Skip to content

Commit a9676d9

Browse files
committedApr 5, 2022
deps: @npmcli/[email protected]
BREAKING CHANGE: this drops support for node10 and non-LTS versions of node 12 and node 14
1 parent 68ec250 commit a9676d9

23 files changed

+459
-10667
lines changed
 

‎.commitlintrc.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* This file is automatically added by @npmcli/template-oss. Do not edit. */
2+
3+
module.exports = {
4+
extends: ['@commitlint/config-conventional'],
5+
rules: {
6+
'type-enum': [2, 'always', ['feat', 'fix', 'docs', 'deps', 'chore']],
7+
'header-max-length': [2, 'always', 80],
8+
'subject-case': [0, 'always', ['lower-case', 'sentence-case', 'start-case']],
9+
},
10+
}

‎.eslintrc.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* This file is automatically added by @npmcli/template-oss. Do not edit. */
2+
3+
const { readdirSync: readdir } = require('fs')
4+
5+
const localConfigs = readdir(__dirname)
6+
.filter((file) => file.startsWith('.eslintrc.local.'))
7+
.map((file) => `./${file}`)
8+
9+
module.exports = {
10+
root: true,
11+
extends: [
12+
'@npmcli',
13+
...localConfigs,
14+
],
15+
}

‎.github/CODEOWNERS

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
* @npm/cli-team

‎.github/ISSUE_TEMPLATE/bug.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
name: Bug
4+
description: File a bug/issue
5+
title: "[BUG] <title>"
6+
labels: [ Bug, Needs Triage ]
7+
8+
body:
9+
- type: checkboxes
10+
attributes:
11+
label: Is there an existing issue for this?
12+
description: Please [search here](./issues) to see if an issue already exists for your problem.
13+
options:
14+
- label: I have searched the existing issues
15+
required: true
16+
- type: textarea
17+
attributes:
18+
label: Current Behavior
19+
description: A clear & concise description of what you're experiencing.
20+
validations:
21+
required: false
22+
- type: textarea
23+
attributes:
24+
label: Expected Behavior
25+
description: A clear & concise description of what you expected to happen.
26+
validations:
27+
required: false
28+
- type: textarea
29+
attributes:
30+
label: Steps To Reproduce
31+
description: Steps to reproduce the behavior.
32+
value: |
33+
1. In this environment...
34+
2. With this config...
35+
3. Run '...'
36+
4. See error...
37+
validations:
38+
required: false
39+
- type: textarea
40+
attributes:
41+
label: Environment
42+
description: |
43+
examples:
44+
- **npm**: 7.6.3
45+
- **Node**: 13.14.0
46+
- **OS**: Ubuntu 20.04
47+
- **platform**: Macbook Pro
48+
value: |
49+
- npm:
50+
- Node:
51+
- OS:
52+
- platform:
53+
validations:
54+
required: false

‎.github/ISSUE_TEMPLATE/config.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
blank_issues_enabled: true

‎.github/dependabot.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
version: 2
4+
5+
updates:
6+
- package-ecosystem: npm
7+
directory: "/"
8+
schedule:
9+
interval: daily
10+
allow:
11+
- dependency-type: direct
12+
versioning-strategy: increase-if-necessary
13+
commit-message:
14+
prefix: deps
15+
prefix-development: chore
16+
labels:
17+
- "Dependencies"

‎.github/workflows/audit.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
name: Audit
4+
5+
on:
6+
workflow_dispatch:
7+
schedule:
8+
# "At 01:00 on Monday" https://crontab.guru/#0_1_*_*_1
9+
- cron: "0 1 * * 1"
10+
11+
jobs:
12+
audit:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Setup git user
17+
run: |
18+
git config --global user.email "ops+npm-cli@npmjs.com"
19+
git config --global user.name "npm cli ops bot"
20+
- uses: actions/setup-node@v3
21+
with:
22+
node-version: 16.x
23+
- name: Update npm to latest
24+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
25+
- run: npm -v
26+
- run: npm i --ignore-scripts --package-lock
27+
- run: npm audit

‎.github/workflows/ci.yml

+73-28
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,86 @@
1-
name: node-ci
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
22

3-
on: [push, pull_request]
3+
name: CI
4+
5+
on:
6+
workflow_dispatch:
7+
pull_request:
8+
branches:
9+
- '*'
10+
push:
11+
branches:
12+
- main
13+
- latest
14+
schedule:
15+
# "At 02:00 on Monday" https://crontab.guru/#0_2_*_*_1
16+
- cron: "0 2 * * 1"
417

518
jobs:
6-
build:
19+
lint:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: Setup git user
24+
run: |
25+
git config --global user.email "ops+npm-cli@npmjs.com"
26+
git config --global user.name "npm cli ops bot"
27+
- uses: actions/setup-node@v3
28+
with:
29+
node-version: 16.x
30+
- name: Update npm to latest
31+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
32+
- run: npm -v
33+
- run: npm i --ignore-scripts
34+
- run: npm run lint
35+
36+
test:
737
strategy:
38+
fail-fast: false
839
matrix:
9-
node-version: [10.0.x, 10.x, 12.0.x, 12.x, 14.0.x, 14.x, 15.x, 16.x]
40+
node-version:
41+
- 12.13.0
42+
- 12.x
43+
- 14.15.0
44+
- 14.x
45+
- 16.0.0
46+
- 16.x
1047
platform:
11-
- os: ubuntu-latest
12-
shell: bash
13-
- os: macos-latest
14-
shell: bash
15-
- os: windows-latest
16-
shell: bash
17-
- os: windows-latest
18-
shell: powershell
19-
48+
- os: ubuntu-latest
49+
shell: bash
50+
- os: macos-latest
51+
shell: bash
52+
- os: windows-latest
53+
shell: cmd
2054
runs-on: ${{ matrix.platform.os }}
2155
defaults:
2256
run:
2357
shell: ${{ matrix.platform.shell }}
24-
2558
steps:
26-
- name: Checkout Repository
27-
uses: actions/checkout@v1.1.0
28-
29-
- name: Use Nodejs ${{ matrix.node-version }}
30-
uses: actions/setup-node@v1
59+
- uses: actions/checkout@v3
60+
- name: Setup git user
61+
run: |
62+
git config --global user.email "ops+npm-cli@npmjs.com"
63+
git config --global user.name "npm cli ops bot"
64+
- uses: actions/setup-node@v3
3165
with:
3266
node-version: ${{ matrix.node-version }}
33-
34-
- name: Update npm
35-
run: npm i -g npm@latest
36-
37-
- name: Install dependencies
38-
run: npm ci
39-
40-
- name: Run Tap Tests
41-
run: npm test
67+
- name: Update to workable npm (windows)
68+
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
69+
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
70+
run: |
71+
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
72+
tar xf npm-7.5.4.tgz
73+
cd package
74+
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
75+
cd ..
76+
rmdir /s /q package
77+
- name: Update npm to 7
78+
# If we do test on npm 10 it needs npm7
79+
if: startsWith(matrix.node-version, '10.')
80+
run: npm i --prefer-online --no-fund --no-audit -g npm@7
81+
- name: Update npm to latest
82+
if: ${{ !startsWith(matrix.node-version, '10.') }}
83+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
84+
- run: npm -v
85+
- run: npm i --ignore-scripts
86+
- run: npm test --ignore-scripts

‎.github/workflows/codeql-analysis.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
name: "CodeQL"
4+
5+
on:
6+
push:
7+
branches:
8+
- main
9+
- latest
10+
pull_request:
11+
# The branches below must be a subset of the branches above
12+
branches:
13+
- main
14+
- latest
15+
schedule:
16+
# "At 03:00 on Monday" https://crontab.guru/#0_3_*_*_1
17+
- cron: "0 3 * * 1"
18+
19+
jobs:
20+
analyze:
21+
name: Analyze
22+
runs-on: ubuntu-latest
23+
permissions:
24+
actions: read
25+
contents: read
26+
security-events: write
27+
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
language: [ javascript ]
32+
33+
steps:
34+
- uses: actions/checkout@v3
35+
- name: Setup git user
36+
run: |
37+
git config --global user.email "ops+npm-cli@npmjs.com"
38+
git config --global user.name "npm cli ops bot"
39+
- name: Initialize CodeQL
40+
uses: github/codeql-action/init@v1
41+
with:
42+
languages: ${{ matrix.language }}
43+
- name: Perform CodeQL Analysis
44+
uses: github/codeql-action/analyze@v1

‎.github/workflows/post-dependabot.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
name: Post Dependabot Actions
4+
5+
on: pull_request
6+
7+
# https://docs.github.com/en/rest/overview/permissions-required-for-github-apps
8+
permissions:
9+
actions: write
10+
contents: write
11+
12+
jobs:
13+
Install:
14+
runs-on: ubuntu-latest
15+
if: github.actor == 'dependabot[bot]'
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Setup git user
19+
run: |
20+
git config --global user.email "ops+npm-cli@npmjs.com"
21+
git config --global user.name "npm cli ops bot"
22+
- uses: actions/setup-node@v3
23+
with:
24+
node-version: 16.x
25+
- name: Update npm to latest
26+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
27+
- run: npm -v
28+
- name: Dependabot metadata
29+
id: metadata
30+
uses: dependabot/fetch-metadata@v1.1.1
31+
with:
32+
github-token: "${{ secrets.GITHUB_TOKEN }}"
33+
- name: npm install and commit
34+
if: contains(steps.metadata.outputs.dependency-names, '@npmcli/template-oss')
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
run: |
38+
gh pr checkout ${{ github.event.pull_request.number }}
39+
npm install --ignore-scripts
40+
npm run template-oss-apply
41+
git add .
42+
git commit -am "chore: postinstall for dependabot template-oss PR"
43+
git push
44+
npm run lint

‎.github/workflows/pull-request.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
name: Pull Request Linting
4+
5+
on:
6+
pull_request:
7+
types:
8+
- opened
9+
- reopened
10+
- edited
11+
- synchronize
12+
13+
jobs:
14+
check:
15+
name: Check PR Title or Commits
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
- name: Setup git user
22+
run: |
23+
git config --global user.email "ops+npm-cli@npmjs.com"
24+
git config --global user.name "npm cli ops bot"
25+
- uses: actions/setup-node@v3
26+
with:
27+
node-version: 16.x
28+
- name: Update npm to latest
29+
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
30+
- run: npm -v
31+
- name: Install deps
32+
run: npm i -D @commitlint/cli @commitlint/config-conventional
33+
- name: Check commits OR PR title
34+
env:
35+
PR_TITLE: ${{ github.event.pull_request.title }}
36+
run: |
37+
npx --offline commitlint -V --from origin/main --to ${{ github.event.pull_request.head.sha }} \
38+
|| echo $PR_TITLE | npx --offline commitlint -V

‎.github/workflows/release-please.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
name: Release Please
4+
5+
on:
6+
push:
7+
branches:
8+
- main
9+
- latest
10+
11+
jobs:
12+
release-please:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: google-github-actions/release-please-action@v3
16+
id: release
17+
with:
18+
release-type: node
19+
changelog-types: >
20+
[
21+
{"type":"feat","section":"Features","hidden":false},
22+
{"type":"fix","section":"Bug Fixes","hidden":false},
23+
{"type":"docs","section":"Documentation","hidden":false},
24+
{"type":"deps","section":"Dependencies","hidden":false},
25+
{"type":"chore","hidden":true}
26+
]

‎.gitignore

+18-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
1-
# ignore everything
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
# ignore everything in the root
24
/*
35

46
# keep these
5-
!.github
7+
!/.eslintrc.local.*
68
!**/.gitignore
7-
!/package.json
8-
!/package-lock.json
9-
!/bin
10-
!/lib
9+
!/docs/
10+
!/tap-snapshots/
11+
!/test/
1112
!/map.js
12-
!/tap-snapshots
13-
!/test
13+
!/scripts/
1414
!/README*
1515
!/LICENSE*
16+
!/CHANGELOG*
17+
!/.commitlintrc.js
18+
!/.eslintrc.js
19+
!/.github/
20+
!/.gitignore
21+
!/.npmrc
22+
!/SECURITY.md
23+
!/bin/
24+
!/lib/
25+
!/package.json

‎.npmrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
; This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
package-lock=false

‎SECURITY.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<!-- This file is automatically added by @npmcli/template-oss. Do not edit. -->
2+
3+
Please send vulnerability reports through [hackerone](https://hackerone.com/github).

‎lib/index.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,15 @@ class PackageJson {
7373
)
7474
}
7575

76-
for (const step of knownSteps)
76+
for (const step of knownSteps) {
7777
this[_manifest] = step({ content, originalContent: this[_manifest] })
78+
}
7879

7980
// unknown properties will just be overwitten
8081
for (const [key, value] of Object.entries(content)) {
81-
if (!knownKeys.has(key))
82+
if (!knownKeys.has(key)) {
8283
this[_manifest][key] = value
84+
}
8385
}
8486

8587
return this
@@ -98,8 +100,9 @@ class PackageJson {
98100
}\n`
99101
.replace(/\n/g, eol)
100102

101-
if (fileContent.trim() !== this[_readFileContent].trim())
103+
if (fileContent.trim() !== this[_readFileContent].trim()) {
102104
return await writeFile(this[_filename], fileContent)
105+
}
103106
}
104107
}
105108

‎lib/update-dependencies.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,28 @@ const updateDependencies = ({ content, originalContent }) => {
2828
// optionalDependencies don't need to be repeated in two places
2929
if (pkg.dependencies) {
3030
if (pkg.optionalDependencies) {
31-
for (const name of Object.keys(pkg.optionalDependencies))
31+
for (const name of Object.keys(pkg.optionalDependencies)) {
3232
delete pkg.dependencies[name]
33+
}
3334
}
3435
}
3536

3637
const result = { ...originalContent }
3738

3839
// loop through all types of dependencies and update package json pkg
3940
for (const type of depTypes) {
40-
if (pkg[type])
41+
if (pkg[type]) {
4142
result[type] = pkg[type]
43+
}
4244

4345
// prune empty type props from resulting object
4446
const emptyDepType =
4547
pkg[type]
4648
&& typeof pkg === 'object'
4749
&& Object.keys(pkg[type]).length === 0
48-
if (emptyDepType)
50+
if (emptyDepType) {
4951
delete result[type]
52+
}
5053
}
5154

5255
// if original package.json had dep in peerDeps AND deps, preserve that.

‎lib/update-scripts.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
const updateScripts = ({ content, originalContent = {} }) => {
22
const newScripts = content.scripts
33

4-
if (!newScripts)
4+
if (!newScripts) {
55
return originalContent
6+
}
67

78
// validate scripts content being appended
89
const hasInvalidScripts = () =>

‎lib/update-workspaces.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
const updateWorkspaces = ({ content, originalContent = {} }) => {
22
const newWorkspaces = content.workspaces
33

4-
if (!newWorkspaces)
4+
if (!newWorkspaces) {
55
return originalContent
6+
}
67

78
// validate workspaces content being appended
89
const hasInvalidWorkspaces = () =>

‎package-lock.json

-10,573
This file was deleted.

‎package.json

+20-6
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@
44
"description": "Programmatic API to update package.json",
55
"main": "lib/index.js",
66
"files": [
7-
"lib"
7+
"bin/",
8+
"lib/"
89
],
910
"scripts": {
1011
"preversion": "npm test",
1112
"postversion": "npm publish",
1213
"prepublishOnly": "git push origin --follow-tags",
1314
"snap": "tap",
1415
"test": "tap",
15-
"npmclilint": "npmcli-lint",
16-
"lint": "npm run npmclilint -- \"lib/*.*js\" \"test/*.*js\"",
16+
"lint": "eslint \"**/*.js\"",
1717
"lintfix": "npm run lint -- --fix",
18-
"posttest": "npm run lint --",
19-
"postsnap": "npm run lintfix --"
18+
"posttest": "npm run lint",
19+
"postsnap": "npm run lintfix --",
20+
"postlint": "template-oss-check",
21+
"template-oss-apply": "template-oss-apply --force"
2022
},
2123
"keywords": [
2224
"npm",
@@ -25,10 +27,22 @@
2527
"author": "GitHub Inc.",
2628
"license": "ISC",
2729
"devDependencies": {
28-
"@npmcli/lint": "^1.0.1",
30+
"@npmcli/eslint-config": "^3.0.1",
31+
"@npmcli/template-oss": "3.2.2",
2932
"tap": "^16.0.1"
3033
},
3134
"dependencies": {
3235
"json-parse-even-better-errors": "^2.3.1"
36+
},
37+
"repository": {
38+
"type": "git",
39+
"url": "https://github.com/npm/package-json.git"
40+
},
41+
"engines": {
42+
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
43+
},
44+
"templateOSS": {
45+
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
46+
"version": "3.2.2"
3347
}
3448
}

‎test/update-dependencies.js

+40-39
Original file line numberDiff line numberDiff line change
@@ -122,49 +122,50 @@ t.test('existing package.json with optionalDependencies', async t => {
122122
)
123123
})
124124

125-
t.test('existing package.json with optionalDependencies and some existing dependencies', async t => {
126-
const result = updateDeps({
127-
content: {
128-
name: 'missing-package-json-optional-test',
129-
version: '1.0.0',
130-
dependencies: {
131-
abbrev: '^1.0.0',
132-
foo: '^1.0.0',
133-
bar: '^1.2.3',
125+
t.test('existing package.json with optionalDependencies and some existing dependencies',
126+
async t => {
127+
const result = updateDeps({
128+
content: {
129+
name: 'missing-package-json-optional-test',
130+
version: '1.0.0',
131+
dependencies: {
132+
abbrev: '^1.0.0',
133+
foo: '^1.0.0',
134+
bar: '^1.2.3',
135+
},
136+
optionalDependencies: {
137+
abbrev: '^1.0.0',
138+
},
134139
},
135-
optionalDependencies: {
136-
abbrev: '^1.0.0',
140+
originalContent: {
141+
name: 'existing-package-json-optional-test',
142+
version: '1.0.0',
143+
bin: './file.js',
144+
funding: 'http://example.com',
145+
dependencies: {
146+
foo: '^1.0.0',
147+
bar: '^1.2.3',
148+
},
137149
},
138-
},
139-
originalContent: {
140-
name: 'existing-package-json-optional-test',
141-
version: '1.0.0',
142-
bin: './file.js',
143-
funding: 'http://example.com',
144-
dependencies: {
145-
foo: '^1.0.0',
146-
bar: '^1.2.3',
150+
})
151+
t.strictSame(
152+
result,
153+
{
154+
name: 'existing-package-json-optional-test',
155+
version: '1.0.0',
156+
bin: './file.js',
157+
funding: 'http://example.com',
158+
dependencies: {
159+
foo: '^1.0.0',
160+
bar: '^1.2.3',
161+
},
162+
optionalDependencies: {
163+
abbrev: '^1.0.0',
164+
},
147165
},
148-
},
166+
'should add only optionalDependencies to result content and preserve original dependencies'
167+
)
149168
})
150-
t.strictSame(
151-
result,
152-
{
153-
name: 'existing-package-json-optional-test',
154-
version: '1.0.0',
155-
bin: './file.js',
156-
funding: 'http://example.com',
157-
dependencies: {
158-
foo: '^1.0.0',
159-
bar: '^1.2.3',
160-
},
161-
optionalDependencies: {
162-
abbrev: '^1.0.0',
163-
},
164-
},
165-
'should add only optionalDependencies to result content and preserve original dependencies'
166-
)
167-
})
168169

169170
t.test('preserve deps duplicated in peer and prod', async t => {
170171
const result = updateDeps({

‎test/update-workspaces.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ t.test('new workspaces content, no originalContent', async t => {
3939

4040
t.test('new workspaces content, some originalContent but no ws', async t => {
4141
const result = updateWorkspaces({
42-
content: { workspaces: ['./packages/*']},
42+
content: { workspaces: ['./packages/*'] },
4343
originalContent: { name: 'foo', version: '1.1.1' },
4444
})
4545
t.strictSame(
@@ -55,7 +55,7 @@ t.test('new workspaces content, some originalContent but no ws', async t => {
5555

5656
t.test('new workspaces content, some originalContent WITH ws', async t => {
5757
const result = updateWorkspaces({
58-
content: { workspaces: ['./a', './b']},
58+
content: { workspaces: ['./a', './b'] },
5959
originalContent: {
6060
name: 'foo',
6161
version: '1.1.1',
@@ -75,7 +75,7 @@ t.test('new workspaces content, some originalContent WITH ws', async t => {
7575

7676
t.test('add new workspace, remove some other one', async t => {
7777
const result = updateWorkspaces({
78-
content: { workspaces: ['foo', 'bar']},
78+
content: { workspaces: ['foo', 'bar'] },
7979
originalContent: {
8080
name: 'foo',
8181
version: '1.1.1',
@@ -96,7 +96,7 @@ t.test('add new workspace, remove some other one', async t => {
9696
t.test('new INVALID workspaces content, some originalContent', async t => {
9797
t.throws(
9898
() => updateWorkspaces({
99-
content: { workspaces: 1234},
99+
content: { workspaces: 1234 },
100100
originalContent: {
101101
name: 'foo',
102102
version: '1.1.1',
@@ -107,7 +107,7 @@ t.test('new INVALID workspaces content, some originalContent', async t => {
107107
)
108108
t.throws(
109109
() => updateWorkspaces({
110-
content: { workspaces: ['a', 'b', 1234]},
110+
content: { workspaces: ['a', 'b', 1234] },
111111
originalContent: {
112112
name: 'foo',
113113
version: '1.1.1',

0 commit comments

Comments
 (0)
Please sign in to comment.