-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- `no-shadow` was disabled for the cli and arborist due to the amount of changes required. These should be fixed later. - Manually updated linting in the cli root to match closer to what template-oss does - Included docs to be managed with template-oss. This required adding an empty test for now, with the plan to add real tests later.
- Loading branch information
1 parent
b48a2bf
commit aac01b8
Showing
114 changed files
with
2,451 additions
and
4,139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const { readdirSync: readdir } = require('fs') | ||
|
||
const localConfigs = readdir(__dirname) | ||
.filter((file) => file.startsWith('.eslintrc.local.')) | ||
.map((file) => `./${file}`) | ||
|
||
module.exports = { | ||
root: true, | ||
extends: [ | ||
'@npmcli', | ||
...localConfigs, | ||
], | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"ignorePatterns": [ | ||
"docs/", | ||
"workspaces/*" | ||
], | ||
"rules": { | ||
"no-shadow": "off", | ||
"no-console": "error" | ||
}, | ||
"overrides": [{ | ||
"files": [ | ||
"scripts/**", | ||
"smoke-tests/**", | ||
"bin/**", | ||
"test/**" | ||
], | ||
"rules": { | ||
"no-console": "off" | ||
} | ||
}] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,53 @@ | ||
name: Node Workspace CI libnpmaccess | ||
# This file is automatically added by @npmcli/template-oss. Do not edit. | ||
|
||
name: CI - libnpmaccess | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- '*' | ||
paths: | ||
- workspaces/libnpmaccess/** | ||
push: | ||
paths: | ||
- workspaces/libnpmaccess/** | ||
branches: | ||
- release-next | ||
- main | ||
- latest | ||
workflow_dispatch: | ||
paths: | ||
- workspaces/libnpmaccess/** | ||
schedule: | ||
# "At 02:00 on Monday" https://crontab.guru/#0_2_*_*_1 | ||
- cron: "0 2 * * 1" | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout the npm/cli repo | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Setup git user | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "npm cli ops bot" | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
- run: npm i --prefer-online -g npm@latest | ||
- run: npm i | ||
- run: npm run lint -w workspaces/libnpmaccess | ||
node-version: 16.x | ||
- name: Update npm to latest | ||
run: npm i --prefer-online --no-fund --no-audit -g npm@latest | ||
- run: npm -v | ||
- run: npm i --ignore-scripts | ||
- run: npm run lint -w libnpmaccess | ||
|
||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x] | ||
node-version: | ||
- 12.13.0 | ||
- 12.x | ||
- 14.15.0 | ||
- 14.x | ||
- 16.0.0 | ||
- 16.x | ||
platform: | ||
- os: ubuntu-latest | ||
shell: bash | ||
|
@@ -42,22 +60,31 @@ jobs: | |
run: | ||
shell: ${{ matrix.platform.shell }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Setup git user | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "npm cli ops bot" | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows | ||
- name: Update to workable npm (windows) | ||
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14')) | ||
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows | ||
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.')) | ||
run: | | ||
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz | ||
tar xf npm-7.5.4.tgz | ||
cd package | ||
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz | ||
cd .. | ||
rmdir /s /q package | ||
- name: Update npm | ||
- name: Update npm to 7 | ||
# If we do test on npm 10 it needs npm7 | ||
if: startsWith(matrix.node-version, '10.') | ||
run: npm i --prefer-online --no-fund --no-audit -g npm@7 | ||
- name: Update npm to latest | ||
if: ${{ !startsWith(matrix.node-version, '10.') }} | ||
run: npm i --prefer-online --no-fund --no-audit -g npm@latest | ||
- run: npm -v | ||
- run: npm i | ||
- run: npm test --ignore-scripts -w workspaces/libnpmaccess | ||
- run: npm i --ignore-scripts | ||
- run: npm test --ignore-scripts -w libnpmaccess |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,53 @@ | ||
name: Node Workspace CI libnpmdiff | ||
# This file is automatically added by @npmcli/template-oss. Do not edit. | ||
|
||
name: CI - libnpmdiff | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- '*' | ||
paths: | ||
- workspaces/libnpmdiff/** | ||
push: | ||
paths: | ||
- workspaces/libnpmdiff/** | ||
branches: | ||
- release-next | ||
- main | ||
- latest | ||
workflow_dispatch: | ||
paths: | ||
- workspaces/libnpmdiff/** | ||
schedule: | ||
# "At 02:00 on Monday" https://crontab.guru/#0_2_*_*_1 | ||
- cron: "0 2 * * 1" | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout the npm/cli repo | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Setup git user | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "npm cli ops bot" | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
- run: npm i --prefer-online -g npm@latest | ||
- run: npm i | ||
- run: npm run lint -w workspaces/libnpmdiff | ||
node-version: 16.x | ||
- name: Update npm to latest | ||
run: npm i --prefer-online --no-fund --no-audit -g npm@latest | ||
- run: npm -v | ||
- run: npm i --ignore-scripts | ||
- run: npm run lint -w libnpmdiff | ||
|
||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x] | ||
node-version: | ||
- 12.13.0 | ||
- 12.x | ||
- 14.15.0 | ||
- 14.x | ||
- 16.0.0 | ||
- 16.x | ||
platform: | ||
- os: ubuntu-latest | ||
shell: bash | ||
|
@@ -42,22 +60,31 @@ jobs: | |
run: | ||
shell: ${{ matrix.platform.shell }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Setup git user | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "npm cli ops bot" | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows | ||
- name: Update to workable npm (windows) | ||
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14')) | ||
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows | ||
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.')) | ||
run: | | ||
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz | ||
tar xf npm-7.5.4.tgz | ||
cd package | ||
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz | ||
cd .. | ||
rmdir /s /q package | ||
- name: Update npm | ||
- name: Update npm to 7 | ||
# If we do test on npm 10 it needs npm7 | ||
if: startsWith(matrix.node-version, '10.') | ||
run: npm i --prefer-online --no-fund --no-audit -g npm@7 | ||
- name: Update npm to latest | ||
if: ${{ !startsWith(matrix.node-version, '10.') }} | ||
run: npm i --prefer-online --no-fund --no-audit -g npm@latest | ||
- run: npm -v | ||
- run: npm i | ||
- run: npm test --ignore-scripts -w workspaces/libnpmdiff | ||
- run: npm i --ignore-scripts | ||
- run: npm test --ignore-scripts -w libnpmdiff |
Oops, something went wrong.