diff --git a/.gitattributes b/.gitattributes index ef4b94f9e45f9..34e0f47668be7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,8 @@ -/node_modules/** linguist-generated=false -/package-lock.json linguist-generated=false +* text=auto +/bin/npm text eol=lf +/bin/npx text eol=lf +*.bat text eol=crlf +*.cmd text eol=crlf +*.tgz binary +/package-lock.json linguist-generated=false +/node_modules/** -text linguist-generated=false diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index fa272ea63ee22..e99b13cb1d5f9 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -29,7 +29,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps -- --package-lock + run: node scripts/resetdeps.js --package-lock - name: Run Production Audit run: node . audit --omit=dev - name: Run Full Audit diff --git a/.github/workflows/ci-libnpmaccess.yml b/.github/workflows/ci-libnpmaccess.yml index e73e76f6cf013..1ab417e396c17 100644 --- a/.github/workflows/ci-libnpmaccess.yml +++ b/.github/workflows/ci-libnpmaccess.yml @@ -38,7 +38,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Lint run: node . run lint --ignore-scripts -w libnpmaccess - name: Post Lint @@ -84,11 +84,10 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test run: node . test --ignore-scripts -w libnpmaccess - name: Check Git Status - if: matrix && matrix.platform.os != 'windows-latest' run: node scripts/git-dirty.js diff --git a/.github/workflows/ci-libnpmdiff.yml b/.github/workflows/ci-libnpmdiff.yml index 02dd24d48c718..d3378619e8deb 100644 --- a/.github/workflows/ci-libnpmdiff.yml +++ b/.github/workflows/ci-libnpmdiff.yml @@ -38,7 +38,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Lint run: node . run lint --ignore-scripts -w libnpmdiff - name: Post Lint @@ -84,11 +84,10 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test run: node . test --ignore-scripts -w libnpmdiff - name: Check Git Status - if: matrix && matrix.platform.os != 'windows-latest' run: node scripts/git-dirty.js diff --git a/.github/workflows/ci-libnpmexec.yml b/.github/workflows/ci-libnpmexec.yml index 5f73f3bf05b9c..7356ddeb9cbdb 100644 --- a/.github/workflows/ci-libnpmexec.yml +++ b/.github/workflows/ci-libnpmexec.yml @@ -38,7 +38,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Lint run: node . run lint --ignore-scripts -w libnpmexec - name: Post Lint @@ -84,11 +84,10 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test run: node . test --ignore-scripts -w libnpmexec - name: Check Git Status - if: matrix && matrix.platform.os != 'windows-latest' run: node scripts/git-dirty.js diff --git a/.github/workflows/ci-libnpmfund.yml b/.github/workflows/ci-libnpmfund.yml index 114446ace98fe..5bccfcbcc85a6 100644 --- a/.github/workflows/ci-libnpmfund.yml +++ b/.github/workflows/ci-libnpmfund.yml @@ -38,7 +38,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Lint run: node . run lint --ignore-scripts -w libnpmfund - name: Post Lint @@ -84,11 +84,10 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test run: node . test --ignore-scripts -w libnpmfund - name: Check Git Status - if: matrix && matrix.platform.os != 'windows-latest' run: node scripts/git-dirty.js diff --git a/.github/workflows/ci-libnpmhook.yml b/.github/workflows/ci-libnpmhook.yml index 414e122591cca..77c0650e46a7d 100644 --- a/.github/workflows/ci-libnpmhook.yml +++ b/.github/workflows/ci-libnpmhook.yml @@ -38,7 +38,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Lint run: node . run lint --ignore-scripts -w libnpmhook - name: Post Lint @@ -84,11 +84,10 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test run: node . test --ignore-scripts -w libnpmhook - name: Check Git Status - if: matrix && matrix.platform.os != 'windows-latest' run: node scripts/git-dirty.js diff --git a/.github/workflows/ci-libnpmorg.yml b/.github/workflows/ci-libnpmorg.yml index 89140eed3cd11..59f66d3830502 100644 --- a/.github/workflows/ci-libnpmorg.yml +++ b/.github/workflows/ci-libnpmorg.yml @@ -38,7 +38,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Lint run: node . run lint --ignore-scripts -w libnpmorg - name: Post Lint @@ -84,11 +84,10 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test run: node . test --ignore-scripts -w libnpmorg - name: Check Git Status - if: matrix && matrix.platform.os != 'windows-latest' run: node scripts/git-dirty.js diff --git a/.github/workflows/ci-libnpmpack.yml b/.github/workflows/ci-libnpmpack.yml index 2f9e787941395..8584ffe824d36 100644 --- a/.github/workflows/ci-libnpmpack.yml +++ b/.github/workflows/ci-libnpmpack.yml @@ -38,7 +38,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Lint run: node . run lint --ignore-scripts -w libnpmpack - name: Post Lint @@ -84,11 +84,10 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test run: node . test --ignore-scripts -w libnpmpack - name: Check Git Status - if: matrix && matrix.platform.os != 'windows-latest' run: node scripts/git-dirty.js diff --git a/.github/workflows/ci-libnpmpublish.yml b/.github/workflows/ci-libnpmpublish.yml index cbd72f52d4f58..df7f2678db358 100644 --- a/.github/workflows/ci-libnpmpublish.yml +++ b/.github/workflows/ci-libnpmpublish.yml @@ -38,7 +38,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Lint run: node . run lint --ignore-scripts -w libnpmpublish - name: Post Lint @@ -84,11 +84,10 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test run: node . test --ignore-scripts -w libnpmpublish - name: Check Git Status - if: matrix && matrix.platform.os != 'windows-latest' run: node scripts/git-dirty.js diff --git a/.github/workflows/ci-libnpmsearch.yml b/.github/workflows/ci-libnpmsearch.yml index 7c11951b8c858..05fa1ef5f088a 100644 --- a/.github/workflows/ci-libnpmsearch.yml +++ b/.github/workflows/ci-libnpmsearch.yml @@ -38,7 +38,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Lint run: node . run lint --ignore-scripts -w libnpmsearch - name: Post Lint @@ -84,11 +84,10 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test run: node . test --ignore-scripts -w libnpmsearch - name: Check Git Status - if: matrix && matrix.platform.os != 'windows-latest' run: node scripts/git-dirty.js diff --git a/.github/workflows/ci-libnpmteam.yml b/.github/workflows/ci-libnpmteam.yml index c89c09fcf12b1..ff72d447d79ea 100644 --- a/.github/workflows/ci-libnpmteam.yml +++ b/.github/workflows/ci-libnpmteam.yml @@ -38,7 +38,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Lint run: node . run lint --ignore-scripts -w libnpmteam - name: Post Lint @@ -84,11 +84,10 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test run: node . test --ignore-scripts -w libnpmteam - name: Check Git Status - if: matrix && matrix.platform.os != 'windows-latest' run: node scripts/git-dirty.js diff --git a/.github/workflows/ci-libnpmversion.yml b/.github/workflows/ci-libnpmversion.yml index 6fa4a45b4c4dd..7922c847a2c7f 100644 --- a/.github/workflows/ci-libnpmversion.yml +++ b/.github/workflows/ci-libnpmversion.yml @@ -38,7 +38,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Lint run: node . run lint --ignore-scripts -w libnpmversion - name: Post Lint @@ -84,11 +84,10 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test run: node . test --ignore-scripts -w libnpmversion - name: Check Git Status - if: matrix && matrix.platform.os != 'windows-latest' run: node scripts/git-dirty.js diff --git a/.github/workflows/ci-npmcli-arborist.yml b/.github/workflows/ci-npmcli-arborist.yml index e1a7f82a04549..fb8118bc8c155 100644 --- a/.github/workflows/ci-npmcli-arborist.yml +++ b/.github/workflows/ci-npmcli-arborist.yml @@ -38,7 +38,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Lint run: node . run lint --ignore-scripts -w @npmcli/arborist - name: Post Lint @@ -84,11 +84,10 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test run: node . test --ignore-scripts -w @npmcli/arborist - name: Check Git Status - if: matrix && matrix.platform.os != 'windows-latest' run: node scripts/git-dirty.js diff --git a/.github/workflows/ci-npmcli-config.yml b/.github/workflows/ci-npmcli-config.yml index 72cc302e721ad..11d573a796824 100644 --- a/.github/workflows/ci-npmcli-config.yml +++ b/.github/workflows/ci-npmcli-config.yml @@ -38,7 +38,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Lint run: node . run lint --ignore-scripts -w @npmcli/config - name: Post Lint @@ -84,11 +84,10 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test run: node . test --ignore-scripts -w @npmcli/config - name: Check Git Status - if: matrix && matrix.platform.os != 'windows-latest' run: node scripts/git-dirty.js diff --git a/.github/workflows/ci-npmcli-docs.yml b/.github/workflows/ci-npmcli-docs.yml index 017d354a538fc..d88bc4c606506 100644 --- a/.github/workflows/ci-npmcli-docs.yml +++ b/.github/workflows/ci-npmcli-docs.yml @@ -38,7 +38,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Lint run: node . run lint --ignore-scripts -w @npmcli/docs - name: Post Lint @@ -79,13 +79,12 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test run: node . test --ignore-scripts -w @npmcli/docs - name: Check Git Status - if: matrix && matrix.platform.os != 'windows-latest' run: node scripts/git-dirty.js compare-docs: @@ -110,7 +109,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Build Docs run: | node . run build -w docs @@ -121,7 +120,7 @@ jobs: run: | git clean -fd git checkout ${{ github.event.pull_request.base.ref }} - node . run resetdeps + node scripts/resetdeps.js node . run build -w docs - name: Diff Man run: diff -r --color=always man/ man-update/ || true diff --git a/.github/workflows/ci-npmcli-mock-globals.yml b/.github/workflows/ci-npmcli-mock-globals.yml index 60f85f7c7795f..ff7c52faba7c9 100644 --- a/.github/workflows/ci-npmcli-mock-globals.yml +++ b/.github/workflows/ci-npmcli-mock-globals.yml @@ -38,7 +38,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Lint run: node . run lint --ignore-scripts -w @npmcli/mock-globals - name: Post Lint @@ -84,11 +84,10 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test run: node . test --ignore-scripts -w @npmcli/mock-globals - name: Check Git Status - if: matrix && matrix.platform.os != 'windows-latest' run: node scripts/git-dirty.js diff --git a/.github/workflows/ci-npmcli-mock-registry.yml b/.github/workflows/ci-npmcli-mock-registry.yml index db394f789c9f8..33f9ca9c4febc 100644 --- a/.github/workflows/ci-npmcli-mock-registry.yml +++ b/.github/workflows/ci-npmcli-mock-registry.yml @@ -38,7 +38,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Lint run: node . run lint --ignore-scripts -w @npmcli/mock-registry - name: Post Lint @@ -84,11 +84,10 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test run: node . test --ignore-scripts -w @npmcli/mock-registry - name: Check Git Status - if: matrix && matrix.platform.os != 'windows-latest' run: node scripts/git-dirty.js diff --git a/.github/workflows/ci-npmcli-smoke-tests.yml b/.github/workflows/ci-npmcli-smoke-tests.yml index d6103908fcff7..155972307a316 100644 --- a/.github/workflows/ci-npmcli-smoke-tests.yml +++ b/.github/workflows/ci-npmcli-smoke-tests.yml @@ -38,7 +38,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Lint run: node . run lint --ignore-scripts -w @npmcli/smoke-tests - name: Post Lint @@ -84,11 +84,10 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test run: node . test --ignore-scripts -w @npmcli/smoke-tests - name: Check Git Status - if: matrix && matrix.platform.os != 'windows-latest' run: node scripts/git-dirty.js diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index 821d4a37368a3..71585adafa246 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -84,7 +84,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Lint run: node . run lint --ignore-scripts -ws -iwr --if-present - name: Post Lint @@ -182,13 +182,12 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test run: node . test --ignore-scripts -ws -iwr --if-present - name: Check Git Status - if: matrix && matrix.platform.os != 'windows-latest' run: node scripts/git-dirty.js - name: Conclude Check uses: LouisBrunner/checks-action@v1.3.1 @@ -284,7 +283,7 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Pack env: SMOKE_PUBLISH_NPM: 1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 485b9bc9245c9..0c1261e5f64aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Lint run: node . run lint --ignore-scripts - name: Post Lint @@ -92,13 +92,12 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test run: node . test --ignore-scripts - name: Check Git Status - if: matrix && matrix.platform.os != 'windows-latest' run: node scripts/git-dirty.js licenses: @@ -121,7 +120,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Check Licenses run: node . run licenses @@ -145,7 +144,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Run Smoke Tests run: node . test -w smoke-tests --ignore-scripts - name: Check Git Status diff --git a/.github/workflows/create-node-pr.yml b/.github/workflows/create-node-pr.yml index f5cb5e88c8c2a..c590b5165d174 100644 --- a/.github/workflows/create-node-pr.yml +++ b/.github/workflows/create-node-pr.yml @@ -39,7 +39,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Checkout Node uses: actions/checkout@v3 with: diff --git a/.github/workflows/node-integration.yml b/.github/workflows/node-integration.yml index 64d7894f4934d..49beea2115d6f 100644 --- a/.github/workflows/node-integration.yml +++ b/.github/workflows/node-integration.yml @@ -106,7 +106,7 @@ jobs: echo "::group::packing npm release $npmVersion" pushd "$npmDir" >/dev/null - node . run resetdeps + node scripts/resetdeps.js npmtarball="$(node . pack --loglevel=silent --json | jq -r .[0].filename)" tar czf "$npmFile" -C "$npmDir" . popd >/dev/null @@ -204,7 +204,7 @@ jobs: echo "::endgroup::" echo "::group::npm run resetdeps" - node . run resetdeps + node scripts/resetdeps.js echo "::endgroup::" echo "::group::npm link" diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index c0c46fc557a80..83b19aab37556 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -33,7 +33,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Run Commitlint on Commits id: commit continue-on-error: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 35f09773b1ea0..16bdf850492bd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,7 +48,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Release Please id: release env: @@ -158,7 +158,7 @@ jobs: node-version: 18.x cache: npm - name: Reset Deps - run: node . run resetdeps + run: node scripts/resetdeps.js - name: Run Post Pull Request Actions env: RELEASE_PR_NUMBER: ${{ needs.release.outputs.pr-number }} diff --git a/bin/npm.cmd b/bin/npm.cmd index f111c59d1efb6..880554dcdd686 100755 --- a/bin/npm.cmd +++ b/bin/npm.cmd @@ -1,19 +1,19 @@ -:: Created by npm, please don't edit manually. -@ECHO OFF - -SETLOCAL - -SET "NODE_EXE=%~dp0\node.exe" -IF NOT EXIST "%NODE_EXE%" ( - SET "NODE_EXE=node" -) - -SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" -FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( - SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js" -) -IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" ( - SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%" -) - -"%NODE_EXE%" "%NPM_CLI_JS%" %* +:: Created by npm, please don't edit manually. +@ECHO OFF + +SETLOCAL + +SET "NODE_EXE=%~dp0\node.exe" +IF NOT EXIST "%NODE_EXE%" ( + SET "NODE_EXE=node" +) + +SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" +FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( + SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js" +) +IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" ( + SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%" +) + +"%NODE_EXE%" "%NPM_CLI_JS%" %* diff --git a/bin/npx.cmd b/bin/npx.cmd index b79518ec50540..9339ebd065282 100755 --- a/bin/npx.cmd +++ b/bin/npx.cmd @@ -1,20 +1,20 @@ -:: Created by npm, please don't edit manually. -@ECHO OFF - -SETLOCAL - -SET "NODE_EXE=%~dp0\node.exe" -IF NOT EXIST "%NODE_EXE%" ( - SET "NODE_EXE=node" -) - -SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" -SET "NPX_CLI_JS=%~dp0\node_modules\npm\bin\npx-cli.js" -FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( - SET "NPM_PREFIX_NPX_CLI_JS=%%F\node_modules\npm\bin\npx-cli.js" -) -IF EXIST "%NPM_PREFIX_NPX_CLI_JS%" ( - SET "NPX_CLI_JS=%NPM_PREFIX_NPX_CLI_JS%" -) - -"%NODE_EXE%" "%NPX_CLI_JS%" %* +:: Created by npm, please don't edit manually. +@ECHO OFF + +SETLOCAL + +SET "NODE_EXE=%~dp0\node.exe" +IF NOT EXIST "%NODE_EXE%" ( + SET "NODE_EXE=node" +) + +SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" +SET "NPX_CLI_JS=%~dp0\node_modules\npm\bin\npx-cli.js" +FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( + SET "NPM_PREFIX_NPX_CLI_JS=%%F\node_modules\npm\bin\npx-cli.js" +) +IF EXIST "%NPM_PREFIX_NPX_CLI_JS%" ( + SET "NPX_CLI_JS=%NPM_PREFIX_NPX_CLI_JS%" +) + +"%NODE_EXE%" "%NPX_CLI_JS%" %* diff --git a/node_modules/.gitignore b/node_modules/.gitignore index a32136b521357..2ae24fcf8a16f 100644 --- a/node_modules/.gitignore +++ b/node_modules/.gitignore @@ -18,8 +18,6 @@ !/@isaacs/string-locale-compare !/@npmcli/ /@npmcli/* -!/@npmcli/arborist -!/@npmcli/config !/@npmcli/disparity-colors !/@npmcli/fs !/@npmcli/git @@ -138,17 +136,6 @@ !/jsonparse !/just-diff-apply !/just-diff -!/libnpmaccess -!/libnpmdiff -!/libnpmexec -!/libnpmfund -!/libnpmhook -!/libnpmorg -!/libnpmpack -!/libnpmpublish -!/libnpmsearch -!/libnpmteam -!/libnpmversion !/lru-cache !/make-fetch-happen !/minimatch @@ -330,3 +317,5 @@ __pycache__ .gitkeep *.map *.ts +*.png +*.jpg diff --git a/node_modules/@npmcli/arborist b/node_modules/@npmcli/arborist deleted file mode 120000 index a2d3e8bbf4641..0000000000000 --- a/node_modules/@npmcli/arborist +++ /dev/null @@ -1 +0,0 @@ -../../workspaces/arborist \ No newline at end of file diff --git a/node_modules/@npmcli/config b/node_modules/@npmcli/config deleted file mode 120000 index bf09f370d87e3..0000000000000 --- a/node_modules/@npmcli/config +++ /dev/null @@ -1 +0,0 @@ -../../workspaces/config \ No newline at end of file diff --git a/node_modules/@npmcli/run-script/lib/node-gyp-bin/node-gyp.cmd b/node_modules/@npmcli/run-script/lib/node-gyp-bin/node-gyp.cmd index 4c6987ac9868b..a59f0c4f9722e 100755 --- a/node_modules/@npmcli/run-script/lib/node-gyp-bin/node-gyp.cmd +++ b/node_modules/@npmcli/run-script/lib/node-gyp-bin/node-gyp.cmd @@ -1 +1 @@ -@node "%npm_config_node_gyp%" %* +@node "%npm_config_node_gyp%" %* diff --git a/node_modules/cmd-shim/lib/to-batch-syntax.js b/node_modules/cmd-shim/lib/to-batch-syntax.js index 86a3f01405de5..23e6ad28c4f82 100644 --- a/node_modules/cmd-shim/lib/to-batch-syntax.js +++ b/node_modules/cmd-shim/lib/to-batch-syntax.js @@ -1,49 +1,49 @@ -exports.replaceDollarWithPercentPair = replaceDollarWithPercentPair -exports.convertToSetCommand = convertToSetCommand -exports.convertToSetCommands = convertToSetCommands - -function convertToSetCommand (key, value) { - var line = '' - key = key || '' - key = key.trim() - value = value || '' - value = value.trim() - if (key && value && value.length > 0) { - line = '@SET ' + key + '=' + replaceDollarWithPercentPair(value) + '\r\n' - } - return line -} - -function extractVariableValuePairs (declarations) { - var pairs = {} - declarations.map(function (declaration) { - var split = declaration.split('=') - pairs[split[0]] = split[1] - }) - return pairs -} - -function convertToSetCommands (variableString) { - var variableValuePairs = extractVariableValuePairs(variableString.split(' ')) - var variableDeclarationsAsBatch = '' - Object.keys(variableValuePairs).forEach(function (key) { - variableDeclarationsAsBatch += convertToSetCommand(key, variableValuePairs[key]) - }) - return variableDeclarationsAsBatch -} - -function replaceDollarWithPercentPair (value) { - var dollarExpressions = /\$\{?([^$@#?\- \t{}:]+)\}?/g - var result = '' - var startIndex = 0 - do { - var match = dollarExpressions.exec(value) - if (match) { - var betweenMatches = value.substring(startIndex, match.index) || '' - result += betweenMatches + '%' + match[1] + '%' - startIndex = dollarExpressions.lastIndex - } - } while (dollarExpressions.lastIndex > 0) - result += value.slice(startIndex) - return result -} +exports.replaceDollarWithPercentPair = replaceDollarWithPercentPair +exports.convertToSetCommand = convertToSetCommand +exports.convertToSetCommands = convertToSetCommands + +function convertToSetCommand (key, value) { + var line = '' + key = key || '' + key = key.trim() + value = value || '' + value = value.trim() + if (key && value && value.length > 0) { + line = '@SET ' + key + '=' + replaceDollarWithPercentPair(value) + '\r\n' + } + return line +} + +function extractVariableValuePairs (declarations) { + var pairs = {} + declarations.map(function (declaration) { + var split = declaration.split('=') + pairs[split[0]] = split[1] + }) + return pairs +} + +function convertToSetCommands (variableString) { + var variableValuePairs = extractVariableValuePairs(variableString.split(' ')) + var variableDeclarationsAsBatch = '' + Object.keys(variableValuePairs).forEach(function (key) { + variableDeclarationsAsBatch += convertToSetCommand(key, variableValuePairs[key]) + }) + return variableDeclarationsAsBatch +} + +function replaceDollarWithPercentPair (value) { + var dollarExpressions = /\$\{?([^$@#?\- \t{}:]+)\}?/g + var result = '' + var startIndex = 0 + do { + var match = dollarExpressions.exec(value) + if (match) { + var betweenMatches = value.substring(startIndex, match.index) || '' + result += betweenMatches + '%' + match[1] + '%' + startIndex = dollarExpressions.lastIndex + } + } while (dollarExpressions.lastIndex > 0) + result += value.slice(startIndex) + return result +} diff --git a/node_modules/color-name/LICENSE b/node_modules/color-name/LICENSE index c6b10012540c2..4d9802a89e299 100644 --- a/node_modules/color-name/LICENSE +++ b/node_modules/color-name/LICENSE @@ -1,8 +1,8 @@ -The MIT License (MIT) -Copyright (c) 2015 Dmitry Ivanov - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - +The MIT License (MIT) +Copyright (c) 2015 Dmitry Ivanov + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/color-name/index.js b/node_modules/color-name/index.js index b7c198a6f3d7c..e42aa68a542d9 100644 --- a/node_modules/color-name/index.js +++ b/node_modules/color-name/index.js @@ -1,152 +1,152 @@ -'use strict' - -module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] -}; +'use strict' + +module.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; diff --git a/node_modules/color-name/package.json b/node_modules/color-name/package.json index 782dd82878030..7acc90285c96f 100644 --- a/node_modules/color-name/package.json +++ b/node_modules/color-name/package.json @@ -1,28 +1,28 @@ -{ - "name": "color-name", - "version": "1.1.4", - "description": "A list of color names and its values", - "main": "index.js", - "files": [ - "index.js" - ], - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git@github.com:colorjs/color-name.git" - }, - "keywords": [ - "color-name", - "color", - "color-keyword", - "keyword" - ], - "author": "DY ", - "license": "MIT", - "bugs": { - "url": "https://github.com/colorjs/color-name/issues" - }, - "homepage": "https://github.com/colorjs/color-name" -} +{ + "name": "color-name", + "version": "1.1.4", + "description": "A list of color names and its values", + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "git@github.com:colorjs/color-name.git" + }, + "keywords": [ + "color-name", + "color", + "color-keyword", + "keyword" + ], + "author": "DY ", + "license": "MIT", + "bugs": { + "url": "https://github.com/colorjs/color-name/issues" + }, + "homepage": "https://github.com/colorjs/color-name" +} diff --git a/node_modules/libnpmaccess b/node_modules/libnpmaccess deleted file mode 120000 index b3a138bb62b43..0000000000000 --- a/node_modules/libnpmaccess +++ /dev/null @@ -1 +0,0 @@ -../workspaces/libnpmaccess \ No newline at end of file diff --git a/node_modules/libnpmdiff b/node_modules/libnpmdiff deleted file mode 120000 index 70ab2f9c6bbee..0000000000000 --- a/node_modules/libnpmdiff +++ /dev/null @@ -1 +0,0 @@ -../workspaces/libnpmdiff \ No newline at end of file diff --git a/node_modules/libnpmexec b/node_modules/libnpmexec deleted file mode 120000 index 6fc0a19cf63a4..0000000000000 --- a/node_modules/libnpmexec +++ /dev/null @@ -1 +0,0 @@ -../workspaces/libnpmexec \ No newline at end of file diff --git a/node_modules/libnpmfund b/node_modules/libnpmfund deleted file mode 120000 index d82688b40a0f8..0000000000000 --- a/node_modules/libnpmfund +++ /dev/null @@ -1 +0,0 @@ -../workspaces/libnpmfund \ No newline at end of file diff --git a/node_modules/libnpmhook b/node_modules/libnpmhook deleted file mode 120000 index 2c01b4ad01384..0000000000000 --- a/node_modules/libnpmhook +++ /dev/null @@ -1 +0,0 @@ -../workspaces/libnpmhook \ No newline at end of file diff --git a/node_modules/libnpmorg b/node_modules/libnpmorg deleted file mode 120000 index 6b2e24155f1ab..0000000000000 --- a/node_modules/libnpmorg +++ /dev/null @@ -1 +0,0 @@ -../workspaces/libnpmorg \ No newline at end of file diff --git a/node_modules/libnpmpack b/node_modules/libnpmpack deleted file mode 120000 index e6c52f5106c6d..0000000000000 --- a/node_modules/libnpmpack +++ /dev/null @@ -1 +0,0 @@ -../workspaces/libnpmpack \ No newline at end of file diff --git a/node_modules/libnpmpublish b/node_modules/libnpmpublish deleted file mode 120000 index ed6ad89c30934..0000000000000 --- a/node_modules/libnpmpublish +++ /dev/null @@ -1 +0,0 @@ -../workspaces/libnpmpublish \ No newline at end of file diff --git a/node_modules/libnpmsearch b/node_modules/libnpmsearch deleted file mode 120000 index db3ba8d84df37..0000000000000 --- a/node_modules/libnpmsearch +++ /dev/null @@ -1 +0,0 @@ -../workspaces/libnpmsearch \ No newline at end of file diff --git a/node_modules/libnpmteam b/node_modules/libnpmteam deleted file mode 120000 index 3445d078310a9..0000000000000 --- a/node_modules/libnpmteam +++ /dev/null @@ -1 +0,0 @@ -../workspaces/libnpmteam \ No newline at end of file diff --git a/node_modules/libnpmversion b/node_modules/libnpmversion deleted file mode 120000 index 28738cfa6bcfc..0000000000000 --- a/node_modules/libnpmversion +++ /dev/null @@ -1 +0,0 @@ -../workspaces/libnpmversion \ No newline at end of file diff --git a/node_modules/node-gyp/gyp/gyp.bat b/node_modules/node-gyp/gyp/gyp.bat index c0b4ca24e5df0..ad797c30814fb 100755 --- a/node_modules/node-gyp/gyp/gyp.bat +++ b/node_modules/node-gyp/gyp/gyp.bat @@ -1,5 +1,5 @@ -@rem Copyright (c) 2009 Google Inc. All rights reserved. -@rem Use of this source code is governed by a BSD-style license that can be -@rem found in the LICENSE file. - -@python "%~dp0gyp_main.py" %* +@rem Copyright (c) 2009 Google Inc. All rights reserved. +@rem Use of this source code is governed by a BSD-style license that can be +@rem found in the LICENSE file. + +@python "%~dp0gyp_main.py" %* diff --git a/node_modules/qrcode-terminal/example/basic.png b/node_modules/qrcode-terminal/example/basic.png deleted file mode 100644 index 2ab5c226f4311..0000000000000 Binary files a/node_modules/qrcode-terminal/example/basic.png and /dev/null differ diff --git a/scripts/bundle-and-gitignore-deps.js b/scripts/bundle-and-gitignore-deps.js index 7e65064ceda3a..b7e991ddbb36d 100644 --- a/scripts/bundle-and-gitignore-deps.js +++ b/scripts/bundle-and-gitignore-deps.js @@ -3,7 +3,7 @@ const packlist = require('npm-packlist') const { join, relative } = require('path') const localeCompare = require('@isaacs/string-locale-compare')('en') const PackageJson = require('@npmcli/package-json') -const { run, CWD, git, fs } = require('./util') +const { run, CWD, git, fs, pkg: rootPkg } = require('./util') const npmGit = require('@npmcli/git') const ALWAYS_IGNORE = ` @@ -39,6 +39,8 @@ __pycache__ .gitkeep *.map *.ts +*.png +*.jpg ` const lsAndRmIgnored = async (dir) => { @@ -70,15 +72,6 @@ const lsAndRmIgnored = async (dir) => { } const getAllowedPaths = (files) => { - // Get all files within node_modules and remove - // the node_modules/ portion of the path for processing - // since this list will go inside a gitignore at the - // root of the node_modules dir - const nmFiles = files - .filter(f => f.startsWith('node_modules/')) - .map(f => f.replace(/^node_modules\//, '')) - .sort(localeCompare) - class AllowSegments { #segments #usedSegments @@ -177,7 +170,7 @@ const getAllowedPaths = (files) => { } const allowPaths = new Set() - for (const file of nmFiles) { + for (const file of files) { for (const allow of gatherAllows(file.split('/'))) { allowPaths.add(allow) } @@ -214,7 +207,19 @@ const main = async () => { await setBundleDeps() const arb = new Arborist({ path: CWD }) - const files = await arb.loadActual().then(packlist) + const allFiles = await arb.loadActual().then(packlist) + const workspaceNames = (await rootPkg.mapWorkspaces()).map(p => p.name) + const isWorkspace = (p) => workspaceNames.some(w => p.startsWith(w + '/')) + + // Get all files within node_modules and remove the node_modules/ portion of + // the path for processing since this list will go inside a gitignore at the + // root of the node_modules dir. It also removes workspaces since those are + // symlinks and should not be commited into source control. + const files = allFiles + .filter(f => f.startsWith('node_modules/')) + .map(f => f.replace(/^node_modules\//, '')) + .filter(f => !isWorkspace(f)) + .sort(localeCompare) const ignoreFile = [ '# Automatically generated to ignore everything except bundled deps', diff --git a/scripts/resetdeps.js b/scripts/resetdeps.js index 083c57e11a693..c9ddba5319f95 100644 --- a/scripts/resetdeps.js +++ b/scripts/resetdeps.js @@ -1,9 +1,18 @@ - const { join } = require('path') +const { symlink } = require('fs/promises') const { CWD, run, pkg, fs, git, npm } = require('./util.js') const ciInfo = require('ci-info') -const checkout = () => git('checkout', 'node_modules/') +const cleanup = async () => { + await git('checkout', 'node_modules/') + for (const { name, path, pkg: wsPkg } of await pkg.mapWorkspaces()) { + if (!wsPkg.private) { + // add symlinks similar to how arborist does for our production + // workspaces, so they are in place before the initial install. + await symlink(path, join(CWD, 'node_modules', name), 'junction') + } + } +} const main = async ({ packageLock }) => { await fs.rimraf(join(CWD, 'node_modules')) @@ -11,7 +20,7 @@ const main = async ({ packageLock }) => { await fs.rimraf(join(path, 'node_modules')) } - await checkout() + await cleanup() await npm('i', '--ignore-scripts', '--no-audit', '--no-fund', packageLock && '--package-lock') await npm('rebuild', '--ignore-scripts') if (!ciInfo.isCI) { @@ -19,4 +28,4 @@ const main = async ({ packageLock }) => { } } -run(main).catch(checkout) +run(main).catch(cleanup) diff --git a/scripts/template-oss/_step-deps.yml b/scripts/template-oss/_step-deps.yml index 22f8d00c7a6fd..09b532301962d 100644 --- a/scripts/template-oss/_step-deps.yml +++ b/scripts/template-oss/_step-deps.yml @@ -1,2 +1,2 @@ - name: Reset Deps - run: {{rootNpmPath}} run resetdeps {{~#if jobDepFlags}} -- {{ jobDepFlags }}{{/if}} + run: node scripts/resetdeps.js {{~#if jobDepFlags}} {{ jobDepFlags }}{{/if}} diff --git a/scripts/template-oss/_step-test.yml b/scripts/template-oss/_step-test.yml index 9471e6a5a4f55..f46e11cdc39fd 100644 --- a/scripts/template-oss/_step-test.yml +++ b/scripts/template-oss/_step-test.yml @@ -1,4 +1,3 @@ {{> defaultStepTest }} - name: Check Git Status - if: matrix && matrix.platform.os != 'windows-latest' run: node scripts/git-dirty.js diff --git a/scripts/template-oss/ci-npmcli-docs.yml b/scripts/template-oss/ci-npmcli-docs.yml index 1e3cd054262d3..82397433e0671 100644 --- a/scripts/template-oss/ci-npmcli-docs.yml +++ b/scripts/template-oss/ci-npmcli-docs.yml @@ -12,7 +12,7 @@ run: | git clean -fd git checkout $\{{ github.event.pull_request.base.ref }} - node . run resetdeps + node scripts/resetdeps.js node . run build -w docs - name: Diff Man run: diff -r --color=always man/ man-update/ || true diff --git a/scripts/template-oss/node-integration.yml b/scripts/template-oss/node-integration.yml index 4513ab0e43d72..4632aae9aa98e 100644 --- a/scripts/template-oss/node-integration.yml +++ b/scripts/template-oss/node-integration.yml @@ -104,7 +104,7 @@ jobs: echo "::group::packing npm release $npmVersion" pushd "$npmDir" >/dev/null - node . run resetdeps + node scripts/resetdeps.js npmtarball="$(node . pack --loglevel=silent --json | jq -r .[0].filename)" tar czf "$npmFile" -C "$npmDir" . popd >/dev/null @@ -202,7 +202,7 @@ jobs: echo "::endgroup::" echo "::group::npm run resetdeps" - node . run resetdeps + node scripts/resetdeps.js echo "::endgroup::" echo "::group::npm link" diff --git a/workspaces/arborist/test/fixtures/tap-with-yarn-lock/node_modules/json-schema/package.json b/workspaces/arborist/test/fixtures/tap-with-yarn-lock/node_modules/json-schema/package.json index b9b7bac836bce..b010571dd952c 100644 --- a/workspaces/arborist/test/fixtures/tap-with-yarn-lock/node_modules/json-schema/package.json +++ b/workspaces/arborist/test/fixtures/tap-with-yarn-lock/node_modules/json-schema/package.json @@ -1,31 +1,31 @@ -{ - "name": "json-schema", - "version": "0.2.3", - "author": "Kris Zyp", - "description": "JSON Schema validation and specifications", - "maintainers":[ - {"name": "Kris Zyp", "email": "kriszyp@gmail.com"}], - "keywords": [ - "json", - "schema" - ], - "licenses": [ - { - "type": "AFLv2.1", - "url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L43" - }, - { - "type": "BSD", - "url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L13" - } - ], - "repository": { - "type":"git", - "url":"http://github.com/kriszyp/json-schema" - }, - "directories": { "lib": "./lib" }, - "main": "./lib/validate.js", - "devDependencies": { "vows": "*" }, - "scripts": { "test": "echo TESTS DISABLED vows --spec test/*.js" } -} - +{ + "name": "json-schema", + "version": "0.2.3", + "author": "Kris Zyp", + "description": "JSON Schema validation and specifications", + "maintainers":[ + {"name": "Kris Zyp", "email": "kriszyp@gmail.com"}], + "keywords": [ + "json", + "schema" + ], + "licenses": [ + { + "type": "AFLv2.1", + "url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L43" + }, + { + "type": "BSD", + "url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L13" + } + ], + "repository": { + "type":"git", + "url":"http://github.com/kriszyp/json-schema" + }, + "directories": { "lib": "./lib" }, + "main": "./lib/validate.js", + "devDependencies": { "vows": "*" }, + "scripts": { "test": "echo TESTS DISABLED vows --spec test/*.js" } +} +