diff --git a/.github/ISSUE_TEMPLATE/bug_9.yml b/.github/ISSUE_TEMPLATE/bug_9.yml new file mode 100644 index 0000000000000..c29c0e3ba89de --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_9.yml @@ -0,0 +1,63 @@ +name: 🐞 Bug v9 +description: File a bug/issue against v9.x +title: "[BUG] " +labels: [Bug, Needs Triage, Release 9.x] +body: +- type: checkboxes + attributes: + label: Is there an existing issue for this? + description: Please [search here](https://github.com/npm/cli/issues) to see if an issue already exists for your problem. + options: + - label: I have searched the existing issues + required: true +- type: checkboxes + attributes: + label: This issue exists in the latest npm version + description: Please make sure you have installed the latest npm and verified it is still an issue. + options: + - label: I am using the latest npm + required: true +- type: textarea + attributes: + label: Current Behavior + description: A clear & concise description of what you're experiencing. + validations: + required: false +- type: textarea + attributes: + label: Expected Behavior + description: A clear & concise description of what you expected to happen. + validations: + required: false +- type: textarea + attributes: + label: Steps To Reproduce + description: Steps to reproduce the behavior. + value: | + 1. In this environment... + 2. With this config... + 3. Run '...' + 4. See error... + validations: + required: false +- type: textarea + attributes: + label: Environment + description: | + examples: + - **`npm -v`**: **npm**: 7.6.3 + - **`node -v`**: **Node.js**: 13.14.0 + - **OS Name**: Ubuntu 20.04 + - **System Model Name**: Macbook Pro + - **`npm config ls`**: `; "user" config from ...` + value: | + - npm: + - Node.js: + - OS Name: + - System Model Name: + - npm config: + ```ini + ; copy and paste output from `npm config ls` here + ``` + validations: + required: false diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index a7931f39843bc..0000000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,185 +0,0 @@ -# This file is automatically added by @npmcli/template-oss. Do not edit. - -version: 2 - -updates: - - package-ecosystem: npm - directory: / - schedule: - interval: daily - allow: - - dependency-type: direct - versioning-strategy: increase-if-necessary - commit-message: - prefix: deps - prefix-development: chore - labels: - - "Dependencies" - - package-ecosystem: npm - directory: docs/ - schedule: - interval: daily - allow: - - dependency-type: direct - versioning-strategy: increase-if-necessary - commit-message: - prefix: deps - prefix-development: chore - labels: - - "Dependencies" - - package-ecosystem: npm - directory: smoke-tests/ - schedule: - interval: daily - allow: - - dependency-type: direct - versioning-strategy: increase-if-necessary - commit-message: - prefix: deps - prefix-development: chore - labels: - - "Dependencies" - - package-ecosystem: npm - directory: workspaces/arborist/ - schedule: - interval: daily - allow: - - dependency-type: direct - versioning-strategy: increase-if-necessary - commit-message: - prefix: deps - prefix-development: chore - labels: - - "Dependencies" - - package-ecosystem: npm - directory: workspaces/libnpmaccess/ - schedule: - interval: daily - allow: - - dependency-type: direct - versioning-strategy: increase-if-necessary - commit-message: - prefix: deps - prefix-development: chore - labels: - - "Dependencies" - - package-ecosystem: npm - directory: workspaces/libnpmdiff/ - schedule: - interval: daily - allow: - - dependency-type: direct - versioning-strategy: increase-if-necessary - commit-message: - prefix: deps - prefix-development: chore - labels: - - "Dependencies" - - package-ecosystem: npm - directory: workspaces/libnpmexec/ - schedule: - interval: daily - allow: - - dependency-type: direct - versioning-strategy: increase-if-necessary - commit-message: - prefix: deps - prefix-development: chore - labels: - - "Dependencies" - - package-ecosystem: npm - directory: workspaces/libnpmfund/ - schedule: - interval: daily - allow: - - dependency-type: direct - versioning-strategy: increase-if-necessary - commit-message: - prefix: deps - prefix-development: chore - labels: - - "Dependencies" - - package-ecosystem: npm - directory: workspaces/libnpmhook/ - schedule: - interval: daily - allow: - - dependency-type: direct - versioning-strategy: increase-if-necessary - commit-message: - prefix: deps - prefix-development: chore - labels: - - "Dependencies" - - package-ecosystem: npm - directory: workspaces/libnpmorg/ - schedule: - interval: daily - allow: - - dependency-type: direct - versioning-strategy: increase-if-necessary - commit-message: - prefix: deps - prefix-development: chore - labels: - - "Dependencies" - - package-ecosystem: npm - directory: workspaces/libnpmpack/ - schedule: - interval: daily - allow: - - dependency-type: direct - versioning-strategy: increase-if-necessary - commit-message: - prefix: deps - prefix-development: chore - labels: - - "Dependencies" - - package-ecosystem: npm - directory: workspaces/libnpmpublish/ - schedule: - interval: daily - allow: - - dependency-type: direct - versioning-strategy: increase-if-necessary - commit-message: - prefix: deps - prefix-development: chore - labels: - - "Dependencies" - - package-ecosystem: npm - directory: workspaces/libnpmsearch/ - schedule: - interval: daily - allow: - - dependency-type: direct - versioning-strategy: increase-if-necessary - commit-message: - prefix: deps - prefix-development: chore - labels: - - "Dependencies" - - package-ecosystem: npm - directory: workspaces/libnpmteam/ - schedule: - interval: daily - allow: - - dependency-type: direct - versioning-strategy: increase-if-necessary - commit-message: - prefix: deps - prefix-development: chore - labels: - - "Dependencies" - - package-ecosystem: npm - directory: workspaces/libnpmversion/ - schedule: - interval: daily - allow: - - dependency-type: direct - versioning-strategy: increase-if-necessary - commit-message: - prefix: deps - prefix-development: chore - labels: - - "Dependencies" diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 281331a54adc4..b3f3b982bcb7f 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -31,4 +31,4 @@ jobs: - name: Reset Deps run: node . run resetdeps -- --package-lock - name: Run Audit - run: node . audit + run: node . audit -iwr -w workspaces diff --git a/.github/workflows/ci-libnpmaccess.yml b/.github/workflows/ci-libnpmaccess.yml index 412d64f1cefd2..8455f2b2a1c9f 100644 --- a/.github/workflows/ci-libnpmaccess.yml +++ b/.github/workflows/ci-libnpmaccess.yml @@ -73,9 +73,9 @@ jobs: - name: Reset Deps run: node . run resetdeps - name: Lint - run: node . run lint --ignore-scripts + run: node . run lint --ignore-scripts -w libnpmaccess - name: Post Lint - run: node . run postlint --ignore-scripts + run: node . run postlint --ignore-scripts -w libnpmaccess test: name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }} diff --git a/.github/workflows/ci-libnpmdiff.yml b/.github/workflows/ci-libnpmdiff.yml index c0548e19ca470..10bd7c90f7fe1 100644 --- a/.github/workflows/ci-libnpmdiff.yml +++ b/.github/workflows/ci-libnpmdiff.yml @@ -73,9 +73,9 @@ jobs: - name: Reset Deps run: node . run resetdeps - name: Lint - run: node . run lint --ignore-scripts + run: node . run lint --ignore-scripts -w libnpmdiff - name: Post Lint - run: node . run postlint --ignore-scripts + run: node . run postlint --ignore-scripts -w libnpmdiff test: name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }} diff --git a/.github/workflows/ci-libnpmexec.yml b/.github/workflows/ci-libnpmexec.yml index 4134cc8400bf0..037c344c2aafb 100644 --- a/.github/workflows/ci-libnpmexec.yml +++ b/.github/workflows/ci-libnpmexec.yml @@ -73,9 +73,9 @@ jobs: - name: Reset Deps run: node . run resetdeps - name: Lint - run: node . run lint --ignore-scripts + run: node . run lint --ignore-scripts -w libnpmexec - name: Post Lint - run: node . run postlint --ignore-scripts + run: node . run postlint --ignore-scripts -w libnpmexec test: name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }} diff --git a/.github/workflows/ci-libnpmfund.yml b/.github/workflows/ci-libnpmfund.yml index 5c3c9bdf0041e..78b79f530b105 100644 --- a/.github/workflows/ci-libnpmfund.yml +++ b/.github/workflows/ci-libnpmfund.yml @@ -73,9 +73,9 @@ jobs: - name: Reset Deps run: node . run resetdeps - name: Lint - run: node . run lint --ignore-scripts + run: node . run lint --ignore-scripts -w libnpmfund - name: Post Lint - run: node . run postlint --ignore-scripts + run: node . run postlint --ignore-scripts -w libnpmfund test: name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }} diff --git a/.github/workflows/ci-libnpmhook.yml b/.github/workflows/ci-libnpmhook.yml index 7204c1b89f428..997a2401b585d 100644 --- a/.github/workflows/ci-libnpmhook.yml +++ b/.github/workflows/ci-libnpmhook.yml @@ -73,9 +73,9 @@ jobs: - name: Reset Deps run: node . run resetdeps - name: Lint - run: node . run lint --ignore-scripts + run: node . run lint --ignore-scripts -w libnpmhook - name: Post Lint - run: node . run postlint --ignore-scripts + run: node . run postlint --ignore-scripts -w libnpmhook test: name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }} diff --git a/.github/workflows/ci-libnpmorg.yml b/.github/workflows/ci-libnpmorg.yml index 68c44992dac28..aac1cbc9bdaf7 100644 --- a/.github/workflows/ci-libnpmorg.yml +++ b/.github/workflows/ci-libnpmorg.yml @@ -73,9 +73,9 @@ jobs: - name: Reset Deps run: node . run resetdeps - name: Lint - run: node . run lint --ignore-scripts + run: node . run lint --ignore-scripts -w libnpmorg - name: Post Lint - run: node . run postlint --ignore-scripts + run: node . run postlint --ignore-scripts -w libnpmorg test: name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }} diff --git a/.github/workflows/ci-libnpmpack.yml b/.github/workflows/ci-libnpmpack.yml index d4cbf4107336f..533bcd8134b9a 100644 --- a/.github/workflows/ci-libnpmpack.yml +++ b/.github/workflows/ci-libnpmpack.yml @@ -73,9 +73,9 @@ jobs: - name: Reset Deps run: node . run resetdeps - name: Lint - run: node . run lint --ignore-scripts + run: node . run lint --ignore-scripts -w libnpmpack - name: Post Lint - run: node . run postlint --ignore-scripts + run: node . run postlint --ignore-scripts -w libnpmpack test: name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }} diff --git a/.github/workflows/ci-libnpmpublish.yml b/.github/workflows/ci-libnpmpublish.yml index f0bdcbc4cd732..7ecab7a4e5777 100644 --- a/.github/workflows/ci-libnpmpublish.yml +++ b/.github/workflows/ci-libnpmpublish.yml @@ -73,9 +73,9 @@ jobs: - name: Reset Deps run: node . run resetdeps - name: Lint - run: node . run lint --ignore-scripts + run: node . run lint --ignore-scripts -w libnpmpublish - name: Post Lint - run: node . run postlint --ignore-scripts + run: node . run postlint --ignore-scripts -w libnpmpublish test: name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }} diff --git a/.github/workflows/ci-libnpmsearch.yml b/.github/workflows/ci-libnpmsearch.yml index 0df5f0932a581..42e8f4f8374ae 100644 --- a/.github/workflows/ci-libnpmsearch.yml +++ b/.github/workflows/ci-libnpmsearch.yml @@ -73,9 +73,9 @@ jobs: - name: Reset Deps run: node . run resetdeps - name: Lint - run: node . run lint --ignore-scripts + run: node . run lint --ignore-scripts -w libnpmsearch - name: Post Lint - run: node . run postlint --ignore-scripts + run: node . run postlint --ignore-scripts -w libnpmsearch test: name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }} diff --git a/.github/workflows/ci-libnpmteam.yml b/.github/workflows/ci-libnpmteam.yml index 7f28450a77b71..ec00a20c2b1d8 100644 --- a/.github/workflows/ci-libnpmteam.yml +++ b/.github/workflows/ci-libnpmteam.yml @@ -73,9 +73,9 @@ jobs: - name: Reset Deps run: node . run resetdeps - name: Lint - run: node . run lint --ignore-scripts + run: node . run lint --ignore-scripts -w libnpmteam - name: Post Lint - run: node . run postlint --ignore-scripts + run: node . run postlint --ignore-scripts -w libnpmteam test: name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }} diff --git a/.github/workflows/ci-libnpmversion.yml b/.github/workflows/ci-libnpmversion.yml index a5e7af85958aa..567e85ebadb7f 100644 --- a/.github/workflows/ci-libnpmversion.yml +++ b/.github/workflows/ci-libnpmversion.yml @@ -73,9 +73,9 @@ jobs: - name: Reset Deps run: node . run resetdeps - name: Lint - run: node . run lint --ignore-scripts + run: node . run lint --ignore-scripts -w libnpmversion - name: Post Lint - run: node . run postlint --ignore-scripts + run: node . run postlint --ignore-scripts -w libnpmversion test: name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }} diff --git a/.github/workflows/ci-npmcli-arborist.yml b/.github/workflows/ci-npmcli-arborist.yml index 445eba9b50022..86a4be73b638e 100644 --- a/.github/workflows/ci-npmcli-arborist.yml +++ b/.github/workflows/ci-npmcli-arborist.yml @@ -73,9 +73,9 @@ jobs: - name: Reset Deps run: node . run resetdeps - name: Lint - run: node . run lint --ignore-scripts + run: node . run lint --ignore-scripts -w @npmcli/arborist - name: Post Lint - run: node . run postlint --ignore-scripts + run: node . run postlint --ignore-scripts -w @npmcli/arborist test: name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }} diff --git a/.github/workflows/ci-docs.yml b/.github/workflows/ci-npmcli-docs.yml similarity index 93% rename from .github/workflows/ci-docs.yml rename to .github/workflows/ci-npmcli-docs.yml index ef583ed2332a7..9906b3bb791e6 100644 --- a/.github/workflows/ci-docs.yml +++ b/.github/workflows/ci-npmcli-docs.yml @@ -1,6 +1,6 @@ # This file is automatically added by @npmcli/template-oss. Do not edit. -name: CI - docs +name: CI - @npmcli/docs on: workflow_dispatch: @@ -71,9 +71,9 @@ jobs: - name: Reset Deps run: node . run resetdeps - name: Lint - run: node . run lint --ignore-scripts + run: node . run lint --ignore-scripts -w @npmcli/docs - name: Post Lint - run: node . run postlint --ignore-scripts + run: node . run postlint --ignore-scripts -w @npmcli/docs test: name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }} @@ -119,7 +119,7 @@ jobs: - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test - run: node . test --ignore-scripts -w docs + 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 diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index 8b3a77ea6d19d..0958704ce06fb 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -21,6 +21,39 @@ jobs: run: shell: bash steps: + - name: Get Workflow Job + uses: actions/github-script@v6 + + id: check-output + env: + JOB_NAME: "Lint All" + MATRIX_NAME: "" + with: + script: | + const { owner, repo } = context.repo + + const { data } = await github.rest.actions.listJobsForWorkflowRun({ + owner, + repo, + run_id: context.runId, + per_page: 100 + }) + + const jobName = process.env.JOB_NAME + process.env.MATRIX_NAME + const job = data.jobs.find(j => j.name.endsWith(jobName)) + const jobUrl = job?.html_url + + const shaUrl = `${context.serverUrl}/${owner}/${repo}/commit/${{ inputs.check-sha }}` + + let summary = `This check is assosciated with ${shaUrl}\n\n` + + if (jobUrl) { + summary += `For run logs, click here: ${jobUrl}` + } else { + summary += `Run logs could not be found for a job with name: "${jobName}"` + } + + return { summary } - name: Create Check uses: LouisBrunner/checks-action@v1.3.1 id: check @@ -30,12 +63,7 @@ jobs: status: in_progress name: Lint All sha: ${{ inputs.check-sha }} - # XXX: this does not work when using the default GITHUB_TOKEN. - # Instead we post the main job url to the PR as a comment which - # will link to all the other checks. To work around this we would - # need to create a GitHub that would create on-demand tokens. - # https://github.com/LouisBrunner/checks-action/issues/18 - # details_url: + output: ${{ steps.check-output.outputs.result }} - name: Checkout uses: actions/checkout@v3 with: @@ -52,9 +80,9 @@ jobs: - name: Reset Deps run: node . run resetdeps - name: Lint - run: node . run lint --ignore-scripts + run: node . run lint --ignore-scripts -ws -iwr --if-present - name: Post Lint - run: node . run postlint --ignore-scripts + run: node . run postlint --ignore-scripts -ws -iwr --if-present - name: Conclude Check uses: LouisBrunner/checks-action@v1.3.1 if: always() @@ -91,6 +119,39 @@ jobs: run: shell: ${{ matrix.platform.shell }} steps: + - name: Get Workflow Job + uses: actions/github-script@v6 + + id: check-output + env: + JOB_NAME: "Test All" + MATRIX_NAME: " - ${{ matrix.platform.name }} - ${{ matrix.node-version }}" + with: + script: | + const { owner, repo } = context.repo + + const { data } = await github.rest.actions.listJobsForWorkflowRun({ + owner, + repo, + run_id: context.runId, + per_page: 100 + }) + + const jobName = process.env.JOB_NAME + process.env.MATRIX_NAME + const job = data.jobs.find(j => j.name.endsWith(jobName)) + const jobUrl = job?.html_url + + const shaUrl = `${context.serverUrl}/${owner}/${repo}/commit/${{ inputs.check-sha }}` + + let summary = `This check is assosciated with ${shaUrl}\n\n` + + if (jobUrl) { + summary += `For run logs, click here: ${jobUrl}` + } else { + summary += `Run logs could not be found for a job with name: "${jobName}"` + } + + return { summary } - name: Create Check uses: LouisBrunner/checks-action@v1.3.1 id: check @@ -100,12 +161,7 @@ jobs: status: in_progress name: Test All - ${{ matrix.platform.name }} - ${{ matrix.node-version }} sha: ${{ inputs.check-sha }} - # XXX: this does not work when using the default GITHUB_TOKEN. - # Instead we post the main job url to the PR as a comment which - # will link to all the other checks. To work around this we would - # need to create a GitHub that would create on-demand tokens. - # https://github.com/LouisBrunner/checks-action/issues/18 - # details_url: + output: ${{ steps.check-output.outputs.result }} - name: Checkout uses: actions/checkout@v3 with: @@ -166,6 +222,39 @@ jobs: run: shell: ${{ matrix.platform.shell }} steps: + - name: Get Workflow Job + uses: actions/github-script@v6 + + id: check-output + env: + JOB_NAME: "Smoke Publish" + MATRIX_NAME: " - ${{ matrix.platform.name }} - ${{ matrix.node-version }}" + with: + script: | + const { owner, repo } = context.repo + + const { data } = await github.rest.actions.listJobsForWorkflowRun({ + owner, + repo, + run_id: context.runId, + per_page: 100 + }) + + const jobName = process.env.JOB_NAME + process.env.MATRIX_NAME + const job = data.jobs.find(j => j.name.endsWith(jobName)) + const jobUrl = job?.html_url + + const shaUrl = `${context.serverUrl}/${owner}/${repo}/commit/${{ inputs.check-sha }}` + + let summary = `This check is assosciated with ${shaUrl}\n\n` + + if (jobUrl) { + summary += `For run logs, click here: ${jobUrl}` + } else { + summary += `Run logs could not be found for a job with name: "${jobName}"` + } + + return { summary } - name: Create Check uses: LouisBrunner/checks-action@v1.3.1 id: check @@ -175,12 +264,7 @@ jobs: status: in_progress name: Smoke Publish - ${{ matrix.platform.name }} - ${{ matrix.node-version }} sha: ${{ inputs.check-sha }} - # XXX: this does not work when using the default GITHUB_TOKEN. - # Instead we post the main job url to the PR as a comment which - # will link to all the other checks. To work around this we would - # need to create a GitHub that would create on-demand tokens. - # https://github.com/LouisBrunner/checks-action/issues/18 - # details_url: + output: ${{ steps.check-output.outputs.result }} - name: Checkout uses: actions/checkout@v3 with: diff --git a/.github/workflows/ci-smoke-tests.yml b/.github/workflows/ci-smoke-tests.yml index 91cc8b6cdd770..549785c4e024c 100644 --- a/.github/workflows/ci-smoke-tests.yml +++ b/.github/workflows/ci-smoke-tests.yml @@ -73,9 +73,9 @@ jobs: - name: Reset Deps run: node . run resetdeps - name: Lint - run: node . run lint --ignore-scripts + run: node . run lint --ignore-scripts -w smoke-tests - name: Post Lint - run: node . run postlint --ignore-scripts + run: node . run postlint --ignore-scripts -w smoke-tests test: name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13ee90e7e06ef..57ea1212be5e1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -130,37 +130,11 @@ jobs: - name: Add Problem Matcher run: echo "::add-matcher::.github/matchers/tap.json" - name: Test - run: node . test --ignore-scripts -iwr + run: node . test --ignore-scripts - name: Check Git Status if: matrix && matrix.platform.os != 'windows-latest' run: node scripts/git-dirty.js - check-docs: - name: Check Docs - if: github.repository_owner == 'npm' - runs-on: ubuntu-latest - defaults: - run: - shell: bash - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup Git User - run: | - git config --global user.email "npm-cli+bot@github.com" - git config --global user.name "npm CLI robot" - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: 18.x - cache: npm - - name: Reset Deps - run: node . run resetdeps - - name: Make Docs - run: make freshdocs - - name: Check Git Status - run: node scripts/git-dirty.js - licenses: name: Check Licenses if: github.repository_owner == 'npm' diff --git a/.github/workflows/create-cli-deps-pr.yml b/.github/workflows/create-cli-deps-pr.yml index e0fd97fa206b3..e5bd2ccdd1315 100644 --- a/.github/workflows/create-cli-deps-pr.yml +++ b/.github/workflows/create-cli-deps-pr.yml @@ -64,7 +64,6 @@ jobs: echo "Prepping CLI repo for release" cd cli git checkout "$npm_vtag" - make make release echo "Removing old npm" diff --git a/.github/workflows/post-dependabot.yml b/.github/workflows/post-dependabot.yml deleted file mode 100644 index e2411dba05bb3..0000000000000 --- a/.github/workflows/post-dependabot.yml +++ /dev/null @@ -1,118 +0,0 @@ -# This file is automatically added by @npmcli/template-oss. Do not edit. - -name: Post Dependabot - -on: pull_request - -permissions: - contents: write - -jobs: - template-oss: - name: template-oss - if: github.repository_owner == 'npm' && github.actor == 'dependabot[bot]' - runs-on: ubuntu-latest - defaults: - run: - shell: bash - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.ref }} - - name: Setup Git User - run: | - git config --global user.email "npm-cli+bot@github.com" - git config --global user.name "npm CLI robot" - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: 18.x - cache: npm - - name: Reset Deps - run: node . run resetdeps - - name: Fetch Dependabot Metadata - id: metadata - uses: dependabot/fetch-metadata@v1 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - - # Dependabot can update multiple directories so we output which directory - # it is acting on so we can run the command for the correct root or workspace - - name: Get Dependabot Directory - if: contains(steps.metadata.outputs.dependency-names, '@npmcli/template-oss') - id: flags - run: | - dependabot_dir="${{ steps.metadata.outputs.directory }}" - if [[ "$dependabot_dir" == "/" ]]; then - echo "::set-output name=workspace::-iwr" - else - # strip leading slash from directory so it works as a - # a path to the workspace flag - echo "::set-output name=workspace::-w ${dependabot_dir#/}" - fi - - - name: Apply Changes - if: steps.flags.outputs.workspace - id: apply - run: | - node . run template-oss-apply ${{ steps.flags.outputs.workspace }} - if [[ `git status --porcelain` ]]; then - echo "::set-output name=changes::true" - fi - # This only sets the conventional commit prefix. This workflow can't reliably determine - # what the breaking change is though. If a BREAKING CHANGE message is required then - # this PR check will fail and the commit will be amended with stafftools - if [[ "${{ steps.dependabot-metadata.outputs.update-type }}" == "version-update:semver-major" ]]; then - prefix='feat!' - else - prefix='chore!' - fi - echo "::set-output name=message::$prefix: postinstall for dependabot template-oss PR" - - # This step will fail if template-oss has made any workflow updates. It is impossible - # for a workflow to update other workflows. In the case it does fail, we continue - # and then try to apply only a portion of the changes in the next step - - name: Push All Changes - if: steps.apply.outputs.changes - id: push - continue-on-error: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - git commit -am "${{ steps.apply.outputs.message }}" - git push - - # If the previous step failed, then reset the commit and remove any workflow changes - # and attempt to commit and push again. This is helpful because we will have a commit - # with the correct prefix that we can then --amend with @npmcli/stafftools later. - - name: Push All Changes Except Workflows - if: steps.apply.outputs.changes && steps.push-all.outcome == 'failure' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - git reset HEAD~ - git checkout HEAD -- .github/workflows/ - git clean -fd .github/workflows/ - git commit -am "${{ steps.apply.outputs.message }}" - git push - - # Check if all the necessary template-oss changes were applied. Since we continued - # on errors in one of the previous steps, this check will fail if our follow up - # only applied a portion of the changes and we need to followup manually. - # - # Note that this used to run `lint` and `postlint` but that will fail this action - # if we've also shipped any linting changes separate from template-oss. We do - # linting in another action, so we want to fail this one only if there are - # template-oss changes that could not be applied. - - name: Check Changes - if: steps.apply.outputs.changes - run: | - node . exec --offline ${{ steps.flags.outputs.workspace }} -- template-oss-check - - - name: Fail on Breaking Change - if: steps.apply.outputs.changes && startsWith(steps.apply.outputs.message, 'feat!') - run: | - echo "This PR has a breaking change. Run 'npx -p @npmcli/stafftools gh template-oss-fix'" - echo "for more information on how to fix this with a BREAKING CHANGE footer." - exit 1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8db7ed9d35b60..eed87af62ba6b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,7 @@ name: Release on: + workflow_dispatch: push: branches: - main @@ -48,17 +49,19 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - npx --offline template-oss-release-please ${{ github.ref_name }} + npx --offline template-oss-release-please ${{ github.ref_name }} ${{ github.event_name }} - name: Post Pull Request Comment if: steps.release.outputs.pr-number uses: actions/github-script@v6 id: pr-comment env: PR_NUMBER: ${{ steps.release.outputs.pr-number }} + REF_NAME: ${{ github.ref_name }} with: script: | + const { REF_NAME, PR_NUMBER } = process.env const repo = { owner: context.repo.owner, repo: context.repo.repo } - const issue = { ...repo, issue_number: process.env.PR_NUMBER } + const issue = { ...repo, issue_number: PR_NUMBER } const { data: workflow } = await github.rest.actions.getWorkflowRun({ ...repo, run_id: context.runId }) @@ -67,7 +70,11 @@ jobs: const comments = await github.paginate(github.rest.issues.listComments, issue) let commentId = comments?.find(c => c.user.login === 'github-actions[bot]' && c.body.startsWith(body))?.id - body += `- Release workflow run: ${workflow.html_url}` + body += `Release workflow run: ${workflow.html_url}\n\n#### Force CI to Rerun for This Release\n\n` + body += `This PR will be updated and CI will run for every non-\`chore:\` commit that is pushed to \`main\`. ` + body += `To force CI to rerun, run this command:\n\n` + body += `\`\`\`\ngh workflow run release.yml -r ${REF_NAME}\n\`\`\`` + if (commentId) { await github.rest.issues.updateComment({ ...repo, comment_id: commentId, body }) } else { @@ -76,6 +83,39 @@ jobs: } return commentId + - name: Get Workflow Job + uses: actions/github-script@v6 + if: steps.release.outputs.pr-number + id: check-output + env: + JOB_NAME: "Release" + MATRIX_NAME: "" + with: + script: | + const { owner, repo } = context.repo + + const { data } = await github.rest.actions.listJobsForWorkflowRun({ + owner, + repo, + run_id: context.runId, + per_page: 100 + }) + + const jobName = process.env.JOB_NAME + process.env.MATRIX_NAME + const job = data.jobs.find(j => j.name.endsWith(jobName)) + const jobUrl = job?.html_url + + const shaUrl = `${context.serverUrl}/${owner}/${repo}/commit/${{ steps.release.outputs.pr-sha }}` + + let summary = `This check is assosciated with ${shaUrl}\n\n` + + if (jobUrl) { + summary += `For run logs, click here: ${jobUrl}` + } else { + summary += `Run logs could not be found for a job with name: "${jobName}"` + } + + return { summary } - name: Create Check uses: LouisBrunner/checks-action@v1.3.1 id: check @@ -85,12 +125,7 @@ jobs: status: in_progress name: Release sha: ${{ steps.release.outputs.pr-sha }} - # XXX: this does not work when using the default GITHUB_TOKEN. - # Instead we post the main job url to the PR as a comment which - # will link to all the other checks. To work around this we would - # need to create a GitHub that would create on-demand tokens. - # https://github.com/LouisBrunner/checks-action/issues/18 - # details_url: + output: ${{ steps.check-output.outputs.result }} update: needs: release @@ -136,6 +171,39 @@ jobs: git commit --all --amend --no-edit || true git push --force-with-lease echo "::set-output name=sha::$(git rev-parse HEAD)" + - name: Get Workflow Job + uses: actions/github-script@v6 + + id: check-output + env: + JOB_NAME: "Update - Release" + MATRIX_NAME: "" + with: + script: | + const { owner, repo } = context.repo + + const { data } = await github.rest.actions.listJobsForWorkflowRun({ + owner, + repo, + run_id: context.runId, + per_page: 100 + }) + + const jobName = process.env.JOB_NAME + process.env.MATRIX_NAME + const job = data.jobs.find(j => j.name.endsWith(jobName)) + const jobUrl = job?.html_url + + const shaUrl = `${context.serverUrl}/${owner}/${repo}/commit/${{ steps.commit.outputs.sha }}` + + let summary = `This check is assosciated with ${shaUrl}\n\n` + + if (jobUrl) { + summary += `For run logs, click here: ${jobUrl}` + } else { + summary += `Run logs could not be found for a job with name: "${jobName}"` + } + + return { summary } - name: Create Check uses: LouisBrunner/checks-action@v1.3.1 id: check @@ -145,12 +213,7 @@ jobs: status: in_progress name: Release sha: ${{ steps.commit.outputs.sha }} - # XXX: this does not work when using the default GITHUB_TOKEN. - # Instead we post the main job url to the PR as a comment which - # will link to all the other checks. To work around this we would - # need to create a GitHub that would create on-demand tokens. - # https://github.com/LouisBrunner/checks-action/issues/18 - # details_url: + output: ${{ steps.check-output.outputs.result }} - name: Conclude Check uses: LouisBrunner/checks-action@v1.3.1 if: always() diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 53a1f52c1e2a9..0a4cf7597a5be 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,15 +1,15 @@ { - ".": "9.0.0-pre.4", - "workspaces/arborist": "6.0.0-pre.4", - "workspaces/libnpmaccess": "7.0.0-pre.1", - "workspaces/libnpmdiff": "5.0.0-pre.2", - "workspaces/libnpmexec": "5.0.0-pre.4", - "workspaces/libnpmfund": "4.0.0-pre.4", - "workspaces/libnpmhook": "9.0.0-pre.0", - "workspaces/libnpmorg": "5.0.0-pre.0", - "workspaces/libnpmpack": "5.0.0-pre.2", - "workspaces/libnpmpublish": "7.0.0-pre.2", - "workspaces/libnpmsearch": "6.0.0-pre.0", - "workspaces/libnpmteam": "5.0.0-pre.0", - "workspaces/libnpmversion": "4.0.0-pre.0" + ".": "9.0.0-pre.6", + "workspaces/arborist": "6.0.0-pre.5", + "workspaces/libnpmaccess": "7.0.0-pre.2", + "workspaces/libnpmdiff": "5.0.0-pre.3", + "workspaces/libnpmexec": "5.0.0-pre.5", + "workspaces/libnpmfund": "4.0.0-pre.5", + "workspaces/libnpmhook": "9.0.0-pre.1", + "workspaces/libnpmorg": "5.0.0-pre.1", + "workspaces/libnpmpack": "5.0.0-pre.4", + "workspaces/libnpmpublish": "7.0.0-pre.4", + "workspaces/libnpmsearch": "6.0.0-pre.1", + "workspaces/libnpmteam": "5.0.0-pre.1", + "workspaces/libnpmversion": "4.0.0-pre.1" } diff --git a/AUTHORS b/AUTHORS index 8a84d86f4c6d3..c788a24482538 100644 --- a/AUTHORS +++ b/AUTHORS @@ -860,3 +860,6 @@ Juan Heyns <juanheyns@gmail.com> Michał Kurowski <michalkurowskix@gmail.com> giovanniPepi <gtpepi@proton.me> Winter <winter@winter.cafe> +shalvah <diakon.ng@gmail.com> +Albert 理斯特 <shuaizhexu@gmail.com> +Gennadiy Gashev <63790536+gennadiygashev@users.noreply.github.com> diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ffd1653ffc80..c56936d441d51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,90 @@ # Changelog +## [9.0.0-pre.6](https://github.com/npm/cli/compare/v9.0.0-pre.5...v9.0.0-pre.6) (2022-10-19) + +### ⚠️ BREAKING CHANGES + +* `npm` now outputs some json errors on stdout. Previously `npm` would output all json formatted errors on stderr, making it difficult to parse as the stderr stream usually has logs already written to it. In the future, `npm` will differentiate between errors and crashes. Errors, such as `E404` and `ERESOLVE`, will be handled and will continue to be output on stdout. In the case of a crash, `npm` will log the error as usual but will not attempt to display it as json, even in `--json` mode. Moving a case from the category of an error to a crash will not be considered a breaking change. For more information see npm/rfcs#482. +* `npm config set` will no longer accept deprecated or invalid config options. +* `timing` and `loglevel` changes + - `timing` has been removed as a value for `--loglevel` + - `--timing` will show timing information regardless of + `--loglevel`, except when `--silent` +* deprecate boolean install flags in favor of `--install-strategy` + * deprecate --global-style, --global now sets --install-strategy=shallow + * deprecate --legacy-bundling, now sets --install-strategy=nested +* npm will no longer attempt to modify ownership of files it creates +* this package no longer attempts to change file ownership automatically +* this package no longer attempts to change file ownership automatically + +### Features + +* [`d3543e9`](https://github.com/npm/cli/commit/d3543e945e721783dcb83385935f282a4bb32cf3) output json formatted errors on stdout (#5716) (@lukekarrys) +* [`be642c6`](https://github.com/npm/cli/commit/be642c6b8e3df40fd43b0110b30d3ecd44086016) refuse to set deprecated/invalid config (#5719) (@wraithgar) +* [`332914b`](https://github.com/npm/cli/commit/332914b48b616099e586893b1df21480b7ddb733) separate configs for `--timing` and `--loglevel` (@lukekarrys) +* [`f653785`](https://github.com/npm/cli/commit/f6537855e1a34b84251993a49e1ee362082ada37) deprecated `key`, `cert` config options and updated registry scoped auth docs (@fritzy) +* [`de2d33f`](https://github.com/npm/cli/commit/de2d33f3ed42e187803bdd31db4f7a12f08f353c) add --install-strategy=hoisted|nested|shallow, deprecate --global-style, --legacy-bundling (#5709) (@fritzy) +* [`58065bc`](https://github.com/npm/cli/commit/58065bc679e6968742b5b15fa2fb82dd9e8ae988) [#5704](https://github.com/npm/cli/pull/5704) do not alter file ownership (@nlf) +* [`475e9b6`](https://github.com/npm/cli/commit/475e9b6c0c978a104dd2ee47bde22b0a031a95f9) [#5703](https://github.com/npm/cli/pull/5703) do not alter file ownership (@nlf) + +### Bug Fixes + +* [`6ffa5b7`](https://github.com/npm/cli/commit/6ffa5b7bbb8fd7cae1a0b955a1f762661ec5e9ed) `npm hook ls` duplicates hook name prefixes (#5295) (@gennadiygashev) +* [`1afe5ba`](https://github.com/npm/cli/commit/1afe5ba9647d1f0f55bf0a4bace543965d05daed) account for new npm-package-arg behavior (@wraithgar) +* [`353b5bb`](https://github.com/npm/cli/commit/353b5bb92c3f7899526536b597252b44aa8a712d) [#5710](https://github.com/npm/cli/pull/5710) remove chownr and mkdirp-infer-owner (@nlf) + +### Documentation + +* [`9e74d3e`](https://github.com/npm/cli/commit/9e74d3e847c4bc0abc630fbe81328e011d6f0187) update supported engines in readme (#5725) (@lukekarrys) + +### Dependencies + +* [`88137a3`](https://github.com/npm/cli/commit/88137a329c8ad418db265dd465768a7cf5ebccb1) `npmlog@7.0.1` +* [`2008ea6`](https://github.com/npm/cli/commit/2008ea6a807acbd97912799adfe97f276202cea6) `npm-package-arg@10.0.0`, `pacote@15.0.2` +* [`aa01072`](https://github.com/npm/cli/commit/aa010722996ef6de46e1bb937c6f8a94dc2844fa) [#5707](https://github.com/npm/cli/pull/5707) update the following dependencies +* [Workspace](https://github.com/npm/cli/compare/arborist-v6.0.0-pre.4...arborist-v6.0.0-pre.5): `@npmcli/arborist@6.0.0-pre.5` +* [Workspace](https://github.com/npm/cli/compare/libnpmaccess-v7.0.0-pre.1...libnpmaccess-v7.0.0-pre.2): `libnpmaccess@7.0.0-pre.2` +* [Workspace](https://github.com/npm/cli/compare/libnpmdiff-v5.0.0-pre.2...libnpmdiff-v5.0.0-pre.3): `libnpmdiff@5.0.0-pre.3` +* [Workspace](https://github.com/npm/cli/compare/libnpmexec-v5.0.0-pre.4...libnpmexec-v5.0.0-pre.5): `libnpmexec@5.0.0-pre.5` +* [Workspace](https://github.com/npm/cli/compare/libnpmfund-v4.0.0-pre.4...libnpmfund-v4.0.0-pre.5): `libnpmfund@4.0.0-pre.5` +* [Workspace](https://github.com/npm/cli/compare/libnpmhook-v9.0.0-pre.0...libnpmhook-v9.0.0-pre.1): `libnpmhook@9.0.0-pre.1` +* [Workspace](https://github.com/npm/cli/compare/libnpmorg-v5.0.0-pre.0...libnpmorg-v5.0.0-pre.1): `libnpmorg@5.0.0-pre.1` +* [Workspace](https://github.com/npm/cli/compare/libnpmpack-v5.0.0-pre.3...libnpmpack-v5.0.0-pre.4): `libnpmpack@5.0.0-pre.4` +* [Workspace](https://github.com/npm/cli/compare/libnpmpublish-v7.0.0-pre.3...libnpmpublish-v7.0.0-pre.4): `libnpmpublish@7.0.0-pre.4` +* [Workspace](https://github.com/npm/cli/compare/libnpmsearch-v6.0.0-pre.0...libnpmsearch-v6.0.0-pre.1): `libnpmsearch@6.0.0-pre.1` +* [Workspace](https://github.com/npm/cli/compare/libnpmteam-v5.0.0-pre.0...libnpmteam-v5.0.0-pre.1): `libnpmteam@5.0.0-pre.1` +* [Workspace](https://github.com/npm/cli/compare/libnpmversion-v4.0.0-pre.0...libnpmversion-v4.0.0-pre.1): `libnpmversion@4.0.0-pre.1` + +## [9.0.0-pre.5](https://github.com/npm/cli/compare/v9.0.0-pre.4...v9.0.0-pre.5) (2022-10-13) + +### ⚠️ BREAKING CHANGES + +* the presence of auth related settings that are not scoped to a specific registry found in a config file is no longer supported and will throw errors +* the `node-version` and `npm-version` configs have been removed. +* links generated from git urls will now use `HEAD` instead of `master` as the default ref + +### Features + +* [`a09e19d`](https://github.com/npm/cli/commit/a09e19d88f046e54e8d75343883635a1bd056310) [#5696](https://github.com/npm/cli/pull/5696) introduce the `npm config fix` command (@nlf) +* [`d2963c6`](https://github.com/npm/cli/commit/d2963c67b992b9b3b9dd32f6f41cbbe4bcc580c8) explicitly validate config within the cli (@nlf) +* [`a5fec08`](https://github.com/npm/cli/commit/a5fec08348add7e75fa2498e6a9efe608b20aa8b) rewrite docs generation (@lukekarrys) + +### Bug Fixes + +* [`a35c784`](https://github.com/npm/cli/commit/a35c784f8c25dce05b4173edd6c3f8e7913d7b50) [#5691](https://github.com/npm/cli/pull/5691) config: remove `node-version` and `npm-version` (@wraithgar) + +### Documentation + +* [`a8532eb`](https://github.com/npm/cli/commit/a8532eb39504584cef452152948e015cef8c010a) [#5661](https://github.com/npm/cli/pull/5661) typo missing parentheses (@hbrls) +* [`542efdb`](https://github.com/npm/cli/commit/542efdb0a31f663cd899bc6d2ddad8fa88c20bc8) update `folders` page for modern npm (@shalvah) + +### Dependencies + +* [`cee3fd9`](https://github.com/npm/cli/commit/cee3fd9905c7eb0a5cb26a8c9c08c5db48becd15) `@npmcli/config@5.0.0` +* [`2a740b1`](https://github.com/npm/cli/commit/2a740b14c3789d80825b1345f2e99765fcb90351) [#5692](https://github.com/npm/cli/pull/5692) `hosted-git-info@6.0.0` +* [Workspace](https://github.com/npm/cli/compare/libnpmpack-v5.0.0-pre.2...libnpmpack-v5.0.0-pre.3): `libnpmpack@5.0.0-pre.3` +* [Workspace](https://github.com/npm/cli/compare/libnpmpublish-v7.0.0-pre.2...libnpmpublish-v7.0.0-pre.3): `libnpmpublish@7.0.0-pre.3` + ## [9.0.0-pre.4](https://github.com/npm/cli/compare/v9.0.0-pre.3...v9.0.0-pre.4) (2022-10-05) ### Features @@ -180,1399 +265,3 @@ * libnpmsearch bumped from ^5.0.4 to ^6.0.0-pre.0 * libnpmteam bumped from ^4.0.4 to ^5.0.0-pre.0 * libnpmversion bumped from ^3.0.7 to ^4.0.0-pre.0 - -## [8.19.1](https://github.com/npm/cli/compare/v8.19.0...v8.19.1) (2022-09-01) - -### Bug Fixes - - * [`d60b43f`](https://github.com/npm/cli/commit/d60b43f3825452dd8b9b5879c287df232c9a8dc8) [#5438](https://github.com/npm/cli/pull/5438) fix: Turn off progress bar when using web based authorization (@sandeepmeduru) - -## [8.19.0](https://github.com/npm/cli/compare/v8.18.0...v8.19.0) (2022-08-31) - -### Features - - * [`d94a9f5`](https://github.com/npm/cli/commit/d94a9f56cce1de32bfd87f841d7678e8394d8ea6) [#5347](https://github.com/npm/cli/pull/5347) feat: add deprecation warnings to access commands (@wraithgar) - -### Bug Fixes - - * [`bd2ae5d`](https://github.com/npm/cli/commit/bd2ae5d79eb8807bfca6075e98432c545a9ededa) [#5323](https://github.com/npm/cli/pull/5323) fix: linting (@wraithgar) - -### Documentation - - * [`3569094`](https://github.com/npm/cli/commit/356909424f60a26d90faf25594085e79e93f09d5) [#5321](https://github.com/npm/cli/pull/5321) docs: fix link to dependency selectors page (@hghmn) - * [`414667a`](https://github.com/npm/cli/commit/414667a1e6d7d7a3ab0cb64704c3aa696eae8715) [#5328](https://github.com/npm/cli/pull/5328) docs(dependency-selectors): fix Arborist example in docs (@kyle-west) - -### Dependencies - - * [`1286f03`](https://github.com/npm/cli/commit/1286f03fe73dee9a447b13b662f0c5622ab6ec9e) [#5381](https://github.com/npm/cli/pull/5381) deps: `unique-filename@2.0.1` - * [`d7e9a8e`](https://github.com/npm/cli/commit/d7e9a8ed5b7c1f9ca8d34e86388a134b2f48fc15) [#5381](https://github.com/npm/cli/pull/5381) deps: `ini@3.0.1` - * [`2c4e387`](https://github.com/npm/cli/commit/2c4e38728f25fd32624df2eb5bbf61c2c40c8ad5) [#5381](https://github.com/npm/cli/pull/5381) deps: `hosted-git-info@5.1.0` - * [`e401a81`](https://github.com/npm/cli/commit/e401a81c784556393bad57283337283a46bd57c5) [#5381](https://github.com/npm/cli/pull/5381) deps: `npm-bundled@2.0.1` - * [`f4205e5`](https://github.com/npm/cli/commit/f4205e57d6c4ee5f2ff7d21ffc116ffc420d191e) [#5381](https://github.com/npm/cli/pull/5381) deps: `diff@5.1.0` - * [`8f7abbe`](https://github.com/npm/cli/commit/8f7abbe4c3ceba451eb422c6328d623e7c8eeed5) [#5381](https://github.com/npm/cli/pull/5381) deps: `npm-packlist@5.1.3` - * [`b12ac01`](https://github.com/npm/cli/commit/b12ac013226b7d86b5b1847d58eabbac2846b153) [#5381](https://github.com/npm/cli/pull/5381) deps: `npm-pick-manifest@7.0.2` - * [`7fbf6f7`](https://github.com/npm/cli/commit/7fbf6f7825f76906ecdec79ab15595f9e2f7b784) [#5381](https://github.com/npm/cli/pull/5381) deps: `bin-links@3.0.3` - * [`7c7f656`](https://github.com/npm/cli/commit/7c7f65629c3dd4fe7fd8254ac38914cf52ad31c2) [#5381](https://github.com/npm/cli/pull/5381) deps: `read-package-json@5.0.2` - * [`26d2e55`](https://github.com/npm/cli/commit/26d2e551b250972caa550d56127810648a1663a1) [#5381](https://github.com/npm/cli/pull/5381) deps: `@npmcli/query@1.2.0` - * [`a79ee00`](https://github.com/npm/cli/commit/a79ee00b530b765ed219e81de77c37057c373adf) [#5381](https://github.com/npm/cli/pull/5381) deps: `cacache@16.1.3` - * [`2561822`](https://github.com/npm/cli/commit/25618229b7698aa8abbfcd2ef32024809f05a1a1) [#5378](https://github.com/npm/cli/pull/5378) deps: `@npmcli/config@4.2.2` - * [`8ab12dc`](https://github.com/npm/cli/commit/8ab12dc32b26db770b868cf694cedab38f4e7460) [#5323](https://github.com/npm/cli/pull/5323) deps: `@npmcli/eslint-config@3.1.0` - * `@npmcli/arborist@^5.6.1` - * [`libnpmaccess@^6.0.4`](https://github.com/npm/cli/compare/libnpmaccess-v6.0.3...libnpmaccess-v6.0.4) - * [`libnpmdiff@^4.0.5`](https://github.com/npm/cli/compare/libnpmdiff-v4.0.4...libnpmdiff-v4.0.5) - * [`libnpmexec@^4.0.12`](https://github.com/npm/cli/compare/libnpmexec-v4.0.11...libnpmexec-v4.0.12) - * [`libnpmfund@^3.0.3`](https://github.com/npm/cli/compare/libnpmfund-v3.0.2...libnpmfund-v3.0.3) - * [`libnpmhook@^8.0.4`](https://github.com/npm/cli/compare/libnpmhook-v8.0.3...libnpmhook-v8.0.4) - * [`libnpmorg@^4.0.4`](https://github.com/npm/cli/compare/libnpmorg-v4.0.3...libnpmorg-v4.0.4) - * [`libnpmpack@^4.1.3`](https://github.com/npm/cli/compare/libnpmpack-v4.1.2...libnpmpack-v4.1.3) - * [`libnpmpublish@^6.0.5`](https://github.com/npm/cli/compare/libnpmpublish-v6.0.4...libnpmpublish-v6.0.5) - * [`libnpmsearch@^5.0.4`](https://github.com/npm/cli/compare/libnpmsearch-v5.0.3...libnpmsearch-v5.0.4) - * [`libnpmteam@^4.0.4`](https://github.com/npm/cli/compare/libnpmteam-v4.0.3...libnpmteam-v4.0.4) - * [`libnpmversion@^3.0.7`](https://github.com/npm/cli/compare/libnpmversion-v3.0.6...libnpmversion-v3.0.7) - -## v8.18.0 (2022-08-17) - -### Features - - * [`e6d4304`](https://github.com/npm/cli/commit/e6d4304bbd03e38dcf2c7467bb1e61b5740a4c73) [#5306](https://github.com/npm/cli/pull/5306) feat(arborist): add overridden getter to Node class ([@nlf](https://github.com/nlf)) - * [`d221f72`](https://github.com/npm/cli/commit/d221f72c00e13258469a748227a1d6f9953a5948) [#5306](https://github.com/npm/cli/pull/5306) feat(arborist): add :overridden pseudo selector ([@nlf](https://github.com/nlf)) - * [`0d4ed0f`](https://github.com/npm/cli/commit/0d4ed0fb1cd86edd827cac0b5367b73bb864a9bf) [#5306](https://github.com/npm/cli/pull/5306) feat(query): support :overridden pseudo selector ([@nlf](https://github.com/nlf)) - -### Bug Fixes - - * [`05d9bcf`](https://github.com/npm/cli/commit/05d9bcf7e557e0dbecbd80d4d1be332963761e69) [#5306](https://github.com/npm/cli/pull/5306) fix(ls): display overridden nodes ([@nlf](https://github.com/nlf)) - * [`cd2b1e6`](https://github.com/npm/cli/commit/cd2b1e6f5fbd85691465bbfe275c8baf1b6e2746) [#5306](https://github.com/npm/cli/pull/5306) fix(explain): display override information ([@nlf](https://github.com/nlf)) - * [`e5a9162`](https://github.com/npm/cli/commit/e5a9162a9dae9471e1ea77ad38baa02bb8d9852e) [#5297](https://github.com/npm/cli/pull/5297) fix: npm exec does not use script-shell option to run commands ([@lux01](https://github.com/lux01)) - * [`6eba131`](https://github.com/npm/cli/commit/6eba13164d84efb34554c7dddeb2dbfed063ac0a) [#5298](https://github.com/npm/cli/pull/5298) fix: don't prompt on `npm exec [directory]` ([@wraithgar](https://github.com/wraithgar)) - -### Documentation - - * [`bc66ffa`](https://github.com/npm/cli/commit/bc66ffa76005c882cc5fd237af87b7ca79375097) [#5304](https://github.com/npm/cli/pull/5304) docs: update --no-optional to --omit=optional ([@wraithgar](https://github.com/wraithgar)) - -### Dependencies - - * [`8460ccf`](https://github.com/npm/cli/commit/8460ccf8de0744e9b7228af682bbeb2eebb00e98) [#5311](https://github.com/npm/cli/pull/5311) deps: `libnpmexec@4.0.11` - * [`41d0f51`](https://github.com/npm/cli/commit/41d0f51c34b24659d080beff0d53905975d34213) [#5310](https://github.com/npm/cli/pull/5310) deps: `@npmcli/arborist@5.6.0` - * [`4e08d71`](https://github.com/npm/cli/commit/4e08d71e76fb2355dc93fcd7695e1ae20d6446af) [#5315](https://github.com/npm/cli/pull/5315) deps: `pacote@13.6.2` - * [`46e8753`](https://github.com/npm/cli/commit/46e875306f551e3b89e2786d0fc8f0f3e4a8aa82) [#5316](https://github.com/npm/cli/pull/5316) deps: `npm-registry-fetch@13.3.1` - * [`d39b2ee`](https://github.com/npm/cli/commit/d39b2ee671f2c7adf041b07a1d4e8bdc24ef7588) [#5318](https://github.com/npm/cli/pull/5318) deps: `normalize-package-data@4.0.1` - * [`7d564bd`](https://github.com/npm/cli/commit/7d564bd73bcac909a922d88986e3a55fe343ca44) [#5318](https://github.com/npm/cli/pull/5318) deps: `make-fetch-happen@10.2.1` - * [`5a56686`](https://github.com/npm/cli/commit/5a566863ca96f641fcecacd1ad20a7c837dccfeb) [#5318](https://github.com/npm/cli/pull/5318) deps: `@npmcli/git@3.0.2` - * [`3c5a866`](https://github.com/npm/cli/commit/3c5a866cc6e58e660a0aedb8ce6fec258e523a21) [#5318](https://github.com/npm/cli/pull/5318) deps: `bin-links@3.0.2` - * [`07536a4`](https://github.com/npm/cli/commit/07536a4be30ac3305fe4827335d621387bae3ca7) [#5318](https://github.com/npm/cli/pull/5318) deps: `@npmcli/fs@2.1.2` - * [`8165501`](https://github.com/npm/cli/commit/81655017172eaedd346b3efe63c5975c803c82b4) [#5318](https://github.com/npm/cli/pull/5318) deps: `@npmcli/move-file@2.0.1` - * [`cbee638`](https://github.com/npm/cli/commit/cbee6385a3231ea9ba02aa23d9dd110ba369217b) [#5318](https://github.com/npm/cli/pull/5318) deps: `cacache@16.1.2` - * [`1f6daf5`](https://github.com/npm/cli/commit/1f6daf5b9df054952a47df01780039bd5da8f024) [#5318](https://github.com/npm/cli/pull/5318) deps: `write-file-atomic@4.0.2` - * [`409468f`](https://github.com/npm/cli/commit/409468f25e783d0941e76c7a9a64a751a574176b) [#5318](https://github.com/npm/cli/pull/5318) deps: `minipass-fetch@2.1.1` - -## v8.17.0 (2022-08-10) - -### Features - - * [`96b6781`](https://github.com/npm/cli/commit/96b6781086143d7285c2c5bf7808c24b2c87e4dd) [#5263](https://github.com/npm/cli/pull/5263) feat(arborist): add option to forcibly skip loading a virtual tree ([@nlf](https://github.com/nlf)) - -### Bug Fixes - - * [`9078e27`](https://github.com/npm/cli/commit/9078e27cef0233d6fc81e0ca824a34fd7685d93c) [#5263](https://github.com/npm/cli/pull/5263) fix(query): tell arborist to load an actual tree, not a virtual one ([@nlf](https://github.com/nlf)) - * [`c992fd6`](https://github.com/npm/cli/commit/c992fd6757505974dc8e92a9e2886d2233e098eb) [#5273](https://github.com/npm/cli/pull/5273) fix: look up local command bins from local tree ([@wraithgar](https://github.com/wraithgar)) - * [`95ae9f2`](https://github.com/npm/cli/commit/95ae9f2e2555ef592777399bf8fee5206d77f41d) [#5253](https://github.com/npm/cli/pull/5253) fix: only try to run global bin if the bin name exists ([@wraithgar](https://github.com/wraithgar)) - * [`daaf461`](https://github.com/npm/cli/commit/daaf4619c85ecf62346770735cfa8e2ddecbef8b) [#5291](https://github.com/npm/cli/pull/5291) fix: ignore global prefix if --prefix is used ([@wraithgar](https://github.com/wraithgar)) - -### Documentation - - * [`f281ec8`](https://github.com/npm/cli/commit/f281ec8a1aec43439281a8fca4c255b0d94a0c94) [#5257](https://github.com/npm/cli/pull/5257) docs: Fix link syntax in `dependency-selectors.md` ([@aried3r](https://github.com/aried3r)) - -### Dependencies - - * [`741bccf`](https://github.com/npm/cli/commit/741bccf24ad1fa420a6c6182e04487abc02f8ccf) [#5284](https://github.com/npm/cli/pull/5284) deps: `@npmcli/config@4.2.1` - * [`7f31b85`](https://github.com/npm/cli/commit/7f31b85db650c7a2b3b0577840251f5e25e63a01) [#5284](https://github.com/npm/cli/pull/5284) deps: `nopt@6.0.0` - * [`2569d82`](https://github.com/npm/cli/commit/2569d82d0408e158b4b28cab6f23e1b7dc468553) [#5284](https://github.com/npm/cli/pull/5284) deps: `node-gyp@9.1.0` - * [`a396f8d`](https://github.com/npm/cli/commit/a396f8dd0968971ddb6f491a0bc645132c82021a) [#5284](https://github.com/npm/cli/pull/5284) deps: `@npmcli/map-workspaces@2.0.4` - * [`a9b5306`](https://github.com/npm/cli/commit/a9b5306627058b8869a6221a0c099493c206a3f2) [#5284](https://github.com/npm/cli/pull/5284) deps: `is-core-module@2.10.0` - * [`786f753`](https://github.com/npm/cli/commit/786f753b0db49340a0e26ec8fb5425773a7f0558) [#5284](https://github.com/npm/cli/pull/5284) deps: `lru-cache@7.13.2` - * [`7b702b6`](https://github.com/npm/cli/commit/7b702b6d490d37bdfa52b623dd42ce185846b1bc) [#5284](https://github.com/npm/cli/pull/5284) deps: `are-we-there-yet@3.0.1` - * [`e74f99e`](https://github.com/npm/cli/commit/e74f99e7ccdfce1519cc45bb58054d94b748146c) [#5284](https://github.com/npm/cli/pull/5284) deps: `just-diff@5.1.1` - * [`9833066`](https://github.com/npm/cli/commit/983306637579ab5c062878c0153671007cceea2b) [#5284](https://github.com/npm/cli/pull/5284) deps: `just-diff-apply@5.4.1` - * [`4e5dd73`](https://github.com/npm/cli/commit/4e5dd732d7fe39490be1d9f8e81cbdba602c67fe) [#5284](https://github.com/npm/cli/pull/5284) deps: `socks@2.7.0` - * [`d0f5995`](https://github.com/npm/cli/commit/d0f5995e0399a093c8037057150a922e56b1d7ca) [#5284](https://github.com/npm/cli/pull/5284) deps: `@npmcli/run-script@4.2.1` - * [`8d870c5`](https://github.com/npm/cli/commit/8d870c56eed20f352695c3c06be07a656ada4ba7) [#5275](https://github.com/npm/cli/pull/5275) deps: `libnpmexec@4.0.10` - -## v8.16.0 (2022-08-03) - -### Features - - * [`3c024ac`](https://github.com/npm/cli/commit/3c024ace60904c69e61da00e1fb56c0c1735804a) [#5000](https://github.com/npm/cli/pull/5000) feat: add npm query cmd ([@ruyadorno](https://github.com/ruyadorno)) ([@wraithgar](https://github.com/wraithgar)) - * [`703dbbf`](https://github.com/npm/cli/commit/703dbbf2a8149dff72c848d60600889a76779828) [#4860](https://github.com/npm/cli/pull/4860) feat: add --replace-registry-host=<npmjs|always|never> ([@fritzy](https://github.com/fritzy)) - -### Bug Fixes - - * [`eac1bf2`](https://github.com/npm/cli/commit/eac1bf26f28e9e8fc07e1350c3d7b14a94005ebf) [#5164](https://github.com/npm/cli/pull/5164) fix(ls): when filtering workspaces, make sure the edge has a to before checking if its a workspace ([@nlf](https://github.com/nlf)) - * [`47cc95d`](https://github.com/npm/cli/commit/47cc95d9ffb37fc8ff62a1d5554eab16d303aa43) [#5227](https://github.com/npm/cli/pull/5227) fix(arborist): use the sourceReference root rather than the node root for overrides ([@nlf](https://github.com/nlf)) - * [`050284d`](https://github.com/npm/cli/commit/050284d2abb6aa91a0f9ffad5b0c4f074e5dbf6d) [#5233](https://github.com/npm/cli/pull/5233) fix(arborist): pass the edge to fromPath in order to determine correct path ([@nlf](https://github.com/nlf)) - * [`d315ead`](https://github.com/npm/cli/commit/d315ead7a7f6d531eb57cfa4350bb08949c60997) [#5243](https://github.com/npm/cli/pull/5243) fix: gracefully exit login and publish commands on Ctrl+C (SIGINT) in the new webAuthn flow ([@neeldani](https://github.com/neeldani)) - * [`ea44995`](https://github.com/npm/cli/commit/ea449954844f21abbf984e09e421f0e03485a535) [#5244](https://github.com/npm/cli/pull/5244) fix: properly find locally/globally/npxCache packages ([@wraithgar](https://github.com/wraithgar)) - * [`19f1497`](https://github.com/npm/cli/commit/19f1497322411f1566885bd53e63dc39f0df27ea) [#5244](https://github.com/npm/cli/pull/5244) fix: use binPaths ([@wraithgar](https://github.com/wraithgar)) - * [`3b30af2`](https://github.com/npm/cli/commit/3b30af25e93665f5aa21897910a65d7f26bbd066) [#5244](https://github.com/npm/cli/pull/5244) fix: fix exec tests and clean up workspace-location-msg ([@wraithgar](https://github.com/wraithgar)) - * [`8233fca`](https://github.com/npm/cli/commit/8233fca44321186c485964d26aa3c7c43eafff3d) [#5248](https://github.com/npm/cli/pull/5248) fix(arborist): fix bare attribute queries ([@darcyclarke](https://github.com/darcyclarke)) - * [`19a8346`](https://github.com/npm/cli/commit/19a834610d154f36748536b27aed13bfdb5ee748) [#5250](https://github.com/npm/cli/pull/5250) fix: properly find and run global scoped packages ([@wraithgar](https://github.com/wraithgar)) - -### Documentation - - * [`a6153cf`](https://github.com/npm/cli/commit/a6153cfd2b0764e69d103b33af6b42978b0403f4) [#5240](https://github.com/npm/cli/pull/5240) docs: Use the full proper name of Travis CI ([@tnir](https://github.com/tnir)) - -### Dependencies - - * [`fd030c8`](https://github.com/npm/cli/commit/fd030c86b1e01b7df1b9d73fda07496742a4737f) [#5245](https://github.com/npm/cli/pull/5245) deps: `npm-profile@6.2.1` - * [`c18dbc4`](https://github.com/npm/cli/commit/c18dbc4393491e02532d698351747307848d2e20) [#5244](https://github.com/npm/cli/pull/5244) deps: add `@npmcli/fs@2.1.1` - * [`cd6bafd`](https://github.com/npm/cli/commit/cd6bafdfbbd7a054709c11850b58f7dbc26eb8da) [#5244](https://github.com/npm/cli/pull/5244) deps: add `semver@7.3.7` - * [`d0be9a2`](https://github.com/npm/cli/commit/d0be9a2bb53e74b30e13751afd1f6924990c8422) [#5244](https://github.com/npm/cli/pull/5244) deps: `@npmcli/run-script@4.2.0` - * [`d55007d`](https://github.com/npm/cli/commit/d55007d9c535b17612a07a7a58cb6be94eedf77a) [#5247](https://github.com/npm/cli/pull/5247) deps: `@npmcli/query@1.1.1` - * [`c650a29`](https://github.com/npm/cli/commit/c650a29a664aa303d8b8761dcf50236baf4bb4ca) [#5241](https://github.com/npm/cli/pull/5241) deps: `@npmcli/arborist@5.4.0` - * [`4b7b48b`](https://github.com/npm/cli/commit/4b7b48befdca90e0114f4c64eac1d96fea1cc191) [#5246](https://github.com/npm/cli/pull/5246) deps: `libnpmexec@4.0.9` - -## v8.15.1 (2022-07-27) - -### Bug Fixes - - * [`9905d0e`](https://github.com/npm/cli/commit/9905d0e24c162c3f6cc006fa86b4c9d0205a4c6f) [#5197](https://github.com/npm/cli/pull/5197) fix: don't fail immediately if cache dir is not accessible ([@lukekarrys](https://github.com/lukekarrys)) - * [`0e3660e`](https://github.com/npm/cli/commit/0e3660eb39bd12a25517d745701bf841811b4623) [#5206](https://github.com/npm/cli/pull/5206) fix(init): allow for spec on scope-only arg ([@wraithgar](https://github.com/wraithgar)) - * [`62b95a0`](https://github.com/npm/cli/commit/62b95a04337661e3fa17093708b57000054442d9) [#5122](https://github.com/npm/cli/pull/5122) fix: allow hash character in paths ([@AgainPsychoX](https://github.com/AgainPsychoX)) - -### Documentation - - * [`f9abee7`](https://github.com/npm/cli/commit/f9abee79abe541226a249f50bdeec41317dd5712) [#5205](https://github.com/npm/cli/pull/5205) docs: update commit-ish default branch ([@dijonkitchen](https://github.com/dijonkitchen)) - * [`77bf2e1`](https://github.com/npm/cli/commit/77bf2e10236b72613101ac21d151f5974240f3aa) [#5218](https://github.com/npm/cli/pull/5218) docs: update npm-ls.md ([@MapleCCC](https://github.com/MapleCCC)) - * [`de40c31`](https://github.com/npm/cli/commit/de40c31d1fe7521ffbc4e22fd233b18eca149afe) [#5207](https://github.com/npm/cli/pull/5207) docs: sync ci params with install ([@wraithgar](https://github.com/wraithgar)) - * [`4d1d8a9`](https://github.com/npm/cli/commit/4d1d8a9561000064fe765ba31a3ad21832721c59) [#5221](https://github.com/npm/cli/pull/5221) docs: describe implicit workspace and prefix configuration ([@fritzy](https://github.com/fritzy)) ([@lukekarrys](https://github.com/lukekarrys)) ([@wraithgar](https://github.com/wraithgar)) - -### Dependencies - - * [`3bbb293`](https://github.com/npm/cli/commit/3bbb2931d09df66186108760353b2992171b057f) [#5223](https://github.com/npm/cli/pull/5223) deps: `@npmcli/arborist@5.3.1` - -## v8.15.0 (2022-07-20) - -### Features - - * [`5ef53ee`](https://github.com/npm/cli/commit/5ef53eedad2871a32611f47001e1c9ca9b813c07) [#5160](https://github.com/npm/cli/pull/5160) feat: accept registry-scoped certfile and keyfile as credentials ([@jenseng](https://github.com/jenseng)) - * [`c8bdb4a`](https://github.com/npm/cli/commit/c8bdb4a2517cf69cccf9bfe5bd5375a5e3d4b5b1) feat: Support pure web authentication for commands ([@jumoel](https://github.com/jumoel)) ([@ljharb](https://github.com/ljharb)) ([@hfaulds](https://github.com/hfaulds)) ([@sandeepmeduru](https://github.com/sandeepmeduru)) - -### Bug Fixes - - * [`9c590fa`](https://github.com/npm/cli/commit/9c590fac8b9b649b3ab7203c48a0abce89e6f3e9) [#5172](https://github.com/npm/cli/pull/5172) fix: disable progress bar on publish ([@wraithgar](https://github.com/wraithgar)) - * [`2fa3271`](https://github.com/npm/cli/commit/2fa3271ba37a58767307cf0105424b3c0b4ba7fe) [#5196](https://github.com/npm/cli/pull/5196) fix: add missing ` in adduser warning ([@MylesBorins](https://github.com/MylesBorins)) - -### Documentation - - * [`7efad06`](https://github.com/npm/cli/commit/7efad065ed4e7bc56e14e94cdcb21f71d547dd9e) [#5168](https://github.com/npm/cli/pull/5168) docs: Update audit signatures cmd ([@feelepxyz](https://github.com/feelepxyz)) - * [`8ab5fca`](https://github.com/npm/cli/commit/8ab5fcabbf9317df096bc727c49a98cf87dda560) [#5171](https://github.com/npm/cli/pull/5171) docs: correct bundledDependencies -> bundleDependencies ([@nlf](https://github.com/nlf)) - -### Dependencies - - * [`64fe64b`](https://github.com/npm/cli/commit/64fe64b74bc66635771ae65003ccc67be5853929) [#5187](https://github.com/npm/cli/pull/5187) deps: `@npmcli/config@4.2.0` - * [`51b12a0`](https://github.com/npm/cli/commit/51b12a085e087609c99befccfd6a98ef8a9919d0) [#5187](https://github.com/npm/cli/pull/5187) deps: `npm-registry-fetch@13.3.0` - * [`3ae1b81`](https://github.com/npm/cli/commit/3ae1b814aa557ccb5b639a57715f67119754ea76) [#5190](https://github.com/npm/cli/pull/5190) deps: `make-fetch-happen@10.2.0` - -## v8.14.0 (2022-07-13) - -### Features - - * [`f032e1c`](https://github.com/npm/cli/commit/f032e1c0ada062e2139c8f057b24abb1ce2e4a33) [#4827](https://github.com/npm/cli/pull/4827) feat: add npm audit signatures ([@feelepxyz](https://github.com/feelepxyz)) - * [`e8102c1`](https://github.com/npm/cli/commit/e8102c1aae65a18e41253fbcdffe2eff0bedae53) [#5076](https://github.com/npm/cli/pull/5076) feat: Add `web` auth type ([@jumoel](https://github.com/jumoel)) - * [`e9b4214`](https://github.com/npm/cli/commit/e9b4214e1ddb1ad79fe6826cf2ce7ba385f0c274) [#5094](https://github.com/npm/cli/pull/5094) feat(arborist): add support for dependencies script ([@nlf](https://github.com/nlf)) - * [`c6c4ba3`](https://github.com/npm/cli/commit/c6c4ba3b62e2a0896a48329f4c7e13d9e44a2f80) [#5149](https://github.com/npm/cli/pull/5149) feat: notify on adduser of upcoming cmds, login and register ([@fritzy](https://github.com/fritzy)) - * [`e58f02f`](https://github.com/npm/cli/commit/e58f02f5e8263bf86ae1f07a863098d445e6d0cd) [#5149](https://github.com/npm/cli/pull/5149) feat: warn on config --auth-type=sso/saml/oauth, undeprecate --auth-type ([@fritzy](https://github.com/fritzy)) - -### Bug Fixes - - * [`52ec5ec`](https://github.com/npm/cli/commit/52ec5ec61fd3b266efd7a9c5712dd6a769a2d365) [#5154](https://github.com/npm/cli/pull/5154) fix: properly open package arg repo inside workspace ([@wraithgar](https://github.com/wraithgar)) - -### Documentation - - * [`9697f16`](https://github.com/npm/cli/commit/9697f16952b1bf02bb5455c36a1995277cbc0c97) [#5118](https://github.com/npm/cli/pull/5118) docs: typo in npm command ([@crisanmm](https://github.com/crisanmm)) - * [`da5a4ba`](https://github.com/npm/cli/commit/da5a4ba2c83af9a7e5e0fe38c32136adf396f557) [#5079](https://github.com/npm/cli/pull/5079) docs: update reference to deprecated spdx package ([@kachick](https://github.com/kachick)) - * [`25b3058`](https://github.com/npm/cli/commit/25b305830be0892bbbf0245aee2eebdb76ee2ce3) [#5043](https://github.com/npm/cli/pull/5043) docs: naming of files in example code should be consistent ([@xc1427](https://github.com/xc1427)) - * [`ac56fc4`](https://github.com/npm/cli/commit/ac56fc41bc2f91f51c8438f98893121e7a92ee46) [#5095](https://github.com/npm/cli/pull/5095) docs: document `dependencies` script ([@nlf](https://github.com/nlf)) - -### Dependencies - - * [`cb0db7c`](https://github.com/npm/cli/commit/cb0db7c3fd1d0a4c30db9f44e9ea9e69ec327fe8) [#5147](https://github.com/npm/cli/pull/5147) deps: `@npmcli/arborist@5.3.0` - * [`b8c0580`](https://github.com/npm/cli/commit/b8c0580e5df93aa519b3ec240bb85d59eee5ee37) [#5156](https://github.com/npm/cli/pull/5156) deps: `minipass@3.3.4` - * [`ad72611`](https://github.com/npm/cli/commit/ad726118755ef577cc0755499d35a5d3c74d54a6) [#5156](https://github.com/npm/cli/pull/5156) deps: `lru-cache@7.12.0` - * [`c94919d`](https://github.com/npm/cli/commit/c94919dd4874196d3a84eff4fab450a17dcd4867) [#5156](https://github.com/npm/cli/pull/5156) deps: `just-diff@5.0.3` - * [`18ddc57`](https://github.com/npm/cli/commit/18ddc57c7a54165d55c81b413ef9de981c790148) [#5156](https://github.com/npm/cli/pull/5156) deps: `just-diff-apply@5.3.1` - * [`a2d700b`](https://github.com/npm/cli/commit/a2d700b3cc7cebca2d1b0c16224af41da3689aaf) [#5156](https://github.com/npm/cli/pull/5156) deps: `npm-package-arg@9.1.0` - * [`99dc697`](https://github.com/npm/cli/commit/99dc697409e1eb42caaf0c0e38fa41635d89a871) [#5156](https://github.com/npm/cli/pull/5156) deps: `@npmcli/run-script@4.1.7` - * [`4a9f2dc`](https://github.com/npm/cli/commit/4a9f2dc9169fd330c4dcf2bad7890aaf4765bafa) [#5157](https://github.com/npm/cli/pull/5157) deps: `npm-registry-fetch@13.2.0` - * [`45a9bde`](https://github.com/npm/cli/commit/45a9bdee604073a3c5b4d3c6d90e22bf6672d6bf) [#5158](https://github.com/npm/cli/pull/5158) deps: `npm-profile@6.2.0` - -## v8.13.2 (2022-06-29) - -### Documentation - - * [`5be7d6e`](https://github.com/npm/cli/commit/5be7d6ea555bc25acaae1bfd309d64ce6693b084) [#5087](https://github.com/npm/cli/pull/5087) docs: add foreground-scripts to run-script page ([@ruyadorno](https://github.com/ruyadorno)) - -### Dependencies - - * [`dd62328`](https://github.com/npm/cli/commit/dd6232817d8c86afa4eb27ec1f62278893443163) [#5086](https://github.com/npm/cli/pull/5086) deps: `@npmcli/run-script@4.1.4` - * [`5546906`](https://github.com/npm/cli/commit/5546906977bae55c61a3874e2cbf10e28f2df4ea) [#5086](https://github.com/npm/cli/pull/5086) deps: `@npmcli/run-script@4.1.5` - * [`c7d5a69`](https://github.com/npm/cli/commit/c7d5a69080b5de6ed0f1cdde77e7d7a3c6b05158) [#5102](https://github.com/npm/cli/pull/5102) deps: `@npmcli/metavuln-calculator@3.1.1` - * [`7ce66b0`](https://github.com/npm/cli/commit/7ce66b017a611458b4ce385c13c446d89c23d777) [#5103](https://github.com/npm/cli/pull/5103) deps: `npm-packlist@5.1.1` - -## v8.13.1 (2022-06-23) - -### Dependencies - - * [`f59a114`](https://github.com/npm/cli/commit/f59a114ffe3d1f86ccb2e52a4432292ab76852cc) [#5064](https://github.com/npm/cli/pull/5064) deps: `@npmcli/run-script@4.1.3` - * fix: improves escaping of arguments for run-script, exec and npx ([@nlf](https://github.com/nlf)) - * [`236b4a2`](https://github.com/npm/cli/commit/236b4a21046c4cb43a1aaa8bde09f4cec2aa1fb6) [#5069](https://github.com/npm/cli/pull/5069) deps: `libnpmpack@4.1.2` - * [`0a6664d`](https://github.com/npm/cli/commit/0a6664d285b300f26764efaa2798a5b6045b95a1) [#5070](https://github.com/npm/cli/pull/5070) deps: `@npmcli/arborist@5.2.3` - * [`9f94049`](https://github.com/npm/cli/commit/9f94049f058687b916da726ea625b5fa68d0829d) [#5071](https://github.com/npm/cli/pull/5071) deps: `libnpmexec@4.0.8` - * [`8212363`](https://github.com/npm/cli/commit/8212363280f02c10f38e22c2dcd7e2abdf8bec35) [#5072](https://github.com/npm/cli/pull/5072) deps: `libnpmversion@3.0.6` - -## v8.13.0 (2022-06-22) - -### Features - - * [`06fd788`](https://github.com/npm/cli/commit/06fd788f79e16da04d6e96aa56416cd2698f057a) [#4960](https://github.com/npm/cli/pull/4960) feat: prompt before opening web-login URL when performing `login`/`adduser` ([@jumoel](https://github.com/jumoel)) - -### Bug Fixes - - * [`e03009f`](https://github.com/npm/cli/commit/e03009f4b423e85e498f1b1851fae785de91a73d) [#5042](https://github.com/npm/cli/pull/5042) fix: Add space to SemVer log message ([@dnicolson](https://github.com/dnicolson)) - * [`2953983`](https://github.com/npm/cli/commit/2953983ad5c5e830a5844be5d6d0a2b49863c05d) [#5035](https://github.com/npm/cli/pull/5035) fix(view): error on missing version ([@wraithgar](https://github.com/wraithgar)) - -### Documentation - - * [`69b5a96`](https://github.com/npm/cli/commit/69b5a9674e8c03219c3da088b35b8ec6dea69770) [#5048](https://github.com/npm/cli/pull/5048) docs: consolidate docs and help for package spec ([@wraithgar](https://github.com/wraithgar)) - * [`facba42`](https://github.com/npm/cli/commit/facba42bcd2a10722788f44de13ea46cde6c8e71) [#5030](https://github.com/npm/cli/pull/5030) docs: fix typo ([@westy92](https://github.com/westy92)) - -### Dependencies - - * [`2e50cb8`](https://github.com/npm/cli/commit/2e50cb83e84cf25fee93ba0ca5a0343fbdb33c41) [#5049](https://github.com/npm/cli/pull/5049) deps: `pacote@13.6.1` - * [`2c06cee`](https://github.com/npm/cli/commit/2c06ceee82dd813c0ae84cc0b09e6941cfc5533e) [#5049](https://github.com/npm/cli/pull/5049) deps: `@npmcli/run-script@4.1.0` - * [`61112f7`](https://github.com/npm/cli/commit/61112f718efd1dd31e56c98321b721692e19f032) [#5044](https://github.com/npm/cli/pull/5044) deps: `make-fetch-happen@10.1.8` - * [`01eef03`](https://github.com/npm/cli/commit/01eef035cf3c14136fc68da09b05b2ff9d73f2e1) [#5034](https://github.com/npm/cli/pull/5034) deps: `npm-profile@6.1.0` - * [`afa10c7`](https://github.com/npm/cli/commit/afa10c747e44bc6fa12cfeb3ece7a8e25ac4beae) [#5063](https://github.com/npm/cli/pull/5063) deps: `libnpmdiff@4.0.4` - * [`a5be4d6`](https://github.com/npm/cli/commit/a5be4d612ff1ce2b31e2246cf17308652e804ce1) [#5062](https://github.com/npm/cli/pull/5062) deps: `libnpmversion@3.0.5` - * [`3ea332b`](https://github.com/npm/cli/commit/3ea332b1cbc24c82c1ee7523b4fb37d295d47243) [#5061](https://github.com/npm/cli/pull/5061) deps: `libnpmpack@4.1.1` - * [`14a08d6`](https://github.com/npm/cli/commit/14a08d6ceb57130a2e4bdbad74ebf4944c92890e) [#5060](https://github.com/npm/cli/pull/5060) deps: `libnpmexec@4.0.7` - * [`1ab9776`](https://github.com/npm/cli/commit/1ab9776b5db12d2fd14bf379ce0ae715a49a68fa) [#5059](https://github.com/npm/cli/pull/5059) deps: `@npmcli/arborist@5.2.2` - -## v8.12.2 (2022-06-15) - -### Dependencies - - * [`053dffe`](https://github.com/npm/cli/commit/053dffe2adf4bc5cc33e98de63f9331f47be23ea) [#4986](https://github.com/npm/cli/pull/4986) deps: `make-fetch-happen@10.1.7` - * [`d404c8c`](https://github.com/npm/cli/commit/d404c8c9d3f86e7491070210a763e701582830e0) [#4985](https://github.com/npm/cli/pull/4985) deps: `cacache@16.1.1` - -## v8.12.1 (2022-06-02) - -### Bug Fixes - - * [`40c823c`](https://github.com/npm/cli/commit/40c823cc7d33d22f659a1ccceed440baacaaff1d) [#4982](https://github.com/npm/cli/pull/4982) fix: undeprecate and remove warnings for --global, -g, --local ([@fritzy](https://github.com/fritzy)) - -## v8.12.0 (2022-06-01) - -### Features - - * [`aee6fc8`](https://github.com/npm/cli/commit/aee6fc857458ac660bf90ecd0af94212c7269fd7) [#4892](https://github.com/npm/cli/pull/4892) feat(init): reify on init new workspace ([@ruyadorno](https://github.com/ruyadorno)) - * [`a8ae177`](https://github.com/npm/cli/commit/a8ae17775a24ccbaf4570530d7433e0d290b3793) [#4931](https://github.com/npm/cli/pull/4931) feat: Add `--auth-type=webauthn` flag ([@jumoel](https://github.com/jumoel)) - -### Bug Fixes - - * [`646b6b5`](https://github.com/npm/cli/commit/646b6b5d05de937beb8202e5fd8b8daf3e58e902) [#4963](https://github.com/npm/cli/pull/4963) fix(arborist): use rawSpec for bundled and shrinkwrapped deps ([@nlf](https://github.com/nlf)) - * [`fcc72dd`](https://github.com/npm/cli/commit/fcc72dd8791187f4b3d8705fb23c2744c83ef943) [#4929](https://github.com/npm/cli/pull/4929) fix(libnpmexec): fix bug not install latest pkg ([@jihunleekr](https://github.com/jihunleekr)) - -### Dependencies - - * [`a6b62b2`](https://github.com/npm/cli/commit/a6b62b2b0a3a22c4039b41b527ebdf8d06b0e1f1) [#4949](https://github.com/npm/cli/pull/4949) deps: `make-fetch-happen@10.1.6` - * [`fb4cc24`](https://github.com/npm/cli/commit/fb4cc249a413af1ecfe6b2be14b1d376f787a03d) [#4969](https://github.com/npm/cli/pull/4969) deps: `pacote@13.6.0` - * [`5b9688c`](https://github.com/npm/cli/commit/5b9688cfd832ae72071a89ee7a7c3a939df91c58) [#4971](https://github.com/npm/cli/pull/4971) deps: `glob@8.0.3` - * [`a8bfdd8`](https://github.com/npm/cli/commit/a8bfdd8e8f3939f9be1d61567ee19ed4834e64be) [#4972](https://github.com/npm/cli/pull/4972) deps: `minimatch@5.1.0` - * [`66981ec`](https://github.com/npm/cli/commit/66981ecf08b888fde9188c162cc928fff7d6d9d6) [#4973](https://github.com/npm/cli/pull/4973) deps: `tap@16.2.0` - * [`180a7e4`](https://github.com/npm/cli/commit/180a7e4647ded3d3bca5cd9a2fa8d264b7d2104a) [#4975](https://github.com/npm/cli/pull/4975) deps: `@npmcli/arborist@5.2.1` - * [`0886f7f`](https://github.com/npm/cli/commit/0886f7fa5ac641137052782698407ada230c611c) [#4976](https://github.com/npm/cli/pull/4976) deps: `libnpmexec@4.0.6` - -## v8.11.0 (2022-05-25) - -### Features - - * [`8898710`](https://github.com/npm/cli/commit/8898710220a3d84b0a9ea2a6d9cf880e50b94c9e) [#4879](https://github.com/npm/cli/pull/4879) feat: deprecated set-script, birthday, --global, and --local ([@fritzy](https://github.com/fritzy)) - * [`7307c8d`](https://github.com/npm/cli/commit/7307c8de388cd14c96c42d70b7e567ec343ad084) [#4940](https://github.com/npm/cli/pull/4940) feat(libnpmpack): bump pacote for better workspace awareness ([@nlf](https://github.com/nlf)) - -### Bug Fixes - - * [`400c80f`](https://github.com/npm/cli/commit/400c80f570228a2c0ffe09d6564cc88dc2f356c3) [#4913](https://github.com/npm/cli/pull/4913) fix(ci): remove node_modules post-validation ([@wraithgar](https://github.com/wraithgar)) - * [`124df81`](https://github.com/npm/cli/commit/124df81391ea5810b29d2af9500ed597f076d597) [#4910](https://github.com/npm/cli/pull/4910) fix: clean up npm cache tests ([@wraithgar](https://github.com/wraithgar)) - * [`ee3308a`](https://github.com/npm/cli/commit/ee3308a7a08799ec7e86237165ebaf278d9a4f9f) fix: remove dead code from get-identity ([@wraithgar](https://github.com/wraithgar)) - * [`357b0af`](https://github.com/npm/cli/commit/357b0af2af2b07a58d2d837043d1d77c9495d8b5) [#4917](https://github.com/npm/cli/pull/4917) fix: pass prefix and workspaces to libnpmpack ([@nlf](https://github.com/nlf)) - * [`0f89e07`](https://github.com/npm/cli/commit/0f89e0750f2ac9b5b4794b5718d047b5286283c8) [#4935](https://github.com/npm/cli/pull/4935) fix: add global getter to npm class ([@nlf](https://github.com/nlf)) - -### Documentation - - * [`83ed8d0`](https://github.com/npm/cli/commit/83ed8d0d4fb51716fa58608fa3c1ee8eb0a93571) [#4922](https://github.com/npm/cli/pull/4922) docs: update roadmap link in readme ([@OmriBarZik](https://github.com/OmriBarZik)) - * [`ed054d4`](https://github.com/npm/cli/commit/ed054d477093be3da96968d217c244cf2efd3ef1) [#4933](https://github.com/npm/cli/pull/4933) docs: fix broken link in changelog ([@yonran](https://github.com/yonran)) - -### Dependencies - - * [`632ce87`](https://github.com/npm/cli/commit/632ce87bbd23707cba2c49b95d5db755b3d68638) [#4915](https://github.com/npm/cli/pull/4915) deps: `cacache@16.1.0` - * [`7b2b77a`](https://github.com/npm/cli/commit/7b2b77adca730e516c1b187092374a01de7f0f56) [#4915](https://github.com/npm/cli/pull/4915) deps: `make-fetch-happen@10.1.5` - * [`f3b0a24`](https://github.com/npm/cli/commit/f3b0a2407c7e213b1660ef7024c861dcb0eacb50) [#4915](https://github.com/npm/cli/pull/4915) deps: `pacote@13.4.1` - * [`0df3011`](https://github.com/npm/cli/commit/0df3011ec59ba76c12fb8fbfb29ff4d601cc4bdb) [#4915](https://github.com/npm/cli/pull/4915) deps: `ssri@9.0.1` - * [`dc38ab9`](https://github.com/npm/cli/commit/dc38ab96fca99069449e6c5e492062b94a1264b6) [#4919](https://github.com/npm/cli/pull/4919) deps: `npm-packlist@5.0.4` - * [`353e2f9`](https://github.com/npm/cli/commit/353e2f9dc60a5d319d4105822a9e0b2ddbf82bc0) [#4940](https://github.com/npm/cli/pull/4940) deps: `pacote@13.5.0 npm-packlist@5.1.0` - * [`f4d4126`](https://github.com/npm/cli/commit/f4d41265931c3c2eee433e27f4535c7a209e69fa) [#4941](https://github.com/npm/cli/pull/4941) deps: `libnpmpack@4.1.0` - -## v8.10.0 (2022-05-11) - -### Features - - * [`911f55d`](https://github.com/npm/cli/commit/911f55dc6ac3672f48740d0675f67c934c01aaf4) [#4864](https://github.com/npm/cli/pull/4864) feat: add --iwr alias for --include-workspace-root ([@fritzy](https://github.com/fritzy)) - * [`bfb8bcc`](https://github.com/npm/cli/commit/bfb8bccbe83753e527b43c8a3889696087dbe8f1) [#4874](https://github.com/npm/cli/pull/4874) feat: add flag --omit-lockfile-registry-resolved ([@fritzy](https://github.com/fritzy)) ([Caleb ツ Everett](mailto:calebev@amazon.com)) - -### Bug Fixes - - * [`48d2db6`](https://github.com/npm/cli/commit/48d2db6037487fd782f67bbcd2cf12e009ece17b) [#4862](https://github.com/npm/cli/pull/4862) fix: remove test coverage map ([@wraithgar](https://github.com/wraithgar)) - * [`38cf29a`](https://github.com/npm/cli/commit/38cf29a0054544c575b6bce953f1d433dbb6a3b5) [#4868](https://github.com/npm/cli/pull/4868) fix: cleanup star/unstar ([@wraithgar](https://github.com/wraithgar)) - * [`5baa4a7`](https://github.com/npm/cli/commit/5baa4a7c64319485604982f9060702a7cee8a85c) [#4857](https://github.com/npm/cli/pull/4857) fix: consolidate bugs, docs, repo command logic ([@wraithgar](https://github.com/wraithgar)) - * [`5a50762`](https://github.com/npm/cli/commit/5a50762faa37ae5964ae6f12595b20b367056c0a) [#4875](https://github.com/npm/cli/pull/4875) fix(arborist): link deps lifecycle scripts ([@ruyadorno](https://github.com/ruyadorno)) - -### Dependencies - - * [`d58bf40`](https://github.com/npm/cli/commit/d58bf40abf7c3ff8ae400f50e5e5a19c33138707) [#4856](https://github.com/npm/cli/pull/4856) deps: `npm-packlist@5.0.3` - * [`86f443e`](https://github.com/npm/cli/commit/86f443e97aa58c1a06b8eb6f523656274234bb71) [#4872](https://github.com/npm/cli/pull/4872) deps: `make-fetch-happen@10.1.3` - * [`f9984e6`](https://github.com/npm/cli/commit/f9984e64e714937fa69f14850a1d3ed7ccfc934c) [#4880](https://github.com/npm/cli/pull/4880) deps: `@npmcli/arborist@5.2.0` - * [`ba59915`](https://github.com/npm/cli/commit/ba599154dc8ea9f424410fb7dc382d5829215920) [#4881](https://github.com/npm/cli/pull/4881) deps: `socks-proxy-agent@6.2.0` - * [`c0806ba`](https://github.com/npm/cli/commit/c0806ba2b325456199069b245446c8a86e7feae2) [#4881](https://github.com/npm/cli/pull/4881) deps: `http-proxy-agent@5.0.1` - * [`cc7be6b`](https://github.com/npm/cli/commit/cc7be6b8b63a7314066e8763589a57e5a6e77d30) [#4881](https://github.com/npm/cli/pull/4881) deps: `is-core-module@2.9.0` - * [`0432c7d`](https://github.com/npm/cli/commit/0432c7d8a22ddbfdf238c2b22dd3c7bd263e2d6c) [#4881](https://github.com/npm/cli/pull/4881) deps: `lru-cache@7.9.0` - * [`5778820`](https://github.com/npm/cli/commit/57788204646a6aa5a384630a5640bf00efa25ce0) [#4881](https://github.com/npm/cli/pull/4881) deps: `just-diff@5.0.2` - * [`893dd00`](https://github.com/npm/cli/commit/893dd0066e2315f0d9937fe05879957e1446b755) [#4881](https://github.com/npm/cli/pull/4881) deps: `ip@1.1.8` - * [`6ab85bd`](https://github.com/npm/cli/commit/6ab85bd5df88ade023f7e4895d07a39228d23a33) [#4881](https://github.com/npm/cli/pull/4881) deps: `builtins@5.0.1` - -## v8.9.0 (2022-05-04) - -### Features - - * [`62af3a1`](https://github.com/npm/cli/commit/62af3a1dc003cf23c563d18437be81f61e65cb49) [#4835](https://github.com/npm/cli/pull/4835) feat: make npm owner workspace aware ([@wraithgar](https://github.com/wraithgar)) - -### Bug Fixes - - * [`d654e7e`](https://github.com/npm/cli/commit/d654e7e9146f123a9806cfd9a17150eb1f6075a4) [#4781](https://github.com/npm/cli/pull/4781) fix: start consolidating color output ([@wraithgar](https://github.com/wraithgar)) - * [`b9a966c`](https://github.com/npm/cli/commit/b9a966cf33cfa9b1e5f16c16219f63633bbe19d6) [#4843](https://github.com/npm/cli/pull/4843) fix(exec): ignore packageLockOnly flag ([@nlf](https://github.com/nlf)) - -### Documentation - - * [`8fd7eec`](https://github.com/npm/cli/commit/8fd7eec8ef76224dd8a9874a1044a0cc8f5e1c49) [#4845](https://github.com/npm/cli/pull/4845) docs: remove incorrect v6 auto prune info ([@wraithgar](https://github.com/wraithgar)) - * [`5f59f80`](https://github.com/npm/cli/commit/5f59f803d1c6cdc690d4d7016990ca0e20c6706f) [#4847](https://github.com/npm/cli/pull/4847) docs: show complex object interactions in npm pkg ([@wraithgar](https://github.com/wraithgar)) - -### Dependencies - - * [`62faf8a`](https://github.com/npm/cli/commit/62faf8adba19d6ef26238887a453d013fe58ae75) [#4837](https://github.com/npm/cli/pull/4837) deps: `pacote@13.2.0` - * [`4ff7d3d`](https://github.com/npm/cli/commit/4ff7d3d993533d6407fa69c5e6dd00f95090a280) [#4816](https://github.com/npm/cli/pull/4816) deps: `cacache@16.0.7` - * [`e2e9c81`](https://github.com/npm/cli/commit/e2e9c8152e2d2adcb7e2dfc90f61353d50e433ba) [#4852](https://github.com/npm/cli/pull/4852) deps: `pacote@13.3.0` - -## v8.8.0 (2022-04-27) - -### Features - - * [`bedd8a1`](https://github.com/npm/cli/commit/bedd8a1f5844b5b379af5a756baa70821d78c610) [#4745](https://github.com/npm/cli/pull/4745) feat: add install-links config definition ([@nlf](https://github.com/nlf)) - -### Bug Fixes - - * [`6253d19`](https://github.com/npm/cli/commit/6253d1968d8390ea6b16604ff3abb5e6509349c9) [#4643](https://github.com/npm/cli/pull/4643) fix(exec): workspaces support ([@ruyadorno](https://github.com/ruyadorno)) - * [`e9163b4`](https://github.com/npm/cli/commit/e9163b48d8e46a80d2a4cc98c492b94dfa152cb8) [#4657](https://github.com/npm/cli/pull/4657) fix(libnpmpublish): unpublish from custom registry ([@ruyadorno](https://github.com/ruyadorno)) - * [`a677f49`](https://github.com/npm/cli/commit/a677f49e29ee9d472c8c9aa1c9eb3d5d8b4ee4a9) [#4778](https://github.com/npm/cli/pull/4778) fix: Use node in and fallback to PATH if not found ([@elibus](https://github.com/elibus)) - * [`b10462e`](https://github.com/npm/cli/commit/b10462ed156ada4d4ad90e6cf613e292a9361a87) [#4752](https://github.com/npm/cli/pull/4752) fix: completion for `deprecate` cmd ([@wraithgar](https://github.com/wraithgar)) - * [`ced0acf`](https://github.com/npm/cli/commit/ced0acfe5998a5be9313815f76f5c1439a09db78) [#4775](https://github.com/npm/cli/pull/4775) fix: consolidate registryConfig application logic ([@wraithgar](https://github.com/wraithgar)) - * [`b06e89f`](https://github.com/npm/cli/commit/b06e89f434fe8f104e71d4d8b5c98f1e866efdfa) [#4679](https://github.com/npm/cli/pull/4679) fix(install): do not install invalid package name ([@ruyadorno](https://github.com/ruyadorno)) - * [`9ea2603`](https://github.com/npm/cli/commit/9ea26038ad4d3dc971d442cba2bb02a35755c07a) [#4786](https://github.com/npm/cli/pull/4786) fix: normalize win32 paths before globbing ([@lukekarrys](https://github.com/lukekarrys)) - * [`8da28b4`](https://github.com/npm/cli/commit/8da28b403f32d2e99c842893bdc40429b8ffa9a7) [#4757](https://github.com/npm/cli/pull/4757) fix: remove `lib/utils/read-package-name.js` ([@wraithgar](https://github.com/wraithgar)) - -### Documentation - - * [`a6ea884`](https://github.com/npm/cli/commit/a6ea8843a9761d4392b3344400eb56e07691a91d) [#4745](https://github.com/npm/cli/pull/4745) docs: add some more docs for --install-links ([@nlf](https://github.com/nlf)) - * [`6cd6831`](https://github.com/npm/cli/commit/6cd6831eaa9e1681e07f6646e6f13cce344e1250) [#4782](https://github.com/npm/cli/pull/4782) docs: explain that _auth only goes to npm registry ([@wraithgar](https://github.com/wraithgar)) - * [`fa3d829`](https://github.com/npm/cli/commit/fa3d82989df7071cfe500c5f9cc09c597bcc17ee) [#4772](https://github.com/npm/cli/pull/4772) docs: include org instructions in scoped publish ([@bnb](https://github.com/bnb)) - -### Dependencies - - * [`36899d1`](https://github.com/npm/cli/commit/36899d193b8e8ee6019b04aa5e6a3a9a641a3172) [#4807](https://github.com/npm/cli/pull/4807) deps: `@npmcli/arborist@5.1.1` - * [`0ebadf5`](https://github.com/npm/cli/commit/0ebadf5b603368557e9e837a46ea5c59c2677a81) [#4745](https://github.com/npm/cli/pull/4745) add support for installLinks ([@nlf](https://github.com/nlf)) - * [`3d96494`](https://github.com/npm/cli/commit/3d964940f410052918e37a9b05818fe9dc4cd86a) [#4745](https://github.com/npm/cli/pull/4745) when replacing a Link with a Node, make sure to remove the Link target from the root ([@nlf](https://github.com/nlf)) - * [`3f2b24a`](https://github.com/npm/cli/commit/3f2b24afe205547dbbadf5a6313e95f6b565fb49) [#4786](https://github.com/npm/cli/pull/4786) deps: `@npmcli/map-workspaces@2.0.3` - * [`b1b6948`](https://github.com/npm/cli/commit/b1b69487637ce99192dc930257eebae9eed4fe7f) [#4808](https://github.com/npm/cli/pull/4808) deps: `libnpmexec@4.0.5` - * [`4a46a27`](https://github.com/npm/cli/commit/4a46a27f2b968e2f8c1f4821508f93013738c482) [#4777](https://github.com/npm/cli/pull/4777) fix read mixed local/registry pkg ([@ruyadorno](https://github.com/ruyadorno)) - * [`9f57404`](https://github.com/npm/cli/commit/9f57404dc148835d7393b5fe617c8c5e2c958061) [#4743](https://github.com/npm/cli/pull/4743) deps: `npm-registry-fetch@13.1.1` - * [`532883f`](https://github.com/npm/cli/commit/532883ffc35fc1cc9aec09f03bf5ee0f256b94a4) [#4786](https://github.com/npm/cli/pull/4786) deps: `cacache@16.0.6` - * [`4d1398e`](https://github.com/npm/cli/commit/4d1398e347ed56464d7afd8ef0b3a3bc82b2f19f) [#4786](https://github.com/npm/cli/pull/4786) deps: `npm-profile@6.0.3` - * [`5e31322`](https://github.com/npm/cli/commit/5e313223100db1207818d756b081eaba3468b273) [#4786](https://github.com/npm/cli/pull/4786) deps: `npmlog@6.0.2` - * [`4eb2ccb`](https://github.com/npm/cli/commit/4eb2ccbacbd2ca55f2a41a104ee20578542fc52f) [#4786](https://github.com/npm/cli/pull/4786) deps: `read-package-json@5.0.1` - * [`aeb54e4`](https://github.com/npm/cli/commit/aeb54e41b613f4a98d1f02d255b3a564c43270d8) [#4786](https://github.com/npm/cli/pull/4786) deps: `glob@8.0.1` - * [`252b2b1`](https://github.com/npm/cli/commit/252b2b1e8caaf1c26e5ab6836a83ec430d2a699a) [#4786](https://github.com/npm/cli/pull/4786) deps: `npm-packlist@5.0.2` - * [`c51e553`](https://github.com/npm/cli/commit/c51e553a32315e4f1b703ca9030eb7ade91d1a85) [#4786](https://github.com/npm/cli/pull/4786) deps: `semver@7.3.7` - * [`13299ee`](https://github.com/npm/cli/commit/13299eed80db9a05f0b0a063b8936c0148ec3037) [#4786](https://github.com/npm/cli/pull/4786) deps: `lru-cache@7.8.1` - * [`0f2da5d`](https://github.com/npm/cli/commit/0f2da5dca54862707a00d2254bf4c0b4c2e0be60) [#4786](https://github.com/npm/cli/pull/4786) deps: `cli-table3@0.6.2` - * [`0ee57f1`](https://github.com/npm/cli/commit/0ee57f1492893da84686f4340feeb0469fb751f8) [#4805](https://github.com/npm/cli/pull/4805) deps: `libnpmpublish@6.0.4` - * [`8a633a4`](https://github.com/npm/cli/commit/8a633a436cf37dad293af3aaf8ea9a0b5badf314) [#4806](https://github.com/npm/cli/pull/4806) deps: `libnpmversion@3.0.4` - -## v8.7.0 (2022-04-13) - -### Features - - * [`6611e91`](https://github.com/npm/cli/commit/6611e9147f1726ab4537a7fe3b9e3beb6728f700) [#4723](https://github.com/npm/cli/pull/4723) feat(config): add more npm/node information to config ls ([@lukekarrys](https://github.com/lukekarrys)) - * [`c057b90`](https://github.com/npm/cli/commit/c057b90d0954ff5b6f2973748ae5d41885b99213) [#4740](https://github.com/npm/cli/pull/4740) feat(config): warn on deprecated configs ([@lukekarrys](https://github.com/lukekarrys)) - -### Bug Fixes - - * [`2829cb2`](https://github.com/npm/cli/commit/2829cb28a432b5ff7beeeb3bf3e7e2e174c1121d) [#4658](https://github.com/npm/cli/pull/4658) fix: update readme badges ([@lukekarrys](https://github.com/lukekarrys)) - * [`e3da5df`](https://github.com/npm/cli/commit/e3da5df4152fbe547f7871547165328e1bf06262) [#4667](https://github.com/npm/cli/pull/4667) fix: replace deprecated String.prototype.substr() ([@CommanderRoot](https://github.com/CommanderRoot)) - * [`2a26e5e`](https://github.com/npm/cli/commit/2a26e5e21af788f025a5731d88f15f6dc88b4c0c) [#4645](https://github.com/npm/cli/pull/4645) fix: remove dedupe --save ([@wraithgar](https://github.com/wraithgar)) - * [`47438ff`](https://github.com/npm/cli/commit/47438ff19f4b6e84a0325ed73b97999ce34bc789) [#4645](https://github.com/npm/cli/pull/4645) fix: do not export npm_config_include_workspace_root ([@wraithgar](https://github.com/wraithgar)) - * [`840c338`](https://github.com/npm/cli/commit/840c338aa6aba7dc39d9d3afba075701e3979362) [#4678](https://github.com/npm/cli/pull/4678) fix(run-script): don't cascade if-present config ([@ruyadorno](https://github.com/ruyadorno)) - * [`4d676e3`](https://github.com/npm/cli/commit/4d676e31a68f081b8553eff4e79db1f29acf47e1) [#4709](https://github.com/npm/cli/pull/4709) fix(arborist): when reloading an edge, also refresh overrides ([@nlf](https://github.com/nlf)) - * [`3f7fe17`](https://github.com/npm/cli/commit/3f7fe17d1ea743b3ce1f27b9156e9fa0e358a7df) [#4659](https://github.com/npm/cli/pull/4659) fix: skip update notifier file if not requested ([@lukekarrys](https://github.com/lukekarrys)) - * [`5ba7f0c`](https://github.com/npm/cli/commit/5ba7f0cef753d4af0bc02ca7d6dd0ac1bdd11ffe) [#4726](https://github.com/npm/cli/pull/4726) fix: show more information during publish dry-run ([@lukekarrys](https://github.com/lukekarrys)) - * [`aa4a4da`](https://github.com/npm/cli/commit/aa4a4da336a6ec1963394fdbd06acb173c842d26) [#4735](https://github.com/npm/cli/pull/4735) fix(arborist): dont skip adding advisories to audit based on name/range ([@lukekarrys](https://github.com/lukekarrys)) - * [`0cd852f`](https://github.com/npm/cli/commit/0cd852f62e1453e647a2551e98c78ce7e0c8ea03) [#4741](https://github.com/npm/cli/pull/4741) fix: mitigate doctor test race condition ([@wraithgar](https://github.com/wraithgar)) - * [`ba8b2a7`](https://github.com/npm/cli/commit/ba8b2a753d63c8a8c7a44a48c2e13626b12025fe) [#4744](https://github.com/npm/cli/pull/4744) fix(ls): make `--omit` filter `npm ls` ([@lukekarrys](https://github.com/lukekarrys)) - -### Documentation - - * [`85b3c48`](https://github.com/npm/cli/commit/85b3c48d2c9bc4199aed699cc4c00ac96c5feebd) [#4666](https://github.com/npm/cli/pull/4666) docs(ci): add note that configuration must be consistent between install and ci ([@nlf](https://github.com/nlf)) - * [`44108f7`](https://github.com/npm/cli/commit/44108f7be5e1e928d8aa3eda3c5c177bcd216c99) [#4670](https://github.com/npm/cli/pull/4670) docs: fix npm-uninstall typo ([@JSKitty](https://github.com/JSKitty)) - -### Dependencies - - * [`aaf86f6`](https://github.com/npm/cli/commit/aaf86f61836c45b254794785f0a2e8f43dc38800) [#4674](https://github.com/npm/cli/pull/4674) deps: `@npmcli/metavuln-calculator@3.1.0` - * [`4a9a705`](https://github.com/npm/cli/commit/4a9a705de6992a3e9eefecc6c0cf8da45a527c7a) [#4691](https://github.com/npm/cli/pull/4691) deps: `@npmcli/package-json@2.0.0` - * [`1a90b9e`](https://github.com/npm/cli/commit/1a90b9e9ebe98cce83591e11312aaf41c830f835) [#4691](https://github.com/npm/cli/pull/4691) deps: `treeverse@2.0.0` - * [`f86f1af`](https://github.com/npm/cli/commit/f86f1af636f39d7d30a97873bbb6652416f68013) [#4691](https://github.com/npm/cli/pull/4691) deps: `@npmcli/disparity-colors@2.0.0` - * [`3a76dff`](https://github.com/npm/cli/commit/3a76dff3f49af9688a44a508d956f2091363b66d) [#4691](https://github.com/npm/cli/pull/4691) deps: `make-fetch-happen@10.1.2` - * [`0230428`](https://github.com/npm/cli/commit/02304284ddd147e604835a000d3a28a2deb65702) [#4691](https://github.com/npm/cli/pull/4691) deps: `@npmcli/config@4.0.2` - * [`82dc75f`](https://github.com/npm/cli/commit/82dc75fe62466714ea59accf245a6f9d6d111e17) [#4691](https://github.com/npm/cli/pull/4691) deps: `npm-pick-manifest@7.0.1` - * [`ad99360`](https://github.com/npm/cli/commit/ad9936063f20829eb9d5358d056593883f17a57b) [#4691](https://github.com/npm/cli/pull/4691) deps: `npm-install-checks@5.0.0` - * [`79fc706`](https://github.com/npm/cli/commit/79fc706f9c389a17ba50dd8835223160b8b0c3fb) [#4691](https://github.com/npm/cli/pull/4691) deps: `bin-links@3.0.1` - * [`1f2fb1e`](https://github.com/npm/cli/commit/1f2fb1e07b752ee34867c271a0fd1f186397d8ec) [#4691](https://github.com/npm/cli/pull/4691) deps: `@npmcli/git@3.0.1` - * [`0f23c33`](https://github.com/npm/cli/commit/0f23c3378c991b2a482463ce7f700829a3752940) [#4691](https://github.com/npm/cli/pull/4691) deps: `@npmcli/run-script@3.0.2` - * [`485753d`](https://github.com/npm/cli/commit/485753df44e66921dcb593e1bcbb39de79c6dc11) [#4691](https://github.com/npm/cli/pull/4691) deps: `cacache@16.0.4` - * [`e9b25cd`](https://github.com/npm/cli/commit/e9b25cd66bef17e807a84e7b10384f5f4d0064b7) [#4691](https://github.com/npm/cli/pull/4691) deps: `@npmcli/move-file@2.0.0` - * [`0e87cac`](https://github.com/npm/cli/commit/0e87cac8b6f09692f6bd1bf086aadbe323d127b5) [#4691](https://github.com/npm/cli/pull/4691) deps: `@npmcli/node-gyp@2.0.0` - * [`b632746`](https://github.com/npm/cli/commit/b632746b99121b5a271c75b985a849dfd75b6c57) [#4691](https://github.com/npm/cli/pull/4691) deps: `@npmcli/promise-spawn@3.0.0` - * [`b1863bf`](https://github.com/npm/cli/commit/b1863bf87adeb6deec83869f0f7bb1df4a5731ef) [#4691](https://github.com/npm/cli/pull/4691) deps: `pacote@13.1.1` - * [`a2781a3`](https://github.com/npm/cli/commit/a2781a367d62328d7f870de878f1b63d66593f4f) [#4691](https://github.com/npm/cli/pull/4691) deps: `ssri@9.0.0` - * [`5172e03`](https://github.com/npm/cli/commit/5172e03a572c99159568861049e4c2a536922f50) [#4691](https://github.com/npm/cli/pull/4691) deps: `ini@3.0.0` - * [`71296d5`](https://github.com/npm/cli/commit/71296d5ca4ace5805e1061c1a58878939c1c32f3) [#4691](https://github.com/npm/cli/pull/4691) deps: `npm-package-arg@9.0.2` - * [`69d8343`](https://github.com/npm/cli/commit/69d834319a9d668bd451600ab6e124a8819b284d) [#4691](https://github.com/npm/cli/pull/4691) deps: `graceful-fs@4.2.10` - * [`c44c2b0`](https://github.com/npm/cli/commit/c44c2b02920854897ba7a663ef705b9b474c2250) [#4691](https://github.com/npm/cli/pull/4691) deps: `lru-cache@7.7.3` - * [`38029ed`](https://github.com/npm/cli/commit/38029edea846ffe81768d7073d4ec09a4b129c24) [#4691](https://github.com/npm/cli/pull/4691) deps: `dezalgo@1.0.4` - * [`e57353c`](https://github.com/npm/cli/commit/e57353c78e798afbd3eb4390a42da5d5076be45d) [#4691](https://github.com/npm/cli/pull/4691) deps: `semver@7.3.6` - * [`1b30c72`](https://github.com/npm/cli/commit/1b30c725ecd0f03f55e3c0576962972748eec238) [#4691](https://github.com/npm/cli/pull/4691) deps: `minimatch@5.0.1` - * [`c70232c`](https://github.com/npm/cli/commit/c70232cc12fd9b3b024c2c759edd708af2367b8d) [#4706](https://github.com/npm/cli/pull/4706) deps: `@npmcli/arborist@5.0.5` - * [`baff482`](https://github.com/npm/cli/commit/baff4828f733efee0a569e00f87d25f06f2b384b) [#4705](https://github.com/npm/cli/pull/4705) deps: `libnpmdiff@4.0.3` - * [`dda8a97`](https://github.com/npm/cli/commit/dda8a976a9dd696cf2b2e2be5b55b2048e768768) [#4704](https://github.com/npm/cli/pull/4704) deps: `libnpmorg@4.0.3` - * [`8914864`](https://github.com/npm/cli/commit/891486451f1c34a2e7649b0a76c6c0d611ce3d39) [#4703](https://github.com/npm/cli/pull/4703) deps: `libnpmaccess@6.0.3` - * [`3516f61`](https://github.com/npm/cli/commit/3516f61e415d9ce6e9b00378c45791e33bb99fc9) [#4702](https://github.com/npm/cli/pull/4702) deps: `libnpmfund@3.0.2` - * [`ecd22b0`](https://github.com/npm/cli/commit/ecd22b07af515d86b77248e6a4cc2dec57bafd50) [#4701](https://github.com/npm/cli/pull/4701) deps: `libnpmversion@3.0.2` - * [`7ed9faf`](https://github.com/npm/cli/commit/7ed9fafaa951071a7988a3ec4ca3a5e01756b11d) [#4700](https://github.com/npm/cli/pull/4700) deps: `libnpmhook@8.0.3` - * [`df92e23`](https://github.com/npm/cli/commit/df92e23af63ca07bb4c261abd7365530529d3fd2) [#4699](https://github.com/npm/cli/pull/4699) deps: `libnpmexec@4.0.3` - * [`5074adc`](https://github.com/npm/cli/commit/5074adc5e17d1b0ec753cde3b7efd96c2fc7c4a3) [#4698](https://github.com/npm/cli/pull/4698) deps: `libnpmsearch@5.0.3` - * [`35e5100`](https://github.com/npm/cli/commit/35e5100e287925d19df4aab98de96cf70a6ff5a6) [#4697](https://github.com/npm/cli/pull/4697) deps: `libnpmteam@4.0.3` - * [`86f5b27`](https://github.com/npm/cli/commit/86f5b273fc57118b8b1a5e53ec3ca49d94d81601) [#4696](https://github.com/npm/cli/pull/4696) deps: `libnpmpack@4.0.3` - * [`1617bce`](https://github.com/npm/cli/commit/1617bce61663a743435d162b003d3b99376d426f) [#4695](https://github.com/npm/cli/pull/4695) deps: `libnpmpublish@6.0.3` - * [`e33aa0f`](https://github.com/npm/cli/commit/e33aa0f94f87ae4f9d2a73781e84832ef61d1855) [#4714](https://github.com/npm/cli/pull/4714) deps: remove stringify-package - * [`98377d1`](https://github.com/npm/cli/commit/98377d159f72a5b6073f07235b057984eb09a85c) [#4740](https://github.com/npm/cli/pull/4740) deps: `@npmcli/config@4.1.0` - * [`605ccef`](https://github.com/npm/cli/commit/605ccef6916c170f6d0c53775614f8a02682262a) [#4728](https://github.com/npm/cli/pull/4728) deps: remove ansistyles - * [`c22fb1e`](https://github.com/npm/cli/commit/c22fb1e756d43b54fefd826f2c3f459d4f1204b5) [#4728](https://github.com/npm/cli/pull/4728) deps: remove ansicolors - * [`970244c`](https://github.com/npm/cli/commit/970244c415da91b98ca3b200d88c1206ba81d774) [#4734](https://github.com/npm/cli/pull/4734) deps: `libnpmversion@3.0.3` - * [`42dc0b0`](https://github.com/npm/cli/commit/42dc0b03d60dc27602dab26a2f8cbfc17bf4ab40) [#4733](https://github.com/npm/cli/pull/4733) deps: `@npmcli/arborist@5.0.6` - -## v8.6.0 (2022-03-31) - -### Features - - * [`723a0918a`](https://github.com/npm/cli/commit/723a0918a5a9d9f795584f85d04506fafda9ca42) [#4588](https://github.com/npm/cli/pull/4588) feat(version): reify on workspace version change ([@ruyadorno](https://github.com/ruyadorno)) - * [`cc6c09431`](https://github.com/npm/cli/commit/cc6c09431d7fe2db8ac1dc7a707f2dab7a7a1f83) [#4594](https://github.com/npm/cli/pull/4594) feat: add logs-dir config to set custom logging location ([@lukekarrys](https://github.com/lukekarrys)) - -### Bug Fixes - - * [`98bfd9a8c`](https://github.com/npm/cli/commit/98bfd9a8cc23930e6becd15fffabadd1c269b0a2) fix: remove always true condition (#4590) ([@XhmikosR](https://github.com/XhmikosR)) - * [`81afa5a88`](https://github.com/npm/cli/commit/81afa5a8838c71a3a5037e2c8b4ae196e19fe0d7) [#4601](https://github.com/npm/cli/pull/4601) fix(unpublish): properly apply publishConfig ([@wraithgar](https://github.com/wraithgar)) - * [`716a07fde`](https://github.com/npm/cli/commit/716a07fde7905bb69e4c6f1991bb7289589a6669) [#4607](https://github.com/npm/cli/pull/4607) fix: 100% coverage in tests ([@wraithgar](https://github.com/wraithgar)) - * [`6f9cb490e`](https://github.com/npm/cli/commit/6f9cb490e7299976c43c6a118036c130671fe188) [#4614](https://github.com/npm/cli/pull/4614) fix(arborist): handle link nodes in old lockfiles correctly ([@nlf](https://github.com/nlf)) - * [`18b8b9435`](https://github.com/npm/cli/commit/18b8b94357d8f57301fbaa0f1e5dc2cf1128bf3e) [#4617](https://github.com/npm/cli/pull/4617) fix(arborist): make sure resolveParent exists before checking props ([@nlf](https://github.com/nlf)) - * [`bd96ae407`](https://github.com/npm/cli/commit/bd96ae4071f9cc8a65e741f414db12e98537971d) [#4599](https://github.com/npm/cli/pull/4599) fix(arborist): identify and repair invalid nodes in the virtual tree ([@nlf](https://github.com/nlf)) - * [`99d884542`](https://github.com/npm/cli/commit/99d88454248f950b82652b592fe2b4d019c1060b) [#4599](https://github.com/npm/cli/pull/4599) fix: make sure we loadOverrides on the root node in loadVirtual() ([@nlf](https://github.com/nlf)) - * [`45dd8b861`](https://github.com/npm/cli/commit/45dd8b8615bb1d7a93e1733746581049a1f399e6) [#4609](https://github.com/npm/cli/pull/4609) fix: move shellout logic into commands ([@wraithgar](https://github.com/wraithgar)) - * [`a64acc0bf`](https://github.com/npm/cli/commit/a64acc0bf01e4bc68b26ead5b2d5c6db47ef16c2) [#4609](https://github.com/npm/cli/pull/4609) fix: really load all commands in tests, add description to birthday ([@wraithgar](https://github.com/wraithgar)) - * [`d8dcc02cf`](https://github.com/npm/cli/commit/d8dcc02cfd354c1314c45d6530ec926cd138210c) [#4609](https://github.com/npm/cli/pull/4609) fix: consolidate command alias code ([@wraithgar](https://github.com/wraithgar)) - * [`f76d4f2f6`](https://github.com/npm/cli/commit/f76d4f2f661bcc2534f541ee0e7d683155372baf) [#4609](https://github.com/npm/cli/pull/4609) fix: consolidate is-windows code ([@wraithgar](https://github.com/wraithgar)) - * [`57d8f75eb`](https://github.com/npm/cli/commit/57d8f75eb864486f6aa17bb3dd2f213b5c148073) [#4609](https://github.com/npm/cli/pull/4609) fix: consolidate node version support logic ([@wraithgar](https://github.com/wraithgar)) - * [`0a957f5e2`](https://github.com/npm/cli/commit/0a957f5e2fbcce51c407d22b19e38004d09c51af) [#4609](https://github.com/npm/cli/pull/4609) fix: consolidate path delimiter logic ([@wraithgar](https://github.com/wraithgar)) - * [`738a40445`](https://github.com/npm/cli/commit/738a404454677b78b25ce82a8d2e4c1f46d57ffa) [#4609](https://github.com/npm/cli/pull/4609) fix: bump knownBroken to <12.5.0 ([@wraithgar](https://github.com/wraithgar)) - * [`8b65bfd5d`](https://github.com/npm/cli/commit/8b65bfd5d610a70e1a860936be1a47f3a3df7f32) [#4629](https://github.com/npm/cli/pull/4629) fix: return otplease fn results ([@wraithgar](https://github.com/wraithgar)) - * [`d8d374d23`](https://github.com/npm/cli/commit/d8d374d23d34c17e22b52afc1cfb5247cc7c3e1d) [#4632](https://github.com/npm/cli/pull/4632) fix: consolidate split-package-names ([@wraithgar](https://github.com/wraithgar)) - * [`cc0a2ec99`](https://github.com/npm/cli/commit/cc0a2ec9999b956ea654deaf68fd49ae4bf1a1c0) [#4611](https://github.com/npm/cli/pull/4611) fix: work better with system manpages (#4610) ([@d0sboots](https://github.com/d0sboots)) - * [`668ec7f33`](https://github.com/npm/cli/commit/668ec7f33b7a76f5e86a59f7e5a6c0e068a242b1) [#4644](https://github.com/npm/cli/pull/4644) fix: only call npmlog progress methods if explicitly requested ([@lukekarrys](https://github.com/lukekarrys)) - -### Documentation - - * [`ff1367f01`](https://github.com/npm/cli/commit/ff1367f01b9dd924d039b5a6b58399101cac99ca) [#4641](https://github.com/npm/cli/pull/4641) docs: recommend prepare over prepublish ([@verhovsky](https://github.com/verhovsky)) - -### Dependencies - - * [`6df061ec2`](https://github.com/npm/cli/commit/6df061ec2a52882693ed86a3524ac6af0f88acd8) [#4594](https://github.com/npm/cli/pull/4594) deps: `npm-registry-fetch@13.1.0` - * [`6dd1139c9`](https://github.com/npm/cli/commit/6dd1139c9f302ac71f47a75e70bbe9cdf2e64960) [#4594](https://github.com/npm/cli/pull/4594) deps: `cacache@16.0.3` - * [`feb4446d5`](https://github.com/npm/cli/commit/feb4446d50a7b6a61e44a92b78e1e1af2d89a725) [#4616](https://github.com/npm/cli/pull/4616) deps: `make-fetch-happen@10.1.0` - * [`c33b53311`](https://github.com/npm/cli/commit/c33b5331120d8304e0f090ceda55e19cc6f451f4) [#4613](https://github.com/npm/cli/pull/4613) deps: `minipass-fetch@2.1.0` - * [`6a4c8ff89`](https://github.com/npm/cli/commit/6a4c8ff89acc98409060f5aa55b2f1a795a6b66c) [#4606](https://github.com/npm/cli/pull/4606) deps: `npm-audit-report@3.0.0` - * [`6e0a131d2`](https://github.com/npm/cli/commit/6e0a131d2ff3143856f388bb42c6568d5312c451) [#4627](https://github.com/npm/cli/pull/4627) deps: `debug@4.3.4` - * [`0f1cd60a1`](https://github.com/npm/cli/commit/0f1cd60a1cdb643782ae86a5a7fce84e357dbf10) [#4627](https://github.com/npm/cli/pull/4627) deps: `proc-log@2.0.1` - * [`da377eed5`](https://github.com/npm/cli/commit/da377eed5cba72185b90f5fc32ef288331c856ef) [#4627](https://github.com/npm/cli/pull/4627) deps: `parse-conflict-json@2.0.2` - * [`726a8a07a`](https://github.com/npm/cli/commit/726a8a07afeb3bd24979307679ce7e63c73b178e) [#4627](https://github.com/npm/cli/pull/4627) deps: `gauge@4.0.4` - * [`aac01b89c`](https://github.com/npm/cli/commit/aac01b89caf6336a2eb34d696296303cdadd5c08) [#4628](https://github.com/npm/cli/pull/4628) deps: `@npmcli/template-oss@3.2.1` - * [`52dfaf239`](https://github.com/npm/cli/commit/52dfaf239a3f66a05ee9d6148bc41a46b5adffd6) [#4630](https://github.com/npm/cli/pull/4630) deps: `make-fetch-happen@10.1.1` - * [`9778a5387`](https://github.com/npm/cli/commit/9778a5387771256fc81e3587922c12ec47f750ea) [#4635](https://github.com/npm/cli/pull/4635) deps: `init-package-json@3.0.2` - * [`86eff5dcc`](https://github.com/npm/cli/commit/86eff5dccb9bce2eb8d80706e8dea855faf753b3) [#4635](https://github.com/npm/cli/pull/4635) deps: `npm-package-arg@9.0.2` - * [`5b4cbb217`](https://github.com/npm/cli/commit/5b4cbb2175bfa35e347fe94e21d49a05ea64ead1) [#4635](https://github.com/npm/cli/pull/4635) deps: `validate-npm-package-name@4.0.0` - * [`a59fd2cb8`](https://github.com/npm/cli/commit/a59fd2cb863245fce56f96c90ac854e62c5c4d6f) [#4639](https://github.com/npm/cli/pull/4639) deps: `@npmcli/template-oss@3.2.2` - * [`679e569d5`](https://github.com/npm/cli/commit/679e569d5778aef312b37c1ba3bda0171366c9fb) [#4655](https://github.com/npm/cli/pull/4655) deps: `@npmcli/arborist@5.0.4` - -## v8.5.5 (2022-03-17) - -### Bug Fixes - - * [`0e7511d14`](https://github.com/npm/cli/commit/0e7511d144bdb6624e4c0fdfb31b4b42ed2954c9) [#4261](https://github.com/npm/cli/pull/4261) fix(arborist): _findMissingEdges missing dependency due to inconsistent path separators ([@salvadorj](https://github.com/salvadorj)) - * [`c83069436`](https://github.com/npm/cli/commit/c83069436ef4af75eaef071bc181ba1ab49729e9) [#4547](https://github.com/npm/cli/pull/4547) fix: omit bots from authors ([@wraithgar](https://github.com/wraithgar)) - * [`f66da2ed8`](https://github.com/npm/cli/commit/f66da2ed8948fbfa919dd5debe52eafe2018735c) [#4565](https://github.com/npm/cli/pull/4565) fix(owner): bypass cache when fetching packument ([@wraithgar](https://github.com/wraithgar)) - * [`f0c6e86ca`](https://github.com/npm/cli/commit/f0c6e86ca5920baa85355af3ea50ed13f7429a10) [#4572](https://github.com/npm/cli/pull/4572) fix: remove name from unpublished message ([@wraithgar](https://github.com/wraithgar)) - * [`f7e58fa74`](https://github.com/npm/cli/commit/f7e58fa74d9008731b86c82f75251ca295056cf1) [#4572](https://github.com/npm/cli/pull/4572) fix: remove "bug the author" message from package 404 ([@wraithgar](https://github.com/wraithgar)) - * [`5471ff5fe`](https://github.com/npm/cli/commit/5471ff5fe8f74f46cdc2bb056ba9b496c7dd1a78) [#4573](https://github.com/npm/cli/pull/4573) fix: add isntall alias to install ([@wraithgar](https://github.com/wraithgar)) - * [`84d19210e`](https://github.com/npm/cli/commit/84d19210e5604775a3a413aa32cbba2c103933f2) [#4576](https://github.com/npm/cli/pull/4576) fix: properly show `npm view ./directory` ([@wraithgar](https://github.com/wraithgar)) - * [`e9a2981f5`](https://github.com/npm/cli/commit/e9a2981f55f84ff521ef597883a4e732d08ce1c1) [#4578](https://github.com/npm/cli/pull/4578) fix(arborist): save workspace version ([@ruyadorno](https://github.com/ruyadorno)) - -### Documentation - - * [`a30405258`](https://github.com/npm/cli/commit/a304052580c070a1f8c1c0cf8cbeec615c46af02) [#4580](https://github.com/npm/cli/pull/4580) docs: add foreground-scripts and ignore-scripts to commands ([@wraithgar](https://github.com/wraithgar)) - * [`2361a68e1`](https://github.com/npm/cli/commit/2361a68e14f893e97dad53d66fde32082e23521a) [#4582](https://github.com/npm/cli/pull/4582) docs: add isntall alias to install command ([@wraithgar](https://github.com/wraithgar)) - * [`8ff1dfaae`](https://github.com/npm/cli/commit/8ff1dfaaeeb32e88c879b96a786835fe13526a88) [#4575](https://github.com/npm/cli/pull/4575) docs: explain that linked deps need `npm install` ran in them ([@wraithgar](https://github.com/wraithgar)) - * [`ddbb505ec`](https://github.com/npm/cli/commit/ddbb505ec6077576e0a9d00a14b43d32d69e4f9e) [#4574](https://github.com/npm/cli/pull/4574) docs: explain that git-tag-version=false does not commit ([@wraithgar](https://github.com/wraithgar)) - * [`7c878b978`](https://github.com/npm/cli/commit/7c878b9781be2e2151f41bd29d46c33e421aeb10) [#4584](https://github.com/npm/cli/pull/4584) docs: fix unpublish docs to auto generate usage ([@wraithgar](https://github.com/wraithgar)) - -### Dependencies - - * [`fcc6acfa8`](https://github.com/npm/cli/commit/fcc6acfa808aa556748544edf4e9b73262f77608) [#4562](https://github.com/npm/cli/pull/4562) deps: `@npmcli/metavuln-calculator@3.0.1` - * [`6d3145014`](https://github.com/npm/cli/commit/6d3145014861b4198c16d7772d809fd037ece289) [#4562](https://github.com/npm/cli/pull/4562) deps: `pacote@13.0.4` - * [`f6b771aab`](https://github.com/npm/cli/commit/f6b771aabece09dca2231426d4f681d3578e5ab7) [#4562](https://github.com/npm/cli/pull/4562) deps: `make-fetch-happen@10.0.6` - * [`e26548fb1`](https://github.com/npm/cli/commit/e26548fb12a3bb23fbe32a336f1305e083aa51c0) [#4562](https://github.com/npm/cli/pull/4562) deps: `cacache@16.0.0` - * [`915dda7ab`](https://github.com/npm/cli/commit/915dda7abeedf79cfe0dde1bd55d80115e2a795d) [#4562](https://github.com/npm/cli/pull/4562) deps: `init-package-json@3.0.1` - * [`f2ec2ef1f`](https://github.com/npm/cli/commit/f2ec2ef1f7a639ea292d6ab442d588ed72198857) [#4562](https://github.com/npm/cli/pull/4562) deps: `read-package-json@5.0.0` - * [`340fa51f4`](https://github.com/npm/cli/commit/340fa51f423a518a96c8015a67d8f6144a2e8051) [#4562](https://github.com/npm/cli/pull/4562) deps: `pacote@13.0.5` - * [`9555a5f1d`](https://github.com/npm/cli/commit/9555a5f1d135aa1b8f7374273403efe41e99ee26) [#4562](https://github.com/npm/cli/pull/4562) deps: `npm-package-arg@9.0.1` - * [`b2a494283`](https://github.com/npm/cli/commit/b2a494283f45a25d1b87bc40bf2d68812871e89c) [#4562](https://github.com/npm/cli/pull/4562) deps: `normalize-package-data@4.0.0` - * [`1cb88f4b3`](https://github.com/npm/cli/commit/1cb88f4b31019af9cb8eac8a46433b44bba9d061) [#4562](https://github.com/npm/cli/pull/4562) deps: `hosted-git-info@5.0.0` - * [`f95396a03`](https://github.com/npm/cli/commit/f95396a033b75e2a3e9aa83f0b06c527641027a4) [#4562](https://github.com/npm/cli/pull/4562) deps: `cacache@16.0.1` - * [`aec2bfecc`](https://github.com/npm/cli/commit/aec2bfecca4ad3ee7db4481cf068add9c42e7160) [#4585](https://github.com/npm/cli/pull/4585) deps: `cacache@16.0.2` - * [`ed8ab63e4`](https://github.com/npm/cli/commit/ed8ab63e4a2c8e6527bf7d49736d1bbb6f0aead2) deps: `libnpmpack@4.0.2` - * [`0b73bfa82`](https://github.com/npm/cli/commit/0b73bfa82d4eb826ec0dbda4cc457c94580e0d64) deps: `libnpmteam@4.0.2` - * [`475d59b36`](https://github.com/npm/cli/commit/475d59b361ef9e260e21d39361baf92f2272f1d7) deps: `libnpmaccess@6.0.2` - * [`7201c7395`](https://github.com/npm/cli/commit/7201c7395f66d3faf24b361e69555490d606ed91) deps: `libnpmsearch@5.0.2` - * [`f5df358c3`](https://github.com/npm/cli/commit/f5df358c3af2c23e7818105608bcceabdd8b62fa) deps: `libnpmorg@4.0.2` - * [`472e7dd7a`](https://github.com/npm/cli/commit/472e7dd7aa6935cb6b89ec78cbce45f75f3f0044) deps: `libnpmhook@8.0.2` - * [`c901d7290`](https://github.com/npm/cli/commit/c901d7290ed09aefe3ba6e8c09cb3126f0d92f95) deps: `libnpmpublish@6.0.2` - * [`aad53327f`](https://github.com/npm/cli/commit/aad53327f23b123d0e017338a9a1b65d40f21efe) deps: `@npmcli/arborist@5.0.3` - * [`b40136bca`](https://github.com/npm/cli/commit/b40136bcaf32232e4cacdb517ce40f61871da159) deps: `libnpmdiff@4.0.2` - * [`5d91201d1`](https://github.com/npm/cli/commit/5d91201d1c69e3c095a4eedf0f1d702f35b0d8c1) deps: `libnpmexec@4.0.2` - -## v8.5.4 (2022-03-10) - -### Bug Fixes - -* [`fbdb43138`](https://github.com/npm/cli/commit/fbdb43138ab8e682efb7668767465e7066d43b9f) - [#4529](https://github.com/npm/cli/pull/4529) - fix(rebuild): don't run lifecycle scripts twice on linked deps - ([@wraithgar](https://github.com/wraithgar)) -* [`1c182e11d`](https://github.com/npm/cli/commit/1c182e11d524294d85348a3c2566f266bd281c00) - [#4495](https://github.com/npm/cli/pull/4495) - fix(doctor): don't retry ping - ([@wraithgar](https://github.com/wraithgar)) -* [`55ab38c53`](https://github.com/npm/cli/commit/55ab38c5337de76b739c4f0cdfb8932dc5420ce4) - [#4495](https://github.com/npm/cli/pull/4495) - fix(doctor): allow for missing local bin and `node_modules` - ([@wraithgar](https://github.com/wraithgar)) -* [`5c06a33e6`](https://github.com/npm/cli/commit/5c06a33e641594c5617a0606c338fc54c64d623b) - [#4528](https://github.com/npm/cli/pull/4528) - fix: clean up owner command and otplease - ([@wraithgar](https://github.com/wraithgar)) - -### Documentation - -* [`2485064da`](https://github.com/npm/cli/commit/2485064da590ef787e94a952e0bbdcd9f4880703) - [#4524](https://github.com/npm/cli/pull/4524) - docs: fix typo in configuring-npm/package-json.md - ([@dlcmh](https://github.com/dlcmh)) -* [`91f03ee61`](https://github.com/npm/cli/commit/91f03ee618bc635f9cfbded735fe98bbfa9d643f) - [#4510](https://github.com/npm/cli/pull/4510) - docs: standardize changelog heading - ([@wraithgar](https://github.com/wraithgar)) - -### Dependencies - -* [`377f55e0e`](https://github.com/npm/cli/commit/377f55e0e786ac6c26d64848a89ce720c5d478eb) - [#4530](https://github.com/npm/cli/pull/4530) - deps: `make-fetch-happen@10.0.5` - * add code property to unsupported proxy url error -* [`40b7fbf67`](https://github.com/npm/cli/commit/40b7fbf670c8ba064b3a771981fa0510d63fb6ef) - [#4531](https://github.com/npm/cli/pull/4531) - deps: `read-package-json@4.1.2` - * don't throw exception on invalid main attr -* [`d9dc70ce4`](https://github.com/npm/cli/commit/d9dc70ce4d632b8b0401c41e9a015b8083e87db1) - [#4545](https://github.com/npm/cli/pull/4545) - deps: `map-workspaces@2.0.2` - * evaluate all patterns before throwing `EDUPLICATEWORKSPACE` -* [`70fcfb46b`](https://github.com/npm/cli/commit/70fcfb46bebc777e0ef6b36a47d9620807488acd) - deps: `libnpmfund@3.0.1` -* [`621cd033f`](https://github.com/npm/cli/commit/621cd033f64f101084af83ff8a797f5415a3b70d) - deps: `@npmcli/arborist@5.0.2` -* [`087fdc4cb`](https://github.com/npm/cli/commit/087fdc4cb4d6582b2b628087f866e8ca8bc00934) - deps: `libnpmpublish@6.0.1` -* [`d24c6d288`](https://github.com/npm/cli/commit/d24c6d288b1cfe6dd893a8ffedb15cbe6837d545) - deps: `libnpmhook@8.0.1` -* [`fa59830fc`](https://github.com/npm/cli/commit/fa59830fc429d354179853e8f9b9a32ef3444067) - deps: `libnpmsearch@5.0.1` -* [`6d5f22b86`](https://github.com/npm/cli/commit/6d5f22b86006e7c563161837f56e47079e0fde4a) - deps: `libnpmexec@4.0.1` -* [`69ea54350`](https://github.com/npm/cli/commit/69ea5435016a9d1c454af7253a80204dc9941380) - deps: `libnpmaccess@6.0.1` -* [`4742d7cf3`](https://github.com/npm/cli/commit/4742d7cf3ad15f5263fd5fefd15c04f9871c58af) - deps: `libnpmteam@4.0.1` -* [`fdd255ae9`](https://github.com/npm/cli/commit/fdd255ae9ebf41147085e74cec5c9f65eb5ff1de) - deps: `libnpmorg@4.0.1` -* [`ed41bc101`](https://github.com/npm/cli/commit/ed41bc10182ffd1db66181c20db6c348dba6783e) - deps: `libnpmdiff@4.0.1` -* [`21e241025`](https://github.com/npm/cli/commit/21e24102564e2f3c795312d256fade4228e67776) - deps: `libnpmversion@3.0.1` -* [`ec7f36ff9`](https://github.com/npm/cli/commit/ec7f36ff9e6c973ae5d5998a783bcff16027c282) - deps: `libnpmpack@4.0.1` -* [`ad4b56414`](https://github.com/npm/cli/commit/ad4b564148eaa6fdfe68e5b68f910e41e4e8ee14) - deps: `gauge@4.0.3` - -## v8.5.3 (2022-03-03) - -### Bug Fixes - -* [`defe79ad6`](https://github.com/npm/cli/commit/defe79ad6f2f4216bf5e0188256c77b49164eb94) - [#4480](https://github.com/npm/cli/pull/4480) - fix: publish of tarballs includes README in packument - ([@fritzy](https://github.com/fritzy)) -* [`45fc297f1`](https://github.com/npm/cli/commit/45fc297f12e63c026715945a186ba0ec4efbdedb) - [#4479](https://github.com/npm/cli/pull/4479) - fix: ignore implict workspace for some commands - ([@fritzy](https://github.com/fritzy)) -* [`a0900bdf1`](https://github.com/npm/cli/commit/a0900bdf1ab7a68988984735f1f3885d02ffb67f) - [#4481](https://github.com/npm/cli/pull/4481) - fix(ls): respect `--include-workspace-root` - ([@fritzy](https://github.com/fritzy)) -* [`0cfc155db`](https://github.com/npm/cli/commit/0cfc155db5f11ce23419e440111d99a63bf39754) - [#4476](https://github.com/npm/cli/pull/4476) - fix: set proper workspace repo urls in package.json - ([@ljharb](https://github.com/ljharb)) -* [`9e43de8a5`](https://github.com/npm/cli/commit/9e43de8a59e5bf354a9595ed8a79fedcec085aaa) - [#4493](https://github.com/npm/cli/pull/4493) - fix: ignore implicit workspace for whoami - ([@nlf](https://github.com/nlf)) - -### Dependencies - -* [`d13f067d9`](https://github.com/npm/cli/commit/d13f067d91283e1dec94780a3c007883de9edc46) - [#4490](https://github.com/npm/cli/pull/4490) - deps: `@npmcli/run-script@3.0.1` - ([@wraithgar](https://github.com/wraithgar)) -* [`ce9a6eac0`](https://github.com/npm/cli/commit/ce9a6eac0c8329871664167c37f4982c5e443a2a) - [#4490](https://github.com/npm/cli/pull/4490) - deps: `node-gyp@9.0.0` - ([@wraithgar](https://github.com/wraithgar)) -* [`bd660f5f1`](https://github.com/npm/cli/commit/bd660f5f1ccc1d9fa88085b168ea05b6dcf5826a) - [#4490](https://github.com/npm/cli/pull/4490) - deps: `@npmcli/config@4.0.1` -* [`3c17b6965`](https://github.com/npm/cli/commit/3c17b6965f0c5fffd5ac908388568a307466a73f) - [#4490](https://github.com/npm/cli/pull/4490) - deps: `make-fetch-happen@10.0.4` -* [`e9b69c4c5`](https://github.com/npm/cli/commit/e9b69c4c5454cc8b7d6cf2cbf1f09313f0d20afc) - [#4490](https://github.com/npm/cli/pull/4490) - deps: `npm-registry-fetch@13.0.1` -* [`cf27ca888`](https://github.com/npm/cli/commit/cf27ca8884387f2b82f8f6900a29e4e41693e774) - [#4490](https://github.com/npm/cli/pull/4490) - deps: `write-file-atomic@4.0.1` -* [`f3421921a`](https://github.com/npm/cli/commit/f3421921aa72ef570105474cdb2e48cec80de796) - [#4490](https://github.com/npm/cli/pull/4490) - deps: `gauge@4.0.2` -* [`1dd2f7ee1`](https://github.com/npm/cli/commit/1dd2f7ee16a61024e520b3efa54f8cdba5458a16) - [#4490](https://github.com/npm/cli/pull/4490) - deps: `socks@2.6.2` -* [`236e3b403`](https://github.com/npm/cli/commit/236e3b4030dd91397713eb02cdf2737dcc988fd7) - [#4490](https://github.com/npm/cli/pull/4490) - deps: `minimatch@3.1.2` - ([@wraithgar](https://github.com/wraithgar)) -* [`10e1326d2`](https://github.com/npm/cli/commit/10e1326d2eb7ff2c70ee19907991b369476ccdd0) - [#4490](https://github.com/npm/cli/pull/4490) - deps: `lru-cache@7.4.0` - -## v8.5.2 (2022-02-24) - -### Bug Fixes - -* [`9bdd1ace8`](https://github.com/npm/cli/commit/9bdd1ace86300a8ee562027bbc5cb57d62dc7ba8) - [#4300](https://github.com/npm/cli/pull/4300) - fix(arborist): use full location as tracker key when inflating - ([@lukekarrys](https://github.com/lukekarrys)) ([@kirtangajjar](https://github.com/kirtangajjar)) -* [`c9ff797e8`](https://github.com/npm/cli/commit/c9ff797e8b5e5a7b39ced04b1d3f8a0006993a1f) - [#4457](https://github.com/npm/cli/pull/4457) - fix: remove html comments from man entries - ([@wraithgar](https://github.com/wraithgar)) -* [`f4c5f0e52`](https://github.com/npm/cli/commit/f4c5f0e52679b1aa42db833fc23dc07d96cc904e) - fix(arborist): fix unescaped periods (#4462) - ([@lukekarrys](https://github.com/lukekarrys)) -* [`c608512ed`](https://github.com/npm/cli/commit/c608512ed03ccf87dc989cec2849d14bf034513a) - [#4468](https://github.com/npm/cli/pull/4468) - fix: ignore integrity values for git dependencies - ([@lukekarrys](https://github.com/lukekarrys)) - -### Documentation - -* [`e83e5c9ba`](https://github.com/npm/cli/commit/e83e5c9bad93e598969088ae780149dbe34c6b5c) - [#4435](https://github.com/npm/cli/pull/4435) - docs: clarify npm init @latest behavior - ([@wraithgar](https://github.com/wraithgar)) -* [`d8fa9fa5e`](https://github.com/npm/cli/commit/d8fa9fa5e44d91e1c0170628d4839f7802c65a7f) - [#4436](https://github.com/npm/cli/pull/4436) - docs: explain $INIT_CWD on using scripts page - ([@wraithgar](https://github.com/wraithgar)) -* [`6b68c1aaa`](https://github.com/npm/cli/commit/6b68c1aaa282205eb4d47dbc81909c11851f7e06) - [#4450](https://github.com/npm/cli/pull/4450) - docs: auto-generate npm usage for each command - ([@manekinekko](https://github.com/manekinekko)) - -### Dependencies - -* [`d58e4442b`](https://github.com/npm/cli/commit/d58e4442b0a16c84219d5f80ab88ef68ad209918) - deps `@npmcli/arborist@5.0.0` -* [`77399cb98`](https://github.com/npm/cli/commit/77399cb988d984133bfc2885a6407ffc56b9152d) - deps: `libnpmaccess@6.0.0` -* [`9633752cd`](https://github.com/npm/cli/commit/9633752cd5c4a0d240adcb24f0ae7e3fafd122ba) - deps: `libnpmdiff@4.0.0` -* [`938750581`](https://github.com/npm/cli/commit/9387505819f0e7e4b3d76dd3e2bd8636a1bb6306) - deps: `libnpmexec@4.0.0` -* [`2c86feaf1`](https://github.com/npm/cli/commit/2c86feaf1f974ee510563c7d93c0dd26f6355b15) - deps: `libnpmfund@3.0.0` -* [`1dab29805`](https://github.com/npm/cli/commit/1dab29805c820f82e4bae18123e911fec6948dfd) - deps: `libnpmhook@8.0.0` -* [`cf273f1cf`](https://github.com/npm/cli/commit/cf273f1cf31775c8a73cc67b654faf87b44f7f79) - deps: `libnpmorg@4.0.0` -* [`8b1d9636a`](https://github.com/npm/cli/commit/8b1d9636ad2374254263d154f2b4ca8ea6416f4c) - deps: `libnpmpack@4.0.0` -* [`67aed0542`](https://github.com/npm/cli/commit/67aed05429163fc120e05e6fb15f8f3cd9c6ef22) - deps: `libnpmpublish@6.0.0` -* [`8b26a6db1`](https://github.com/npm/cli/commit/8b26a6db13c37a6f0df86c54ca859ad2f9627825) - deps: `libnpmsearch@5.0.0` -* [`0b2fa7fed`](https://github.com/npm/cli/commit/0b2fa7feda4643fe16c9a492497908f94d310dbd) - deps: `libnpmteam@4.0.0` -* [`2646d199f`](https://github.com/npm/cli/commit/2646d199f26f77c4197ec0bcf30c3e452844c1ab) - deps: `libnpmversion@3.0.0` -* [`5b29666e5`](https://github.com/npm/cli/commit/5b29666e566c09dc685108daaa20163dd58ade2b) - [#4459](https://github.com/npm/cli/pull/4459) - deps: `columnify@1.6.0 and dedupe vulnerable deps` - -## v8.5.1 (2022-02-17) - -### Dependencies - -* [`54cda9697`](https://github.com/npm/cli/commit/54cda9697b776fae807966097315c7b836623743) - [#4410](https://github.com/npm/cli/pull/4410) - fix(arborist): do not audit in offline mode - ([@mohd-akram](https://github.com/mohd-akram)) -* [`fb13bdaf1`](https://github.com/npm/cli/commit/fb13bdaf12dde3ef5685a77354e51a9cfa579879) - [#4403](https://github.com/npm/cli/pull/4403) - deps: `@npmcli/ci-detect@2.0.0` -* [`702801002`](https://github.com/npm/cli/commit/702801002e99bf02dd4d6d1e447a5ab332d56c79) - [#4415](https://github.com/npm/cli/pull/4415) - deps: `make-fetch-happen@10.0.3` -* [`88bab3540`](https://github.com/npm/cli/commit/88bab354097023c96c49e78d7ee54159f495bf73) - [#4416](https://github.com/npm/cli/pull/4416) - deps: `gauge@4.0.1` - -### Documentation - -* [`20378c67c`](https://github.com/npm/cli/commit/20378c67cd533db514dd2aec7828c6d119e9d6c7) - [#4423](https://github.com/npm/cli/pull/4423) - docs: update documentation for ping - ([@fhinkel](https://github.com/fhinkel)) -* [`408d2fc15`](https://github.com/npm/cli/commit/408d2fc150185ef66125f7d6bdb1c25edb71bba3) - [#4426](https://github.com/npm/cli/pull/4426) - docs: update workspaces guide for consistency - ([@bnb](https://github.com/bnb)) -* [`9275856eb`](https://github.com/npm/cli/commit/9275856eb75e7c394a3c7617c2b495aba35ee2de) - [#4424](https://github.com/npm/cli/pull/4424) - docs: update usage example for npm pkg - ([@manekinekko](https://github.com/manekinekko)) -* [`20c83fae7`](https://github.com/npm/cli/commit/20c83fae76ff4a051e4f6542a328f1c00cf071bb) - [#4428](https://github.com/npm/cli/pull/4428) - docs: update docs for npm install <folder> - ([@manekinekko](https://github.com/manekinekko)) - -## v8.5.0 (2022-02-10) - -### Features - -* [`0cc9d4c51`](https://github.com/npm/cli/commit/0cc9d4c51a337af0edd2e20c6fadb26807e5d09f) - [#4372](https://github.com/npm/cli/pull/4372) - feat(deps): `@npmcli/config@3.0.0 - introduce automatic workspace roots` - ([@nlf](https://github.com/nlf)) - -### Bug Fixes - -* [`fb6e2ddf9`](https://github.com/npm/cli/commit/fb6e2ddf942bacf5ae745d16c2d57f3836dce75a) - [#4386](https://github.com/npm/cli/pull/4386) - fix(log): pass in logger to more external modules - ([@wraithgar](https://github.com/wraithgar)) -* [`0e231d4a4`](https://github.com/npm/cli/commit/0e231d4a40526608411aca0a6e7cf27c750f2409) - [#4389](https://github.com/npm/cli/pull/4389) - fix(pack): let libnpmpack take care of file writes - ([@nlf](https://github.com/nlf)) -* [`e2f1f7b04`](https://github.com/npm/cli/commit/e2f1f7b045a3ae9840f431cb4266ba046831247b) - [#4389](https://github.com/npm/cli/pull/4389) - fix(publish): pass dryRun: true to libnpmpack so it doesnt write a tarball - ([@nlf](https://github.com/nlf)) -* [`2937b43d4`](https://github.com/npm/cli/commit/2937b43d4629225d83b6c71833df00743209f5ff) - [#4389](https://github.com/npm/cli/pull/4389) - fix(config): add pack-destination flattener - ([@nlf](https://github.com/nlf)) - -### Documentation - -* [`b836d596f`](https://github.com/npm/cli/commit/b836d596f9d98cd7849882000cad11ad2a0b9a26) - [#4384](https://github.com/npm/cli/pull/4384) - docs: add cross-references between npx and npm exec - ([@Delapouite](https://github.com/Delapouite)) -* [`f3fbeea5a`](https://github.com/npm/cli/commit/f3fbeea5a173902ca7455c6c94a9e677591b0410) - [#4388](https://github.com/npm/cli/pull/4388) - docs: add --save-bundle to --save usage output - ([@wraithgar](https://github.com/wraithgar)) - -### Dependencies - -* [`8732f393e`](https://github.com/npm/cli/commit/8732f393ee547e2eada4317613599517c1d8ec0a) - deps: `@npmcli/arborist@4.3.1` - * [`2ba09cc0d`](https://github.com/npm/cli/commit/2ba09cc0d7d56a064aa67bbb1881d381e6504888) - [#4371](https://github.com/npm/cli/pull/4371) - fix(arborist): check if a spec is a workspace before fetching a manifest, closes #3637 - ([@nlf](https://github.com/nlf)) - * [`e631faf7b`](https://github.com/npm/cli/commit/e631faf7b5f414c233d723ee11413264532b37de) - [#4387](https://github.com/npm/cli/pull/4387) - fix(arborist): save bundleDependencies to package.json when reifying - ([@wraithgar](https://github.com/wraithgar)) -* [`d3a7c15e1`](https://github.com/npm/cli/commit/d3a7c15e1e3d305a0bf781493406dfb1fdbaca35) - deps: `libnpmpack@3.1.0` - * [`4884821f6`](https://github.com/npm/cli/commit/4884821f637ca1992b494fbdbd94d000e4428a40) - [#4389](https://github.com/npm/cli/pull/4389) - feat(libnpmpack): write tarball file when dryRun === false - ([@nlf](https://github.com/nlf)) -* [`ab926995e`](https://github.com/npm/cli/commit/ab926995e43ccdd048a6e1164b436fea1940f932) - [#4393](https://github.com/npm/cli/pull/4393) - deps: `npm-registry-fetch@12.0.2` -* [`1c0d0699c`](https://github.com/npm/cli/commit/1c0d0699c13e1cb36a69f2ac4acdb78ea205aa3e) - [#4394](https://github.com/npm/cli/pull/4394) - deps: `npmlog@6.0.1` - * changed notice color from blue to cyan for improved readability -* [`3c33a5842`](https://github.com/npm/cli/commit/3c33a584213e4f2230f3b912fad2c2f5786906fb) - [#4400](https://github.com/npm/cli/pull/4400) - deps: `make-fetch-happen@10.0.2` - -## v8.4.1 (2022-02-03) - -### Bug Fixes - -* [`1b9338554`](https://github.com/npm/cli/commit/1b9338554fc006954fae54c25c33e64e26ae997e) - [#4359](https://github.com/npm/cli/pull/4359) - fix(log): pass in logger to external modules - ([@wraithgar](https://github.com/wraithgar)) -* [`457e0ae61`](https://github.com/npm/cli/commit/457e0ae61bbc55846f5af44afa4066921923490f) - [#4363](https://github.com/npm/cli/pull/4363) - fix(ci): lock file validation - ([@ruyadorno](https://github.com/ruyadorno)) -* [`c0519edc1`](https://github.com/npm/cli/commit/c0519edc16f66370b2153430342247b4ec5cb496) - [#4364](https://github.com/npm/cli/pull/4364) - fix(ci): should not use package-lock config - ([@ruyadorno](https://github.com/ruyadorno)) -* [`ebb428375`](https://github.com/npm/cli/commit/ebb428375cd417c096d5a648df92620dc4215a3d) - [#4365](https://github.com/npm/cli/pull/4365) - fix(outdated): parse aliased modules - ([@ruyadorno](https://github.com/ruyadorno)) - -### Documentation - -* [`0b0a7cc76`](https://github.com/npm/cli/commit/0b0a7cc767947ea738da50caa832d8a922e20ac6) - [#4361](https://github.com/npm/cli/pull/4361) - docs: bundleDependencies can be a boolean. - ([@forty](https://github.com/forty)) - -### Dependencies - -* [`3d41447b9`](https://github.com/npm/cli/commit/3d41447b961a72f1ce541fea252d0cd462399c76) - [#4353](https://github.com/npm/cli/pull/4353) - deps: `wide-align@1.1.5` -* [`dc1a0573a`](https://github.com/npm/cli/commit/dc1a0573ace328d985a741af76d03752b1dbf1ff) - [#4353](https://github.com/npm/cli/pull/4353) - deps: `socks-proxy-agent@6.1.1` -* [`adcefef6b`](https://github.com/npm/cli/commit/adcefef6b953e0804f4a2de3a1912321f44c4a7e) - [#4353](https://github.com/npm/cli/pull/4353) - deps: `spdx-license-ids@3.0.11` -* [`d7e2499e0`](https://github.com/npm/cli/commit/d7e2499e073301a62607266d3ab8f9b63d630fb5) - [#4353](https://github.com/npm/cli/pull/4353) - deps: `debug@4.3.3` -* [`f0f307140`](https://github.com/npm/cli/commit/f0f30714002db979a2707d85c65bb92ae0ff76fe) - [#4353](https://github.com/npm/cli/pull/4353) - deps: `@npmcli/fs@1.1.0` -* [`1cb107d33`](https://github.com/npm/cli/commit/1cb107d33d7e1499d92c3405fa0694142bdee8df) - [#4353](https://github.com/npm/cli/pull/4353) - deps: `is-core-module@2.8.1` -* [`e198ac0d1`](https://github.com/npm/cli/commit/e198ac0d1c1e536db57e84af6e7f40089b4c1bfc) - [#4354](https://github.com/npm/cli/pull/4354) - deps: `cli-table3@0.6.1` -* [`5a84e6515`](https://github.com/npm/cli/commit/5a84e6515a0331be20395ce2a6b1e892ecea20f8) - [#4355](https://github.com/npm/cli/pull/4355) - deps: `graceful-fs@4.2.9` - -## v8.4.0 (2022-01-27) - -### Features - -* [`fbe48a840`](https://github.com/npm/cli/commit/fbe48a84047e0c5de31bdaa84707f0f8fdcef71d) - [#4307](https://github.com/npm/cli/pull/4307) - feat(arborist): add named updates validation - ([@ruyadorno](https://github.com/ruyadorno)) - -### Bug Fixes - -* [`1f853f8bf`](https://github.com/npm/cli/commit/1f853f8bf7cecd1222703dde676a4b664526141d) - [#4306](https://github.com/npm/cli/pull/4306) - fix(arborist): load actual tree on named updates - ([@ruyadorno](https://github.com/ruyadorno)) -* [`90c384ccc`](https://github.com/npm/cli/commit/90c384ccccac32c80c481a04c438cbcbea82539c) - [#4326](https://github.com/npm/cli/pull/4326) - fix(logout): require proper auth.js from npm-registry-fetch - ([@wraithgar](https://github.com/wraithgar)) -* [`fabcf431a`](https://github.com/npm/cli/commit/fabcf431a63ecf93b56ae5d9a05ad4e7ef280c2a) - [#4327](https://github.com/npm/cli/pull/4327) - fix(arborist): correctly load overrides on workspace edges, closes #4205 - ([@nlf](https://github.com/nlf)) -* [`8c3b143ca`](https://github.com/npm/cli/commit/8c3b143ca20d0da56c0ce2764e288a4c203b9f93) - [#4258](https://github.com/npm/cli/pull/4258) - fix(arborist): shrinkwrap throws when trying to read a folder without permissions - ([@Linkgoron](https://github.com/Linkgoron)) -* [`b51b29c56`](https://github.com/npm/cli/commit/b51b29c563fa97aa4fbf38250d1f04e879a8d961) - [#4334](https://github.com/npm/cli/pull/4334) - fix(arborist): update save exact - ([@ruyadorno](https://github.com/ruyadorno)) - -### Dependencies - -* [`8558527c7`](https://github.com/npm/cli/commit/8558527c7158b2c1c353f8ab9c31de2a66ab470e) - [#4333](https://github.com/npm/cli/pull/4333) - deps: `make-fetch-happen@10.0.0` - * compress option and accept/content encoding header edge cases - * strip cookie header on redirect across hostnames -* [`1bfc507f2`](https://github.com/npm/cli/commit/1bfc507f2a5afa02f04d4dea2fc6d151d4fef3ac) - [#4326](https://github.com/npm/cli/pull/4326) - deps: `npm-registry-fetch@12.0.1` -* [`52c9608e7`](https://github.com/npm/cli/commit/52c9608e7bb1cda396b2cef3fc1b48dbaa2b7de3) - [#4326](https://github.com/npm/cli/pull/4326) - deps: `pacote@12.0.3` -* [`2bbeedfeb`](https://github.com/npm/cli/commit/2bbeedfebb3aea082d612deb5e4d9de9e550c529) - [#4326](https://github.com/npm/cli/pull/4326) - deps: `npm-profile@6.0.0` -* [`9652d685b`](https://github.com/npm/cli/commit/9652d685b1e4bd21cec107a611c2e307387623d6) - chore(release): `@npmcli/arborist@4.3.0` - ([@wraithgar](https://github.com/wraithgar)) -* [`0ee4927d2`](https://github.com/npm/cli/commit/0ee4927d2e8206dd24fa7eea5e1c10ea649ecc49) - chore(release): `libnpmaccess@5.0.1` - ([@wraithgar](https://github.com/wraithgar)) -* [`6c0dc1ffb`](https://github.com/npm/cli/commit/6c0dc1ffb70858be1e9ca9afdb6950e39609a367) - chore(release): `libnpmexec@3.0.3` - ([@wraithgar](https://github.com/wraithgar)) -* [`41b8f7b6f`](https://github.com/npm/cli/commit/41b8f7b6ff62f0e738865eb8e98df8650f5467bd) - chore(release): `libnpmorg@3.0.1` - ([@wraithgar](https://github.com/wraithgar)) -* [`433e6aafb`](https://github.com/npm/cli/commit/433e6aafbbf56efcf71e991767a6f00afe4aba7c) - chore(release): `libnpmpublish@5.0.1` - ([@wraithgar](https://github.com/wraithgar)) -* [`6654b6efe`](https://github.com/npm/cli/commit/6654b6efe02666bdb9864f4608e477ba132fd215) - chore(release): `libnpmsearch@4.0.1` - ([@wraithgar](https://github.com/wraithgar)) -* [`3423a9804`](https://github.com/npm/cli/commit/3423a980436492b7f0ee9e002517387a801f4f4a) - chore(release): `libnpmteam@3.0.1` - ([@wraithgar](https://github.com/wraithgar)) -* [`fb03e485d`](https://github.com/npm/cli/commit/fb03e485d9b1f09eb1cbcce00ee8e3e5c012097f) - chore(release): `libnpmhook@7.0.1` - ([@wraithgar](https://github.com/wraithgar)) - -## v8.3.2 (2022-01-20) - -### Bug Fixes - -* [`cfd59b8c8`](https://github.com/npm/cli/commit/cfd59b8c81078f842328b13a23a234150842cd58) - [#4223](https://github.com/npm/cli/pull/4223) - fix: npm update --save - ([@ruyadorno](https://github.com/ruyadorno)) -* [`510f0ecbc`](https://github.com/npm/cli/commit/510f0ecbc9970ed8c8993107cc03cf27b7b996dc) - [#4218](https://github.com/npm/cli/pull/4218) - fix(arborist): ensure indentation is preserved - ([@ljharb](https://github.com/ljharb)) -* [`c99c2151a`](https://github.com/npm/cli/commit/c99c2151a868672c017f64ff0ecb12149a2fb095) - [#4230](https://github.com/npm/cli/pull/4230) - fix(arborist): prioritize valid workspace nodes - ([@nlf](https://github.com/nlf)) -* [`14a3d9500`](https://github.com/npm/cli/commit/14a3d95000f1cba937f3309d198a363ae65cf01f) - [#4265](https://github.com/npm/cli/pull/4265) - fix: resolve workspace paths from cwd when possible - ([@nlf](https://github.com/nlf)) - -### Dependencies - -* [`2ef9f9847`](https://github.com/npm/cli/commit/2ef9f9847c11fe8c0c0494558fe77c15ac4dbc80) - [#4254](https://github.com/npm/cli/pull/4254) - deps: `bin-links@3.0.0 write-file-atomic@4.0.0` - -## v8.3.1 (2022-01-13) - -### Bug Fixes - -* [`2ac540b0c`](https://github.com/npm/cli/commit/2ac540b0ccd016a14676ad891758e8d9e903a12c) - fix(unpublish): Show warning on unpublish command when last version (#4191) - ([@ebsaral](https://github.com/ebsaral)) - -### Dependencies - -* [`da80d579d`](https://github.com/npm/cli/commit/da80d579d1f1db61894c54f7b9b3623394882c16) - [#4211](https://github.com/npm/cli/pull/4211) - deps: `hosted-git-info@4.1.0` - * feat: Support Sourcehut -* [`5a87d190f`](https://github.com/npm/cli/commit/5a87d190f38af9f2f98084d9b476184dbcaf1429) - [#4228](https://github.com/npm/cli/pull/4228) - deps: `@npmcli/config@2.4.0` -* [`1f0d1370f`](https://github.com/npm/cli/commit/1f0d1370ff6bf2ca978ef0d7d32640314c62204e) - chore(release): `@npmcli/arborist@4.2.0` - * [`3cfae3840`](https://github.com/npm/cli/commit/3cfae384011a8b291cc82cc02b56bc114557a9e5) - [#4181](https://github.com/npm/cli/pull/4181) - feat(arborist) add `toJSON`/`toString` methods to get shrinkwrap contents without saving - ([@ljharb](https://github.com/ljharb)) - -### Chores - -* [`d72650457`](https://github.com/npm/cli/commit/d7265045730555c03b3142c004c7438e9577028c) - chore: Bring in all libnpm modules + arborist as workspaces (#4166) - ([@fritzy](https://github.com/fritzy)) - - -## v8.3.0 (2021-12-09) - -### Features - -* [`4b0c29a7c`](https://github.com/npm/cli/commit/4b0c29a7c5860410c7b453bec389c54cb21dbde3) - [#4116](https://github.com/npm/cli/issues/4116) - feat: `@npmcli/arborist@4.1.0` - * introduces overrides - ([@nlf](https://github.com/nlf)) -* [`166d9e144`](https://github.com/npm/cli/commit/166d9e144b38087ee5e7d8aaf6ec7d602cf2957c) - [npm/statusboard#416](https://github.com/npm/statusboard/issues/416) - [#4143](https://github.com/npm/cli/issues/4143) - feat: output configured registry during publish - ([@lukekarrys](https://github.com/lukekarrys)) -* [`71777be17`](https://github.com/npm/cli/commit/71777be17e57179d203cb9162664ecd0c36ca633) - [npm/statusboard#417](https://github.com/npm/statusboard/issues/417) - [#4146](https://github.com/npm/cli/issues/4146) - feat: display `publishConfig` during `config list` - ([@lukekarrys](https://github.com/lukekarrys)) - -### Bug Fixes - -* [`08c663931`](https://github.com/npm/cli/commit/08c663931ec1f56d777ffdb38f94926b9eac13ef) - [#4128](https://github.com/npm/cli/issues/4128) - [#4134](https://github.com/npm/cli/issues/4134) - fix: dont warn on error cleaning individual log files - ([@lukekarrys](https://github.com/lukekarrys)) -* [`e605b128c`](https://github.com/npm/cli/commit/e605b128c87620aae843cdbd8f35cc614da3f8a2) - [#4142](https://github.com/npm/cli/issues/4142) - fix: redact all private keys from config output - ([@lukekarrys](https://github.com/lukekarrys)) - -### Documentation - -* [`db1885d7f`](https://github.com/npm/cli/commit/db1885d7fec012f018093c76dec5a9c01a0ca2b0) - [#4092](https://github.com/npm/cli/issues/4092) - chore(docs): document overrides - ([@nlf](https://github.com/nlf)) - -### Dependencies - -* [`e1da1fa4b`](https://github.com/npm/cli/commit/e1da1fa4ba7d95616928d2192b5b9db09b3120bc) - [#4141](https://github.com/npm/cli/issues/4141) - deps: `@npmcli/arborist@4.1.1`: `parse-conflict-json@2.0.1` - * Fixes object property assignment bug in resolving package-locks with - conflicts -* [`1d8bec566`](https://github.com/npm/cli/commit/1d8bec566cb08ff5ff220f53083323fa8c3fb72e) - [#4144](https://github.com/npm/cli/issues/4144) - [#3884](https://github.com/npm/cli/issues/3884) - deps: `minipass@3.1.6` - * fixes some TAR_ENTRY_INVALID and Z_DATA_ERROR errors - -## v8.2.0 (2021-12-02) - -### Features - -* [`6734ba36d`](https://github.com/npm/cli/commit/6734ba36dd6e07a859ab4d6eb4f264d2c0022276) - [#4062](https://github.com/npm/cli/issues/4062) - feat: streaming debug logfile - ([@lukekarrys](https://github.com/lukekarrys)) - -### Bug Fixes - -* [`5f4040aa0`](https://github.com/npm/cli/commit/5f4040aa0e30a3b74caab64958770c682e4d0031) - chore: remove get-project-scope utils - ([@Yucel Okcu](https://github.com/Yucel Okcu)) -* [`c5c6d1603`](https://github.com/npm/cli/commit/c5c6d1603b06df4c10b503047aeed34d6e0c36c2) - [#4060](https://github.com/npm/cli/issues/4060) - fix: add missing scope on flat options - ([@yuqu](https://github.com/yuqu)) -* [`47828b766`](https://github.com/npm/cli/commit/47828b766a4a7b50c1245c8f01b99ffbeffd014f) - chore: update one-time password prompt - ([@Darcy Clarke](https://github.com/Darcy Clarke)) - -### Documentation - -* [`fc46a7926`](https://github.com/npm/cli/commit/fc46a792621c89354eddc0e1ee2d4f5c26efe5a5) - [#4072](https://github.com/npm/cli/issues/4072) - docs: fix typo in `save-peer` description - ([@chalkygames123](https://github.com/chalkygames123)) -* [`2fbf1576f`](https://github.com/npm/cli/commit/2fbf1576f5427babab2bdf314b1760adc5f9a575) - [#4081](https://github.com/npm/cli/issues/4081) - docs: Fix typo - ([@idleberg](https://github.com/idleberg)) -* [`a8bc95f11`](https://github.com/npm/cli/commit/a8bc95f11c9d21319581d7b09baf9f864bea21ac) - [#4089](https://github.com/npm/cli/issues/4089) - docs(workspaces): Fix typo - ([@yotamselementor](https://github.com/yotamselementor)) -* [`31b098ee2`](https://github.com/npm/cli/commit/31b098ee26ed17facb132278bb3205e80e2a760d) - [#4113](https://github.com/npm/cli/issues/4113) - docs: add logging docs - ([@darcyclarke](https://github.com/darcyclarke)) -* [`cbae0fb71`](https://github.com/npm/cli/commit/cbae0fb71cea55004f7066c0dfc870137b53ee8b) - [#4114](https://github.com/npm/cli/issues/4114) - docs: update description about where/when debug log is written - ([@lukekarrys](https://github.com/lukekarrys)) - - -### Dependencies - -* [`037f2cc8c`](https://github.com/npm/cli/commit/037f2cc8c8ed9d9a092475a5a07f2a3a88915633) - [#4078](https://github.com/npm/cli/issues/4078) - `node-gyp@8.4.1` -* [`0e63df612`](https://github.com/npm/cli/commit/0e63df61283a2f7ace991f72e4577c6f23ffc5df) - [#4102](https://github.com/npm/cli/issues/4102) - `@npmcli/config@2.3.2`: - * fix: always load localPrefix - -## v8.1.4 (2021-11-18) - -### BUG FIXES - -* [`7887fb3d7`](https://github.com/npm/cli/commit/7887fb3d7ba7f05abeb49dd92b76d90422cb38ca) - [#4025](https://github.com/npm/cli/issues/4025) - fix: don't try to open file:/// urls - ([@wraithgar](https://github.com/wraithgar)) -* [`cd6d3a90d`](https://github.com/npm/cli/commit/cd6d3a90d4bbf3793834830b4c77fc8eb0846596) - [#4026](https://github.com/npm/cli/issues/4026) - fix: explicitly allow `npm help` to open file:/// man pages - ([@wraithgar](https://github.com/wraithgar)) -* [`72ca4a4e3`](https://github.com/npm/cli/commit/72ca4a4e39a1d4de03d6423480aa2ee82b021060) - [#4020](https://github.com/npm/cli/issues/4020) - [#4032](https://github.com/npm/cli/issues/4032) - fix: command completion - ([@wraithgar](https://github.com/wraithgar)) -* [`b78949134`](https://github.com/npm/cli/commit/b789491345aa6fbe345aa3c96fe9f415296ec418) - [#4023](https://github.com/npm/cli/issues/4023) - fix(install): command completion with single match - ([@wraithgar](https://github.com/wraithgar)) -* [`44bfa3787`](https://github.com/npm/cli/commit/44bfa378723554195fccf8cf4ca2d895ddbd8f8c) - [#4065](https://github.com/npm/cli/issues/4065) - @npmcli/arborist 4.0.5 - * fix: accurate filtering of workspaces `--no-workspaces` - ([@fritzy](https://github.com/fritzy)) - -### DEPENDENCIES - -* [`225645420`](https://github.com/npm/cli/commit/225645420cf3d13bc0b0d591f7f7bf21a9c24e47) - [#3995](https://github.com/npm/cli/issues/3995) - update to latest eslint and linting rules - ([@wraithgar](https://github.com/wraithgar)) -* [`203fedf5b`](https://github.com/npm/cli/commit/203fedf5b1eba78b76ebacbda88f215caabea6ca) - [#4016](https://github.com/npm/cli/issues/4016) - `eslint@8.0.0`: `@npmcli/eslint-config@2.0.0` - * Update to eslint@8 and and `@npmcli/eslint-config@2.0.0` - * Remove eslint-plugin-node. - Also remove an unused script that was failing linting. We don't use the - update-dist-tags script anymore as part of our release process. - ([@wraithgar](https://github.com/wraithgar)) -* [`7b4aa59b6`](https://github.com/npm/cli/commit/7b4aa59b6630831f25d19c0c15a65acaf3a83327) - `signal-exit@3.0.6`:, `tap@15.1.2` - ([@isaacs](https://github.com/isaacs)) -* [`08015859c`](https://github.com/npm/cli/commit/08015859ca0abe47845d2970212cd344cdfc56e6) - [#4049](https://github.com/npm/cli/issues/4049) - `npmlog@6.0.0` -* [`088c11694`](https://github.com/npm/cli/commit/088c11694a9f575e5c0fe10ab9efb55d14019be7) - [#4045](https://github.com/npm/cli/issues/4045) - `node-gyp@8.4.0`: - * feat: support vs2022 - * feat: build with config.gypi from node headers - -## v8.1.3 (2021-11-04) - -### BUG FIXES - -* [`8ffeb71df`](https://github.com/npm/cli/commit/8ffeb71dfb248b4a76744bd06cd4d6100f17c8ae) - [#3959](https://github.com/npm/cli/issues/3959) - fix: refactor commands - ([@wraithgar](https://github.com/wraithgar)) -* [`e5bfdaca4`](https://github.com/npm/cli/commit/e5bfdaca455e294109ba026f4d8b5cc80d3dfd20) - [#3978](https://github.com/npm/cli/issues/3978) - fix: shrinkwrap setting incorrect lockfileVersion - ([@lukekarrys](https://github.com/lukekarrys)) -* [`32ccd3c27`](https://github.com/npm/cli/commit/32ccd3c2767a14198a1803f04e747ef848f7c938) - [#3988](https://github.com/npm/cli/issues/3988) - fix: remove usage of unnecessary util.promisify - ([@lukekarrys](https://github.com/lukekarrys)) -* [`1e9c31c4e`](https://github.com/npm/cli/commit/1e9c31c4e3929483580a0a554d7515095b5418ca) - [#3994](https://github.com/npm/cli/issues/3994) - fix: npm help on windows - ([@wraithgar](https://github.com/wraithgar)) -* [`22230ef3d`](https://github.com/npm/cli/commit/22230ef3dd590def31c274b3412106b4cfbd212f) - [#3987](https://github.com/npm/cli/issues/3987) - fix: make prefixed usage errors more consistent - ([@lukekarrys](https://github.com/lukekarrys)) - -### DEPENDENCIES - -* [`ac2fabb86`](https://github.com/npm/cli/commit/ac2fabb8604db0dac852913d61c8415ae7464485) - [#3990](https://github.com/npm/cli/issues/3990) - `@npmcli/arborist@4.0.4` - * fix: don't compare spec for local dep vs existing - * fix: stop pruning peerSets when entryEdge is from a workspace -* [`a0d35ff20`](https://github.com/npm/cli/commit/a0d35ff20aed6aab8508123eb540bc9c61fb127d) - [#3996](https://github.com/npm/cli/issues/3996) - `@npmcli/config@2.3.1`: - * fix: dont load project configs in global mode - -## v8.1.2 (2021-10-28) - -### BUG FIXES - -* [`cb9f43551`](https://github.com/npm/cli/commit/cb9f43551f46bf27095cd7bd6c1885a441004cd2) - [#3949](https://github.com/npm/cli/issues/3949) - allow `--lockfile-version` config to be string and coerce to number ([@lukekarrys](https://github.com/lukekarrys)) -* [`070901d7a`](https://github.com/npm/cli/commit/070901d7a6e3110a04ef41d8fcf14ffbfcce1496) - [#3943](https://github.com/npm/cli/issues/3943) - fix(publish): clean args before logging - ([@wraithgar](https://github.com/wraithgar)) - -### DEPENDENCIES - -* [`8af94726b`](https://github.com/npm/cli/commit/8af94726b098031c7c0cae7ed50cc4e2e3499181) - [#3953](https://github.com/npm/cli/issues/3953) - `arborist@4.0.3` - * [`38cee94`](https://github.com/npm/arborist/commit/38cee94afa53d578830cc282348a803a8a6eefad) - [#340](https://github.com/npm/arborist/pull/340) - fix: set lockfileVersion from file during reset - * [`d310bd3`](https://github.com/npm/arborist/commit/d310bd3290c3a81e8285ceeb6eda9c9b5aa867d7) - [#339](https://github.com/npm/arborist/pull/339) - fix: always set originalLockfileVersion when doing shrinkwrap reset - -## v8.1.1 (2021-10-21) - -### DEPENDENCIES - -* [`51fb83ce9`](https://github.com/npm/cli/commit/51fb83ce93fdd7e289da7b2aabc95b0518f0aa31) - [#3921](https://github.com/npm/cli/issues/3921) - `@npmcli/arborist@4.0.2`: - * fix: skip peer conflict check if there is a current node -* [`1d07f2187`](https://github.com/npm/cli/commit/1d07f21876994c6d4d69559203cfdac6022536b6) - [#3913](https://github.com/npm/cli/issues/3913) - `node-gyp@8.3.0`: - * feat(gyp): update gyp to v0.10.0 - -## v8.1.0 (2021-10-14) - -### FEATURES - -* [`24273a862`](https://github.com/npm/cli/commit/24273a862e54abfd022df9fc4b8c250bfe77817c) - [#3890](https://github.com/npm/cli/issues/3890) - feat(workspaces): add --include-workspace-root and explicit --no-workspaces - ([@fritzy](https://github.com/fritzy)) -* [`d559d6da8`](https://github.com/npm/cli/commit/d559d6da84c2dae960c6b7c89c6012fb31bcfa37) - [#3880](https://github.com/npm/cli/issues/3880) - feat(config): Add --lockfile-version config option - ([@isaacs](https://github.com/isaacs)) - -### DEPENDENCIES - -* [`ae4bf013d`](https://github.com/npm/cli/commit/ae4bf013d06d84b8600937a28cc7b4c4034f571c) - [#3883](https://github.com/npm/cli/issues/3883) - `pacote@12.0.2`: - * fix: preserve git+ssh url for non-hosted repos - * deps: update `npm-packlist@3.0.0` - * fix: no longer include ignored bundled link deps -* [`fbc5a3d08`](https://github.com/npm/cli/commit/fbc5a3d08231176b9d8a7b9dd3371fb40ba6abc9) - [#3889](https://github.com/npm/cli/issues/3889) - `@npmcli/ci-detect@1.4.0` -* [`b6bc279e5`](https://github.com/npm/cli/commit/b6bc279e55aa65afff09d9258f9df7168a7dbadb) - `@npmcli/arborist@4.0.1` -* [`0f69d295b`](https://github.com/npm/cli/commit/0f69d295bd5516f496af75ef29e7ae6304fa2ba5) - [#3893](https://github.com/npm/cli/issues/3893) - `@npmcli/map-workspaces@2.0.0` - -### DOCUMENTATION - -* [`f77932ca1`](https://github.com/npm/cli/commit/f77932ca1eafbece16fc249a7470f760d652bd94) - [#3861](https://github.com/npm/cli/issues/3861) - fix(docs): Update Node support in README - ([@gfyoung](https://github.com/gfyoung)) -* [`a190f422a`](https://github.com/npm/cli/commit/a190f422a2587a0e56afa5032175e57e55123ea2) - [#3878](https://github.com/npm/cli/issues/3878) - fix(docs): grammar fix - ([@XhmikosR](https://github.com/XhmikosR)) - -## v8.0.0 (2021-10-07) - -The purpose of this release is to drop support for old node versions and -to remove support for `require('npm')`. There are no other breaking -changes. - -### BREAKING CHANGES - -* Drop support for node 10 and 11 -* Raise support ceiling in node 12 and 14 to LTS (^12.13.0/^14.15.0) -* Drop support to `require('npm')` -* Update subdependencies that also dropped node10 support - -### DEPENDENCIES - -* The following dependencies were updated to drop node10 support and - update to the latest node-gyp - * libnpmversion@2.0.1 - * pacote@12.0.0 - * libnpmpack@3.0.0 - * @npmcli/arborist@3.0.0 - * libnpmfund@2.0.0 - * libnpmexec@3.0.0 - * node-gyp@8.2.0 -* [`8bd85cdae`](https://github.com/npm/cli/commit/8bd85cdae5eead60d5e92d6f1be27e88b480b1cb) - [#3813](https://github.com/npm/cli/issues/3813) - `cli-columns@4.0.0` diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md index c945f9e18637f..ce0a5d454fd94 100644 --- a/DEPENDENCIES.md +++ b/DEPENDENCIES.md @@ -8,7 +8,6 @@ graph LR; bin-links-->read-cmd-shim; bin-links-->write-file-atomic; cacache-->fs-minipass; - cacache-->infer-owner; cacache-->npmcli-fs["@npmcli/fs"]; cacache-->npmcli-move-file["@npmcli/move-file"]; cacache-->ssri; @@ -37,7 +36,6 @@ graph LR; libnpmexec-->npmcli-arborist["@npmcli/arborist"]; libnpmexec-->npmcli-ci-detect["@npmcli/ci-detect"]; libnpmexec-->npmcli-eslint-config["@npmcli/eslint-config"]; - libnpmexec-->npmcli-fs["@npmcli/fs"]; libnpmexec-->npmcli-run-script["@npmcli/run-script"]; libnpmexec-->npmcli-template-oss["@npmcli/template-oss"]; libnpmexec-->npmlog; @@ -119,8 +117,8 @@ graph LR; npm-->npmcli-arborist["@npmcli/arborist"]; npm-->npmcli-ci-detect["@npmcli/ci-detect"]; npm-->npmcli-config["@npmcli/config"]; + npm-->npmcli-docs["@npmcli/docs"]; npm-->npmcli-eslint-config["@npmcli/eslint-config"]; - npm-->npmcli-fs["@npmcli/fs"]; npm-->npmcli-git["@npmcli/git"]; npm-->npmcli-map-workspaces["@npmcli/map-workspaces"]; npm-->npmcli-package-json["@npmcli/package-json"]; @@ -192,6 +190,9 @@ graph LR; npmcli-config-->proc-log; npmcli-config-->read-package-json-fast; npmcli-config-->semver; + npmcli-docs-->ignore-walk; + npmcli-docs-->npmcli-eslint-config["@npmcli/eslint-config"]; + npmcli-docs-->npmcli-template-oss["@npmcli/template-oss"]; npmcli-fs-->semver; npmcli-git-->npm-pick-manifest; npmcli-git-->npmcli-promise-spawn["@npmcli/promise-spawn"]; @@ -207,8 +208,6 @@ graph LR; npmcli-metavuln-calculator-->semver; npmcli-package-json-->json-parse-even-better-errors; npmcli-promise-spawn-->infer-owner; - npmcli-query-->npm-package-arg; - npmcli-query-->semver; npmcli-run-script-->npmcli-node-gyp["@npmcli/node-gyp"]; npmcli-run-script-->npmcli-promise-spawn["@npmcli/promise-spawn"]; npmcli-run-script-->read-package-json-fast; @@ -216,7 +215,6 @@ graph LR; npmlog-->gauge; pacote-->cacache; pacote-->fs-minipass; - pacote-->infer-owner; pacote-->npm-package-arg; pacote-->npm-packlist; pacote-->npm-pick-manifest; @@ -252,12 +250,17 @@ graph LR; agentkeepalive-->humanize-ms; aggregate-error-->clean-stack; aggregate-error-->indent-string; + ampproject-remapping-->jridgewell-gen-mapping["@jridgewell/gen-mapping"]; + ampproject-remapping-->jridgewell-trace-mapping["@jridgewell/trace-mapping"]; ansi-styles-->color-convert; are-we-there-yet-->delegates; are-we-there-yet-->readable-stream; + argparse-->sprintf-js; babel-code-frame-->babel-highlight["@babel/highlight"]; + babel-core-->ampproject-remapping["@ampproject/remapping"]; babel-core-->babel-code-frame["@babel/code-frame"]; babel-core-->babel-generator["@babel/generator"]; + babel-core-->babel-helper-compilation-targets["@babel/helper-compilation-targets"]; babel-core-->babel-helper-module-transforms["@babel/helper-module-transforms"]; babel-core-->babel-helpers["@babel/helpers"]; babel-core-->babel-parser["@babel/parser"]; @@ -273,13 +276,15 @@ graph LR; babel-core-->semver; babel-core-->source-map; babel-generator-->babel-types["@babel/types"]; + babel-generator-->jridgewell-gen-mapping["@jridgewell/gen-mapping"]; babel-generator-->jsesc; - babel-generator-->source-map; - babel-helper-environment-visitor-->babel-types["@babel/types"]; - babel-helper-function-name-->babel-helper-get-function-arity["@babel/helper-get-function-arity"]; + babel-helper-compilation-targets-->babel-compat-data["@babel/compat-data"]; + babel-helper-compilation-targets-->babel-core["@babel/core"]; + babel-helper-compilation-targets-->babel-helper-validator-option["@babel/helper-validator-option"]; + babel-helper-compilation-targets-->browserslist; + babel-helper-compilation-targets-->semver; babel-helper-function-name-->babel-template["@babel/template"]; babel-helper-function-name-->babel-types["@babel/types"]; - babel-helper-get-function-arity-->babel-types["@babel/types"]; babel-helper-hoist-variables-->babel-types["@babel/types"]; babel-helper-module-imports-->babel-types["@babel/types"]; babel-helper-module-transforms-->babel-helper-environment-visitor["@babel/helper-environment-visitor"]; @@ -325,20 +330,22 @@ graph LR; babel-traverse-->babel-types["@babel/types"]; babel-traverse-->debug; babel-traverse-->globals; + babel-types-->babel-helper-string-parser["@babel/helper-string-parser"]; babel-types-->babel-helper-validator-identifier["@babel/helper-validator-identifier"]; babel-types-->to-fast-properties; bin-links-->cmd-shim; - bin-links-->mkdirp-infer-owner; bin-links-->npm-normalize-package-bin; bin-links-->read-cmd-shim; - bin-links-->rimraf; bin-links-->write-file-atomic; bindings-->file-uri-to-path; bl-->buffer; bl-->inherits; bl-->readable-stream; brace-expansion-->balanced-match; - brace-expansion-->concat-map; + browserslist-->caniuse-lite; + browserslist-->electron-to-chromium; + browserslist-->node-releases; + browserslist-->update-browserslist-db; buffer-->base64-js; buffer-->ieee754; builtins-->semver; @@ -371,12 +378,10 @@ graph LR; cmark-gfm-->bindings; cmark-gfm-->node-addon-api; cmark-gfm-->prebuild-install; - cmd-shim-->mkdirp-infer-owner; color-convert-->color-name; columnify-->strip-ansi; columnify-->wcwidth; combined-stream-->delayed-stream; - convert-source-map-->safe-buffer; cssstyle-->cssom; data-urls-->abab; data-urls-->whatwg-mimetype; @@ -387,18 +392,6 @@ graph LR; detab-->repeat-string; dezalgo-->asap; dezalgo-->wrappy; - docs-->cmark-gfm; - docs-->jsdom; - docs-->marked-man; - docs-->mdx-js-mdx["@mdx-js/mdx"]; - docs-->mkdirp; - docs-->npmcli-eslint-config["@npmcli/eslint-config"]; - docs-->npmcli-fs["@npmcli/fs"]; - docs-->npmcli-promise-spawn["@npmcli/promise-spawn"]; - docs-->npmcli-template-oss["@npmcli/template-oss"]; - docs-->tap; - docs-->which; - docs-->yaml; domexception-->webidl-conversions; encoding-->iconv-lite; end-of-stream-->once; @@ -410,6 +403,7 @@ graph LR; form-data-->asynckit; form-data-->combined-stream; form-data-->mime-types; + front-matter-->js-yaml; fs-minipass-->minipass; gauge-->aproba; gauge-->console-control-strings; @@ -483,6 +477,13 @@ graph LR; is-cidr-->cidr-regex; is-core-module-->has; is-fullwidth-code-point-->number-is-nan; + jridgewell-gen-mapping-->jridgewell-set-array["@jridgewell/set-array"]; + jridgewell-gen-mapping-->jridgewell-sourcemap-codec["@jridgewell/sourcemap-codec"]; + jridgewell-gen-mapping-->jridgewell-trace-mapping["@jridgewell/trace-mapping"]; + jridgewell-trace-mapping-->jridgewell-resolve-uri["@jridgewell/resolve-uri"]; + jridgewell-trace-mapping-->jridgewell-sourcemap-codec["@jridgewell/sourcemap-codec"]; + js-yaml-->argparse; + js-yaml-->esprima; jsdom-->abab; jsdom-->acorn-globals; jsdom-->acorn; @@ -503,7 +504,6 @@ graph LR; jsdom-->saxes; jsdom-->symbol-tree; jsdom-->tough-cookie; - jsdom-->w3c-hr-time; jsdom-->w3c-xmlserializer; jsdom-->webidl-conversions; jsdom-->whatwg-encoding; @@ -534,13 +534,11 @@ graph LR; libnpmexec-->bin-links; libnpmexec-->chalk; libnpmexec-->minify-registry-metadata; - libnpmexec-->mkdirp-infer-owner; libnpmexec-->mkdirp; libnpmexec-->npm-package-arg; libnpmexec-->npmcli-arborist["@npmcli/arborist"]; libnpmexec-->npmcli-ci-detect["@npmcli/ci-detect"]; libnpmexec-->npmcli-eslint-config["@npmcli/eslint-config"]; - libnpmexec-->npmcli-fs["@npmcli/fs"]; libnpmexec-->npmcli-run-script["@npmcli/run-script"]; libnpmexec-->npmcli-template-oss["@npmcli/template-oss"]; libnpmexec-->npmlog; @@ -670,9 +668,6 @@ graph LR; minipass-sized-->minipass; minizlib-->minipass; minizlib-->yallist; - mkdirp-infer-owner-->chownr; - mkdirp-infer-owner-->infer-owner; - mkdirp-infer-owner-->mkdirp; node-abi-->semver; node-gyp-->env-paths; node-gyp-->glob; @@ -693,11 +688,9 @@ graph LR; npm-->archy; npm-->cacache; npm-->chalk; - npm-->chownr; npm-->cli-columns; npm-->cli-table3; npm-->columnify; - npm-->docs; npm-->fastest-levenshtein; npm-->fs-minipass; npm-->glob; @@ -724,7 +717,6 @@ graph LR; npm-->minimatch; npm-->minipass-pipeline; npm-->minipass; - npm-->mkdirp-infer-owner; npm-->mkdirp; npm-->ms; npm-->nock; @@ -741,8 +733,8 @@ graph LR; npm-->npmcli-arborist["@npmcli/arborist"]; npm-->npmcli-ci-detect["@npmcli/ci-detect"]; npm-->npmcli-config["@npmcli/config"]; + npm-->npmcli-docs["@npmcli/docs"]; npm-->npmcli-eslint-config["@npmcli/eslint-config"]; - npm-->npmcli-fs["@npmcli/fs"]; npm-->npmcli-git["@npmcli/git"]; npm-->npmcli-map-workspaces["@npmcli/map-workspaces"]; npm-->npmcli-package-json["@npmcli/package-json"]; @@ -804,8 +796,6 @@ graph LR; npmcli-arborist-->json-stringify-nice; npmcli-arborist-->minify-registry-metadata; npmcli-arborist-->minimatch; - npmcli-arborist-->mkdirp-infer-owner; - npmcli-arborist-->mkdirp; npmcli-arborist-->nock; npmcli-arborist-->nopt; npmcli-arborist-->npm-install-checks; @@ -831,7 +821,6 @@ graph LR; npmcli-arborist-->promise-call-limit; npmcli-arborist-->read-package-json-fast; npmcli-arborist-->readdir-scoped-modules; - npmcli-arborist-->rimraf; npmcli-arborist-->semver; npmcli-arborist-->ssri; npmcli-arborist-->tap; @@ -839,7 +828,6 @@ graph LR; npmcli-arborist-->treeverse; npmcli-arborist-->walk-up-path; npmcli-config-->ini; - npmcli-config-->mkdirp-infer-owner; npmcli-config-->nopt; npmcli-config-->npmcli-map-workspaces["@npmcli/map-workspaces"]; npmcli-config-->proc-log; @@ -847,7 +835,18 @@ graph LR; npmcli-config-->semver; npmcli-config-->walk-up-path; npmcli-disparity-colors-->ansi-styles; - npmcli-fs-->gar-promisify["@gar/promisify"]; + npmcli-docs-->cmark-gfm; + npmcli-docs-->front-matter; + npmcli-docs-->ignore-walk; + npmcli-docs-->isaacs-string-locale-compare["@isaacs/string-locale-compare"]; + npmcli-docs-->jsdom; + npmcli-docs-->marked-man; + npmcli-docs-->mdx-js-mdx["@mdx-js/mdx"]; + npmcli-docs-->mkdirp; + npmcli-docs-->npmcli-eslint-config["@npmcli/eslint-config"]; + npmcli-docs-->npmcli-template-oss["@npmcli/template-oss"]; + npmcli-docs-->tap; + npmcli-docs-->yaml; npmcli-fs-->semver; npmcli-git-->lru-cache; npmcli-git-->mkdirp; @@ -872,9 +871,7 @@ graph LR; npmcli-move-file-->rimraf; npmcli-package-json-->json-parse-even-better-errors; npmcli-promise-spawn-->infer-owner; - npmcli-query-->npm-package-arg; npmcli-query-->postcss-selector-parser; - npmcli-query-->semver; npmcli-run-script-->node-gyp; npmcli-run-script-->npmcli-node-gyp["@npmcli/node-gyp"]; npmcli-run-script-->npmcli-promise-spawn["@npmcli/promise-spawn"]; @@ -893,11 +890,8 @@ graph LR; optionator-->word-wrap; p-map-->aggregate-error; pacote-->cacache; - pacote-->chownr; pacote-->fs-minipass; - pacote-->infer-owner; pacote-->minipass; - pacote-->mkdirp; pacote-->npm-package-arg; pacote-->npm-packlist; pacote-->npm-pick-manifest; @@ -910,7 +904,6 @@ graph LR; pacote-->promise-retry; pacote-->read-package-json-fast; pacote-->read-package-json; - pacote-->rimraf; pacote-->ssri; pacote-->tar; parse-conflict-json-->json-parse-even-better-errors; @@ -922,6 +915,7 @@ graph LR; parse-entities-->is-alphanumerical; parse-entities-->is-decimal; parse-entities-->is-hexadecimal; + parse5-->entities; postcss-selector-parser-->cssesc; postcss-selector-parser-->util-deprecate; prebuild-install-->detect-libc; @@ -1042,6 +1036,7 @@ graph LR; tough-cookie-->psl; tough-cookie-->punycode; tough-cookie-->universalify; + tough-cookie-->url-parse; tr46-->punycode; tunnel-agent-->safe-buffer; type-check-->prelude-ls; @@ -1065,6 +1060,11 @@ graph LR; unist-util-visit-->unist-util-visit-parents; unist-util-visit-parents-->types-unist["@types/unist"]; unist-util-visit-parents-->unist-util-is; + update-browserslist-db-->browserslist; + update-browserslist-db-->escalade; + update-browserslist-db-->picocolors; + url-parse-->querystringify; + url-parse-->requires-port; validate-npm-package-license-->spdx-correct; validate-npm-package-license-->spdx-expression-parse; validate-npm-package-name-->builtins; @@ -1074,7 +1074,6 @@ graph LR; vfile-->vfile-message; vfile-message-->types-unist["@types/unist"]; vfile-message-->unist-util-stringify-position; - w3c-hr-time-->browser-process-hrtime; w3c-xmlserializer-->xml-name-validator; wcwidth-->defaults; whatwg-encoding-->iconv-lite; @@ -1102,6 +1101,6 @@ packages higher up the chain. - pacote, libnpmaccess, libnpmhook, libnpmorg, libnpmsearch, libnpmteam, npm-profile - npm-registry-fetch, libnpmversion - @npmcli/git, make-fetch-happen, @npmcli/config, init-package-json - - @npmcli/installed-package-contents, @npmcli/map-workspaces, cacache, npm-pick-manifest, @npmcli/run-script, read-package-json, @npmcli/query, readdir-scoped-modules, promzard - - npm-bundled, read-package-json-fast, @npmcli/fs, unique-filename, @npmcli/promise-spawn, npm-install-checks, npm-package-arg, npm-packlist, normalize-package-data, @npmcli/package-json, bin-links, nopt, npmlog, parse-conflict-json, dezalgo, read - - npm-normalize-package-bin, @npmcli/name-from-folder, json-parse-even-better-errors, semver, @npmcli/move-file, fs-minipass, infer-owner, ssri, unique-slug, hosted-git-info, proc-log, validate-npm-package-name, @npmcli/node-gyp, ignore-walk, minipass-fetch, cmd-shim, read-cmd-shim, write-file-atomic, abbrev, are-we-there-yet, gauge, wrappy, treeverse, @npmcli/eslint-config, @npmcli/template-oss, minify-registry-metadata, @npmcli/disparity-colors, @npmcli/ci-detect, mute-stream, ini, npm-audit-report, npm-user-validate \ No newline at end of file + - @npmcli/installed-package-contents, @npmcli/map-workspaces, cacache, npm-pick-manifest, @npmcli/run-script, read-package-json, readdir-scoped-modules, promzard + - @npmcli/docs, npm-bundled, read-package-json-fast, @npmcli/fs, unique-filename, @npmcli/promise-spawn, npm-install-checks, npm-package-arg, npm-packlist, normalize-package-data, @npmcli/package-json, bin-links, nopt, npmlog, parse-conflict-json, dezalgo, read + - ignore-walk, @npmcli/eslint-config, @npmcli/template-oss, npm-normalize-package-bin, @npmcli/name-from-folder, json-parse-even-better-errors, semver, @npmcli/move-file, fs-minipass, ssri, unique-slug, infer-owner, hosted-git-info, proc-log, validate-npm-package-name, @npmcli/node-gyp, minipass-fetch, @npmcli/query, cmd-shim, read-cmd-shim, write-file-atomic, abbrev, are-we-there-yet, gauge, wrappy, treeverse, minify-registry-metadata, @npmcli/disparity-colors, @npmcli/ci-detect, mute-stream, ini, npm-audit-report, npm-user-validate \ No newline at end of file diff --git a/Makefile b/Makefile index 5f66ee7174f16..997a095067c28 100644 --- a/Makefile +++ b/Makefile @@ -3,94 +3,9 @@ SHELL = bash PUBLISHTAG = $(shell node scripts/publish-tag.js) -# these docs have the @VERSION@ tag in them, so they have to be rebuilt -# whenever the package.json is touched, in case the version changed. -version_mandocs = $(shell grep -rl '@VERSION@' docs/content \ - |sed 's|.md|.1|g' \ - |sed 's|docs/content/commands/|man/man1/|g' ) - -cli_mandocs = $(shell find docs/content/commands -name '*.md' \ - |sed 's|.md|.1|g' \ - |sed 's|docs/content/commands/|man/man1/|g' ) - -files_mandocs = $(shell find docs/content/configuring-npm -name '*.md' \ - |sed 's|.md|.5|g' \ - |sed 's|docs/content/configuring-npm/|man/man5/|g' ) - -misc_mandocs = $(shell find docs/content/using-npm -name '*.md' \ - |sed 's|.md|.7|g' \ - |sed 's|docs/content/using-npm/|man/man7/|g' ) - -mandocs = $(cli_mandocs) $(files_mandocs) $(misc_mandocs) - -markdown_docs = $(shell for file in $(find lib/commands -name '*.js'); do echo docs/content/commands/npm-$(basename $file .js).md; done) - -all: docs - -docs: mandocs htmldocs $(markdown_docs) - -# don't regenerate the snapshot if we're generating -# snapshots, since presumably we just did that. -mandocs: deps $(mandocs) - @ ! [ "$${npm_lifecycle_event}" = "snap" ] && \ - ! [ "$${npm_lifecycle_event}" = "postsnap" ] && \ - TAP_SNAPSHOT=1 node test/lib/utils/config/definitions.js || true - -$(version_mandocs): package.json - -htmldocs: deps - node bin/npm-cli.js rebuild cmark-gfm - node docs/bin/dockhand.js - -clean: docsclean gitclean - -docsclean: - rm -rf man - deps: node bin/npm-cli.js run resetdeps -## targets for man files, these are encouraged to be only built by running `make docs` or `make mandocs` -man/man1/%.1: docs/content/commands/%.md docs/bin/docs-build.js - @[ -d man/man1 ] || mkdir -p man/man1 - node docs/bin/docs-build.js $< $@ - -man/man5/npm-json.5: man/man5/package.json.5 - cp $< $@ - -man/man5/npm-global.5: man/man5/folders.5 - cp $< $@ - -man/man5/%.5: docs/content/configuring-npm/%.md docs/bin/docs-build.js - @[ -d man/man5 ] || mkdir -p man/man5 - node docs/bin/docs-build.js $< $@ - -man/man7/%.7: docs/content/using-npm/%.md docs/bin/docs-build.js - @[ -d man/man7 ] || mkdir -p man/man7 - node docs/bin/docs-build.js $< $@ - -# Any time the config definitions description changes, automatically -# update the documentation to account for it -docs/content/using-npm/config.md: docs/bin/config-doc.js lib/utils/config/*.js - node docs/bin/config-doc.js - -mddocs: docs/bin/config-doc-command.js lib/utils/config/*.js lib/utils/cmd-list.js - @for file in $(shell find docs/content/commands -name 'npm-*.md'); do \ - cmdname=$$(basename $$file .md) ;\ - cmdname=$${cmdname##npm-} ;\ - echo node docs/bin/config-doc-command.js $${file} lib/commands/$${cmdname}.js ;\ - node docs/bin/config-doc-command.js $${file} lib/commands/$${cmdname}.js ;\ - done - -docs/content/commands/npm-%.md: lib/commands/%.js - node docs/bin/config-doc-command.js $@ $< - -freshdocs: - touch lib/utils/config/definitions.js - touch docs/bin/*.js - make docs - make mddocs - lint-all: deps node bin/npm-cli.js run lint-all @@ -113,10 +28,10 @@ prune: deps node bin/npm-cli.js prune --omit=dev --no-save --no-audit --no-fund node scripts/git-dirty.js -publish: gitclean ls-ok link docs lint-all test-all prune +publish: gitclean ls-ok link lint-all test-all prune node bin/npm-cli.js publish --tag=$(PUBLISHTAG) -release: gitclean ls-ok docs prune +release: gitclean ls-ok prune @bash scripts/release.sh -.PHONY: all latest install dev link docs mddocs clean uninstall lint-all test-all man docsclean release ls-ok deps prune freshdocs +.PHONY: link gitclean uninstall lint-all test-all release ls-ok deps prune diff --git a/README.md b/README.md index 7e4a5f38a7607..b88882fadfee0 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ One of the following versions of [Node.js](https://nodejs.org/en/download/) must be installed to run **`npm`**: -* `12.x.x` >= `12.13.0` -* `14.x.x` >= `14.15.0` -* `16.0.0` or higher +* `14.x.x` >= `14.17.0` +* `16.x.x` >= `16.13.0` +* `18.0.0` or higher ### Installation diff --git a/changelogs/CHANGELOG-1.md b/changelogs/CHANGELOG-1.md deleted file mode 100644 index ea409c3d998b7..0000000000000 --- a/changelogs/CHANGELOG-1.md +++ /dev/null @@ -1,743 +0,0 @@ -### v1.4.29 (2015-10-29): - -#### THINGS ARE HAPPENING IN LTS LAND - -In a special one-off release as part of the [strategy to get a version of npm -into Node LTS that works with the current -registry](https://github.com/nodejs/LTS/issues/37), modify npm to print out -this deprecation banner literally every time npm is invoked to do anything: - -``` -npm WARN deprecated This version of npm lacks support for important features, -npm WARN deprecated such as scoped packages, offered by the primary npm -npm WARN deprecated registry. Consider upgrading to at least npm@2, if not the -npm WARN deprecated latest stable version. To upgrade to npm@2, run: -npm WARN deprecated -npm WARN deprecated npm -g install npm@latest-2 -npm WARN deprecated -npm WARN deprecated To upgrade to the latest stable version, run: -npm WARN deprecated -npm WARN deprecated npm -g install npm@latest -npm WARN deprecated -npm WARN deprecated (Depending on how Node.js was installed on your system, you -npm WARN deprecated may need to prefix the preceding commands with `sudo`, or if -npm WARN deprecated on Windows, run them from an Administrator prompt.) -npm WARN deprecated -npm WARN deprecated If you're running the version of npm bundled with -npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS -npm WARN deprecated will be bundled with a version of npm@2, which has some small -npm WARN deprecated backwards-incompatible changes made to `npm run-script` and -npm WARN deprecated semver behavior. -``` - -The message basically tells the tale: Node 0.10 will finally be getting -`npm@2`, so those of you who haven't upgraded your build systems to deal with -its (relatively small) breaking changes should do so now. - -Also, this version doesn't even pretend that it can deal with scoped packages, -which, given the confusing behavior of older versions of `npm@1.4`, where it -would sometimes try to install packages from GitHub, is a distinct improvement. - -There is no good reason for you as an end user to upgrade to this version of -npm yourself. - -* [`709e9b4`](https://github.com/npm/npm/commit/709e9b44f5df9817a1c4babfbf26a2329bd265fb) - Print 20-line deprecation banner on all command invocations. - ([@othiym23](https://github.com/othiym23)) -* [`0c29d09`](https://github.com/npm/npm/commit/0c29d0906608e8e174bd30a7a245e19795326051) - Crash out immediately with an exhortation to upgrade on attempts to use - scoped packages. ([@othiym23](https://github.com/othiym23)) - -### v1.5.0-alpha-4 (2014-07-18): - -* fall back to `_auth` config as default auth when using default registry - ([@isaacs](https://github.com/isaacs)) -* support for 'init.version' for those who don't want to deal with semver 0.0.x - oddities ([@rvagg](https://github.com/rvagg)) -* [`be06213`](https://github.com/npm/npm/commit/be06213415f2d51a50d2c792b4cd0d3412a9a7b1) - remove residual support for `win` log level - ([@aterris](https://github.com/aterris)) - -### v1.5.0-alpha-3 (2014-07-17): - -* [`a3a85dd`](https://github.com/npm/npm/commit/a3a85dd004c9245a71ad2f0213bd1a9a90d64cd6) - `--save` scoped packages correctly ([@othiym23](https://github.com/othiym23)) -* [`18a3385`](https://github.com/npm/npm/commit/18a3385bcf8bfb8312239216afbffb7eec759150) - `npm-registry-client@3.0.2` ([@othiym23](https://github.com/othiym23)) -* [`375988b`](https://github.com/npm/npm/commit/375988b9bf5aa5170f06a790d624d31b1eb32c6d) - invalid package names are an early error for optional deps - ([@othiym23](https://github.com/othiym23)) -* consistently use `node-package-arg` instead of arbitrary package spec - splitting ([@othiym23](https://github.com/othiym23)) - -### v1.5.0-alpha-2 (2014-07-01): - -* [`54cf625`](https://github.com/npm/npm/commit/54cf62534e3331e3f454e609e44f0b944e819283) - fix handling for 301s in `npm-registry-client@3.0.1` - ([@Raynos](https://github.com/Raynos)) -* [`e410861`](https://github.com/npm/npm/commit/e410861c69a3799c1874614cb5b87af8124ff98d) - don't crash if no username set on `whoami` - ([@isaacs](https://github.com/isaacs)) -* [`0353dde`](https://github.com/npm/npm/commit/0353ddeaca8171aa7dbdd8102b7e2eb581a86406) - respect `--json` for output ([@isaacs](https://github.com/isaacs)) -* [`b3d112a`](https://github.com/npm/npm/commit/b3d112ae190b984cc1779b9e6de92218f22380c6) - outdated: Don't show headings if there's nothing to output - ([@isaacs](https://github.com/isaacs)) -* [`bb4b90c`](https://github.com/npm/npm/commit/bb4b90c80dbf906a1cb26d85bc0625dc2758acc3) - outdated: Default to `latest` rather than `*` for unspecified deps - ([@isaacs](https://github.com/isaacs)) - -### v1.5.0-alpha-1 (2014-07-01): - -* [`eef4884`](https://github.com/npm/npm/commit/eef4884d6487ee029813e60a5f9c54e67925d9fa) - use the correct piece of the spec for GitHub shortcuts - ([@othiym23](https://github.com/othiym23)) - -### v1.5.0-alpha-0 (2014-07-01): - -* [`7f55057`](https://github.com/npm/npm/commit/7f55057807cfdd9ceaf6331968e666424f48116c) - install scoped packages ([#5239](https://github.com/npm/npm/issues/5239)) - ([@othiym23](https://github.com/othiym23)) -* [`0df7e16`](https://github.com/npm/npm/commit/0df7e16c0232d8f4d036ebf4ec3563215517caac) - publish scoped packages ([#5239](https://github.com/npm/npm/issues/5239)) - ([@othiym23](https://github.com/othiym23)) -* [`0689ba2`](https://github.com/npm/npm/commit/0689ba249b92b4c6279a26804c96af6f92b3a501) - support (and save) --scope=@s config - ([@othiym23](https://github.com/othiym23)) -* [`f34878f`](https://github.com/npm/npm/commit/f34878fc4cee29901e4daf7bace94be01e25cad7) - scope credentials to registry ([@othiym23](https://github.com/othiym23)) -* [`0ac7ca2`](https://github.com/npm/npm/commit/0ac7ca233f7a69751fe4386af6c4daa3ee9fc0da) - capture and store bearer tokens when sent by registry - ([@othiym23](https://github.com/othiym23)) -* [`63c3277`](https://github.com/npm/npm/commit/63c3277f089b2c4417e922826bdc313ac854cad6) - only delete files that are created by npm - ([@othiym23](https://github.com/othiym23)) -* [`4f54043`](https://github.com/npm/npm/commit/4f540437091d1cbca3915cd20c2da83c2a88bb8e) - `npm-package-arg@2.0.0` ([@othiym23](https://github.com/othiym23)) -* [`9e1460e`](https://github.com/npm/npm/commit/9e1460e6ac9433019758481ec031358f4af4cd44) - `read-package-json@1.2.3` ([@othiym23](https://github.com/othiym23)) -* [`719d8ad`](https://github.com/npm/npm/commit/719d8adb9082401f905ff4207ede494661f8a554) - `fs-vacuum@1.2.1` ([@othiym23](https://github.com/othiym23)) -* [`9ef8fe4`](https://github.com/npm/npm/commit/9ef8fe4d6ead3acb3e88c712000e2d3a9480ebec) - `async-some@1.0.0` ([@othiym23](https://github.com/othiym23)) -* [`a964f65`](https://github.com/npm/npm/commit/a964f65ab662107b62a4ca58535ce817e8cca331) - `npmconf@2.0.1` ([@othiym23](https://github.com/othiym23)) -* [`113765b`](https://github.com/npm/npm/commit/113765bfb7d3801917c1d9f124b8b3d942bec89a) - `npm-registry-client@3.0.0` ([@othiym23](https://github.com/othiym23)) - -### v1.4.28 (2014-09-12): - -* [`f4540b6`](https://github.com/npm/npm/commit/f4540b6537a87e653d7495a9ddcf72949fdd4d14) - [#6043](https://github.com/npm/npm/issues/6043) defer rollbacks until just - before the CLI exits ([@isaacs](https://github.com/isaacs)) -* [`1eabfd5`](https://github.com/npm/npm/commit/1eabfd5c03f33c2bd28823714ff02059eeee3899) - [#6043](https://github.com/npm/npm/issues/6043) `slide@1.1.6`: wait until all - callbacks have finished before proceeding - ([@othiym23](https://github.com/othiym23)) - -### v1.4.27 (2014-09-04): - -* [`4cf3c8f`](https://github.com/npm/npm/commit/4cf3c8fd78c9e2693a5f899f50c28f4823c88e2e) - [#6007](https://github.com/npm/npm/issues/6007) request@2.42.0: properly set - headers on proxy requests ([@isaacs](https://github.com/isaacs)) -* [`403cb52`](https://github.com/npm/npm/commit/403cb526be1472bb7545fa8e62d4976382cdbbe5) - [#6055](https://github.com/npm/npm/issues/6055) npmconf@1.1.8: restore - case-insensitivity of environmental config - ([@iarna](https://github.com/iarna)) - -### v1.4.26 (2014-08-28): - -* [`eceea95`](https://github.com/npm/npm/commit/eceea95c804fa15b18e91c52c0beb08d42a3e77d) - `github-url-from-git@1.4.0`: add support for git+https and git+ssh - ([@stefanbuck](https://github.com/stefanbuck)) -* [`e561758`](https://github.com/npm/npm/commit/e5617587e7d7ab686192391ce55357dbc7fed0a3) - `columnify@1.2.1` ([@othiym23](https://github.com/othiym23)) -* [`0c4fab3`](https://github.com/npm/npm/commit/0c4fab372ee76eab01dda83b6749429a8564902e) - `cmd-shim@2.0.0`: upgrade to graceful-fs 3 - ([@ForbesLindesay](https://github.com/ForbesLindesay)) -* [`2d69e4d`](https://github.com/npm/npm/commit/2d69e4d95777671958b5e08d3b2f5844109d73e4) - `github-url-from-username-repo@1.0.0`: accept slashes in branch names - ([@robertkowalski](https://github.com/robertkowalski)) -* [`81f9b2b`](https://github.com/npm/npm/commit/81f9b2bac9d34c223ea093281ba3c495f23f10d1) - ensure lifecycle spawn errors caught properly - ([@isaacs](https://github.com/isaacs)) -* [`bfaab8c`](https://github.com/npm/npm/commit/bfaab8c6e0942382a96b250634ded22454c36b5a) - `npm-registry-client@2.0.7`: properly encode % in passwords - ([@isaacs](https://github.com/isaacs)) -* [`91cfb58`](https://github.com/npm/npm/commit/91cfb58dda851377ec604782263519f01fd96ad8) - doc: Fix 'npm help index' ([@isaacs](https://github.com/isaacs)) - -### v1.4.25 (2014-08-21): - -* [`64c0ec2`](https://github.com/npm/npm/commit/64c0ec241ef5d83761ca8de54acb3c41b079956e) - `npm-registry-client@2.0.6`: Print the notification header returned by the - registry, and make sure status codes are printed without gratuitous quotes - around them. - ([@othiym23](https://github.com/othiym23)) -* [`a8ed12b`](https://github.com/npm/npm/commit/a8ed12b) `tar@1.0.1`: - Add test for removing an extract target immediately after unpacking. - ([@isaacs](https://github.com/isaacs)) -* [`70fd11d`](https://github.com/npm/npm/commit/70fd11d) - `lockfile@1.0.0`: Fix incorrect interaction between `wait`, `stale`, - and `retries` options. Part 2 of race condition leading to `ENOENT` - errors. - ([@isaacs](https://github.com/isaacs)) -* [`0072c4d`](https://github.com/npm/npm/commit/0072c4d) - `fstream@1.0.2`: Fix a double-finish call which can result in excess - FS operations after the `close` event. Part 2 of race condition - leading to `ENOENT` errors. - ([@isaacs](https://github.com/isaacs)) - -### v1.4.24 (2014-08-14): - -* [`9344bd9`](https://github.com/npm/npm/commit/9344bd9b2929b5c399a0e0e0b34d45bce7bc24bb) - doc: add new changelog ([@othiym23](https://github.com/othiym23)) -* [`4be76fd`](https://github.com/npm/npm/commit/4be76fd65e895883c337a99f275ccc8c801adda3) - doc: update version doc to include `pre-*` increment args - ([@isaacs](https://github.com/isaacs)) -* [`e4f2620`](https://github.com/npm/npm/commit/e4f262036080a282ad60e236a9aeebd39fde9fe4) - build: add `make tag` to tag current release as `latest` - ([@isaacs](https://github.com/isaacs)) -* [`ec2596a`](https://github.com/npm/npm/commit/ec2596a7cb626772780b25b0a94a7e547a812bd5) - build: publish with `--tag=v1.4-next` ([@isaacs](https://github.com/isaacs)) -* [`9ee55f8`](https://github.com/npm/npm/commit/9ee55f892b8b473032a43c59912c5684fd1b39e6) - build: add script to output `v1.4-next` publish tag - ([@isaacs](https://github.com/isaacs)) -* [`aecb56f`](https://github.com/npm/npm/commit/aecb56f95a84687ea46920a0b98aaa587fee1568) - build: remove outdated `docpublish` make target - ([@isaacs](https://github.com/isaacs)) -* [`b57a9b7`](https://github.com/npm/npm/commit/b57a9b7ccd13e6b38831ed63595c8ea5763da247) - build: remove unpublish step from `make publish` - ([@isaacs](https://github.com/isaacs)) -* [`2c6acb9`](https://github.com/npm/npm/commit/2c6acb96c71c16106965d5cd829b67195dd673c7) - install: rename `.gitignore` when unpacking foreign tarballs - ([@isaacs](https://github.com/isaacs)) -* [`22f3681`](https://github.com/npm/npm/commit/22f3681923e993a47fc1769ba735bfa3dd138082) - cache: detect non-gzipped tar files more reliably - ([@isaacs](https://github.com/isaacs)) - -### v1.4.23 (2014-07-31): - -* [`8dd11d1`](https://github.com/npm/npm/commit/8dd11d1) update several - dependencies to avoid using `semver`s starting with 0. - -### v1.4.22 (2014-07-31): - -* [`d9a9e84`](https://github.com/npm/npm/commit/d9a9e84) `read-package-json@1.2.4` - ([@isaacs](https://github.com/isaacs)) -* [`86f0340`](https://github.com/npm/npm/commit/86f0340) - `github-url-from-git@1.2.0` ([@isaacs](https://github.com/isaacs)) -* [`a94136a`](https://github.com/npm/npm/commit/a94136a) `fstream@0.1.29` - ([@isaacs](https://github.com/isaacs)) -* [`bb82d18`](https://github.com/npm/npm/commit/bb82d18) `glob@4.0.5` - ([@isaacs](https://github.com/isaacs)) -* [`5b6bcf4`](https://github.com/npm/npm/commit/5b6bcf4) `cmd-shim@1.1.2` - ([@isaacs](https://github.com/isaacs)) -* [`c2aa8b3`](https://github.com/npm/npm/commit/c2aa8b3) license: Cleaned up - legalese with actual lawyer ([@isaacs](https://github.com/isaacs)) -* [`63fe0ee`](https://github.com/npm/npm/commit/63fe0ee) `init-package-json@1.0.0` - ([@isaacs](https://github.com/isaacs)) - -### v1.4.21 (2014-07-14): - -* [`88f51aa`](https://github.com/npm/npm/commit/88f51aa27eb9a958d1fa7ec50fee5cfdedd05110) - fix handling for 301s in `npm-registry-client@2.0.3` - ([@Raynos](https://github.com/Raynos)) - -### v1.4.20 (2014-07-02): - -* [`0353dde`](https://github.com/npm/npm/commit/0353ddeaca8171aa7dbdd8102b7e2eb581a86406) - respect `--json` for output ([@isaacs](https://github.com/isaacs)) -* [`b3d112a`](https://github.com/npm/npm/commit/b3d112ae190b984cc1779b9e6de92218f22380c6) - outdated: Don't show headings if there's nothing to output - ([@isaacs](https://github.com/isaacs)) -* [`bb4b90c`](https://github.com/npm/npm/commit/bb4b90c80dbf906a1cb26d85bc0625dc2758acc3) - outdated: Default to `latest` rather than `*` for unspecified deps - ([@isaacs](https://github.com/isaacs)) - -### v1.4.19 (2014-07-01): - -* [`f687433`](https://github.com/npm/npm/commit/f687433) relative URLS for - working non-root registry URLS ([@othiym23](https://github.com/othiym23)) -* [`bea190c`](https://github.com/npm/npm/commit/bea190c) - [#5591](https://github.com/npm/npm/issues/5591) bump nopt and npmconf - ([@isaacs](https://github.com/isaacs)) - -### v1.4.18 (2014-06-29): - -* Bump glob dependency from 4.0.2 to 4.0.3. It now uses graceful-fs when - available, increasing resilience to [various filesystem - errors](https://github.com/isaacs/node-graceful-fs#improvements-over-fs-module). - ([@isaacs](https://github.com/isaacs)) - -### v1.4.17 (2014-06-27): - -* replace escape codes with ansicolors - ([@othiym23](https://github.com/othiym23)) -* Allow to build all the docs OOTB. ([@GeJ](https://github.com/GeJ)) -* Use core.longpaths on win32 git - fixes - [#5525](https://github.com/npm/npm/issues/5525) ([@bmeck](https://github.com/bmeck)) -* `npmconf@1.1.2` ([@isaacs](https://github.com/isaacs)) -* Consolidate color sniffing in config/log loading process - ([@isaacs](https://github.com/isaacs)) -* add verbose log when project config file is ignored - ([@isaacs](https://github.com/isaacs)) -* npmconf: Float patch to remove 'scope' from config defs - ([@isaacs](https://github.com/isaacs)) -* doc: npm-explore can't handle a version - ([@robertkowalski](https://github.com/robertkowalski)) -* Add user-friendly errors for ENOSPC and EROFS. - ([@voodootikigod](https://github.com/voodootikigod)) -* bump tar and fstream deps ([@isaacs](https://github.com/isaacs)) -* Run the npm-registry-couchapp tests along with npm tests - ([@isaacs](https://github.com/isaacs)) - -### v1.2.8000 (2014-06-17): - -* Same as v1.4.16, but with the spinner disabled, and a version number that - starts with v1.2. - -### v1.4.16 (2014-06-17): - -* `npm-registry-client@2.0.2` ([@isaacs](https://github.com/isaacs)) -* `fstream@0.1.27` ([@isaacs](https://github.com/isaacs)) -* `sha@1.2.4` ([@isaacs](https://github.com/isaacs)) -* `rimraf@2.2.8` ([@isaacs](https://github.com/isaacs)) -* `npmlog@1.0.1` ([@isaacs](https://github.com/isaacs)) -* `npm-registry-client@2.0.1` ([@isaacs](https://github.com/isaacs)) -* removed redundant dependency ([@othiym23](https://github.com/othiym23)) -* `npmconf@1.0.5` ([@isaacs](https://github.com/isaacs)) -* Properly handle errors that can occur in the config-loading process - ([@isaacs](https://github.com/isaacs)) - -### v1.4.15 (2014-06-10): - -* cache: atomic de-race-ified package.json writing - ([@isaacs](https://github.com/isaacs)) -* `fstream@0.1.26` ([@isaacs](https://github.com/isaacs)) -* `graceful-fs@3.0.2` ([@isaacs](https://github.com/isaacs)) -* `osenv@0.1.0` ([@isaacs](https://github.com/isaacs)) -* Only spin the spinner when we're fetching stuff - ([@isaacs](https://github.com/isaacs)) -* Update `osenv@0.1.0` which removes ~/tmp as possible tmp-folder - ([@robertkowalski](https://github.com/robertkowalski)) -* `ini@1.2.1` ([@isaacs](https://github.com/isaacs)) -* `graceful-fs@3` ([@isaacs](https://github.com/isaacs)) -* Update glob and things depending on glob - ([@isaacs](https://github.com/isaacs)) -* github-url-from-username-repo and read-package-json updates - ([@isaacs](https://github.com/isaacs)) -* `editor@0.1.0` ([@isaacs](https://github.com/isaacs)) -* `columnify@1.1.0` ([@isaacs](https://github.com/isaacs)) -* bump ansi and associated deps ([@isaacs](https://github.com/isaacs)) - -### v1.4.14 (2014-06-05): - -* char-spinner: update to not bork windows - ([@isaacs](https://github.com/isaacs)) - -### v1.4.13 (2014-05-23): - -* Fix `npm install` on a tarball. - ([`ed3abf1`](https://github.com/npm/npm/commit/ed3abf1aa10000f0f687330e976d78d1955557f6), - [#5330](https://github.com/npm/npm/issues/5330), - [@othiym23](https://github.com/othiym23)) -* Fix an issue with the spinner on Node 0.8. - ([`9f00306`](https://github.com/npm/npm/commit/9f003067909440390198c0b8f92560d84da37762), - [@isaacs](https://github.com/isaacs)) -* Re-add `npm.commands.cache.clean` and `npm.commands.cache.read` APIs, and - document `npm.commands.cache.*` as npm-cache(3). - ([`e06799e`](https://github.com/npm/npm/commit/e06799e77e60c1fc51869619083a25e074d368b3), - [@isaacs](https://github.com/isaacs)) - -### v1.4.12 (2014-05-23): - -* remove normalize-package-data from top level, de-^-ify inflight dep - ([@isaacs](https://github.com/isaacs)) -* Always sort saved bundleDependencies ([@isaacs](https://github.com/isaacs)) -* add inflight to bundledDependencies - ([@othiym23](https://github.com/othiym23)) - -### v1.4.11 (2014-05-22): - -* fix `npm ls` labeling issue -* `node-gyp@0.13.1` -* default repository to https:// instead of git:// -* addLocalTarball: Remove extraneous unpack - ([@isaacs](https://github.com/isaacs)) -* Massive cache folder refactor ([@othiym23](https://github.com/othiym23) and - [@isaacs](https://github.com/isaacs)) -* Busy Spinner, no http noise ([@isaacs](https://github.com/isaacs)) -* Per-project .npmrc file support ([@isaacs](https://github.com/isaacs)) -* `npmconf@1.0.0`, Refactor config/uid/prefix loading process - ([@isaacs](https://github.com/isaacs)) -* Allow once-disallowed characters in passwords - ([@isaacs](https://github.com/isaacs)) -* Send npm version as 'version' header ([@isaacs](https://github.com/isaacs)) -* fix cygwin encoding issue (Karsten Tinnefeld) -* Allow non-github repositories with `npm repo` - ([@evanlucas](https://github.com/evanlucas)) -* Allow peer deps to be satisfied by grandparent -* Stop optional deps moving into deps on `update --save` - ([@timoxley](https://github.com/timoxley)) -* Ensure only matching deps update with `update --save*` - ([@timoxley](https://github.com/timoxley)) -* Add support for `prerelease`, `preminor`, `prepatch` to `npm version` - -### v1.4.10 (2014-05-05): - -* Don't set referer if already set -* fetch: Send referer and npm-session headers -* `run-script`: Support `--parseable` and `--json` -* list runnable scripts ([@evanlucas](https://github.com/evanlucas)) -* Use marked instead of ronn for html docs - -### v1.4.9 (2014-05-01): - -* Send referer header (with any potentially private stuff redacted) -* Fix critical typo bug in previous npm release - -### v1.4.8 (2014-05-01): - -* Check SHA before using files from cache -* adduser: allow change of the saved password -* Make `npm install` respect `config.unicode` -* Fix lifecycle to pass `Infinity` for config env value -* Don't return 0 exit code on invalid command -* cache: Handle 404s and other HTTP errors as errors -* Resolve ~ in path configs to env.HOME -* Include npm version in default user-agent conf -* npm init: Use ISC as default license, use save-prefix for deps -* Many test and doc fixes - -### v1.4.7 (2014-04-15): - -* Add `--save-prefix` option that can be used to override the default of `^` - when using `npm install --save` and its counterparts. - ([`64eefdf`](https://github.com/npm/npm/commit/64eefdfe26bb27db8dc90e3ab5d27a5ef18a4470), - [@thlorenz](https://github.com/thlorenz)) -* Allow `--silent` to silence the echoing of commands that occurs with `npm - run`. - ([`c95cf08`](https://github.com/npm/npm/commit/c95cf086e5b97dbb48ff95a72517b203a8f29eab), - [@Raynos](https://github.com/Raynos)) -* Some speed improvements to the cache, which should improve install times. - ([`cb94310`](https://github.com/npm/npm/commit/cb94310a6adb18cb7b881eacb8d67171eda8b744), - [`3b0870f`](https://github.com/npm/npm/commit/3b0870fb2f40358b3051abdab6be4319d196b99d), - [`120f5a9`](https://github.com/npm/npm/commit/120f5a93437bbbea9249801574a2f33e44e81c33), - [@isaacs](https://github.com/isaacs)) -* Improve ability to retry registry requests when a subset of the registry - servers are down. - ([`4a5257d`](https://github.com/npm/npm/commit/4a5257de3870ac3dafa39667379f19f6dcd6093e), - https://github.com/npm/npm-registry-client/commit/7686d02cb0b844626d6a401e58c0755ef3bc8432, - [@isaacs](https://github.com/isaacs)) -* Fix marking of peer dependencies as extraneous. - ([`779b164`](https://github.com/npm/npm/commit/779b1649764607b062c031c7e5c972151b4a1754), - https://github.com/npm/read-installed/commit/6680ba6ef235b1ca3273a00b70869798ad662ddc, - [@isaacs](https://github.com/isaacs)) -* Fix npm crashing when doing `npm shrinkwrap` in the presence of a - `package.json` with no dependencies. - ([`a9d9fa5`](https://github.com/npm/npm/commit/a9d9fa5ad3b8c925a589422b7be28d2735f320b0), - [@kislyuk](https://github.com/kislyuk)) -* Fix error when using `npm view` on packages that have no versions or have - been unpublished. - ([`94df2f5`](https://github.com/npm/npm/commit/94df2f56d684b35d1df043660180fc321b743dc8), - [@juliangruber](https://github.com/juliangruber); - [`2241a09`](https://github.com/npm/npm/commit/2241a09c843669c70633c399ce698cec3add40b3), - [@isaacs](https://github.com/isaacs)) - -### v1.4.6 (2014-03-19): - -* Fix extraneous package detection to work in more cases. - ([`f671286`](https://github.com/npm/npm/commit/f671286), npm/read-installed#20, - [@LaurentVB](https://github.com/LaurentVB)) - -### v1.4.5 (2014-03-18): - -* Sort dependencies in `package.json` when doing `npm install --save` and all - its variants. - ([`6fd6ff7`](https://github.com/npm/npm/commit/6fd6ff7e536ea6acd33037b1878d4eca1f931985), - [@domenic](https://github.com/domenic)) -* Add `--save-exact` option, usable alongside `--save` and its variants, which - will write the exact version number into `package.json` instead of the - appropriate semver-compatibility range. - ([`17f07df`](https://github.com/npm/npm/commit/17f07df8ad8e594304c2445bf7489cb53346f2c5), - [@timoxley](https://github.com/timoxley)) -* Accept gzipped content from the registry to speed up downloads and save - bandwidth. - ([`a3762de`](https://github.com/npm/npm/commit/a3762de843b842be8fa0ab57cdcd6b164f145942), - npm/npm-registry-client#40, [@fengmk2](https://github.com/fengmk2)) -* Fix `npm ls`'s `--depth` and `--log` options. - ([`1d29b17`](https://github.com/npm/npm/commit/1d29b17f5193d52a5c4faa412a95313dcf41ed91), - npm/read-installed#13, [@zertosh](https://github.com/zertosh)) -* Fix "Adding a cache directory to the cache will make the world implode" in - certain cases. - ([`9a4b2c4`](https://github.com/npm/npm/commit/9a4b2c4667c2b1e0054e3d5611ab86acb1760834), - domenic/path-is-inside#1, [@pmarques](https://github.com/pmarques)) -* Fix readmes not being uploaded in certain rare cases. - ([`527b72c`](https://github.com/npm/npm/commit/527b72cca6c55762b51e592c48a9f28cc7e2ff8b), - [@isaacs](https://github.com/isaacs)) - -### v1.4.4 (2014-02-20): - -* Add `npm t` as an alias for `npm test` (which is itself an alias for `npm run - test`, or even `npm run-script test`). We like making running your tests - easy. ([`14e650b`](https://github.com/npm/npm/commit/14e650bce0bfebba10094c961ac104a61417a5de), [@isaacs](https://github.com/isaacs)) - -### v1.4.3 (2014-02-16): - -* Add back `npm prune --production`, which was removed in 1.3.24. - ([`acc4d02`](https://github.com/npm/npm/commit/acc4d023c57d07704b20a0955e4bf10ee91bdc83), - [@davglass](https://github.com/davglass)) -* Default `npm install --save` and its counterparts to use the `^` version - specifier, instead of `~`. - ([`0a3151c`](https://github.com/npm/npm/commit/0a3151c9cbeb50c1c65895685c2eabdc7e2608dc), - [@mikolalysenko](https://github.com/mikolalysenko)) -* Make `npm shrinkwrap` output dependencies in a sorted order, so that diffs - between shrinkwrap files should be saner now. - ([`059b2bf`](https://github.com/npm/npm/commit/059b2bfd06ae775205a37257dca80142596a0113), - [@Raynos](https://github.com/Raynos)) -* Fix `npm dedupe` not correctly respecting dependency constraints. - ([`86028e9`](https://github.com/npm/npm/commit/86028e9fd8524d5e520ce01ba2ebab5a030103fc), - [@rafeca](https://github.com/rafeca)) -* Fix `npm ls` giving spurious warnings when you used `"latest"` as a version - specifier. - (https://github.com/npm/read-installed/commit/d2956400e0386931c926e0f30c334840e0938f14, - [@bajtos](https://github.com/bajtos)) -* Fixed a bug where using `npm link` on packages without a `name` value could - cause npm to delete itself. - ([`401a642`](https://github.com/npm/npm/commit/401a64286aa6665a94d1d2f13604f7014c5fce87), - [@isaacs](https://github.com/isaacs)) -* Fixed `npm install ./pkg@1.2.3` to actually install the directory at - `pkg@1.2.3`; before it would try to find version `1.2.3` of the package - `./pkg` in the npm registry. - ([`46d8768`](https://github.com/npm/npm/commit/46d876821d1dd94c050d5ebc86444bed12c56739), - [@rlidwka](https://github.com/rlidwka); see also - [`f851b79`](https://github.com/npm/npm/commit/f851b79a71d9a5f5125aa85877c94faaf91bea5f)) -* Fix `npm outdated` to respect the `color` configuration option. - ([`d4f6f3f`](https://github.com/npm/npm/commit/d4f6f3ff83bd14fb60d3ac6392cb8eb6b1c55ce1), - [@timoxley](https://github.com/timoxley)) -* Fix `npm outdated --parseable`. - ([`9575a23`](https://github.com/npm/npm/commit/9575a23f955ce3e75b509c89504ef0bd707c8cf6), - [@yhpark](https://github.com/yhpark)) -* Fix a lockfile-related errors when using certain Git URLs. - ([`164b97e`](https://github.com/npm/npm/commit/164b97e6089f64e686db7a9a24016f245effc37f), - [@nigelzor](https://github.com/nigelzor)) - -### v1.4.2 (2014-02-13): - -* Fixed an issue related to mid-publish GET requests made against the registry. - (https://github.com/npm/npm-registry-client/commit/acbec48372bc1816c67c9e7cbf814cf50437ff93, - [@isaacs](https://github.com/isaacs)) - -### v1.4.1 (2014-02-13): - -* Fix `npm shrinkwrap` forgetting to shrinkwrap dependencies that were also - development dependencies. - ([`9c575c5`](https://github.com/npm/npm/commit/9c575c56efa9b0c8b0d4a17cb9c1de3833004bcd), - [@diwu1989](https://github.com/diwu1989)) -* Fixed publishing of pre-existing packages with uppercase characters in their - name. - (https://github.com/npm/npm-registry-client/commit/9345d3b6c3d8510dd5c4418f27ee1fce59acebad, - [@isaacs](https://github.com/isaacs)) - -### v1.4.0 (2014-02-12): - -* Remove `npm publish --force`. See - https://github.com/npm/npmjs.org/issues/148. - ([@isaacs](https://github.com/isaacs), - npm/npm-registry-client@2c8dba990de6a59af6545b75cc00a6dc12777c2a) -* Other changes to the registry client related to saved configs and couch - logins. ([@isaacs](https://github.com/isaacs); - npm/npm-registry-client@25e2b019a1588155e5f87d035c27e79963b75951, - npm/npm-registry-client@9e41e9101b68036e0f078398785f618575f3cdde, - npm/npm-registry-client@2c8dba990de6a59af6545b75cc00a6dc12777c2a) -* Show an error to the user when doing `npm update` and the `package.json` - specifies a version that does not exist. - ([@evanlucas](https://github.com/evanlucas), - [`027a33a`](https://github.com/npm/npm/commit/027a33a5c594124cc1d82ddec5aee2c18bc8dc32)) -* Fix some issues with cache ownership in certain installation configurations. - ([@outcoldman](https://github.com/outcoldman), - [`a132690`](https://github.com/npm/npm/commit/a132690a2876cda5dcd1e4ca751f21dfcb11cb9e)) -* Fix issues where GitHub shorthand dependencies `user/repo` were not always - treated the same as full Git URLs. - ([@robertkowalski](https://github.com/robertkowalski), - https://github.com/meryn/normalize-package-data/commit/005d0b637aec1895117fcb4e3b49185eebf9e240) - -### v1.3.26 (2014-02-02): - -* Fixes and updates to publishing code - ([`735427a`](https://github.com/npm/npm/commit/735427a69ba4fe92aafa2d88f202aaa42920a9e2) - and - [`c0ac832`](https://github.com/npm/npm/commit/c0ac83224d49aa62e55577f8f27d53bbfd640dc5), - [@isaacs](https://github.com/isaacs)) -* Fix `npm bugs` with no arguments. - ([`b99d465`](https://github.com/npm/npm/commit/b99d465221ac03bca30976cbf4d62ca80ab34091), - [@Hoops](https://github.com/Hoops)) - -### v1.3.25 (2014-01-25): - -* Remove gubblebum blocky font from documentation headers. - ([`6940c9a`](https://github.com/npm/npm/commit/6940c9a100160056dc6be8f54a7ad7fa8ceda7e2), - [@isaacs](https://github.com/isaacs)) - -### v1.3.24 (2014-01-19): - -* Make the search output prettier, with nice truncated columns, and a `--long` - option to create wrapping columns. - ([`20439b2`](https://github.com/npm/npm/commit/20439b2) and - [`3a6942d`](https://github.com/npm/npm/commit/3a6942d), - [@timoxley](https://github.com/timoxley)) -* Support multiple packagenames in `npm docs`. - ([`823010b`](https://github.com/npm/npm/commit/823010b), - [@timoxley](https://github.com/timoxley)) -* Fix the `npm adduser` bug regarding "Error: default value must be string or - number" again. ([`b9b4248`](https://github.com/npm/npm/commit/b9b4248), - [@isaacs](https://github.com/isaacs)) -* Fix `scripts` entries containing whitespaces on Windows. - ([`80282ed`](https://github.com/npm/npm/commit/80282ed), - [@robertkowalski](https://github.com/robertkowalski)) -* Fix `npm update` for Git URLs that have credentials in them - ([`93fc364`](https://github.com/npm/npm/commit/93fc364), - [@danielsantiago](https://github.com/danielsantiago)) -* Fix `npm install` overwriting `npm link`-ed dependencies when they are tagged - Git dependencies. ([`af9bbd9`](https://github.com/npm/npm/commit/af9bbd9), - [@evanlucas](https://github.com/evanlucas)) -* Remove `npm prune --production` since it buggily removed some dependencies - that were necessary for production; see - [#4509](https://github.com/npm/npm/issues/4509). Hopefully it can make its - triumphant return, one day. - ([`1101b6a`](https://github.com/npm/npm/commit/1101b6a), - [@isaacs](https://github.com/isaacs)) - -Dependency updates: -* [`909cccf`](https://github.com/npm/npm/commit/909cccf) `read-package-json@1.1.6` -* [`a3891b6`](https://github.com/npm/npm/commit/a3891b6) `rimraf@2.2.6` -* [`ac6efbc`](https://github.com/npm/npm/commit/ac6efbc) `sha@1.2.3` -* [`dd30038`](https://github.com/npm/npm/commit/dd30038) `node-gyp@0.12.2` -* [`c8c3ebe`](https://github.com/npm/npm/commit/c8c3ebe) `npm-registry-client@0.3.3` -* [`4315286`](https://github.com/npm/npm/commit/4315286) `npmconf@0.1.12` - -### v1.3.23 (2014-01-03): - -* Properly handle installations that contained a certain class of circular - dependencies. - ([`5dc93e8`](https://github.com/npm/npm/commit/5dc93e8c82604c45b6067b1acf1c768e0bfce754), - [@substack](https://github.com/substack)) - -### v1.3.22 (2013-12-25): - -* Fix a critical bug in `npm adduser` that would manifest in the error message - "Error: default value must be string or number." - ([`fba4bd2`](https://github.com/npm/npm/commit/fba4bd24bc2ab00ccfeda2043aa53af7d75ef7ce), - [@isaacs](https://github.com/isaacs)) -* Allow `npm bugs` in the current directory to open the current package's bugs - URL. - ([`d04cf64`](https://github.com/npm/npm/commit/d04cf6483932c693452f3f778c2fa90f6153a4af), - [@evanlucas](https://github.com/evanlucas)) -* Several fixes to various error messages to include more useful or updated - information. - ([`1e6f2a7`](https://github.com/npm/npm/commit/1e6f2a72ca058335f9f5e7ca22d01e1a8bb0f9f7), - [`ff46366`](https://github.com/npm/npm/commit/ff46366bd40ff0ef33c7bac8400bc912c56201d1), - [`8b4bb48`](https://github.com/npm/npm/commit/8b4bb4815d80a3612186dc5549d698e7b988eb03); - [@rlidwka](https://github.com/rlidwka), - [@evanlucas](https://github.com/evanlucas)) - -### v1.3.21 (2013-12-17): - -* Fix a critical bug that prevented publishing due to incorrect hash - calculation. - ([`4ca4a2c`](https://github.com/npm/npm-registry-client/commit/4ca4a2c6333144299428be6b572e2691aa59852e), - [@dominictarr](https://github.com/dominictarr)) - -### v1.3.20 (2013-12-17): - -* Fixes a critical bug in v1.3.19. Thankfully, due to that bug, no one could - install npm v1.3.19 :) - -### v1.3.19 (2013-12-16): - -* Adds atomic PUTs for publishing packages, which should result in far fewer - requests and less room for replication errors on the server-side. - -### v1.3.18 (2013-12-16): - -* Added an `--ignore-scripts` option, which will prevent `package.json` scripts - from being run. Most notably, this will work on `npm install`, so e.g. `npm - install --ignore-scripts` will not run preinstall and prepublish scripts. - ([`d7e67bf`](https://github.com/npm/npm/commit/d7e67bf0d94b085652ec1c87d595afa6f650a8f6), - [@sqs](https://github.com/sqs)) -* Fixed a bug introduced in 1.3.16 that would manifest with certain cache - configurations, by causing spurious errors saying "Adding a cache directory - to the cache will make the world implode." - ([`966373f`](https://github.com/npm/npm/commit/966373fad8d741637f9744882bde9f6e94000865), - [@domenic](https://github.com/domenic)) -* Re-fixed the multiple download of URL dependencies, whose fix was reverted in - 1.3.17. - ([`a362c3f`](https://github.com/npm/npm/commit/a362c3f1919987419ed8a37c8defa19d2e6697b0), - [@spmason](https://github.com/spmason)) - -### v1.3.17 (2013-12-11): - -* This release reverts - [`644c2ff`](https://github.com/npm/npm/commit/644c2ff3e3d9c93764f7045762477f48864d64a7), - which avoided re-downloading URL and shinkwrap dependencies when doing `npm - install`. You can see the in-depth reasoning in - [`d8c907e`](https://github.com/npm/npm/commit/d8c907edc2019b75cff0f53467e34e0ffd7e5fba); - the problem was, that the patch changed the behavior of `npm install -f` to - reinstall all dependencies. -* A new version of the no-re-downloading fix has been submitted as - [#4303](https://github.com/npm/npm/issues/4303) and will hopefully be - included in the next release. - -### v1.3.16 (2013-12-11): - -* Git URL dependencies are now updated on `npm install`, fixing a two-year old - bug - ([`5829ecf`](https://github.com/npm/npm/commit/5829ecf032b392d2133bd351f53d3c644961396b), - [@robertkowalski](https://github.com/robertkowalski)). Additional progress on - reducing the resulting Git-related I/O is tracked as - [#4191](https://github.com/npm/npm/issues/4191), but for now, this will be a - big improvement. -* Added a `--json` mode to `npm outdated` to give a parseable output. - ([`0b6c9b7`](https://github.com/npm/npm/commit/0b6c9b7c8c5579f4d7d37a0c24d9b7a12ccbe5fe), - [@yyx990803](https://github.com/yyx990803)) -* Made `npm outdated` much prettier and more useful. It now outputs a - color-coded and easy-to-read table. - ([`fd3017f`](https://github.com/npm/npm/commit/fd3017fc3e9d42acf6394a5285122edb4dc16106), - [@quimcalpe](https://github.com/quimcalpe)) -* Added the `--depth` option to `npm outdated`, so that e.g. you can do `npm - outdated --depth=0` to show only top-level outdated dependencies. - ([`1d184ef`](https://github.com/npm/npm/commit/1d184ef3f4b4bc309d38e9128732e3e6fb46d49c), - [@yyx990803](https://github.com/yyx990803)) -* Added a `--no-git-tag-version` option to `npm version`, for doing the usual - job of `npm version` minus the Git tagging. This could be useful if you need - to increase the version in other related files before actually adding the - tag. - ([`59ca984`](https://github.com/npm/npm/commit/59ca9841ba4f4b2f11b8e72533f385c77ae9f8bd), - [@evanlucas](https://github.com/evanlucas)) -* Made `npm repo` and `npm docs` work without any arguments, adding them to the - list of npm commands that work on the package in the current directory when - invoked without arguments. - ([`bf9048e`](https://github.com/npm/npm/commit/bf9048e2fa16d43fbc4b328d162b0a194ca484e8), - [@robertkowalski](https://github.com/robertkowalski); - [`07600d0`](https://github.com/npm/npm/commit/07600d006c652507cb04ac0dae9780e35073dd67), - [@wilmoore](https://github.com/wilmoore)). There are a few other commands we - still want to implement this for; see - [#4204](https://github.com/npm/npm/issues/4204). -* Pass through the `GIT_SSL_NO_VERIFY` environment variable to Git, if it is - set; we currently do this with a few other environment variables, but we - missed that one. - ([`c625de9`](https://github.com/npm/npm/commit/c625de91770df24c189c77d2e4bc821f2265efa8), - [@arikon](https://github.com/arikon)) -* Fixed `npm dedupe` on Windows due to incorrect path separators being used - ([`7677de4`](https://github.com/npm/npm/commit/7677de4583100bc39407093ecc6bc13715bf8161), - [@mcolyer](https://github.com/mcolyer)). -* Fixed the `npm help` command when multiple words were searched for; it - previously gave a `ReferenceError`. - ([`6a28dd1`](https://github.com/npm/npm/commit/6a28dd147c6957a93db12b1081c6e0da44fe5e3c), - [@dereckson](https://github.com/dereckson)) -* Stopped re-downloading URL and shrinkwrap dependencies, as demonstrated in - [#3463](https://github.com/npm/npm/issues/3463) - ([`644c2ff`](https://github.com/isaacs/npm/commit/644c2ff3e3d9c93764f7045762477f48864d64a7), - [@spmason](https://github.com/spmason)). You can use the `--force` option to - force re-download and installation of all dependencies. diff --git a/changelogs/CHANGELOG-2.md b/changelogs/CHANGELOG-2.md deleted file mode 100644 index c4d2b777ebf12..0000000000000 --- a/changelogs/CHANGELOG-2.md +++ /dev/null @@ -1,5344 +0,0 @@ -### v2.15.12 (2017-03-24): - -This version brings the latest `node-gyp` to a soon to be released Node.js -4.x. The `node-gyp` update is particularly important to Windows folks due to -its addition of Visual Studio 2017 support. - -* [`cdd60e733`](https://github.com/npm/npm/commit/cdd60e733905a9994e1d6d832996bfdd12abeaee) - `node-gyp@3.6.0`: - Improvements to how Python is located. New `--devdir` flag. - Support for VS2017. - Chakracore support on ARM. - Remove path-array dependency, reducing size significantly. - ([@bnoordhuis](https://github.com/bnoordhuis)) - ([@mhart](https://github.com/mhart)) - ([@refack](https://github.com/refack)) - ([@kunalspathak](https://github.com/kunalspathak)) - -### v2.15.11 (2016-09-08): - -On we go with our monthly release cadence! This week is pretty much all -dependency updates and some documentation changes, as can be expected by now. - -Note that `npm@4` will almost certainly be released next month! It's not final -what we'll end up doing as far as LTS support goes, but the current thinking is -that, considering how small and resource-constrained our team is, support for -`npm@2` will be reduced to essentially maintenance, so we can better focus on -`npm@3` as the new LTS version (which will go into `node@6`), and `npm@4` as our -next main development version. - -#### DOCUMENTATION UPDATES - -* [`8f71038`](https://github.com/npm/npm/commit/8f71038310501ad5bc7445b2fa2ff0eaa377919a) - [#13892](https://github.com/npm/npm/pull/13892) - Update `LICENSE` file to match license on `master`. - ([@rvagg](https://github.com/rvagg)) -* [`e81b4f1`](https://github.com/npm/npm/commit/e81b4f1d18a4d79b7af8342747f2ed7dc3e84f0a) - [#12438](https://github.com/npm/npm/issues/12438) - Remind folks to use `#!/usr/bin/env node` in their `bin` scripts to make files - executable directly. - ([@mxstbr](https://github.com/mxstbr)) -* [`f89789f`](https://github.com/npm/npm/commit/f89789f43d65bfc74f64f15a99356841377e1af3) - [#13655](https://github.com/npm/npm/pull/13655) - Document line comment syntax for `.npmrc`. - ([@mdjasper](https://github.com/mdjasper)) -* [`5cd3abc`](https://github.com/npm/npm/commit/5cd3abc3511515e09b4a1b781c0520e84c267c5b) - [#13493](https://github.com/npm/npm/pull/13493) - Document that the user config file can itself be configured either through the - `$NPM_CONFIG_USERCONFIG` environment variable, or `--userconfig` command line - flag. - ([@jasonkarns](https://github.com/jasonkarns)) -* [`dd71ca0`](https://github.com/npm/npm/commit/dd71ca0efc2094b824ccc9e23af0fc915499f2e6) - [#13911](https://github.com/npm/npm/pull/13911) - Minor documentation reword and cleanup. - ([@othiym23](https://github.com/othiym23)) -* [`f7a320c`](https://github.com/npm/npm/commit/f7a320c816947d578a050c97e0fb9878954be0e8) - [#13682](https://github.com/npm/npm/pull/13682) - Minor grammar fix in documentation for `npm scripts`. - ([@Ajedi32](https://github.com/Ajedi32)) -* [`e5cb5e8`](https://github.com/npm/npm/commit/e5cb5e8fcf4642836fedf3f3421c994a8e27e19b) - [#13717](https://github.com/npm/npm/pull/13717) - Document that `npm link` will link the files specified in the `bin` field of - `package.json` to `{prefix}/bin/{name}`. - ([@legodude17](https://github.com/legodude17)) - -#### DEPENDENCY UPDATES -* [`8bef026`](https://github.com/npm/npm/commit/8bef026603b6da888edf0d41308d9e532abfcd54) - `graceful-fs@4.1.6` - ([@francescoinfante](https://github.com/francescoinfante)) -* [`9f73f4a`](https://github.com/npm/npm/commit/9f73f4aab5f56b256c5cf9e461e81abfa2844945) - `glob@7.0.6` - ([@isaacs](https://github.com/isaacs)) -* [`5391b7e`](https://github.com/npm/npm/commit/5391b7e8cd4401fbadbf54e810fdc965a3662a21) - `which@1.2.1` - ([@isaacs](https://github.com/isaacs)) -* [`43bfec8`](https://github.com/npm/npm/commit/43bfec8376dd8ded7d56a8dabd6139919544760e) - `retry@0.10.0` - ([@tim-kos](https://github.com/tim-kos)) -* [`39305f1`](https://github.com/npm/npm/commit/39305f1c76f74bf9789c769ef72a94ea9a81d119) - `readable-stream@2.1.5` - ([@calvinmetcalf](https://github.com/calvinmetcalf)) -* [`a5512fa`](https://github.com/npm/npm/commit/a5512fafd72e23755e77e28f1122b008bc12a733) - `once@1.4.0` - ([@zkochan](https://github.com/zkochan)) -* [`06a208b`](https://github.com/npm/npm/commit/06a208b178c1de3d0da58bc35a854d200fea8ef0) - `npm-registry-client@7.2.1`: - * [npm/npm-registry-client#142](https://github.com/npm/npm-registry-client/pull/142) Fix `EventEmitter` warning spam from error handlers on socket. ([@addaleax](https://github.com/addaleax)) - * [npm/npm-registry-client#131](https://github.com/npm/npm-registry-client/pull/131) Adds support for streaming request bodies. ([@aredridel](https://github.com/aredridel)) - * Fixes [#13656](https://github.com/npm/npm/issues/13656). - * Dependency updates. - * Documentation improvements. - ([@othiym23](https://github.com/othiym23)) -* [`4f759be`](https://github.com/npm/npm/commit/4f759be1fb5e23180b970350e58f40a513daa680) - `inherits@2.0.3` - ([@isaacs](https://github.com/isaacs)) -* [`4258b76`](https://github.com/npm/npm/commit/4258b764e2565f6294ae1e34a5653895290b62e3) - `tap@7.1.1` - ([@isaacs](https://github.com/isaacs)) - -### v2.15.10 (2016-08-11): - -Hi all, today's our first release coming out of the new monthly release -cadence. See below for details. We're all recovered from conferences now and -raring to go! For LTS we see some bug fixes, documentation improvements and -a host of dependency updates. - -The most dramatic bug fix is probably the inclusion of scoped modules in -bundled dependencies. Prior to this release and -[v3.10.7](https://github.com/npm/npm/releases/v3.10.7), npm had ignored -scoped modules found in `bundleDependencies` entirely. - -#### NEW RELEASE CADENCE - -Releasing npm has been, for the most part, a very prominent part of our -weekly process process. As part of our efforts to find the most effective -ways to allocate our team's resources, we decided last month that we would -try and slow our releases down to a monthly cadence, and see if we found -ourselves with as much extra time and attention as we expected to have. -Process experiments are useful for finding more effective ways to do our -work, and we're at least going to keep doing this for a whole quarter, and -then measure how well it worked out. It's entirely likely that we'll switch -back to a more frequent cadence, specially if we find that the value that -weekly cadence was providing the community is not worth sacrificing for a -bit of extra time. Does this affect you significantly? Let us know! - -#### WINDOWS CORNER CASES - -* [`405c404`](https://github.com/npm/npm/commit/405c4048c69c14d66e6179aba0c8a35e504e8041) - [#13023](https://github.com/npm/npm/pull/13023) - Fixed a Windows issue with the cache where callbacks could be called more than once. - ([@zkat](https://github.com/zkat)) - -* [`bf348dc`](https://github.com/npm/npm/commit/bf348dcfb944dc4b9f71b779bf172f86a2e1f474) - [#13023](https://github.com/npm/npm/pull/13023) - Fixed a Windows corner case with correct-mkdir where if SUDO_UID or - SUDO_GID were set then we would try to chown things even though that can't - work on Windows. - ([@zkat](https://github.com/zkat)) - -#### RACES IN THE CACHE - -* [`68f29f1`](https://github.com/npm/npm/commit/68f29f18f65c7a7e1c58eb6933af41d786971379) - [#12669](https://github.com/npm/npm/issues/12669) - Ignore ENOENT errors on chownr while adding packages to cache. This change - works around problems with race conditions and local packages. - ([@julianduque](https://github.com/julianduque)) - -#### BETTER GIT ENVIRONMENT WHITELISTING - -* [`5e96566`](https://github.com/npm/npm/commit/5e96566088f0d88c1ed10c5a9cbb7c0cd4aa2aee) - [#13358](https://github.com/npm/npm/pull/13358) - Add GIT_EXEC_PATH to Git environment whitelist. - ([@mhart](https://github.com/mhart)) - -#### DOCUMENTATION - -* [`363e381`](https://github.com/npm/npm/commit/363e381a4076ead89707a00cc4a447b1d59df3bc) - [#13319](https://github.com/npm/npm/pull/13319) - As Node.js 0.8 is no longer supported, remove mention of it from the README. - ([@watilde](https://github.com/watilde)) -* [`e8fafa8`](https://github.com/npm/npm/commit/e8fafa887c60eb8842c76c4b3dffe85eb49fa434) - [#10167](https://github.com/npm/npm/pull/10167) - Clarify in scope documentation that npm@2 is required for scoped packages. - ([@danpaz](https://github.com/danpaz)) - -#### DEPENDENCIES - -* [`66ef279`](https://github.com/npm/npm/commit/66ef279b7c3b3e4f9454474dddd057cc1f21873b) - [npm/fstream-npm#22](https://github.com/npm/fstream-npm/pull/22) - `fstream@1.1.1`: - Always include NOTICE files now. Fix inclusion of scoped modules as bundled dependencies. - ([@kemitchell](https://github.com/kemitchell)) - ([@forivall](https://github.com/forivall)) -* [`fe8385b`](https://github.com/npm/npm/commit/fe8385bd655502feb175eed175a6a06cafb2247a) - `glob@7.0.5`: - Update minimatch dep for security fix. See the minimatch update below for details. - ([@isaacs](https://github.com/isaacs)) -* [`51d49d2`](https://github.com/npm/npm/commit/51d49d2f79b4c69264de73a492ed54f87188d554) - [isaacs/node-graceful-fs#71](https://github.com/isaacs/node-graceful-fs/pull/71) - `graceful-fs@4.1.5`: - `graceful-fs` had a [bug fix](https://github.com/isaacs/node-graceful-fs/pull/71) which - fixes a problem ([nodejs/node#7846](https://github.com/nodejs/node/pull/7846)) exposed - by recent changes to Node.js. - ([@thefourtheye](https://github.com/thefourtheye)) -* [`5c8f39d`](https://github.com/npm/npm/commit/5c8f39d152c43e96b9006ffe865646a36a433a8a) - `minimatch@3.0.3`: - Handle extremely long and terrible patterns more gracefully. - There were some magic numbers that assumed that every extglob pattern starts - and ends with a specific number of characters in the regular expression. - Since !(||) patterns are a little bit more complicated, this led to creating - an invalid regular expression and throwing. - ([@isaacs](https://github.com/isaacs)) -* [`d681e16`](https://github.com/npm/npm/commit/d681e16a475a49d6196af9a5cedaaf88712f3a9f) - [npm/npm-user-validate#9](https://github.com/npm/npm-user-validate/pull/9) - `npm-user-validate@0.1.5`: - Use correct, lower username length limit. - ([@aredridel](https://github.com/aredridel)) -* [`f918994`](https://github.com/npm/npm/commit/f918994bd05ca965766cd573606ac35fb3032d6e) - `request@2.74.0`: - Update `request` dependency `tough-cookie` to `2.3.0` to - to address [https://nodesecurity.io/advisories/130](https://nodesecurity.io/advisories/130). - Versions 0.9.7 through 2.2.2 contain a vulnerable regular expression that, - under certain conditions involving long strings of semicolons in the - "Set-Cookie" header, causes the event loop to block for excessive amounts of - time. - ([@stash-sfdc](https://github.com/stash-sfdc)) -* [`5540cc4`](https://github.com/npm/npm/commit/5540cc4d6bde65071fb6fc2cb074e8598bd1276f) - [isaacs/rimraf#111](https://github.com/isaacs/rimraf/issues/111) - `rimraf@2.5.4`: Clarify assertions: cb is required, options are not. - ([@isaacs](https://github.com/isaacs)) -* [`6357928`](https://github.com/npm/npm/commit/6357928673be85f520dae2104fea58c35742bd65) - `spdx-license-ids@1.2.2`: - New licenses synced from spdx.org. - ([@shinnn](https://github.com/shinnn)) - -### v2.15.9 (2016-06-30): - -What's this? An LTS release? Yes, that is indeed so. Small, as usual, and as -LTSs should be, really, but a release nonetheless! - -The star of the show is an updated `node-gyp` with some goodies. The rest is -just docs and some CI stuff. - -Happy hacking! - -#### DEPENDENCY UPDATE! - -* [`f9a07cc`](https://github.com/npm/npm/commit/f9a07cc873f1915827d8df97d0c43204d1eb128c) - [#13200](https://github.com/npm/npm/pull/13200) - [`node-gyp@3.4.0`](https://github.com/nodejs/node-gyp/blob/master/CHANGELOG.md): - AIX, Visual Studio 2015, and logging improvements. Oh my~! - ([@rvagg](https://github.com/rvagg)) - -#### CI TWEAKS - -* [`bee83b8`](https://github.com/npm/npm/commit/bee83b8500c31aba65451dfcb082f9b5d1d5ce34) - Globally install `rimraf` on CI to make the LTS self-install work better. - ([@othiym23](https://github.com/othiym23)) -* [`6b8c0ab`](https://github.com/npm/npm/commit/6b8c0ab6fcbf8a37e8693acb8bbac22293b10893) - This new Travis configuration only runs coverage checks against Node.js LTS, - which speeds up all the other test runs. By, like, a lot. Also, the entire - file has been extensively commented, so the next time we need to mess with it, - we'll be able to better remember why all the weird bits are there. - ([@othiym23](https://github.com/othiym23)) - -#### DOCUMENTATION FIXES - -* [`2c7a5be`](https://github.com/npm/npm/commit/2c7a5be080276e3fdca3375ab0f8f5edffff753e) - [#13156](https://github.com/npm/npm/pull/13156) - Fix old reference to `doc/install` in a source comment. - ([@sheerun](https://github.com/sheerun)) -* [`e1cf78c`](https://github.com/npm/npm/commit/e1cf78c5b77f95383bd4a7fc6eeb8adbbe68e12e) - [#13189](https://github.com/npm/npm/pull/13189) - [#13113](https://github.com/npm/npm/issues/13113) - [#13189](https://github.com/npm/npm/pull/13189) - Fixes a link to `npm-tag(3)` that was breaking to instead point to - `npm-dist-tag(1)`, as reported by [@SimenB](https://github.com/SimenB) - ([@macdonst](https://github.com/macdonst)) - -### v2.15.8 (2016-06-17): - -There's a very important bug fix and a long-awaited (and significant!) -deprecation in this hotfix release. [Hold on.](http://butt.holdings/) - -#### *WHOA* - -When Node.js 6.0.0 was released, the CLI team noticed an alarming upsurge in -bugs related to important files (like `README.md`) not being included in -published packages. The new bugs looked much like -[#5082](https://github.com/npm/npm/issues/5082), which had been around in one -form or another since April, 2014. #5082 used to be a very rare (and obnoxious) -bug that the CLI team hadn't had much luck reproducing, and we'd basically -marked it down as a race condition that arose on machines using slow and / or -rotating-media-based hard drives. - -Under 6.0.0, the behavior was reliable enough to be nearly deterministic, and -made it very difficult for publishers using `.npmignore` files in combination -with `"files"` stanzas in `package.json` to get their packages onto the -registry without one or more files missing from the packed tarball. The entire -saga is contained within [the issue](https://github.com/npm/npm/issues/5082), -but the summary is that an improvement to the performance of -[`fs.realpath()`](https://nodejs.org/api/fs.html#fs_fs_realpath_path_options_callback) -made it much more likely that the packing code would lose the race. - -Fixing this has proven to be very difficult, in part because the code used by -npm to produce package tarballs is more complicated than, strictly speaking, it -needs to be. [**@evanlucas**](https://github.com/evanlucas) contributed [a -patch](https://github.com/npm/fstream/pull/50) that passed the tests in a -[special test suite](https://github.com/othiym23/eliminate-5082) that I -([**@othiym23**](https://github.com/othiym23)) created (with help from -[**@addaleax**](https://github.com/addaleax)), but only _after_ we'd released -the fixed version of that package did we learn that it actually made the -problem _worse_ in other situations in npm proper. Eventually, -[**@rvagg**](https://github.com/rvagg) put together a more durable fix that -appears to completely address the errant behavior under Node.js 6.0.0. That's -the patch included in this release. Everybody should chip in for redback -insurance for Rod and his family; he's done the community a huge favor. - -Does this mean the long (2+ year) saga of #5082 is now over? At this point, I'm -going to quote from my latest summary on the issue: - -> The CLI team (mostly me, with input from the rest of the team) has decided that -> the overall complexity of the interaction between `fstream`, `fstream-ignore`, -> `fstream-npm`, and `node-tar` has grown more convoluted than the team is -> comfortable (maybe even capable of) supporting. -> -> - While I believe that @rvagg's (very targeted) fix addresses _this_ issue, I -> would be shocked if there aren't other race conditions in npm's packing -> logic. I've already identified a couple other places in the code that are -> most likely race conditions, even if they're harder to trigger than the -> current one. -> - The way that dependency bundling is integrated leads to a situation in -> which a bunch of logic is duplicated between `fstream-npm` and -> `lib/utils/tar.js` in npm itself, and the way `fstream`'s extension -> mechanism works makes this difficult to clean up. This caused a nasty -> regression ([#13088](https://github.com/npm/fstream/pull/50), see below) as -> of ~`npm@3.8.7` where the dependencies of `bundledDependencies` were no -> longer being included in the built package tarballs. -> - The interaction between `.npmignore`, `.gitignore`, and `files` is hopelessly -> complicated, scattered in many places throughout the code. We've been -> discussing [making the ignores and includes logic clearer and more -> predictable](https://github.com/npm/npm/wiki/Files-and-Ignores), and the -> current code fights our efforts to clean that up. -> -> So, our intention is still to replace `fstream`, `fstream-ignore`, and -> `fstream-npm` with something much simpler and purpose-built. There's no real -> reason to have a stream abstraction here when a simple recursive-descent -> filesystem visitor and a synchronous function that can answer whether a given -> path should be included in the packed tarball would do the job adequately. -> -> What's not yet clear is whether we'll need to replace `node-tar` in the -> process. `node-tar` is a very robust implementation of tar (it handles, like, -> everything), and it also includes some very important tweaks to prevent several -> classes of security exploits involving maliciously crafted packages. However, -> its packing API involves passing in an `fstream` instance, so we'd either need -> to produce something that follows enough of `fstream`'s contract for `node-tar` -> to keep working, or swap `node-tar` out for something like `tar-stream` (and -> then ensuring that our use of `tar-stream` is secure, which could involve -> security patches for either npm or `tar-stream`). - -The testing and review of `fstream@1.0.10` that the team has done leads us to -believe that this bug is fixed, but I'm feeling more than a little paranoid -about fstream now, so it's important that people keep a close eye on their -publishes for a while and let us know immediately if they notice any -irregularities. - -* [`2c49265`](https://github.com/npm/npm/commit/2c49265c6746d29ae0cd5f3532d28c5950f9847e) - [#5082](https://github.com/npm/npm/issues/5082) `fstream@1.0.10`: Ensure that - entries are collected after a paused stream resumes. - ([@rvagg](https://github.com/rvagg)) -* [`92e4344`](https://github.com/npm/npm/commit/92e43444d9204f749f83512aeab5d5e0a2d085a7) - [#5082](https://github.com/npm/npm/issues/5082) Remove the warning introduced - in `npm@3.10.0`, because it should no longer be necessary. - ([@othiym23](https://github.com/othiym23)) - -#### GOODBYE, FAITHFUL FRIEND - -At NodeConf Adventure 2016 (RIP in peace, Mikeal Rogers's NodeConf!), the CLI -team had an opportunity to talk to representatives from some of the larger -companies that we knew were still using Node.js 0.8 in production. After asking -them whether they were still using 0.8, we got back blank stares and questions -like, "0.8? You mean, from four years ago?" After establishing that being able -to run npm in their legacy environments was no longer necessary, the CLI team -made the decision to drop support for 0.8. (Faithful observers of our [team -meetings](https://github.com/npm/npm/issues?utf8=%E2%9C%93&q=is%3Aissue+npm+cli+team+meeting+) -will have known this was the plan for NodeConf since the beginning of 2016.) - -In practice, this means only what's in the commit below: we've removed 0.8 from -our continuous integration test matrix below, and will no longer be habitually -testing changes under Node 0.8. We may also give ourselves permission to use -`setImmediate()` in test code. However, since the project still supports -Node.js 0.10 and 0.12, it's unlikely that patches that rely on ES 2015 -functionality will land anytime soon. - -Looking forward, the team's current plan is to drop support for Node.js 0.10 -when its LTS maintenance window expires in October, 2016, and 0.12 when its -maintenance / LTS window ends at the end of 2016. We will also drop support for -Node.js 5.x when Node.js 6 becomes LTS and Node.js 7 is released, also in the -October-December 2016 timeframe. - -(Confused about Node.js's LTS policy? [Don't -be!](https://github.com/nodejs/LTS) If you look at [this -diagram](https://github.com/nodejs/LTS/blob/ce364a94b0e0619eba570cd57be396573e1ef889/schedule.png), -it should make all of the preceding clear.) - -If, in practice, this doesn't work with distribution packagers or other -community stakeholders responsible for packaging and distributing Node.js and -npm, please reach out to us. Aligning the npm CLI's LTS policy with Node's -helps everybody minimize the amount of work they need to do, and since all of -our teams are small and very busy, this is somewhere between a necessity and -non-negotiable. - -* [`4a1ecc0`](https://github.com/npm/npm/commit/4a1ecc068fb2660bd9bc3e2e2372aa0176d2193b) - Remove 0.8 from the Node.js testing matrix, and reorder to match real-world - priority, with comments. ([@othiym23](https://github.com/othiym23)) - -### v2.15.7 (2016-06-16): - -It pains me greatly that we haven't been able to fix -[#5082](https://github.com/npm/npm/issues/5082) yet, but warning you away from -potentially publishing incomplete packages takes priority over feeling cheesy -about landing a warning to help keep y'all out of trouble, so here you go -(_please read this next bit_ (_please clap_)): - -#### DANGER: PUBLISHING ON NODE 6.0.0 - -Publishing and packing are buggy under Node versions greater than 6.0.0. -Please use Node.js LTS (4.4.x) to publish packages. See -[#5082](https://github.com/npm/npm/issues/5082) for details and current -status. - -* [`dff00ce`](https://github.com/npm/npm/commit/dff00cedd56b9c04370f840299a7e657a7a835c6) - [#13077](https://github.com/npm/npm/pull/13077) - Warn when using Node 6+. - ([@othiym23](https://github.com/othiym23)) - -#### PACKAGING CHANGES - -* [`1877171`](https://github.com/npm/npm/commit/1877171648e20595a82de34073b643f7e01a339f) - [#12873](https://github.com/npm/npm/issues/12873) - Ignore `.nyc_output`. This will help avoid an accidental publish or commit filled with - code coverage data. - ([@TheAlphaNerd](https://github.com/TheAlphaNerd)) - -#### DOCUMENTATION CHANGES - -* [`470ae86`](https://github.com/npm/npm/commit/470ae86e052ae2f29ebec15b7547230b6240042e) - [#12983](https://github.com/npm/npm/pull/12983) - Describe how to run the lifecycle scripts of dependencies. How you do - this changed with `npm` v2. - ([@Tapppi](https://github.com/Tapppi)) -* [`9cedf37`](https://github.com/npm/npm/commit/9cedf37e5a3e26d0ffd6351af8cac974e3e011c2) - [#12776](https://github.com/npm/npm/pull/12776) - Remove mention of `<pkg>` arg for `run-script`. - ([@fibo](https://github.com/fibo)) -* [`55b8424`](https://github.com/npm/npm/commit/55b8424d7229f2021cac55f0b03de72403e7c0ff) - [#12840](https://github.com/npm/npm/pull/12840) - Remove sexualized language from comment. - ([@geek](https://github.com/geek)) -* [`d6bf0c3`](https://github.com/npm/npm/commit/d6bf0c393788a6398bf80b41c57956f2dbcf3b39) - [#12802](https://github.com/npm/npm/pull/12802) - Small grammar fix in `doc/cli/npm.md`. - ([@andresilveira](https://github.com/andresilveira)) - -#### DEPENDENCY UPDATES - -* [`2c2c568`](https://github.com/npm/npm/commit/2c2c56857ff801d5fe1b6d3157870cd16e65891b) - `readable-stream@2.1.4`: Brought up to date with Node 6.1.0's streams implementation. - ([@calvinmetcalf](https://github.com/calvinmetcalf)) -* [`d682e64`](https://github.com/npm/npm/commit/d682e6445845b0a2584935d5e2942409c43f6916) - [npm/npm-user-validate#8](https://github.com/npm/npm-user-validate/pull/8) - `npm-user-validate@0.1.4`: Add a maximum length limit for usernames based on - the (arbitrary) limit imposed by the primary npm registry. - ([@aredridel](https://github.com/aredridel)) -* [`448b65b`](https://github.com/npm/npm/commit/448b65b48cda3b782b714057fb4b8311cc1fa36a) - `which@1.2.10`: Remove unused dependency `is-absolute`, bug fixes. - ([@isaacs](https://github.com/isaacs)) -* [`7d15434`](https://github.com/npm/npm/commit/7d15434f0b0af8e70b119835b21968217224664f) - `require-inject@1.4.0`: Add `requireInject.withEmptyCache` and - `requireInject.installGlobally.andClearCache` to support loading modules to be - injected with an empty cache. - ([@iarna](https://github.com/iarna)) -* [`31845c0`](https://github.com/npm/npm/commit/31845c081bc6f3f8a2f3d83a3c792dccffbaa2a8) - `init-package-json@1.9.4`: - Replace use of reserved identifier `package` in, uh, the package. - ([@adius](https://github.com/adius)) -* [`d73ef3e`](https://github.com/npm/npm/commit/d73ef3e6b18d4905de668c5115bc6042905a02d9) - `glob@7.0.4`: Use userland `fs.realpath` implementation to get glob working under Node 6. - ([@isaacs](https://github.com/isaacs)) -* [`b47da85`](https://github.com/npm/npm/commit/b47da85cf83b946f2c8d29ab612c92028f31f6b0) - `inflight@1.0.5`: Correct link to package repository, add `"files"` stanza. - ([@iarna](https://github.com/iarna), [@jamestalmage](https://github.com/jamestalmage)) -* [`04815e4`](https://github.com/npm/npm/commit/04815e436035de785279fd000cdbc821cc1f3447) - [npm/npmlog#32](https://github.com/npm/npmlog/pull/32) - `npmlog@2.0.4`: Add `"files"` stanza to `package.json`. - ([@jamestalmage](https://github.com/jamestalmage)) -* [`9e29ad2`](https://github.com/npm/npm/commit/9e29ad227300bb970e7bcd21029944d4733e40db) - `wrappy@1.0.2`: Add `"files"` stanza to `package.json`. - ([@jamestalmage](https://github.com/jamestalmage)) -* [`44af4d4`](https://github.com/npm/npm/commit/44af4d475ac65bdce6d088173273ce4a4f74a49e) - `abbrev@1.0.9` ([@jorrit](https://github.com/jorrit)) -* [`6c977c0`](https://github.com/npm/npm/commit/6c977c0031d074479a26c7bec6ec83fd6c6526b2) - `npm-registry-client@7.1.2`: Add support for newer versions of `npmlog`. - ([@iarna](https://github.com/iarna)) - -### v2.15.6 (2016-05-12): - -I have a couple of doc fixes and a shrinkwrap fix for you all this week. - -#### PEER DEPENDENCIES AND SHRINKWRAPS - -* [`55c998a`](https://github.com/npm/npm/commit/55c998a098a306b90a84beef163a8890f9a616b1) - [#5135](https://github.com/npm/npm/issues/5135) - Fix a bug where peerDependencies & shrinkwraps didn't play nice together. (Where - the peerDependency resolver would end up installing its dep when it wasn't needed.) - ([@majgis](https://github.com/majgis)) - -#### NPM AND `node-gyp` DOCS IMPROVEMENTS - -* [`1826908`](https://github.com/npm/npm/commit/1826908b991510d8fbc71a0d0f2c01ff24fd83c2) - [#12636](https://github.com/npm/npm/pull/12636) - Improve `npm-scripts` documentation regarding when `node-gyp` is used. - ([@reconbot](https://github.com/reconbot)) -* [`f9ff7f3`](https://github.com/npm/npm/commit/f9ff7f36cc2c2c3fbb4f6eef91491b589d049d5f) - [#12586](https://github.com/npm/npm/pull/12586) - Correct `package.json` documentation as to when `node-gyp rebuild` called. - This now matches https://docs.npmjs.com/misc/scripts#default-values - ([@reconbot](https://github.com/reconbot)) - -### v2.15.5 (2016-05-05): - -This is a minor LTS release, bringing dependencies up to date and updating -our CI matrix to match what we support. - -Some of the dependency updates come out of our getting the development -branch's tests passing on Windows and so bring in fixes for a few Windows -related corner cases. - -#### CI UPDATES - -* [`bb6f0e5`](https://github.com/npm/npm/commit/bb6f0e5c95d4ad186768b1c962dd4c399f90ddb1) - [#12487](https://github.com/npm/npm/pull/12487) - Remove iojs from CI, add Node.js 6, prioritize 4 over 5. - ([@othiym23](https://github.com/othiym23)) - -#### DEPENDENCY UPDATES - -* [`f2f8753`](https://github.com/npm/npm/commit/f2f8753c4aef2a604a4bdca2677711c940234b8f) - `which@1.2.8`: - Properly handle relative path executables. - ([@isaacs](https://github.com/isaacs)) -* [`e287ca9`](https://github.com/npm/npm/commit/e287ca99c37680d8e4cfacf4cfebe2da98884865) - `read-package-json@2.0.4`: - Fix Windows issue with ENOTDIR detection. - ([@zkat](https://github.com/zkat)) -* [`1a0ce6c`](https://github.com/npm/npm/commit/1a0ce6cff4c347bad035dc89bba2ceed9dacbf73) - `realize-package-specifier@3.0.3`: - Use npa with windows fix. - Fix relative path resolution when the local file might also be a tag. - ([@zkat](https://github.com/zkat)) - ([@iarna](https://github.com/iarna)) -* [`a475c9a`](https://github.com/npm/npm/commit/a475c9a4e4b36d00080b11f379657ce68185adc6) - `lru-cache@4.0.1`: - Use Symbol if available. - ([@isaacs](https://github.com/isaacs)) -* [`7141e08`](https://github.com/npm/npm/commit/7141e08816c620b1889d7537c30dc5b254de4d1f) - `sorted-object@2.0.0` - ([@iamstarkov](https://github.com/iamstarkov)) -* [`27c6190`](https://github.com/npm/npm/commit/27c6190216cc8a5a280f0efbabb3444581968d40) - `request@2.72.0` - ([@simov](https://github.com/simov)) -* [`ab90daf`](https://github.com/npm/npm/commit/ab90daf70ba51b51f722fb4cd74ac5267621c4b4) - `readable-stream@2.1.2` - ([@calvinmetcalf](https://github.com/calvinmetcalf)) -* [`b1715f8`](https://github.com/npm/npm/commit/b1715f805426403273225bcfa91d1a52d7b56eb8) - `graceful-fs@4.1.4` - ([@isaacs](https://github.com/isaacs)) -* [`ca97de6`](https://github.com/npm/npm/commit/ca97de6c18059ef420235f4706898ad8758904e6) - `block-stream@0.0.9` - ([@isaacs](https://github.com/isaacs)) - -### v2.15.4 (2016-04-21): - -Gosh, it's been a peaceful couple of weeks! - -Overall, the CLI team has been focused on the project to [get the test suite -passing on Windows](https://github.com/npm/npm/pull/11444). Our efforts should -be paying off soon -- there's only a couple of tests left! - -It's very unlikely those particular changes will make their way into our current -`npm@2` LTS release, I think, but it will help `npm@3` a lot, as well as -whatever version makes it into [`node@6`, which will eventually be the next -Node.js LTS](https://github.com/nodejs/node/pull/6155). - -As far as this week goes, we've got a couple of dep updates and doc fixes. -Always happy to see community contributions flying in. 💚 - -#### DEP UPDATE MAGIC - -* [`b178c4a`](https://github.com/npm/npm/commit/b178c4ac9ce91c0a0794526a38b553c759132d18) - `spdx-license-ids@1.2.1`: - Minor project-related tweaks -- no license changes. - ([@shinnn](https://github.com/shinnn)) -* [`1adf179`](https://github.com/npm/npm/commit/1adf179948ab8cb97dfb2f46a61e9f37d944c42a) - `normalize-git-url@3.0.2`: - Fixes `file://` URLs on Windows. Turns out stuff like `file://C:\hello` is - actually fairly weird for a URL (it's not actually a valid URL, but we're just - gonna pretend.😉) - ([@zkat](https://github.com/zkat)) -* [`9cfd56c`](https://github.com/npm/npm/commit/9cfd56cdadc040c0b2fa7654cdb5e7d22dbef7cb) - `fs-vacuum@1.2.9`: - This one goes out to our fans at Big Blue: There was an AIX-specific issue - where `fs.rmDir` was failing with `EEXIST` instead of `ENOTEMPTY` with - non-empty directories. - ([@richardlau](https://github.com/richardlau)) - -#### HOORAY DOC CONTRIBUTIONS - -No seriously, we love these. Keep 'em comin'! - -* [`2afe8bf`](https://github.com/npm/npm/commit/2afe8bf415a159baa181a8102f72c96e1d189bc9) - [#12415](https://github.com/npm/npm/pull/12415) - Clarify that the `--cert` and `--key` options are actual certs and keys, not - paths to files containing them. - ([@rvedotrc](https://github.com/rvedotrc)) -* [`3522560`](https://github.com/npm/npm/commit/3522560b0a4bb6c9717a34f9728f156fd9760cad) - [#12107](https://github.com/npm/npm/pull/12107) - Document `npm login` as an alias to `npm adduser`. People are still surprised - by this so often. - ([@gnerkus](https://github.com/gnerkus)) - -### v2.15.3 (2016-03-31): - -Hiiiiiii!~👋 - -We're really happy to be getting more and more community contributions! Keep it -up! We really appreciate folks trying to help us, and we'll do our best to help -point you in the right direction. Even things like documentation are a huge -help. And remember -- you get socks for it, too!🎁 - -This week is as quiet as usual, aside from fixing a regression to `npm -deprecate` you might want to pay attention to! Other than that, just docs and -deps, as any good LTS release train should be. 🙆 - -#### FIXME - -* [`6e0b66e`](https://github.com/npm/npm/commit/6e0b66e282aa27d1b5371e2babaa859924121730) - [#11884](https://github.com/npm/npm/pull/11884) - Include `node_modules` in the list of files and directories that npm won't - include in packages ordinarily. (Modules listed in `bundledDependencies` and - things that those modules rely on, ARE included of course.) - ([@Jameskmonger](https://github.com/Jameskmonger)) -* [`9896290`](https://github.com/npm/npm/commit/98962909b160364030705575202ad133971033c1) - [#12079](https://github.com/npm/npm/pull/12079) - Back in `npm@2.13.1` we included [a patch that made it so `npm install pkg` - was basically `npm install pkg@latest` instead of - `pkg@*`](https://github.com/npm/npm/pull/9170) This is probably what most - users expected, but it also ended up [breaking `npm - deprecate`](https://github.com/npm/npm/pull/9170) when no version was provided - for a package. In that case, we were using `*` to mean "deprecate all - versions" and relying on the `pkg` -> `pkg@*` conversion. This patch fixes - `npm deprecate pkg` to work as it used to by special casing that particular - command's behavior. - ([@polm](https://github.com/polm)) -* [`6c1628f`](https://github.com/npm/npm/commit/6c1628f62b657db6c116be13849d00933a3388cd) - [#12146](https://github.com/npm/npm/pull/12146) - Adds `make doc-clean` to `prepublish` script, to clear out previously built - docs before publishing a new npm version. - ([@watilde](https://github.com/watilde)) -* [`6d3017e`](https://github.com/npm/npm/commit/6d3017e6eed8a771b395d10130ac1f498e2d3211) - [#12146](https://github.com/npm/npm/pull/12146) - Adds `doc-clean` phony target to `make publish`. - ([@watilde](https://github.com/watilde)) - -#### DOCS - -* [`d43921c`](https://github.com/npm/npm/commit/d43921c546617cdb94bbee444d7d67ef55f38dc5) - [#12147](https://github.com/npm/npm/pull/12147) - Document that the current behavior of `engines` is just to warn if the node - platform is incompatible. - ([@reconbot](https://github.com/reconbot)) -* [`3cfe99e`](https://github.com/npm/npm/commit/3cfe99e3a757c5d8cbb1c2789410e9802563abac) - [#12093](https://github.com/npm/npm/pull/12093) - Update `bugs` url in `package.json` to use the `https` URL for Github. - ([@watilde](https://github.com/watilde)) -* [`ecf865f`](https://github.com/npm/npm/commit/ecf865f4eed1419c75442e0d52bc34ba1647de15) - [#12075](https://github.com/npm/npm/pull/12075) - Add the `--ignore-scripts` flag to the `npm install` docs. - ([@paulirish](https://github.com/paulirish)) -* [`f0e6db3`](https://github.com/npm/npm/commit/f0e6db32827d88680ef2320e60c0863754a4fbc5) - [#12063](https://github.com/npm/npm/pull/12063) - Various minor fixes to the html docs homepage. - ([@watilde](https://github.com/watilde)) - -#### DEPS - -* [`e2660de`](https://github.com/npm/npm/commit/e2660de1c08ed68a1c6fc4ee75d10376595979be) - `npmlog@2.0.3` - ([@iarna](https://github.com/iarna)) - -### v2.15.2 (2016-03-24): - -It's always nice to see new contributors. 💚 - -This week sees another small release, but we're still chugging along on our -[Windows efforts](https://github.com/npm/npm/pull/11444). - -There's also some small process changes to our LTS process relatively recently -that you might wanna know about! 💁 - -For one, the `2.x` branch was removed in favor of just `lts`. If you're making -PRs exclusively against npm's LTS, please use that name from now on. `2.x` was -deleted. - -Also, [@othiym23](https://github.com/othiym23) put some time into [writing down -our LTS process and policy](https://github.com/npm/npm/wiki/LTS). Check it out -and ping us if you have questions or comments about it! - -In general, we're trying to make sure all our policy and such for our -contributors is written down, and we hope it makes it easier in general for -y'all. Forrest is also working on a shiny new Contributor's Guide right now, but -we'll link to that in the (near?) future, when it's ready to roll out. - -#### TESTS - -* [`1d0e468`](https://github.com/npm/npm/commit/1d0e468c06c7b8e2b95b7fe874a3399a16d9db74) - [#11931](https://github.com/npm/npm/pull/11931) - Removes a bunch of old, disabled tests that have just been sitting around, - doing nothing. - ([@othiym23](https://github.com/othiym23)) -* [`7ae8aa1`](https://github.com/npm/npm/commit/7ae8aa1d9dc47761024f6756114205db3fb2c80b) - [#11987](https://github.com/npm/npm/pull/11987) - There was a failure in the `outdated-symlink` test caused by using the default - registry instead of the mock registry tests. - ([@yodeyer](https://github.com/yodeyer)) - -#### DOCS - -* [`b2649fb`](https://github.com/npm/npm/commit/b2649fb360f239aadef1ab51a580cbf4fdf29722) - [#12006](https://github.com/npm/npm/pull/12006) - Access was Team and Team was Access, but someone from the community rolled - around and corrected it for us. Thanks a bunch! - ([@yaelz](https://github.com/yaelz)) - -### v2.15.1 (2016-03-17): - -#### SECURITY ADVISORY: BEARER TOKEN DISCLOSURE - -This release includes [the fix for a -vulnerability](https://github.com/npm/npm/commit/fea8cc92cee02c720b58f95f14d315507ccad401) -that could cause the unintentional leakage of bearer tokens. - -Here are details on this vulnerability and how it affects you. - -##### DETAILS - -Since 2014, npm’s registry has used HTTP bearer tokens to authenticate requests -from the npm’s command-line interface. A design flaw meant that the CLI was -sending these bearer tokens with _every_ request made by logged-in users, -regardless of the destination of their request. (The bearers only should have -been included for requests made against a registry or registries used for the -current install.) - -An attacker could exploit this flaw by setting up an HTTP server that could -collect authentication information, then use this authentication information to -impersonate the users whose tokens they collected. This impersonation would -allow them to do anything the compromised users could do, including publishing -new versions of packages. - -With the fixes we’ve released, the CLI will only send bearer tokens with -requests made against a registry. - -##### THINK YOU'RE AT RISK? REGENERATE YOUR TOKENS - -If you believe that your bearer token may have been leaked, [invalidate your -current npm bearer tokens](https://www.npmjs.com/settings/tokens) and rerun -`npm login` to generate new tokens. Keep in mind that this may cause continuous -integration builds in services like Travis to break, in which case you’ll need -to update the tokens in your CI server’s configuration. - -##### WILL THIS BREAK MY CURRENT SETUP? - -Maybe. - -npm’s CLI team believes that the fix won’t break any existing registry setups. -Due to the large number of registry software suites out in the wild, though, -it’s possible our change will be breaking in some cases. - -If so, please [file an issue](https://github.com/npm/npm/issues/new) describing -the software you’re using and how it broke. Our team will work with you to -mitigate the breakage. - -##### CREDIT & THANKS - -Thanks to Mitar, Will White & the team at Mapbox, Max Motovilov, and James -Taylor for reporting this vulnerability to npm. - -### BACK TO YOUR REGULARLY SCHEDULED PROGRAMMING - -Aside from that, it's another one of those releases again! Docs and tests, it -turns out, have a pretty easy time getting into LTS releases, and boring is -exactly how LTS should be. 💁 - -#### DOCS - -* [`981c89c`](https://github.com/npm/npm/commit/981c89c8e398ca22ab6bf466123b25728ef6f543) - [#11820](https://github.com/npm/npm/pull/11820) - The basic explanation for how `npm link` works was a bit confusing, and - somewhat incorrect. It should be clearer now. - ([@rhgb](https://github.com/rhgb)) -* [`35b2b45`](https://github.com/npm/npm/commit/35b2b45f181dcbfb297f53b577dc1f26efcf3aba) - [#11787](https://github.com/npm/npm/pull/11787) - The `verison` alias for `npm version` no longer shows up in the command list - when you do `npm -h`. - ([@doug-wade](https://github.com/doug-wade)) -* [`1c9d00f`](https://github.com/npm/npm/commit/1c9d00f788298a81a8a7293d7dcf430f01bdd7fd) - [#11786](https://github.com/npm/npm/pull/11786) - Add a comment to the `npm-scope.md` docs about `npm@>=2` being required in - order to use scoped packaged. - ([@doug-wade](https://github.com/doug-wade)) -* [`7d64fb1`](https://github.com/npm/npm/commit/7d64fb1452d360aa736f31c85d6776ce570b2365) - [#11762](https://github.com/npm/npm/pull/11762) - Roll back patch that previously advised people to use `--depth Infinity` - instead of `--depth 9999`. Just keep using `--depth 9999`. - ([@GriffinSchneider](https://github.com/GriffinSchneider)) - -#### TESTS - -* [`98a9ee4`](https://github.com/npm/npm/commit/98a9ee4773f83994b8eb63c0ff75a9283408ba1a) - [#11912](https://github.com/npm/npm/pull/11912) - Did you know npm can install itself? `npm install -g npm` is the way to - upgrade! Turns out that one of the tests that verified this functionality got - rewritten as part of our recent push for better tests, and in the process - omitted a detail about *how* the test ran. We're testing that corner case - again, now, by moving the install folder to `/tmp`, where the original legacy - test ran. - ([@iarna](https://github.com/iarna)) - -### v2.15.0 (2016-03-10): - -#### WHY IS THIS SEMVER-MINOR I THOUGHT THIS WAS LTS - -A brief note about LTS this week! - -npm, as you may know if you're using this `2.x` branch, has an LTS process for -releases. We also try and play nice with [Node.js' own LTS release -process](https://github.com/nodejs/LTS#lts-plan). That means we generally try to -avoid things like minor version bumps on our `2.x` branch (which is also tagged -`lts` in the `dist-tag`s). - -That said, we had a minor-bump update recently for `npm@3.8.0` which added a -`maxsockets` option to allow users to configure the number of concurrent sockets -that npm would keep open at a time -- a setting that has the potential to help a -bunch for people with fussy routers or internet connections that aren't very -happy with Node.js applications' usual concurrency storm. This change was done -to `npm-registry-client`, which we don't have a parallel LTS-tracking branch -for. - -After talking it over, we ended up deciding that this was a reasonable enough -addition to LTS, even though it's *technically* a `semver-minor` bump, taking -into account both its potential for bugfixing (specially on `2.x`!) and the -general hassle it would be to maintain another branch for `npm-registry-client`. - - -* [`6dd61e7`](https://github.com/npm/npm/commit/6dd61e781c145480dc255a3e6a748729868443fd) - Expose `maxsockets` config setting from new `npm-registry-client`. - ([@misterbyrne](https://github.com/misterbyrne)) -* [`8a021c3`](https://github.com/npm/npm/commit/8a021c35184e665bd1f3f70ae2f478af812ab614) - `npm-registry-client@7.1.0`: - Adds support for configuring the max number of concurrent sockets, defaulting - to `50`. - ([@iarna](https://github.com/iarna)) - -#### DOC PATCH IS HERE TOO - -* [`0ae9f74`](https://github.com/npm/npm/commit/0ae9f740001a1bdf5920bc464cf9e284d5d139f0) - [#11748](https://github.com/npm/npm/pull/11748) - Add command aliases as a separate section in documentation for npm - subcommands. - ([@watilde](https://github.com/watilde)) - -#### DEP UPDATES - -* [`bfc3888`](https://github.com/npm/npm/commit/bfc38887f832f701c16b7ee410c4e0220a90399f) - `strip-ansi@3.0.1` - ([@jbnicolai](https://github.com/jbnicolai)) -* [`d5f4d51`](https://github.com/npm/npm/commit/d5f4d51a1b7ea78d7431c7ed4fed30200b2622f8) - `node-gyp@3.3.1`: Fixes Android generator - ([@bnoordhuis](https://github.com/bnoordhuis)) -* [`4119df8`](https://github.com/npm/npm/commit/4119df8aecd2ae57b0492ad8c9a480d900833008) - `glob@7.0.3`: Some path-related fixes for Windows. - ([@isaacs](https://github.com/isaacs)) - -### v2.14.22 (2016-03-03): - -This week is all documentation improvements. In case you hadn't noticed, we -*love* doc patches. We love them so much, we give socks away if you submit -documentation PRs! - -These folks are all getting socks if they ask for them. The socks are -super-sweet. Do you have yours yet? 👣 - -* [`3f3c7d0`](https://github.com/npm/npm/commit/3f3c7d080f052a5db91ff6091f8b1b13f26b53d6) - [#11441](https://github.com/npm/npm/pull/11441) - Add a link to the [Contribution - Guidelines](https://github.com/npm/npm/wiki/Contributing-Guidelines) to the - main npm docs. - ([@watilde](https://github.com/watilde)) -* [`9f87bb1`](https://github.com/npm/npm/commit/9f87bb1934acb33b678c17b7827165b17c071a82) - [#11441](https://github.com/npm/npm/pull/11441) - Remove Google Group email from npm docs about contributing. - ([@watilde](https://github.com/watilde)) -* [`93eaab3`](https://github.com/npm/npm/commit/93eaab3ee5ad16c7d90d1a4b38a95403fcf3f0f6) - [#11474](https://github.com/npm/npm/pull/11474) - Fix an invalid JSON error overlooked in - [#11196](https://github.com/npm/npm/pull/11196). - ([@robludwig](https://github.com/robludwig)) -* [`a407ca2`](https://github.com/npm/npm/commit/a407ca2bcf6a05117e55cf2ab69376e09094995e) - [#11483](https://github.com/npm/npm/pull/11483) - Add more details and an example to the documentation for bundledDependencies. - ([@gnerkus](https://github.com/gnerkus)) -* [`2c851a2`](https://github.com/npm/npm/commit/2c851a231afd874baa77c42ea5ba539c454ac79c) - [#11490](https://github.com/npm/npm/pull/11490) - Document the `--registry` flag for `npm search`. - ([@plumlee](https://github.com/plumlee)) - -### v2.14.21 (2016-02-25): - -Good news, everyone! There's a new LTS release with a few shinies here and there! - -#### USE THIS ONE INSTEAD - -We had some cases where the versions of npm and node used in some scripting situations were different than the ideal, or what folks actually expected. These should be particularly helpful to our Windows friends! <3 - -* [`02813c5`](https://github.com/npm/npm/commit/02813c55782a9def23f7f1e614edc38c6c88aed3) [#9253](https://github.com/npm/npm/issues/9253) Fix a bug where, when running lifecycle scripts, if the Node.js binary you ran `npm` with wasn't in your `PATH`, `npm` wouldn't use it to run your scripts. ([@segrey](https://github.com/segrey) and [@narqo](https://github.com/narqo)) -* [`a985dd5`](https://github.com/npm/npm/commit/a985dd50e06ee51ba5544577f977c7440c227ba2) [#11526](https://github.com/npm/npm/pull/11526) Prefer locally installed npm in Git Bash -- previous behavior was to use the global one. This was done previously for other shells, but not for Git Bash. ([@destroyerofbuilds](https://github.com/destroyerofbuilds)) - -#### SOCKS FOR THE SOCK GOD - -* [`f961092`](https://github.com/npm/npm/commit/f9610920079d8b88ae464b30007a92c594bd85a8) - [#11636.](https://github.com/npm/npm/issues/11636.) - Document the `--save-bundle` option for `npm install`. - ([@datyayu](https://github.com/datyayu)) -* [`7c908b6`](https://github.com/npm/npm/commit/7c908b618f7123f0a3b860c71eb779e33df35964) - [#11644](https://github.com/npm/npm/pull/11644) - Add documentation for the `test` directory for packages. - ([@lewiscowper](https://github.com/lewiscowper)) - -#### INTERNAL TEST IMPROVEMENTS - -The npm CLI team's time recently has been sunk into npm's many years of tech debt. Specifically, we've been working on improving the test suite. This isn't user visible, but in future should mean a more stable, easier to contribute to npm. Ordinarily we don't report these kinds of changes in the change log, but I thought I might share this week as this chunk is bigger than usual. - -These patches were previously released for `npm@3`, and then ported back to `npm@2` LTS. - -* [`437c537`](https://github.com/npm/npm/commit/437c537e2be5923c6d2c2753154564ba13db8fd9) [#11613](https://github.com/npm/npm/pull/11613) Fix up one of the tests after rebasing the legacy test rewrite to `npm@2`. ([@zkat](https://github.com/zkat)) -* [`55abd0c`](https://github.com/npm/npm/commit/55abd0cc20e87a144d33ce2d459f65e7506da576) [#11613](https://github.com/npm/npm/pull/11613) Test that the `package.json` `files` section and `.npmignore` do what they're supposed to. ([@zkat](https://github.com/zkat)) -* [`a2b99b6`](https://github.com/npm/npm/commit/a2b99b6273ada14b2121ebc0acb7933e630edd9d) [#11613](https://github.com/npm/npm/pull/11613) Test that npm's distribution binary is complete and can be installed and used. ([@iarna](https://github.com/iarna)) -* [`8a8c36c`](https://github.com/npm/npm/commit/8a8c36ce51166006022e5c5d4f8655bbc458d651) [#11613](https://github.com/npm/npm/pull/11613) Test that environment variables are properly passed into scripts. - ([@iarna](https://github.com/zkat)) -* [`a95b550`](https://github.com/npm/npm/commit/a95b5507616bd51e83d7eab5f2337b1aff6480b1) [#11613](https://github.com/npm/npm/pull/11613) Test that we don't leak auth info into the environment. ([@iarna](https://github.com/iarna)) -* [`a1c1c52`](https://github.com/npm/npm/commit/a1c1c52efeab24f6dba154d054f85d9efc833486) [#11613](https://github.com/npm/npm/pull/11613) Remove all the relatively cryptic legacy tests and creates new tap tests that check the same functionality. The *legacy* tests were tests that were originally a shell script that was ported to javascript early in `npm`'s history. ([@iarna](https:\\github.com/iarna) and [@zkat](https://github.com/zkat)) -* [`9d89581`](https://github.com/npm/npm/commit/9d895811d3ee70c2e672f3d8fa06574495b5b488) [#11613](https://github.com/npm/npm/pull/11613) `tacks@1.0.9`: Add a package that provides a tool to generate fixtures from folders and, relatedly, a module that an create and tear down filesystem fixtures easily. ([@iarna](https://github.com/iarna)) - -### v2.14.20 (2016-02-18): - -Hope y'all are having a nice week! As usual, it's a fairly limited release. The -most notable thing is some dependency updates that might help the Node.js CI -setup for Windows run a little better, even if we have some work to do on that -path length things, still. - -#### WHITTLING AWAY AT PATH LENGTHS - -So for all of you who don't know -- Node.js does, in fact, support long Windows -paths. Unfortunately, depending on the tool and the Windows version, a lot of -external tooling does not. This means, for example, that some (all?) versions of -Windows Explorer *can literally never delete npm from their system entirely -because of deeply-nested npm dependencies*. Which is pretty gnarly. - -Incidentally, if you run into that in particularly, you can use -[rimraf](npm.im/rimraf) to remove such files 💁. - -The latest victim of this issue was the Node.js CI setup for testing on Windows, -which uses some tooling or another that croaks on the usual path length limit -for that OS: 255 characters. - -This issue, of course, is largely not a problem as of `npm@3`, with its flat -trees, but it still occasionally and viciously bites LTS. - -We've taken another baby step towards alleviating this in this release by -updating a couple of dependencies that were preventing `npmlog` from deduping, -and then doing a dedupe on that and `gauge`. Hopefully it helps. - -* [`4199551`](https://github.com/npm/npm/commit/41995517e617674710748ab6d262670c96124393) - [#11528](https://github.com/npm/npm/pull/11528) - `npm-install-checks@1.0.7`: Just updates the version of npmlog so we can - dedupe it better. - ([@zkat](https://github.com/zkat)) -* [`14d72c7`](https://github.com/npm/npm/commit/14d72c756b89e2d167eb52c1849263dbddcb9f35) - [#11552](https://github.com/npm/npm/pull/11552) - [#11528](https://github.com/npm/npm/pull/11528) - `node-gyp@3.3.0`: AIX support, new `gyp`, update `npmlog` (for the dedupe), - adds `--cafile` command line option, and allows configuration of Node.js and - io.js mirrors. - ([@rvagg](https://github.com/rvagg)) -* [`0453cb9`](https://github.com/npm/npm/commit/0453cb94b33520eb723b7072cd2654b1d0142533) - [#11528](https://github.com/npm/npm/pull/11528) - Do a `dedupe` on `gauge` to flatten our dependencies a bit more. - ([@zkat](https://github.com/zkat)) - -#### OTHER DEP STUFF - -* [`686c0b3`](https://github.com/npm/npm/commit/686c0b37ec3a7b65f9b3849e1099805e5221c408) - `rimraf@2.5.2`: Just updates to glob@7. - ([@isaacs](https://github.com/isaacs)) - -#### @wyze, DOCUMENTATION HERO OF THE PEOPLE, GETS THEIR OWN HEADER - -* [`7232948`](https://github.com/npm/npm/commit/72329484c775376cb40d5b348f453eaaf2f0b821) - [#11416](https://github.com/npm/npm/pull/11416) - Logout docs were using a section copy-pasted from the adduser docs. - ([@wyze](https://github.com/wyze)) -* [`922b33a`](https://github.com/npm/npm/commit/922b33aba4362e1e90f42e9348f061a1cc73eafb) - [#11414](https://github.com/npm/npm/pull/11414) - Add colon for consistency. - ([@wyze](https://github.com/wyze)) - -### v2.14.19 (2016-02-11): - -Really tiny micro-release this week! The main thing to note is a dependency -update that means we no longer have `graceful-fs@3` in our dependency tree. This -has some implications for being able to run on future Node.js releases, so -better to get this out the door. 😁 - -#### DEPS - -* [`a556e0f`](https://github.com/npm/npm/commit/a556e0f9dcb5d7b44224ba9c16c9d0dc6c8d2532) - `cmd-shim@2.0.2`: Final straggler using `graceful-fs@<4`. - ([@ForbesLindesay](https://github.com/ForbesLindesay)) - -#### DOCS - -* [`69a2d59`](https://github.com/npm/npm/commit/69a2d599bf0cba674ee268483e9bd5c14333b89f) - [#11391](https://github.com/npm/npm/pull/11391) - Fixed versions of `shrinkwrap.json` in examples in documentation for `npm - shrinkwrap`, which did not quite match up. - ([@xcatliu](https://github.com/xcatliu)) - -### v2.14.18 (2016-02-04): - -Clearly our docs are perfect after all those wonderful PRs, 'cause this week's -gonna be all about dependency updates. Note: There is a small security-related -fix included here! - -#### SECURITY-RELATED DEPENDENCY UPDATE - -* [`5c095ef`](https://github.com/npm/npm/commit/5c095eff8dc006980d4d083f2007e4dacff23be3) - [#11341](https://github.com/npm/npm/pull/11341) - `request@2.69.0`: Includes security-related dependency updates involving - `hawk` and `is-my-json-valid` - ([@remy](https://github.com/remy) and [@simov](https://github.com/simov)) - -#### OTHER DEPENDENCY UPDATES - -* [`f9c2668`](https://github.com/npm/npm/commit/f9c2668ca3e6e2602d91250ce61280e5e12d0a00) - `which@1.2.4` - ([@isaacs](https://github.com/isaacs)) -* [`2907c43`](https://github.com/npm/npm/commit/2907c43ad4ef87e5f730c2576f680d6837fcbad0) - `spdx-license-ids@1.2.0` - ([@shinnn](https://github.com/shinnn)) -* [`7734069`](https://github.com/npm/npm/commit/773406960bf7f4a87b2ecb6ebf593c62d0e9f95d) - `rimraf@2.5.1` - ([@isaacs](https://github.com/isaacs)) -* [`f4b39a7`](https://github.com/npm/npm/commit/f4b39a7dd5e1335d92aa22c46d99abb33f271b8b) - `retry@0.9.0` - ([@tim-kos](https://github.com/tim-kos)) -* [`ded1e7a`](https://github.com/npm/npm/commit/ded1e7a1c9c7bec29bb7c30a8f85546670e75b56) - Nest `retry@0.8.0` inside `npm-registry-client` to prevent invalid - dependency issue until the latter gets a dependency update. - ([@zkat](https://github.com/zkat)) -* [`ab9f867`](https://github.com/npm/npm/commit/ab9f8679f9687f91ad03adaab6211a897aeebbae) - `read-package-json@2.0.3` - ([@iarna](https://github.com/iarna)) -* [`b638c41`](https://github.com/npm/npm/commit/b638c41607bb936b9eaaceba2aeeda1d34e3a9b2) - `npmlog@2.0.2` - ([@iarna](https://github.com/iarna)) -* [`49f34af`](https://github.com/npm/npm/commit/49f34af463a674359269025d8438feb6a7c69960) - `init-package-json@1.9.3` - ([@iarna](https://github.com/iarna)) -* [`2305dab`](https://github.com/npm/npm/commit/2305dab4e7bff09bb7686cec653cf1e663dbf15d) - `graceful-fs@4.1.3`: Fixed `.close()` not being patched. - ([@isaacs](https://github.com/isaacs)) -* [`18496d9`](https://github.com/npm/npm/commit/18496d9a0fff94e3652655998e8333056aa52b15) - `fs-write-stream-atomic@1.0.8` - ([@iarna](https://github.com/iarna)) -* [`6637bc7`](https://github.com/npm/npm/commit/6637bc7a0e194d82554cd7c91e1794018fef5943) - `config-chain@1.1.10` - ([@dominictarr](https://github.com/dominictarr)) -* [`4222bad`](https://github.com/npm/npm/commit/4222badffed9e9edacea6a8a96a99a164d376158) - `columnify@1.5.4` - ([@timoxley](https://github.com/timoxley)) -* [`df9016f`](https://github.com/npm/npm/commit/df9016f327a2a9ce492ebc75b882b03069438e13) - `ansi@0.3.1`: Added a license file. - ([@TooTallNate](https://github.com/TooTallNate)) - -### v2.14.17 (2016-01-28): - -Another week, another small LTS release! - -#### BETTER ERROR REPORTING YAY - -So as it turns out, when stuff goes wrong, it's actually nice to give people a -better clue rather than just say "oh well 😏". - -* [`5b8ccb9`](https://github.com/npm/npm/commit/5b8ccb91cf11b4edb463609cd4ed1dee84ed4db0) - [#11289](https://github.com/npm/npm/pull/11289) - There is an obscure feature that lets you monkey-patch npm when it starts up. - If the module being required with this feature failed, it would previous just - make npm error out– this reduces that to a warning. - ([@evanlucas](https://github.com/evanlucas)) -* [`556e42a`](https://github.com/npm/npm/commit/556e42ac6bab078722ddc1dc6cce4428d001133b) - [#11300](https://github.com/npm/npm/pull/11300) - Report symlinked packages as 'linked' in the output for `npm outdated`. - ([@halhenke](https://github.com/halhenke)) -* [`3842317`](https://github.com/npm/npm/commit/3842317583e0ea2eca78e39aa03f5bc06ba21de7) - [#11290](https://github.com/npm/npm/pull/11290) - Suppress warnings about pre-release node versions. This should get node's CI - passing on non-Windows platforms without needing to modify the node version to - get rid of the pre-release suffix. - ([@iarna](https://github.com/iarna)) - -#### EVERYONE WANTS THOSE NPM SOCKS, GEEZE - -Did you know that you can get npm socks for contributing to our docs? I bet -these people do, and now so do you! - -* [`dcde451`](https://github.com/npm/npm/commit/dcde451cb85a6ca08acc6ef45782c652f1d8fc89) - [#11232](https://github.com/npm/npm/pull/11232) - Update automatically included/excluded packages in `package.json`. - ([@jscissr](https://github.com/jscissr)) -* [`e3f8d5b`](https://github.com/npm/npm/commit/e3f8d5be5ac5ec1d72db42f7abf50cc4a8c5935c) - [#11273](https://github.com/npm/npm/pull/11273) - Add an example for `npm view <pkg> versions`. - ([@vedatmahir](https://github.com/vedatmahir)) -* [`6a06ef2`](https://github.com/npm/npm/commit/6a06ef2252748089f0013de951f2d06160b90306) - [#11272](https://github.com/npm/npm/pull/11272) - Fix a typo in `npm-update.md`. - ([@jonathanp](https://github.com/jonathanp)) -* [`2515ff1`](https://github.com/npm/npm/commit/2515ff1de28f0b261fb25c79a66bd762a65961c4) - [#11215](https://github.com/npm/npm/pull/11215) - Correct small thinko in docs for SPDX expressions. - ([@kemitchell](https://github.com/kemitchell)) -* [`70f897b`](https://github.com/npm/npm/commit/70f897b03da9a5d5d4fd34614e9ee40e6f9e9653) - [#11196](https://github.com/npm/npm/pull/11196) - Make JSON snippets valid JSON in `npm update` docs. - ([@s100](https://github.com/s100)) - -### v2.14.16 (2016-01-21): - -Good to see you all again! It's been a while since we had an LTS release, and -the team continues to work hard to both get the issue tracker under control, and -get our test suite to be awesome and reliable. - -This is also the first LTS release of this year. - -We're gonna have an interesting time -- most of our focus this year will be -around stability and maintainability of the CLI, so you might actually end up -seeing a number of updates even over here, just for the sake of making sure -we're stable, that bugs get fixed, and tests have proper coverage. - -What better way to start this effort, then, than getting Travis tests green, fix -a few things here and there, and tweak a bunch of documentation? 😁 - -#### FIX ALL THE BUGS AND TWEAK ALL THE THINGS - -* [`24b13fb`](https://github.com/npm/npm/commit/24b13fbc57d34db1d5b0a37bcca122c00deba978) - [#11158](https://github.com/npm/npm/pull/11158) - Fix custom node-gyp env var quoting on Windows. - ([@orangemocha](https://github.com/orangemocha)) -* [`e2503f2`](https://github.com/npm/npm/commit/e2503f2be40157b05a9c500ec3b5d16090ffee50) - [#11142](https://github.com/npm/npm/pull/11142) - Fix race condition with `correctMkdir` in the cache directory. - ([@Jimbly](https://github.com/Jimbly)) - -* [`5c0e4c4`](https://github.com/npm/npm/commit/5c0e4c45a29d774ab729e86044377d4e5e424252) - [#10940](https://github.com/npm/npm/pull/10940) - Ignore failures replacing `package.json`. writeFileAtomic is not atomic in - Windows, it fails if the file is being accessed concurrently. - ([@orangemocha](https://github.com/orangemocha)) -* [`2c44d8d`](https://github.com/npm/npm/commit/2c44d8dc8c267d5e054d0175ce2f4750f0986463) - [#10903](https://github.com/npm/npm/pull/10903) - Add tests for `npm adduser --scope`. - ([@ekmartin](https://github.com/ekmartin)) -* [`4cb25d0`](https://github.com/npm/npm/commit/4cb25d0fed5c7792dfd1aec891380ecc1f8a5761) - [#10903](https://github.com/npm/npm/pull/10903) - Add a message informing users when they have been successfully logged in. - ([@ekmartin](https://github.com/ekmartin)) -* [`fe3ec6d`](https://github.com/npm/npm/commit/fe3ec6d6658262054c0c19c55373c21e84ab9f17) - [#10628](https://github.com/npm/npm/pull/10628) - Tell users how to open an issue with a package that has errored. - ([@trodrigues](https://github.com/trodrigues)) - -#### DOCS DOCS DOCS - -We got a TON of lovely documentation patches, too! Thanks all for submitting! - -* [`22482a1`](https://github.com/npm/npm/commit/22482a1f22079d72c3f8ca55c2f0c153bdd024c0) - [#11188](https://github.com/npm/npm/pull/11188) - Briefly explain what's included when you publish. - ([@beaugunderson](https://github.com/beaugunderson)) -* [`fa47724`](https://github.com/npm/npm/commit/fa4772438df0c66a19309dd1c1a3ce43cbee5461) - [#11150](https://github.com/npm/npm/pull/11150) - Advise use of `--depth Infinity` instead of `--depth 9999` in `npm update`. - ([@halhenke](https://github.com/halhenke)) -* [`248ddfe`](https://github.com/npm/npm/commit/248ddfe8f7ddd3318e14bf61de41cab4a638c8a3) - [#11130](https://github.com/npm/npm/pull/11130) - Nuke "using npm programmatically" section from README. The programmatic npm - API is unsupported, and is not guaranteed not to break in non-major versions. - Removing this section so newcomers aren't encouraged to discover or use it. - ([@ljharb](https://github.com/ljharb)) -* [`ae9c452`](https://github.com/npm/npm/commit/ae9c4521222d60ab4a69c19fee5e361c62f41fae) - [#11128](https://github.com/npm/npm/pull/11128) - Add link to local paths section indocs for `package.json`. - ([@orangejulius](https://github.com/orangejulius)) -* [`663a8c6`](https://github.com/npm/npm/commit/663a8c6b4b1647f9b86c15ef32e30023edc8c060) - [#11044](https://github.com/npm/npm/pull/11044) - Update default value documentation for the color option in npm's config. - ([@scottaddie](https://github.com/scottaddie)) -* [`5c1dda0`](https://github.com/npm/npm/commit/5c1dda0d3a18b2954872dba33fbc696ff0700ffe) - [#11037](https://github.com/npm/npm/pull/11037) - Correct the name property max length constraint verbiage. - ([@scottaddie](https://github.com/scottaddie)) -* [`8288365`](https://github.com/npm/npm/commit/8288365d08e97fa3a5b0d31703c015a8be49e07f) - [#10990](https://github.com/npm/npm/pull/10990) - Update folder docs to reflect that process.installPrefix was removed as of - 0.8.x. - ([@jeffmcmahan](https://github.com/jeffmcmahan)) -* [`61d63fa`](https://github.com/npm/npm/commit/61d63fa22c4f09742180c2de460a4ffb6c32738e) - [#10790](https://github.com/npm/npm/pull/10790) - Clarify that `npm install foo` is the same as `npm install foo@latest` now. - ([@cvrebert](https://github.com/cvrebert)) -* [`442c920`](https://github.com/npm/npm/commit/442c9207f375354c91d36df8711ba2d33e1c97f3) - [#10789](https://github.com/npm/npm/pull/10789) - Link over to `npm-dist-tag(1)` in `npm install` docs when they talk about the - `pkg@<tag>` syntax. - ([@cvrebert](https://github.com/cvrebert)) -* [`dca7a5e`](https://github.com/npm/npm/commit/dca7a5e2be3bfa306a870a123707d35c732406c0) - [#10788](https://github.com/npm/npm/pull/10788) - Link to tag docs in docs for `npm publish --tag`. - ([@cvrebert](https://github.com/cvrebert)) -* [`a72904e`](https://github.com/npm/npm/commit/a72904e8d4ab1d43ae8150fbe3f6468b0cbb1efd) - [#10787](https://github.com/npm/npm/pull/10787) - Explain why the `latest` tag matters. - ([@cvrebert](https://github.com/cvrebert)) -* [`9d0697a`](https://github.com/npm/npm/commit/9d0697a534046df7efda32170014041bbc1f4e7d) - [#10785](https://github.com/npm/npm/pull/10785) - Replace some quite marks in `npm dist-tag` docs for the sake of consistency. - ([@cvrebert](https://github.com/cvrebert)) - -#### I REALLY LIKE GREEN. CAN YOU TELL? - -So Travis is all green now on `npm@2`, thanks to the removal of nock and a few -other test suite tweaks. This is a fantastic step towards making sure we can all -have confidence in our test suite! 🎉 - -* [`64995be`](https://github.com/npm/npm/commit/64995be6d874356b15c136f9867302d805dfe1e9) [`75ab216`](https://github.com/npm/npm/commit/75ab2164cf79e28ac7f7ebe714f3c5aee99c6626) [`a9f6fe9`](https://github.com/npm/npm/commit/a9f6fe9dc558f17c4a7b9eb83329ac080f7df4b7) [`649c193`](https://github.com/npm/npm/commit/649c193adadf714c2819837f9372a29d724a5ec0) [`94cb05e`](https://github.com/npm/npm/commit/94cb05eaa9e5ad6675cf15c4ac0a44fbdde05900) [`6541690`](https://github.com/npm/npm/commit/65416907008061ac5a5f66b1630a57776803b526) [`255be6f`](https://github.com/npm/npm/commit/255be6f5bca9e3d216f3a5cbdf6714c6c9fcf132) [`9e84fa4`](https://github.com/npm/npm/commit/9e84fa43c49d04cf86ca1678e2a61412f5559cb9) [`8a587b0`](https://github.com/npm/npm/commit/8a587b0c1696ae7302891fa6355fc3e8670e00d3) [`bf812a5`](https://github.com/npm/npm/commit/bf812a54e497a573493346399798aa0b9373ac24) - [#10903](https://github.com/npm/npm/pull/10903) - Get rid of nock from tests, and get Travis green. - ([@zkat](https://github.com/zkat) and [@iarna](https://github.com/iarna)) -* [`70a5310`](https://github.com/npm/npm/commit/70a5310712c6666e753ca8f3bfff4a780ec6292d) - `npm-registry-couchapp@2.6.12`: - Better 0.8 compatibility, and ability to run in travis docker stuff. This - means the test suite should run a lot faster, too! - ([@iarna](https://github.com/iarna)) -* [`28fae39`](https://github.com/npm/npm/commit/28fae399212eda5554e6c0ffd8c9591144ab7b9d) - Get rid of sudo, for Travis! - ([@zkat](https://github.com/zkat)) - -### v2.14.15 (2015-12-10): - -Did you know that Bob Ross reached the rank of master sergeant in the US Air -Force before becoming perhaps the most soothing painter of all time? - -#### TWO HAPPY LITTLE BUG FIXES - -* [`f482664`](https://github.com/npm/npm/commit/f4826645dc6b5c0f05c5f9187efb28c1a293554f) - [#10505](https://github.com/npm/npm/issues/10505) `npm ls --json --depth=0` - now respects the depth parameter, when it is zero and when it is not zero. - ([@MarkReeder](https://github.com/MarkReeder)) -* [`529fa1f`](https://github.com/npm/npm/commit/529fa1ff2c6432a773af99a1c5209c0865f7a19c) - [#9099](https://github.com/npm/npm/issues/9099) I had always thought you - could run `npm version` from subdirectories in your project, which is great, - because now you can. I guess I was just ahead of my time. - ([@ekmartin](https://github.com/ekmartin)) - -#### NOW PAINT IN SOME NICE DOCS CHANGES - -* [`1fc7f2b`](https://github.com/npm/npm/commit/1fc7f2b523ea760e08adb9b861b28e3ba450e565) - [#10546](https://github.com/npm/npm/issues/10546) Goodbye, FAQ! You were - cheeky and fun until you weren't! Don't worry: npm still loves everyone, - especially you! ([@ashleygwilliams](https://github.com/ashleygwilliams)) -* [`7fe6950`](https://github.com/npm/npm/commit/7fe6950b44d241bb4d90857a44d89d750af1e2b3) - [#10570](https://github.com/npm/npm/issues/10570) Update documentation URLs - to be HTTPS everywhere sensible. No HTTP shall be spared! - ([@rsp](https://github.com/rsp)) -* [`96ebb90`](https://github.com/npm/npm/commit/96ebb902439e4f6f37f8beffb589769146fecf24) - [#10650](https://github.com/npm/npm/issues/10650) Correctly note that there - are two lifecycle scripts run by an install phase in an example, instead of - three. ([@eymengunay](https://github.com/eymengunay)) -* [`5196893`](https://github.com/npm/npm/commit/5196893a7496f68a514b83641ff6b72f14d664dd) - [#10687](https://github.com/npm/npm/issues/10687) `npm outdated`'s output can - be a little puzzling sometimes. I've attempted to make it clearer, with some - examples, of what's going on with "wanted" and "latest" in more cases. - ([@othiym23](https://github.com/othiym23)) -* [`8e6712d`](https://github.com/npm/npm/commit/8e6712d4ee128858cab36c77723e35bddbb977ba) - [#10700](https://github.com/npm/npm/issues/10700) Hey, do you remember when - `search.npmjs.org` was a thing? I think I do? The last time I used it was in - like 2012, and it's gone now, so remove it from the docs. - ([@gagern](https://github.com/gagern)) -* [`27d2612`](https://github.com/npm/npm/commit/27d2612b3f5aa88b12c943d04e162ce4c3a350ae) - `semver@5.1.0`: Include BNF for SemVer expression grammar (which is also now - included in `npm help semver`). ([@isaacs](https://github.com/isaacs)) - -#### LAND YOUR DEPENDENCY UPGRADES IN PAIRS SO EVERYONE HAS A FRIEND - -* [`fc6c3c5`](https://github.com/npm/npm/commit/fc6c3c53a31e9e11c2616fcd378202e5b80bf286) - `request@2.67.0` ([@simov](https://github.com/simov)) -* [`07013fd`](https://github.com/npm/npm/commit/07013fd0fd55a2eb31fb9334631ee5d0dd5c41bb) - [isaacs/rimraf#89](https://github.com/isaacs/rimraf/pull/89) `rimraf@2.4.4` - ([@zerok](https://github.com/zerok)) -* [`bc149be`](https://github.com/npm/npm/commit/bc149bef871f0f00639509898cece531af3aa8b3) - [isaacs/once#7](https://github.com/isaacs/once/pull/7) `once@1.3.3` - ([@floatdrop](https://github.com/floatdrop)) -* [`ac598d3`](https://github.com/npm/npm/commit/ac598d36e1ad207bc0d8a7eadfd84b26146aec1f) - `lru-cache@3.2.0` ([@isaacs](https://github.com/isaacs)) -* [`1b915ce`](https://github.com/npm/npm/commit/1b915ce1e0787ccb6d8aa235d002d66565f2175d) - `npm-registry-client@7.0.9` ([@othiym23](https://github.com/othiym23)) -* [`df7dd78`](https://github.com/npm/npm/commit/df7dd78b8fe3cc58202996fa6c994fc55419bfa5) - `tap@2.3.1` ([@isaacs](https://github.com/isaacs)) - -### v2.14.14 (2015-12-03): - -#### FIX URL IN LICENSE - -The license incorrectly identified the registry URL as `registry.npmjs.com` and -this has been corrected to `registry.npmjs.org`. - -* [`6051a69`](https://github.com/npm/npm/commit/6051a69b1adc80f5f200077067e831643f655bd4) - [#10685](https://github.com/npm/npm/pull/10685) - Fix npm public registry URL in notices. - ([@kemitchell](https://github.com/kemitchell)) - -#### NO MORE MD5 - -We updated modules that had been using MD5 for non-security purposes. While -this is perfectly safe, if you compile Node in FIPS-compliance mode it will -explode if you try to use MD5. We've replaced MD5 with Murmur, which conveys -our intent better and is faster to boot. - -* [`30b5994`](https://github.com/npm/npm/commit/30b599496a9762482e1cef945a378e3a534fd366) - [#10629](https://github.com/npm/npm/issues/10629) - `write-file-atomic@1.1.4` - ([@othiym23](https://github.com/othiym23)) -* [`68c63ff`](https://github.com/npm/npm/commit/68c63ff1279d3d5ea7b2c970ab5562a8e0536f27) - [#10629](https://github.com/npm/npm/issues/10629) - `fs-write-stream-atomic@1.0.5` - ([@othiym23](https://github.com/othiym23)) - -#### DEPENDENCY UPDATES - -* [`e48e5a9`](https://github.com/npm/npm/commit/e48e5a90b4dcf76124b7e9ea3b295c1383e7f0c8) - [nodejs/node-gyp#831](https://github.com/nodejs/node-gyp/pull/831) - `node-gyp@3.2.1`: Improved \*BSD support. - ([@bnoordhuis](https://github.com/bnoordhuis)) - -### v2.14.13 (2015-11-25): - -#### THE npm CLI !== THE npm REGISTRY !== npm, INC. - -npm-the-CLI is licensed under the terms of the [Artistic License -2.0](https://github.com/npm/npm/blob/8d79c1a39dae908f27eaa37ff6b23515d505ef29/LICENSE), -which is a liberal open-source license that allows you to take this code and do -pretty much whatever you like with it (that is, of course, not legal language, -and if you're doing anything with npm that leaves you in doubt about your legal -rights, please seek the review of qualified counsel, which is to say, not -members of the CLI team, none of whom have passed the bar, to my knowledge). At -the same time the primary registry the CLI uses when looking up and downloading -packages is a commercial service run by npm, Inc., and it has its own [Terms of -Use](https://www.npmjs.com/policies/terms). - -Aside from clarifying the terms of use (and trying to make sure they're more -widely known), the only recent changes to npm's licenses have been making the -split between the CLI and registry clearer. You are still free to do whatever -you like with the CLI's source, and you are free to view, download, and publish -packages to and from `registry.npmjs.org`, but now the existing terms under -which you can do so are more clearly documented. Aside from the two commits -below, see also [the release notes for -`npm@2.14.11`](https://github.com/npm/npm/releases/tag/v2.14.11), which is where -the split between the CLI's code and the terms of use for the registry was -first made more clear. - -* [`1f3e936`](https://github.com/npm/npm/commit/1f3e936aab6840667948ef281e0c3621df365131) - [#10532](https://github.com/npm/npm/issues/10532) Clarify that - `registry.npmjs.org` is the default, but that you're free to use the npm CLI - with whatever registry you wish. ([@kemitchell](https://github.com/kemitchell)) -* [`6733539`](https://github.com/npm/npm/commit/6733539eeb9b32a5f2d1a6aa797987e2252fa760) - [#10532](https://github.com/npm/npm/issues/10532) Having semi-duplicate - release information in `README.md` was confusing and potentially inaccurate, - so remove it. ([@kemitchell](https://github.com/kemitchell)) - -#### EASE UP ON WINDOWS BASH USERS - -It turns out that a fair number of us use bash on Windows (through MINGW or -bundled with Git, plz – Cygwin is still a bridge too far, for both npm and -Node.js). [@jakub-g](https://github.com/jakub-g) did us all a favor and relaxed -the check for npm completion to support MINGW bash. Thanks, Jakub! - -* [`460cc09`](https://github.com/npm/npm/commit/460cc0950fd6a005c4e5c4f85af807814209b2bb) - [#10156](https://github.com/npm/npm/issues/10156) completion: enable on - Windows in git bash ([@jakub-g](https://github.com/jakub-g)) - -#### MAKE NODE-GYP A LITTLE BLUER - -* [`333e118`](https://github.com/npm/npm/commit/333e1181082842c21edc62f0ce515928424dff1f) - `node-gyp@3.2.0`: Support AIX, use `which` to find Python, updated to a newer - version of `gyp`, and more! ([@bnoordhuis](https://github.com/bnoordhuis)) - -#### WE LIKE SPDX AND ALL BUT IT'S NOT ACTUALLY A DIRECT DEP, SORRY - -* [`1f4b4bb`](https://github.com/npm/npm/commit/1f4b4bbdf8758281beecb7eaf75d05a6c4a77c15) - Removed `spdx` as a direct npm dependency, since we don't actually need it at - that level, and updated subdeps for `validate-npm-package-license` - ([@othiym23](https://github.com/othiym23)) - -#### A BOUNTEOUS THANKSGIVING CORNUCOPIA OF DOC TWEAKS - -These are great! Keep them coming! Sorry for letting them pile up so deep, -everybody. Also, a belated Thanksgiving to our Canadian friends, and a happy -Thanksgiving to all our friends in the USA. - -* [`6101f44`](https://github.com/npm/npm/commit/6101f44737645d9379c3396fae81bbc4d94e1f7e) - [#10250](https://github.com/npm/npm/issues/10250) Correct order of `org:team` - in `npm team` documentation. ([@louislarry](https://github.com/louislarry)) -* [`e8769f9`](https://github.com/npm/npm/commit/e8769f9807b91582c15ef130733e2e72b6c7bda4) - [#10371](https://github.com/npm/npm/issues/10371) Remove broken / duplicate - link to tag. ([@WickyNilliams](https://github.com/WickyNilliams)) -* [`1ae2dbe`](https://github.com/npm/npm/commit/1ae2dbe759feb80d8634569221ec6ee2c6d1d1ff) - [#10419](https://github.com/npm/npm/issues/10419) Remove references to - nonexistent `npm-rm(1)` documentation. ([@KenanY](https://github.com/KenanY)) -* [`777a271`](https://github.com/npm/npm/commit/777a271830a42d4ee62540a89f764a6e7d62de19) - [#10474](https://github.com/npm/npm/issues/10474) Clarify that install finds - dependencies in `package.json`. ([@sleekweasel](https://github.com/sleekweasel)) -* [`dcf4b5c`](https://github.com/npm/npm/commit/dcf4b5cbece1b0ef55ab7665d9acacc0b6b7cd6e) - [#10497](https://github.com/npm/npm/issues/10497) Clarify what a package is - slightly. ([@aredridel](https://github.com/aredridel)) -* [`447b3d6`](https://github.com/npm/npm/commit/447b3d669b2b6c483b8203754ac0a002c67bf015) - [#10539](https://github.com/npm/npm/issues/10539) Remove an extra, spuriously - capitalized letter. ([@alexlukin-softgrad](https://github.com/alexlukin-softgrad)) - -### v2.14.12 (2015-11-19): - -#### TEEN ORCS AT THE GATES - -This week heralds the general release of the primary npm registry's [new -support for private packages for -organizations](http://blog.npmjs.org/post/133542170540/private-packages-for-organizations). -For many potential users, it's the missing piece needed to make it easy for you -to move your organization's private work onto npm. And now it's here! The -functionality to support it has been in place in the CLI for a while now, -thanks to [@zkat](https://github.com/zkat)'s hard work. - -During our final testing before the release, our ace support team member -[@snopeks](https://github.com/snopeks) noticed that there had been some drift -between the CLI team's implementation and what npm was actually preparing to -ship. In the interests of everyone having a smooth experience with this -_extremely useful_ new feature, we quickly made a few changes to square up the -CLI and the web site experiences. - -* [`0e8b15e`](https://github.com/npm/npm/commit/0e8b15e9fbc89e31bd00e573b648846beddfb835) - [#9327](https://github.com/npm/npm/issues/9327) `npm access` no longer has - problems when run in a directory that doesn't contain a `package.json`. - ([@othiym23](https://github.com/othiym23)) -* [`c4e939c`](https://github.com/npm/npm/commit/c4e939c1d493601d25dcb88e6ffcca73076fd3fd) - [npm/npm-registry-client#126](https://github.com/npm/npm-registry-client/issues/126) - `npm-registry-client@7.0.8`: Allow the CLI to grant, revoke, and list - permissions on unscoped (public) packages on the primary registry. - ([@othiym23](https://github.com/othiym23)) - -#### A BRIEF NOTE ON NPM'S BACKWARDS COMPATIBILITY - -We don't often have much to say about the changes we make to our internal -testing and tooling, but I'm going to take this opportunity to reiterate that -npm tries hard to maintain compatibility with a wide variety of Node versions. -As this change shows, we want to ensure that npm works the same across: - -* Node.js 0.8 -* Node.js 0.10 -* Node.js 0.12 -* the latest io.js release -* Node.js 4 LTS -* Node.js 5 - -Contributors who send us pull requests often notice that it's very rare that -our tests pass across all of those versions (ironically, almost entirely due to -the packages we use for testing instead of any issues within npm itself). We're -currently beginning an effort, lasting the rest of 2015, to clean up our test -suite, and not only get it passing on all of the above versions of Node.js, but -working solidly on Windows as well. This is a compounding form of technical -debt that we're finally paying down, and our hope is that cleaning up the tests -will produce a more robust CLI that's a lot easier to write patches for. - -* [`d743620`](https://github.com/npm/npm/commit/d743620a0005213a65d25de771661b4d48a09717) - [#10233](https://github.com/npm/npm/issues/10233) Update Node.js versions - that Travis uses to test npm. ([@iarna](https://github.com/iarna)) - -#### TYPOS IN THE LICENSE, OH MY - -* [`58ac241`](https://github.com/npm/npm/commit/58ac241f556b2c202a8ee33321965e2540361ca7) - [#10478](https://github.com/npm/npm/issues/10478) Correct two typos in npm's - LICENSE. ([@jorrit](https://github.com/jorrit)) - -### v2.14.11 (2015-11-12): - -#### ASK FOR NOTHING, GET LATEST - -When you run `npm install foo`, you probably expect that you'll get the -`latest` version of `foo`, whatever that is. And good news! That's what this -change makes it do. - -We _think_ this is what everyone wants, but if this causes problems for you, we -want to know! If it proves problematic for people we will consider reverting it -(preferably before this becomes `npm@latest`). - -Previously, when you ran `npm install foo` we would act as if you typed `npm -install foo@*`. Now, like any range-type specifier, in addition to matching the -range, it would also have to be `<=` the value of the `latest` dist-tag. -Further, it would exclude prerelease versions from the list of versions -considered for a match. - -This worked as expected most of the time, unless your `latest` was a prerelease -version, in which case that version wouldn't be used, to everyone's surprise. - -* [`6f0a646`](https://github.com/npm/npm/commit/6f0a646cd865b24fe3ff25365bf5421780e63e01) - [#10189](https://github.com/npm/npm/issues/10189) `npm-package-arg@4.1.0`: - Change the default version from `*` to `latest`. - ([@zkat](https://github.com/zkat)) - -#### LICENSE CLARIFICATION - -* [`54a9046`](https://github.com/npm/npm/commit/54a90461f068ea89baa5d70248cdf1581897936d) - [#10326](https://github.com/npm/npm/issues/10326) Clarify what-all is covered - by npm's license and point to the registry's terms of use. - ([@kemitchell](https://github.com/kemitchell)) - -#### CLOSER TO GREEN TRAVIS - -* [`28efd3d`](https://github.com/npm/npm/commit/28efd3d7dfb2fa3755076ae706ea4d38c6ee6900) - [#10232](https://github.com/npm/npm/issues/10232) `nock@1.9.0`: Downgrade - nock to a version that doesn't depend on streams2 in core so that more of our - tests can pass in 0.8. ([@iarna](https://github.com/iarna)) - -#### A BUG FIX - -* [`eacac8f`](https://github.com/npm/npm/commit/eacac8f05014d15217c3d8264d0b00a72eafe2d2) - [#9965](https://github.com/npm/npm/issues/9965) Fix a corrupt `package.json` - file introduced by a merge conflict in - [`022691a`](https://github.com/npm/npm/commit/022691a). - ([@waynebloss](https://github.com/waynebloss)) - -#### A DEPENDENCY UPGRADE - -* [`ea7d8e0`](https://github.com/npm/npm/commit/ea7d8e00a67a3d5877ed72c9728909c848468a9b) - [npm/nopt#51](https://github.com/npm/nopt/pull/51) `nopt@3.0.6`: Allow - types checked to be validated by passed-in name in addition to the JS name of - the type / class. ([@wbecker](https://github.com/wbecker)) - -### v2.14.10 (2015-11-05): - -There's nothing in here that that isn't in the `npm@3.4.0` release notes, but -all of the commit shasums have been adjusted to be correct. Enjoy! - -#### BUG FIXES VIA DEPENDENCY UPDATES - -* [`204c558`](https://github.com/npm/npm/commit/204c558c06637a753c0b41d0cf19f564a1ac3715) - [#8640](https://github.com/npm/npm/issues/8640) - [npm/normalize-package-data#69](https://github.com/npm/normalize-package-data/pull/69) - `normalize-package-data@2.3.5`: Fix a bug where if you didn't specify the - name of a scoped module's binary, it would install it such that it was - impossible to call it. ([@iarna](https://github.com/iarna)) -* [`bbdf4ee`](https://github.com/npm/npm/commit/bbdf4ee0a3cd12be6a2ace255b67d573a72f1f8f) - [npm/fstream-npm#14](https://github.com/npm/fstream-npm/pull/14) - `fstream-npm@1.0.7`: Only filter `config.gypi` when it's in the build - directory. ([@mscdex](https://github.com/mscdex)) -* [`d82ff81`](https://github.com/npm/npm/commit/d82ff81403e906931fac701775723626dcb443b3) - [npm/fstream-npm#15](https://github.com/npm/fstream-npm/pull/15) - `fstream-npm@1.0.6`: Stop including directories that happened to have names - matching whitelisted npm files in npm module tarballs. The most common cause - was that if you had a README directory then everything in it would be - included if wanted it or not. ([@taion](https://github.com/taion)) - -#### DOCUMENTATION FIXES - -* [`16361d1`](https://github.com/npm/npm/commit/16361d122f2ff6d1a4729c66153b7c24c698fd19) - [#10036](https://github.com/npm/npm/pull/10036) Fix typo / over-abbreviation. - ([@ifdattic](https://github.com/ifdattic)) -* [`d1343dd`](https://github.com/npm/npm/commit/d1343dda42f113dc322f95687f5a8c7d71a97c35) - [#10176](https://github.com/npm/npm/pull/10176) Fix broken link, scopes => - scope. ([@ashleygwilliams](https://github.com/ashleygwilliams)) -* [`110663d`](https://github.com/npm/npm/commit/110663d000a3908a4853393d9abae481700cf4dc) - [#9460](https://github.com/npm/npm/issue/9460) Specifying the default command - run by "npm start" and the fact that you can pass it arguments. - ([@JuanCaicedo](https://github.com/JuanCaicedo)) - -#### DEPENDENCY UPDATES FOR THEIR OWN SAKE - -* [`7476d2d`](https://github.com/npm/npm/commit/7476d2d31552a41671c425aa7fcc2844e0381008) - [npm/npmlog#19](https://github.com/npm/npmlog/pull/19) - `npmlog@2.0.0`: Make it possible to emit log messages with `error` as the - prefix. - ([@bengl](https://github.com/bengl)) -* [`6ca7888`](https://github.com/npm/npm/commit/6ca7888862cfe8bf802dc7c66632c102acd94cf5) - `read-package-json@2.0.2`: Minor cleanups. - ([@KenanY](https://github.com/KenanY)) - -### v2.14.9 (2015-10-29): - -There's still life in `npm@2`, but for now, enjoy these dependency upgrades! -Also, [@othiym23](https://github.com/othiym23) says hi! _waves_ -[@zkat](https://github.com/zkat) has her hands full, and -[@iarna](https://github.com/iarna)'s handling `npm@3`, so I'm dealing with -`npm@2` and the totally nonexistent weird bridge `npm@1.4` LTS release that may -or may not be happening this week. - -#### CAN'T STOP WON'T STOP UPDATING THOSE DEPENDENCIES - -* [`f52f0cb`](https://github.com/npm/npm/commit/f52f0cb51526314197e9d67619feebbd82a397b7) - [#10150](https://github.com/npm/npm/issues/10150) `chmodr@1.0.2`: Use - `fs.lstat()` to check if an entry is a directory, making `chmodr()` work - properly with NFS mounts on Windows. ([@sheerun](https://github.com/sheerun)) -* [`f7011d7`](https://github.com/npm/npm/commit/f7011d7b3b1d9148a6cd8f7b8359d6fe3269a912) - [#10150](https://github.com/npm/npm/issues/10150) `which@1.2.0`: Additional - command-line parameters, which is nice but not used by npm. - ([@isaacs](https://github.com/isaacs)) -* [`ebcc0d8`](https://github.com/npm/npm/commit/ebcc0d8629388da0b849bbbad590382cd7268f51) - [#10150](https://github.com/npm/npm/issues/10150) `minimatch@3.0.0`: Don't - package browser version. ([@isaacs](https://github.com/isaacs)) -* [`8c98dce`](https://github.com/npm/npm/commit/8c98dce5ffe242bafbe92b849e73e8de1803e256) - [#10150](https://github.com/npm/npm/issues/10150) `fstream-ignore@1.0.3`: - Upgrade to use `minimatch@3` (for deduping purposes). - ([@othiym23](https://github.com/othiym23)) -* [`db9ef33`](https://github.com/npm/npm/commit/db9ef337c253ecf21c921055bf8742e10d1cb3bb) - [#10150](https://github.com/npm/npm/issues/10150) `request@2.65.0`: - Dependency upgrades and a few bug fixes, mostly related to cookie handling. - ([@simov](https://github.com/simov)) - -#### DEVDEPENDENCIES TOO, I GUESS, IT'S COOL - -* [`dfbf621`](https://github.com/npm/npm/commit/dfbf621afa09c46991249b4f9a995d1823ea7ede) - [#10150](https://github.com/npm/npm/issues/10150) `tap@2.2.0`: Better - handling of test order handling (including some test fixes for npm). - ([@isaacs](https://github.com/isaacs)) -* [`cf5ad5a`](https://github.com/npm/npm/commit/cf5ad5a8c88bfd72e30ef8a8d1d3c5508e0b3c23) - [#10150](https://github.com/npm/npm/issues/10150) `nock@2.16.0`: More - expectations, documentation, and bug fixes. - ([@pgte](https://github.com/pgte)) - -### v2.14.8 (2015-10-08): - -#### SLOWLY RECOVERING FROM FEELINGS - -OS&F is definitely my favorite convention I've gone to. Y'all should check it -out next year! Rebecca and Kat are back, although Forrest is out at -[&yet conf](http://andyetconf.com/). - -This week sees another tiny LTS release with non-code-related patches -- just -CI/release things. - -Meanwhile, have you heard? `npm@3` is much faster now! Go upgrade with `npm -install -g npm@latest` and give it a whirl if you haven't already! - -#### IF YOU CHANGE CASING ON A FILE, YOU ARE NOT MY FRIEND - -Seriously. I love me some case-sensitive filesystems, but a lot of us have to -deal with `git` and its funky support for case normalizing systems. Have mercy -and just don't bother if all you're changing is casing, please? Otherwise, I -have to do this little dance to prevent horrible conflicts. - -* [`c3a7b61`](https://github.com/npm/npm/commit/c3a7b619786650a45653c8b55b8741fc7bb5cfda) - [#9804](https://github.com/npm/npm/pulls/9804) Remove the readme file with - weird casing. - ([@zkat](https://github.com/zkat)) -* [`f3f619e`](https://github.com/npm/npm/commit/f3f619e06e4be1378dbf286f897b50e9c69c9557) - [#9804](https://github.com/npm/npm/pulls/9804) Add the readme file back in, - with desired casing. - ([@zkat](https://github.com/zkat)) - -#### IDK. OUR CI DOESN'T EVEN FULLY WORK YET BUT SURE - -Either way, it's nice to make sure we're running stuff on the latest Node. `4.2` -is getting released very soon, though (this week?), and that'll be the first -official LTS release! - -* [`bd0b9ab`](https://github.com/npm/npm/commit/bd0b9ab6e60a31448794bbd88f94672572c3cb55) - [#9827](https://github.com/npm/npm/pulls/9827) Add node `4.0` and `4.1` to - TravisCI - ([@JaKXz](https://github.com/JaKXz)) - -### v2.14.7 (2015-10-01): - -#### MORE RELEASE STAGGERING?! - -Hi all, and greetings from [Open Source & Feelings](http://osfeels.com)! - -So we're switching gears a little with how we handle our weekly releases: from -now on, we're going to stagger release weeks between dependency bumps and -regular patches. So, this week, aside from a doc change, we'll be doing only -version bumps. Expect actual patches next week! - -#### TOTALLY FOLLOWING THE RULES ALREADY - -So I snuck this in, because it's our own [@snopeks](https://github.com/snopeks)' -first contribution to the main `npm` repo. She's been helping with building -support documents for Orgs, and contributed her general intro guide to the new -feature so you can read it with `npm help orgs` right in your terminal! - -* [`8324ea0`](https://github.com/npm/npm/commit/8324ea023ace4e08b6b8959ad199e2457af9f9cf) - [#9761](https://github.com/npm/npm/pull/9761) Added general user guide for - Orgs. - ([@snopeks](https://github.com/snopeks)) - -#### JUST. ONE. MORE. - -* [`9a502ca`](https://github.com/npm/npm/commit/9a502ca96e2d43ec75a8f684c9ca33af7e910f0a) - Use unique package name in tests to work around weird test-state-based - failures. - ([@iarna](https://github.com/iarna)) - -#### OKAY ACTUALLY THE THING I WAS SUPPOSED TO DO - -Anyway -- here's your version bump! :) - -* [`4aeb94c`](https://github.com/npm/npm/commit/4aeb94c9f0df3f41802cf2e0397a998f3b527c25) - `request@2.64.0`: No longer defaulting to `application/json` for `json` - requests. Also some minor doc and packaging patches. - ([@simov](https://github.com/simov)) - `minimatch@3.0.0`: No longer packaging browser modules. - ([@isaacs](https://github.com/isaacs)) -* [`a18b213`](https://github.com/npm/npm/commit/a18b213e6945a8f5faf882927829ac95f844e2aa) - `glob@5.0.15`: Upgraded `minimatch` dependency. - ([@isaacs](https://github.com/isaacs)) -* [`9eb64d4`](https://github.com/npm/npm/commit/9eb64e44509519ca9d788502edb2eba4cea5c86b) - `nock@2.13.0` - ([@pgte](https://github.com/pgte)) - -### v2.14.6 (2015-09-24): - -#### `¯\_(ツ)_/¯` - -Since `2.x` is LTS now, you can expect a slowdown in overall release sizes. On -top of that, we had our all-company-npm-internal-conf thing on Monday and -Tuesday so there wasn't really time to do much at all. - -Still, we're bringing you a couple of tiny little changes this week! - -* [`7b7da13`](https://github.com/npm/npm/commit/7b7da13c6cdf5eae53c20d5c69afc4c16e6f715d) - [#9471](https://github.com/npm/npm/pull/9471) When the port for a tarball is - different than the registry it's in, but the hostname is the same, the - protocol is now allowed to change, too. - ([@fastest963](https://github.com/fastest963)) -* [`6643ada`](https://github.com/npm/npm/commit/6643adaf9f37f08893e3ad28b797c55a36b2a152) - `request@2.63.0`: Use `application/json` as the default content type when - making `json` requests. - ([@simov](https://github.com/simov)) - -### v2.14.5 (2015-09-17): - -#### NPM IS DEAD. LONG LIVE NPM - -That's right folks. As of this week, `npm@next` is `npm@3`, which means it'll be -`npm@latest` next week! There's some really great shiny new things over there, -and you should really take a look. - -Many kudos to [@iarna](https://github.com/iarna) for her hard work on `npm@3`! - -Don't worry, we'll keep `2.x` around for a while (as LTS), but you won't see -many, if any, new features on this end. From now on, we're going to use -`latest-2` and `next-2` as the dist tags for the `npm@2` branch. - -#### OKAY THAT'S FINE CAN I DEPRECATE THINGS NOW? - -Yes! Specially if you're using scoped packages. Apparently, deprecating them -never worked, but that should be better now. :) - -* [`eca7b24`](https://github.com/npm/npm/commit/eca7b24de9a0090da02a93a69726f5e70ab80543) - [#9558](https://github.com/npm/npm/issues/9558) Add tests for npm deprecate. - ([@zkat](https://github.com/zkat)) -* [`648fe16`](https://github.com/npm/npm/commit/648fe16157ef0db22395ae056d1dd4b4c1605bf4) - [#9558](https://github.com/npm/npm/issues/9558) `npm-registry-client@7.0.7`: - Fixes `npm deprecate` so you can actually deprecate scoped modules now (it - never worked). - ([@zkat](https://github.com/zkat)) - -#### WTF IS `node-waf` - -idk. Some old thing. We don't talk about it anymore. - -* [`cf1b39f`](https://github.com/npm/npm/commit/cf1b39fc95a9ffad7fba4c2fee705c53b19d1d16) - [#9584](https://github.com/npm/npm/issues/9584) Fix ancient references to - `node-waf` in the docs to refer to the `node-gyp` version of things. - ([@KenanY](https://github.com/KenanY)) - -#### THE `graceful-fs` AND `node-gyp` SAGA CONTINUES - -Last week had some sweeping `graceful-fs` upgrades, and this takes care of one -of the stragglers, as well as bumping `node-gyp`. `node@4` users might be -excited about this, or even `node@<4` users who previously had to cherry-pick a -bunch of patches to get the latest npm working. - -* [`e07354f`](https://github.com/npm/npm/commit/e07354f3ff3a6be568fe950f1f825897f72912d8) - `sha@2.0.1`: Upgraded graceful-fs! - ([@ForbesLindesay](https://github.com/ForbesLindesay)) -* [`83cb6ee`](https://github.com/npm/npm/commit/83cb6ee4045b85e565e9678ca1878877e1dc75bd) - `node-gyp@3.0.3` - ([@rvagg](https://github.com/rvagg)) - -#### DEPS! DEPS! MORE DEPS! OK STOP DEPS - -* [`0d60888`](https://github.com/npm/npm/commit/0d608889615a1cb63f5f852337e955053f201aeb) - `normalize-package-data@2.3.4`: Use an external package to check for built-in - node modules. - ([@sindresorhus](https://github.com/sindresorhus)) -* [`79b4dac`](https://github.com/npm/npm/commit/79b4dac11f1c2d8ad5489fc3104734e1c10d4793) - `retry@0.8.0` - ([@tim-kos](https://github.com/tim-kos)) -* [`c164941`](https://github.com/npm/npm/commit/c164941d3c792904d5b126a4fd36eefbe0699f52) - `request@2.62.0`: node 4 added to build targets. Option initialization issues - fixed. - ([@simov](https://github.com/simov)) -* [`0fd878a`](https://github.com/npm/npm/commit/0fd878a44d5ae303325808d1f00df4dce7549d50) - `lru-cache@2.7.0`: Cache serialization support and fixes a cache length bug. - ([@isaacs](https://github.com/isaacs)) -* [`6a7a114`](https://github.com/npm/npm/commit/6a7a114a45b4699995d6e09164fdfd0fa1274591) - `nock@2.12.0` - ([@pgte](https://github.com/pgte)) -* [`6b25e6d`](https://github.com/npm/npm/commit/6b25e6d2235c11f4444104db4545cb42a0267666) - `semver@5.0.3`: Removed uglify-js dead code. - ([@isaacs](https://github.com/isaacs)) - -### v2.14.4 (2015-09-10): - -#### THE GREAT NODEv4 SAGA - -So [Node 4 is out now](https://nodejs.org/en/blog/release/v4.0.0/) and that's -going to involve a number of things over in npm land. Most importantly, it's the -last major release that will include the `2.x` branch of npm. That also means -that `2.x` is going to go into LTS mode in the coming weeks -- once `npm@3` -becomes our official `latest` release. You can most likely expect Node 5 to -include `npm@3` by default, whenever that happens. We'll go into more detail -about LTS at that point, as well, so keep your eyes peeled for announcements! - -#### NODE IS DEAD. LONG LIVE NODE! - -Node 4 being released means that a few things that used to be floating patches -are finally making it right into npm proper. This week, we've got two such -updates, both to dependencies: - -* [`505d9e4`](https://github.com/npm/npm/commit/505d9e40c13b8b0bb3f70ee9886f7b73ba569407) - `node-gyp@3.0.1`: Support for node nightlies and compilation for both node and - io.js without extra patching - ([@rvagg](https://github.com/rvagg)) - -[@thefourtheye](https://github.com/thefourtheye) was kind enough to submit a -*bunch* of PRs to npm's dependencies updating them to `graceful-fs@4.1.2`, which -mainly makes it so we're no longer monkey-patching `fs`. The following are all -updates related to this: - -* [`10cb189`](https://github.com/npm/npm/commit/10cb189c773fef804214018d57509cc7a943184b) - `write-file-atomic@1.1.3` - ([@thefourtheye](https://github.com/thefourtheye)) -* [`edfb80b`](https://github.com/npm/npm/commit/edfb80b39f8cfce9a993f139eb98248001198e09) - `tar@2.2.1` - ([@thefourtheye](https://github.com/thefourtheye)) -* [`aa6e1ee`](https://github.com/npm/npm/commit/aa6e1eede7d71fa69d7256afdfbaa3406bc39a5b) - `read-package-json@2.0.1` - ([@thefourtheye](https://github.com/thefourtheye)) -* [`18971a3`](https://github.com/npm/npm/commit/18971a361635ed3958ecd39b63930ae1e56f8612) - `read-installed@4.0.3` - ([@thefourtheye](https://github.com/thefourtheye)) -* [`a4cba71`](https://github.com/npm/npm/commit/a4cba71bd2532236fda7385bf55e8790cafd4f0a) - `fstream@1.0.8` - ([@thefourtheye](https://github.com/thefourtheye)) -* [`70a38e2`](https://github.com/npm/npm/commit/70a38e29418951ac61ab6cf269d188074fe8ac3a) - `fs-write-stream-atomic@1.0.4` - ([@thefourtheye](https://github.com/thefourtheye)) -* [`9cbd20f`](https://github.com/npm/npm/commit/9cbd20f691e37960e4ba12d401abd1069657cb47) - `fs-vacuum@1.2.7` - ([@thefourtheye](https://github.com/thefourtheye)) - -#### OTHER PATCHES - -* [`c4dd521`](https://github.com/npm/npm/commit/c4dd5213b2f3283ea0392845e5f78cac4573529e) - [#9506](https://github.com/npm/npm/issues/9506) Make `npm link` work on - Windows when using node pre-release/RC releases. - ([@jon-hall](https://github.com/jon-hall)) -* [`b6bc29c`](https://github.com/npm/npm/commit/b6bc29c1401b3d6b570c09cbef1866bdb0436b59) - [#9544](https://github.com/npm/npm/issues/9549) `process.binding` is being - deprecated, so our only direct usage has been removed. - ([@ChALkeR](https://github.com/ChALkeR)) - -#### MORE DEPENDENCIES! - -* [`d940594`](https://github.com/npm/npm/commit/d940594e479a7f012b6dd6952e8ef985ba2a6216) - `tap@1.4.1` - ([@isaacs](https://github.com/isaacs)) -* [`ee38486`](https://github.com/npm/npm/commit/ee3848669331fd98879a3175789d963543f67ce3) - `which@1.1.2`: Added tests for Windows-related dead code that was previously - helping a silent failure happen. Travis stuff, too. - ([@isaacs](https://github.com/isaacs)) - -#### DOC UPDATES - -* [`475daf5`](https://github.com/npm/npm/commit/475daf54ad07777938d1d7ee1a3e576961e84510) - [#9492](https://github.com/npm/npm/issues/9492) Clarify how `.npmignore` and - `.gitignore` are found and used by npm. - ([@addaleax](https://github.com/addaleax)) -* [`b2c391d`](https://github.com/npm/npm/commit/b2c391d7833249626a6d7650363a83bcc778717a) - `nopt@3.0.4`: Minor clarifications to docs about how array and errors work. - ([@zkat](https://github.com/zkat)) - -### v2.14.3 (2015-09-03): - -#### TEAMS AND ORGS STILL BETA. CLI CODE STILL SOLID. - -Our closed beta for Teens and Orcs is happening! The web team is hard at work -making sure everything looks pretty and usable and such. Once we fix things -stemming from that beta, you can expect the feature to be available publicly. -Some time after that, it'll even be available for free for FOSS orgs. It'll Be -Done When It's Done™. - -#### OH GOOD, I CAN ACTUALLY UPSTREAM NOW - -Looks like last week's release foiled our own test suite when trying to upstream -it to Node! Just a friendly reminder that no, `.npmrc` is no longer included -then you pack/release a package! [@othiym23](https://github.com/othiym23) and -[@isaacs](https://github.com/isaacs) managed to suss the really strange test -failures resulting from that, and we've patched it in this release. - -* [`01a3428`](https://github.com/npm/npm/commit/01a3428534b754dca89a56fd1e49f55cb22f6f25) - [#9476](https://github.com/npm/npm/issues/9476) test: Recreate missing - `.npmrc` files when missing so downstream packagers can run tests on packed - npm. - ([@othiym23](https://github.com/othiym23)) - -#### TALKING ABOUT THE CHANGELOG IN THE CHANGELOG IS LIKE, POMO OR SOMETHING - -* [`c1e7a83`](https://github.com/npm/npm/commit/c1e7a83c0ae7aadf01aecc57cf8a0ae2009d4da8) - [#9431](https://github.com/npm/npm/issues/9431) CHANGELOG: clarify - windows-related nature of patch - ([@saper](https://github.com/saper)) - -#### devDependencies UPDATED - -No actual dep updates this week, but we're bumping a couple of devDeps: - -* [`8454835`](https://github.com/npm/npm/commit/84548351bfd63e3e305d195abbcad24c6b7c3e8e) - `tap@1.4.0`: Add `t.contains()` as alias to `t.match()` - ([@isaacs](https://github.com/isaacs)) -* [`13d2216`](https://github.com/npm/npm/commit/13d22161bcdeb6e1ed095d5ba2f77e6abfffa5eb) - `deep-equal@1.0.1`: Make `null == undefined` in non-strict mode - ([@isaacs](https://github.com/isaacs)) - -### v2.14.2 (2015-08-27): - -#### GETTING THAT PESKY `preferGlobal` WARNING RIGHT - -So apparently the `preferGlobal` option hasn't quite been warning correctly for -some time. But now it should be all better! tl;dr: if you try and install a -dependency with `preferGlobal: true`, and it's _not already_ in your -`package.json`, you'll get a warning that the author would really rather you -install it with `--global`. This should prevent Windows PowerShell from thinking -npm has failed just because of a benign warning. - -* [`bbb25f3`](https://github.com/npm/npm/commit/bbb25f30d582f8979168c79233a9f8f840974f90) - [#8841](https://github.com/npm/npm/issues/8841) - [#9409](https://github.com/npm/npm/issues/9409) The `preferGlobal` - warning shouldn't happen if the dependency being installed is listed in - `devDependencies`. ([@saper](https://github.com/saper)) -* [`222fcec`](https://github.com/npm/npm/commit/222fcec85ccd30d35899e5037079fb14625af4e2) - [#9409](https://github.com/npm/npm/issues/9409) `preferGlobal` now prints a - warning when there are no dependencies for the current package. - ([@zkat](https://github.com/zkat)) -* [`5cfed6d`](https://github.com/npm/npm/commit/5cfed6d7a1a5f2731688cfc8293b5e43a6355393) - [#9409](https://github.com/npm/npm/issues/9409) Verify that - `preferGlobal` is warning as expected (when a `preferGlobal` dependency is - installed, but isn't listed in either `dependencies` or `devDependencies`). - ([@zkat](https://github.com/zkat)) - -#### BUMP +1 - -* [`eeafce2`](https://github.com/npm/npm/commit/eeafce2d06883c0f51bf403415b6bc5f2647eba3) - `validate-npm-package-license@3.0.1`: Include additional metadata in parsed license object, - useful for license checkers. ([@kemitchell](https://github.com/kemitchell)) -* [`1502a28`](https://github.com/npm/npm/commit/1502a285f84aa548806b3eafc8889e6288e810f3) - `normalise-package-data@2.3.2`: Updated to use `validate-npm-package-license@3.0.1`. - ([@othiym23](https://github.com/othiym23)) -* [`cbde823`](https://github.com/npm/npm/commit/cbde8233436bf0ea62a4740869b4990322c20659) - `init-package-json@1.9.1`: Add a `silent` option to suppress output on writing the - generated `package.json`. Also, updated to use `validate-npm-package-license@3.0.1`. - ([@zkat](https://github.com/zkat)) -* [`08fda46`](https://github.com/npm/npm/commit/08fda465452b4d77f1ced8050ee3a35a77fc30a5) - `tar@2.2.0`: Minor improvements. ([@othiym23](https://github.com/othiym23)) -* [`dc2f20b`](https://github.com/npm/npm/commit/dc2f20b53fff77203139c863b48da0e959df2ac9) - `rimraf@2.4.3`: `EPERM` now triggers a delay / retry loop (since Windows throws - this when things still hold a handle). ([@isaacs](https://github.com/isaacs)) -* [`e8acb27`](https://github.com/npm/npm/commit/e8acb273aa67ee0394d0431650e1b2a7d09c8554) - `read@1.0.7`: Fix licensing ambiguity. ([@isaacs](https://github.com/isaacs)) - -#### OTHER STUFF THAT'S RELEVANT - -* [`73a1ee0`](https://github.com/npm/npm/commit/73a1ee0be90fa1928521b63f28bef83b8ffab61d) - [#9386](https://github.com/npm/npm/issues/9386) Include additional unignorable files in - documentation. - ([@mjhasbach](https://github.com/mjhasbach)) -* [`0313e40`](https://github.com/npm/npm/commit/0313e40ee0f757fce8861be590ad668c23d7be53) - [#9396](https://github.com/npm/npm/issues/9396) Improve the `EISDIR` error - message returned by npm's error-handling code to give users a better hint of - what's most likely going on. Usually, error reports with this error code are - about people trying to install things without a `package.json`. - ([@KenanY](https://github.com/KenanY)) -* [`2677457`](https://github.com/npm/npm/commit/26774579c739c5951351e58263cf4d6ea3d66ec8) - [#9360](https://github.com/npm/npm/issues/9360) Make it easier to run - only _some_ of npm tests with lifecycle scripts via `npm tap test/tap/testname.js`. - ([@iarna](https://github.com/iarna)) - -### v2.14.1 (2015-08-20): - -#### SECURITY FIX - -There are patches for two information leaks of moderate severity in `npm@2.14.1`: - -1. In some cases, npm was leaking sensitive credential information into the - child environment when running package and lifecycle scripts. This could - lead to packages being published with files (most notably `config.gypi`, a - file created by `node-gyp` that is a cache of environmental information - regenerated on every run) containing the bearer tokens used to authenticate - users to the registry. Users with affected packages have been notified (and - the affected tokens invalidated), and now npm has been modified to not - upload files that could contain this information, as well as scrubbing the - sensitive information out of the environment passed to child scripts. -2. Per-package `.npmrc` files are used by some maintainers as a way to scope - those packages to a specific registry and its credentials. This is a - reasonable use case, but by default `.npmrc` was packed into packages, - leaking those credentials. npm will no longer include `.npmrc` when packing - tarballs. - -If you maintain packages and believe you may be affected by either -of the above scenarios (especially if you've received a security -notification from npm recently), please upgrade to `npm@2.14.1` as -soon as possible. If you believe you may have inadvertently leaked -your credentials, upgrade to `npm@2.14.1` on the affected machine, -and run `npm logout` and then `npm login`. Your access tokens will be -invalidated, which will eliminate any risk posed by tokens inadvertently -included in published packages. We apologize for the inconvenience this -causes, as well as the oversight that led to the existence of this issue -in the first place. - -Huge thanks to [@ChALkeR](https://github.com/ChALkeR) for bringing these -issues to our attention, and for helping us identify affected packages -and maintainers. Thanks also to the Node.js security working group for -their coördination with the team in our response to this issue. We -appreciate everybody's patience and understanding tremendously. - -* [`b9474a8`](https://github.com/npm/npm/commit/b9474a843ca55b7c5fac6da33989e8eb39aff8b1) - `fstream-npm@1.0.5`: Stop publishing build cruft (`config.gypi`) and per-project - `.npmrc` files to keep local configuration out of published packages. - ([@othiym23](https://github.com/othiym23)) -* [`13c286d`](https://github.com/npm/npm/commit/13c286dbdc3fa8fec4cb79fc4d1ee505c8a41b2e) - [#9348](https://github.com/npm/npm/issues/9348) Filter "private" - (underscore-prefixed, even when scoped to a registry) configuration values - out of child environments. ([@othiym23](https://github.com/othiym23)) - -#### BETTER WINDOWS INTEGRATION, ONE STEP AT A TIME - -* [`e40e71f`](https://github.com/npm/npm/commit/e40e71f2f838a8a42392f44e3eeec04e323ab743) - [#6412](https://github.com/npm/npm/issues/6412) Improve the search strategy - used by the npm shims for Windows to prioritize your own local npm installs. - npm has really needed this tweak for a long time, so hammer on it and let us - know if you run into issues, but with luck it will Just Work. - ([@joaocgreis](https://github.com/joaocgreis)) -* [`204ebbb`](https://github.com/npm/npm/commit/204ebbb3e0cab696a429a878ceeb4a7e78ec2b94) - [#8751](https://github.com/npm/npm/issues/8751) - [#7333](https://github.com/npm/npm/issues/7333) Keep [autorun - scripts](https://technet.microsoft.com/en-us/sysinternals/bb963902.aspx) from - interfering with npm package and lifecycle script execution on Windows by - adding `/d` and `/s` when invoking `cmd.exe`. - ([@saper](https://github.com/saper)) - -#### IT SEEMED LIKE AN IDEA AT THE TIME - -* [`286f3d9`](https://github.com/npm/npm/commit/286f3d97103812f0fd84b70352addbe899e258f9) - [#9201](https://github.com/npm/npm/pull/9201) For a while npm was building - HTML partials for use on [`docs.npmjs.com`](https://docs.npmjs.com), but we - weren't actually using them. Stop building them, which makes running the full - test suite and installation process around a third faster. - ([@isaacs](https://github.com/isaacs)) - -#### A SINGLE LONELY DEPENDENCY UPGRADE - -* [`b343b95`](https://github.com/npm/npm/commit/b343b956ef777e321e4251ddc96ec6d80827d9e2) - `request@2.61.0`: Bug fixes and keep-alive tweaks. - ([@simov](https://github.com/simov)) - -### v2.14.0 (2015-08-13): - -#### IT'S HERE! KINDA! - -This release adds support for teens and orcs (err, teams and organizations) to -the npm CLI! Note that the web site and registry-side features of this are -still not ready for public consumption. - -A beta should be starting in the next couple of weeks, and the features -themselves will become public once all that's done. Keep an eye out for more -news! - -All of these changes were done under [`#9011`](https://github.com/npm/npm/pull/9011): - -* [`6424170`](https://github.com/npm/npm/commit/6424170fc17c666a6efc090370ec691e0cab1792) - Added new `npm team` command and subcommands. - ([@zkat](https://github.com/zkat)) -* [`52220d1`](https://github.com/npm/npm/commit/52220d146d474ec29b683bd99c06f75cbd46a9f4) - Added documentation for new `npm team` command. - ([@zkat](https://github.com/zkat)) -* [`4e66830`](https://github.com/npm/npm/commit/4e668304850d02df8eb27a779fda76fe5de645e7) - Updated `npm access` to support teams and organizations. - ([@zkat](https://github.com/zkat)) -* [`ea3eb87`](https://github.com/npm/npm/commit/ea3eb8733d9fa09ce34106b1b19fb1a8f95844a5) - Gussied up docs for `npm access` with new commands. - ([@zkat](https://github.com/zkat)) -* [`6e0b431`](https://github.com/npm/npm/commit/6e0b431c1de5e329c86e57d097aa88ebfedea864) - Fix up `npm whoami` to make the underlying API usable elsewhere. - ([@zkat](https://github.com/zkat)) -* [`f29c931`](https://github.com/npm/npm/commit/f29c931012ce5ccd69c29d83548f27e443bf7e62) - `npm-registry-client@7.0.1`: Upgrade `npm-registry-client` API to support - `team` and `access` calls against the registry. - ([@zkat](https://github.com/zkat)) - -#### A FEW EXTRA VERSION BUMPS - -* [`c977e12`](https://github.com/npm/npm/commit/c977e12cbfa50c2f52fc807f5cc19ba1cc1b39bf) - `init-package-json@1.8.0`: Checks for some `npm@3` metadata. - ([@iarna](https://github.com/iarna)) -* [`5c8c9e5`](https://github.com/npm/npm/commit/5c8c9e5ae177ba7d0d298cfa42f3fc7f0271e4ec) - `columnify@1.5.2`: Updated some dependencies. - ([@timoxley](https://github.com/timoxley)) -* [`5d56742`](https://github.com/npm/npm/commit/5d567425768b75aeab402c817a53d8b2bc60d8de) - `chownr@1.0.1`: Tests, docs, and minor style nits. - ([@isaacs](https://github.com/isaacs)) - -#### ALSO A DOC FIX - -* [`846fcc7`](https://github.com/npm/npm/commit/846fcc79b86984b109a97366b0422f995a45f8bf) - [`#9200`](https://github.com/npm/npm/pull/9200) Remove single quotes - around semver range, thus making it valid semver. - ([@KenanY](https://github.com/KenanY)) - -### v2.13.5 (2015-08-07): - -This is another quiet week for the `npm@2` release. -[@zkat](https://github.com/zkat) has been working hard on polishing the CLI -bits of the registry's new feature to support direct management of teams and -organizations, and [@iarna](https://github.com/iarna) continues to work through -the list of issues blocking the general release of `npm@3`, which is looking -more and more solid all the time. - -[@othiym23](https://github.com/othiym23) and [@zkat](https://github.com/zkat) -have also been at this week's Node.js / io.js [collaborator -summit](https://github.com/nodejs/summit/tree/master), both as facilitators and -participants. This is a valuable opportunity to get some face time with other -contributors and to work through a bunch of important discussions, but it does -leave us feeling kind of sleepy. Running meetings is hard! - -What does that leave for this release? A few of the more tricky bug fixes that -have been sitting around for a little while now, and a couple dependency -upgrades. Nothing too fancy, but most of these were contributed by developers -like _you_, which we think is swell. Thanks! - -#### BUG FIXES - -* [`d7271b8`](https://github.com/npm/npm/commit/d7271b8226712479cdd339bf85faf7e394923e0d) - [#4530](https://github.com/npm/npm/issues/4530) The bash completion script - for npm no longer alters global completion behavior around word breaks. - ([@whitty](https://github.com/whitty)) -* [`c9ce294`](https://github.com/npm/npm/commit/c9ce29415a0a8fc610690b6e9d91b64d6e36cfcc) - [#7198](https://github.com/npm/npm/issues/7198) When setting up dependencies - to be shared via `npm link <package>`, only run the lifecycle scripts during - the original link, not when running `npm link <package>` or `npm install - --link` against them. ([@murgatroid99](https://github.com/murgatroid99)) -* [`422da66`](https://github.com/npm/npm/commit/422da664bd3ce71313da447f170507faf5aac46a) - [#9108](https://github.com/npm/npm/issues/9108) Clear up minor confusion - around wording in `bundledDependencies` section of `package.json` docs. - ([@derekpeterson](https://github.com/derekpeterson)) -* [`6b42d99`](https://github.com/npm/npm/commit/6b42d99460885e715772d3487b1c548d2bc8a738) - [#9146](https://github.com/npm/npm/issues/9146) Include scripts that run for - `preversion`, `version`, and `postversion` in the section for lifecycle - scripts rather than the generic `npm run-script` output. - ([@othiym23](https://github.com/othiym23)) - -#### NOPE, NOT DONE WITH DEPENDENCY UPDATES - -* [`91a48bb`](https://github.com/npm/npm/commit/91a48bb5ef5a990781c86f8b69b8a32cf4fac2d9) - `chmodr@1.0.1`: Ignore symbolic links when recursively changing mode, just - like the Unix command. ([@isaacs](https://github.com/isaacs)) -* [`4bbc86e`](https://github.com/npm/npm/commit/4bbc86e3825e2eee9a8758ba26bdea0cb6a2581e) - `nock@2.10.0` ([@pgte](https://github.com/pgte)) - -### v2.13.4 (2015-07-30): - -#### JULY ENDS ON A FAIRLY QUIET NOTE - -Hey everyone! I hope you've had a great week. We're having a fairly small -release this week while we wrap up Teams and Orgs (or, as we've taken to calling -it internally, _Teens and Orcs_). - -In other exciting news, a bunch of us are gonna be at the [Node.js Collaborator -Summit](https://github.com/nodejs/summit/issues/1), and you can also find us at -[wafflejs](https://wafflejs.com/) on Wednesday. Hopefully we'll be seeing some -of you there. :) - -#### THE PATCH!!! - -So here it is. The patch. Hope it helps. (Thanks, -[@ktarplee](https://github.com/ktarplee)!) - -* [`2e58c48`](https://github.com/npm/npm/commit/2e58c4819e3cafe4ae23ab7f4a520fe09258cfd7) - [#9033](https://github.com/npm/npm/pull/9033) `npm version` now works on git - submodules - ([@ktarplee](https://github.com/ktarplee)) - -#### OH AND THERE'S A DEV DEPENDENCIES UPDATE - -Hooray. - -* [`d204683`](https://github.com/npm/npm/commit/d2046839d471322e61e3ceb0f00e78e5c481f967) - `nock@2.9.1` - ([@pgte](https://github.com/pgte)) - -### v2.13.3 (2015-07-23): - -#### I'M SAVING THE GOOD JOKES FOR MORE INTERESTING RELEASES - -It's pretty hard to outdo last week's release buuuuut~ I promise I'll have a -treat when we release our shiny new **Teams and Organizations** feature! :D -(Coming Soon™). It'll be a real *gem*. - -That means it's a pretty low-key release this week. We got some nice -documentation tweaks, a few bugfixes, and other such things, though! - -Oh, and a _bunch of version bumps_. Thanks, `semver`! - -#### IT'S THE LITTLE THINGS THAT MATTER - -* [`2fac6ae`](https://github.com/npm/npm/commit/2fac6aeffefba2934c3db395b525d931599c34d8) - [#9012](https://github.com/npm/npm/issues/9012) A convenience for releases -- - using the globally-installed npm before now was causing minor annoyances, so - we just use the exact same npm we're releasing to build the new release. - ([@zkat](https://github.com/zkat)) - -#### WHAT DOES THIS BUTTON DO? - -There's a couple of doc updates! The last one might be interesting. - -* [`4cd3205`](https://github.com/npm/npm/commit/4cd32050c0f89b7f1ae486354fa2c35eea302ba5) - [#9002](https://github.com/npm/npm/issues/9002) Updated docs to list the - various files that npm automatically includes and excludes, regardless of - settings. - ([@SimenB](https://github.com/SimenB)) -* [`cf09e75`](https://github.com/npm/npm/commit/cf09e754931739af32647d667b671e72a4c79081) - [#9022](https://github.com/npm/npm/issues/9022) Document the `"access"` field - in `"publishConfig"`. Did you know you don't need to use `--access=public` - when publishing scoped packages?! Just put it in your `package.json`! - Go refresh yourself on scopes packages by [checking our docs](https://docs.npmjs.com/getting-started/scoped-packages) on them. - ([@boennemann](https://github.com/boennemann)) -* [`bfd73da`](https://github.com/npm/npm/commit/bfd73da33349cc2afb8278953b2ae16ea95023de) - [#9013](https://github.com/npm/npm/issues/9013) fixed typo in changelog - ([@radarhere](https://github.com/radarhere)) - -#### THE SEMVER MAJOR VERSION APOCALYPSE IS UPON US - -Basically, `semver` is up to `@5`, and that meant we needed to go in an update a -bunch of our dependencies manually. `node-gyp` is still pending update, since -it's not ours, though! - -* [`9232e58`](https://github.com/npm/npm/commit/9232e58d54c032c23716ef976023d36a42bfdcc9) - [#8972](https://github.com/npm/npm/issues/8972) `init-package-json@1.7.1` - ([@othiym23](https://github.com/othiym23)) -* [`ba44f6b`](https://github.com/npm/npm/commit/ba44f6b4201a4faee025341b123e372d8f45b6d9) - [#8972](https://github.com/npm/npm/issues/8972) `normalize-package-data@2.3.1` - ([@othiym23](https://github.com/othiym23)) -* [`3901d3c`](https://github.com/npm/npm/commit/3901d3cf191880bb4420b1d6b8aedbcd8fc26cdf) - [#8972](https://github.com/npm/npm/issues/8972) `npm-install-checks@1.0.6` - ([@othiym23](https://github.com/othiym23)) -* [`ffcc7dd`](https://github.com/npm/npm/commit/ffcc7dd12f8bb94ff0f64c465c57e460b3f24a24) - [#8972](https://github.com/npm/npm/issues/8972) `npm-package-arg@4.0.2` - ([@othiym23](https://github.com/othiym23)) -* [`7128f9e`](https://github.com/npm/npm/commit/7128f9ec10c0c8482087511b716dbddb54249626) - [#8972](https://github.com/npm/npm/issues/8972) `npm-registry-client@6.5.1` - ([@othiym23](https://github.com/othiym23)) -* [`af28911`](https://github.com/npm/npm/commit/af28911ecd54a844f848c6ae41887097d6aa2f3b) - [#8972](https://github.com/npm/npm/issues/8972) `read-installed@4.0.2` - ([@othiym23](https://github.com/othiym23)) -* [`3cc817a`](https://github.com/npm/npm/commit/3cc817a0f34f698b580ff6ff02308700efc54f7c) - [#8972](https://github.com/npm/npm/issues/8972) node-gyp needs its own version - of semver - ([@othiym23](https://github.com/othiym23)) -* [`f98eccc`](https://github.com/npm/npm/commit/f98eccc6e3a6699ca0aa9ecbad93a3b995583871) - [#8972](https://github.com/npm/npm/issues/8972) `semver@5.0.1`: Stop including - browser builds. - ([@isaacs](https://github.com/isaacs)) - -#### \*BUMP\* - -And some other version bumps for good measure. - -* [`254ecfb`](https://github.com/npm/npm/commit/254ecfb04f026c2fd16427db01a53600c1892c8b) - [#8990](https://github.com/npm/npm/issues/8990) `marked-man@0.1.5`: Fixes an - issue with documentation rendering where backticks in 2nd-level headers would - break rendering (?!?!) - ([@steveklabnik](https://github.com/steveklabnik)) -* [`79efd79`](https://github.com/npm/npm/commit/79efd79ac216da8cee8636fb2ed926b0196a4eb6) - `minimatch@2.0.10`: A pattern like `'*.!(x).!(y)'` should not match a name - like `'a.xyz.yab'`. - ([@isaacs](https://github.com/isaacs)) -* [`39c7dc9`](https://github.com/npm/npm/commit/39c7dc9a4e17cd35a5ed882ba671821c9a900f9e) - `request@2.60.0`: A few bug fixes and doc updates. - ([@simov](https://github.com/simov)) -* [`72d3c3a`](https://github.com/npm/npm/commit/72d3c3a9e1e461608aa21b14c01a650333330da9) - `rimraf@2.4.2`: Minor doc and dep updates - ([@isaacs](https://github.com/isaacs)) -* [`7513035`](https://github.com/npm/npm/commit/75130356a06f5f4fbec3786aac9f9f0b36dfe010) - `nock@2.9.1` - ([@pgte](https://github.com/pgte)) -* [`3d9aa82`](https://github.com/npm/npm/commit/3d9aa82260f0643a32c13d0c1ed16f644b6fd4ab) - Fixes this thing where Kat decided to save `nock` as a regular dependency ;) - ([@othiym23](https://github.com/othiym23)) - -### v2.13.2 (2015-07-16): - -#### HOLD ON TO YOUR TENTACLES... IT'S NPM RELEASE TIME! - -Kat: Hooray! Full team again, and we've got a pretty small patch release this -week, about everyone's favorite recurring issue: git URLs! - -Rebecca: No Way! Again? - -Kat: The ride never ends! In the meantime, there's some fun, exciting work in -the background to get orgs and teams out the door. Keep an eye out for news. :) - -Rebecca: And make sure to keep an eye out for patches for the super-fresh -`npm@3`! - -#### LET'S GIT INKY - -Rebecca: So what's this about another git URL issue? - -Kat: Welp, I apparently broke backwards-compatibility on what are actually -invalid `git+https` URLs! So I'm making it work, but we're gonna deprecate URLs -that look like `git+https://user@host:path/is/here`. - -Rebecca: What should we use instead?! - -Kat: Just do me a solid and use `git+ssh://user@host:path/here` or -`git+https://user@host/absolute/https/path` instead! - -* [`769f06e`](https://github.com/npm/npm/commit/769f06e5455d7a9fc738379de2e05868df0dab6f) - Updated tests for `getResolved` so the URLs are run through - `normalize-git-url`. - ([@zkat](https://github.com/zkat)) -* [`edbae68`](https://github.com/npm/npm/commit/edbae685bf48971e878ced373d6825fc1891ee47) - [#8881](https://github.com/npm/npm/issues/8881) Added tests to verify that `git+https:` URLs are handled compatibly. - ([@zkat](https://github.com/zkat)) - -#### NEWS FLASH! DOCUMENTATION IMPROVEMENTS! - -* [`bad4e014`](https://github.com/npm/npm/commit/bad4e0143cc95754a682f1da543b2b4e196e924b) - [#8924](https://github.com/npm/npm/pull/8924) Make sure documented default - values in `lib/cache.js` properly correspond to current code. - ([@watilde](https://github.com/watilde)) -* [`e7a11fd`](https://github.com/npm/npm/commit/e7a11fdf70e333cdfe3dac94a1a30907adb76d59) - [#8036](https://github.com/npm/npm/issues/8036) Clarify the documentation for - `.npmrc` to clarify that it's not read at the project level when doing global - installs. - ([@espadrine](https://github.com/espadrine)) - -#### STAY FRESH~ - -Kat: That's it for npm core changes! - -Rebecca: Great! Let's look at the fresh new dependencies, then! - -Kat: See you all next week! - -Both: Stay Freeesh~ - -(some cat form of Forrest can be seen snoring in the corner) - -* [`bfa1f45`](https://github.com/npm/npm/bfa1f45ee760d05039557d2245b7e3df9fda8def) - `normalize-git-url@3.0.1`: Fixes url normalization such that `git+https:` - accepts scp syntax, but get converted into absolute-path `https:` URLs. Also - fixes scp syntax so you can have absolute paths after the `:` - (`git@myhost.org:/some/absolute/place.git`) - ([@zkat](https://github.com/zkat)) -* [`6f757d2`](https://github.com/npm/npm/6f757d22b53f91da0bebec6b5d16c1f4dbe130b4) - `glob@5.0.15`: Better handling of ENOTSUP - ([@isaacs](https://github.com/isaacs)) -* [`0920819`](https://github.com/npm/npm/09208197fb8b0c6d5dbf6bd7f59970cf366de989) - `node-gyp@2.0.2`: Fixes an issue with long paths on Win32 - ([@TooTallNate](https://github.com/TooTallNate)) - -### v2.13.1 (2015-07-09): - -#### KAUAI WAS NICE. I MISS IT. - -But Forrest's still kinda on vacation, and not just mentally, because he's -hanging out with the fine meatbags at CascadiaFest. Enjoy this small bug -release. - -#### MAKE OURSELVES HAPPY - -* [`40981f2`](https://github.com/npm/npm/commit/40981f2e0c9c12bb003ccf188169afd1d201f5af) - [#8862](https://github.com/npm/npm/issues/8862) Make the lifecycle's safety - check work with scoped packages. ([@tcort](https://github.com/tcort)) -* [`5125856`](https://github.com/npm/npm/commit/512585622481dbbda9a0306932468d59efaff658) - [#8855](https://github.com/npm/npm/issues/8855) Make dependency versions of - `"*"` match `"latest"` when all versions are prerelease. - ([@iarna](https://github.com/iarna)) -* [`22fdc1d`](https://github.com/npm/npm/commit/22fdc1d52602ba7098af978c75fca8f7d1060141) - Visually emphasize the correct way to write lifecycle scripts. - ([@josh-egan](https://github.com/josh-egan)) - -#### MAKE TRAVIS HAPPY - -* [`413c3ac`](https://github.com/npm/npm/commit/413c3ac2ab2437f3011c6ca0d1630109ec14e604) - Use npm's `2.x` branch for testing its `2.x` branch. - ([@iarna](https://github.com/iarna)) -* [`7602f64`](https://github.com/npm/npm/commit/7602f64826f7a465d9f3a20bd87a376d992607e6) - Don't prompt for GnuPG passphrase in version lifecycle tests. - ([@othiym23](https://github.com/othiym23)) - -#### MAKE `npm outdated` HAPPY - -* [`d338668`](https://github.com/npm/npm/commit/d338668601d1ebe5247a26237106e80ea8cd7f48) - [#8796](https://github.com/npm/npm/issues/8796) `fstream-npm@1.0.4`: When packing the - package tarball, npm no longer crashes for packages with certain combinations of - `.npmignore` entries, `.gitignore` entries, and lifecycle scripts. - ([@iarna](https://github.com/iarna)) -* [`dbe7c9c`](https://github.com/npm/npm/commit/dbe7c9c74734be870d16dd61b9e7f746123011f6) - `nock@2.7.0`: Add matching based on query strings. - ([@othiym23](https://github.com/othiym23)) - -There are new versions of `strip-ansi` and `ansi-regex`, but npm only uses them -indirectly, so we pushed them down into their dependencies where they can get -updated at their own pace. - -* [`06b6ca5`](https://github.com/npm/npm/commit/06b6ca5b5333025f10c8d901628859bd4678e027) - undeduplicate `ansi-regex` ([@othiym23](https://github.com/othiym23)) -* [`b168e33`](https://github.com/npm/npm/commit/b168e33ad46faf47020a45f72ba8cec8c644bdb9) - undeduplicate `strip-ansi` ([@othiym23](https://github.com/othiym23)) - -### v2.13.0 (2015-07-02): - -#### FORREST IS OUT! LET'S SNEAK IN ALL THE THINGS! - -Well, not _everything_. Just a couple of goodies, like the new `npm ping` -command, and the ability to add files to the commits created by `npm version` -with the new version hooks. There's also a couple of bugfixes in `npm` itself -and some of its dependencies. Here we go! - -#### YES HELLO THIS IS NPM REGISTRY SORRY NO DOG HERE - -Yes, that's right! We now have a dedicated `npm ping` command. It's super simple -and super easy. You ping. We tell you whether you pinged right by saying hello -right back. This should help out folks dealing with things like proxy issues or -other registry-access debugging issues. Give it a shot! - -This addresses [#5750](https://github.com/npm/npm/issues/5750), and will help -with the `npm doctor` stuff described in -[#6756](https://github.com/npm/npm/issues/6756). - -* [`f1f7a85`](https://github.com/npm/npm/commit/f1f7a85) - Add ping command to CLI - ([@michaelnisi](https://github.com/michaelnisi)) -* [`8cec629`](https://github.com/npm/npm/commit/8cec629) - Add ping command to npm-registry-client - ([@michaelnisi](https://github.com/michaelnisi)) -* [`0c0c92d`](https://github.com/npm/npm/0c0c92d) - Fixed ping command issues (added docs, tests, fixed minor bugs, etc) - ([@zkat](https://github.com/zkat)) - -#### I'VE WANTED THIS FOR `version` SINCE LIKE LITERALLY FOREVER AND A DAY - -Seriously! This patch lets you add files to the `version` commit before it's -made, So you can add additional metadata files, more automated changes to -`package.json`, or even generate `CHANGELOG.md` automatically pre-commit if -you're into that sort of thing. I'm so happy this is there I can't even. Do you -have other fun usecases for this? Tell -[npmbot (@npmjs)](http://twitter.com/npmjs) about it! - -* [`582f170`](https://github.com/npm/npm/commit/582f170) - [#8620](https://github.com/npm/npm/issues/8620) version: Allow scripts to add - files to the commit. - ([@jamestalmage](https://github.com/jamestalmage)) - -#### ALL YOUR FILE DESCRIPTORS ARE BELONG TO US - -We've had problems in the past with things like `EMFILE` errors popping up when -trying to install packages with a bunch of dependencies. Isaac patched up -[`graceful-fs`](https://github.com/isaacs/node-graceful-fs) to handle this case -better, so we should be seeing fewer of those. - -* [`022691a`](https://github.com/npm/npm/commit/022691a) - `graceful-fs@4.1.2`: Updated so we can monkey patch globally. - ([@isaacs](https://github.com/isaacs)) -* [`c9fb0fd`](https://github.com/npm/npm/commit/c9fb0fd) - Globally monkey-patch graceful-fs. This should fix some errors when installing - packages with lots of dependencies. - ([@isaacs](https://github.com/isaacs)) - -#### READ THE FINE DOCS. THEY'VE IMPROVED - -* [`5587d0d`](https://github.com/npm/npm/commit/5587d0d) - Nice clarification for `directories.bin` - ([@ujane](https://github.com/ujane)) -* [`20673c7`](https://github.com/npm/npm/commit/20673c7) - Hey, Windows folks! Check out - [`nvm-windows`](https://github.com/coreybutler/nvm-windows) - ([@ArtskydJ](https://github.com/ArtskydJ)) - -#### MORE NUMBERS! MORE VALUE! - -* [`5afa2d5`](https://github.com/npm/npm/commit/5afa2d5) - `validate-npm-package-name@2.2.2`: Documented package name rules in README - ([@zeusdeux](https://github.com/zeusdeux)) -* [`021f4d9`](https://github.com/npm/npm/commit/021f4d9) - `rimraf@2.4.1`: [#74](https://github.com/isaacs/rimraf/issues/74) Use async - function for bin (to better handle Window's `EBUSY`) - ([@isaacs](https://github.com/isaacs)) -* [`5223432`](https://github.com/npm/npm/commit/5223432) - `osenv@0.1.3`: Use `os.homedir()` polyfill for more reliable output. io.js - added the function and the polyfill does a better job than the prior solution. - ([@sindresorhus](https://github.com/sindresorhus)) -* [`8ebbc90`](https://github.com/npm/npm/commit/8ebbc90) - `npm-cache-filename@1.0.2`: Make sure different git references get different - cache folders. This should prevent `foo/bar#v1.0` and `foo/bar#master` from - sharing the same cache folder. - ([@tomekwi](https://github.com/tomekwi)) -* [`367b854`](https://github.com/npm/npm/commit/367b854) - `lru-cache@2.6.5`: Minor test/typo changes - ([@isaacs](https://github.com/isaacs)) -* [`9fcae61`](https://github.com/npm/npm/commit/9fcae61) - `glob@5.0.13`: Tiny doc change + stop firing 'match' events for ignored items. - ([@isaacs](https://github.com/isaacs)) - -#### OH AND ONE MORE THING - -* [`7827249`](https://github.com/npm/npm/commit/7827249) - `PeerDependencies` errors now include the package version. - ([@NickHeiner](https://github.com/NickHeiner)) - -### v2.12.1 (2015-06-25): - -#### HEY WHERE DID EVERYBODY GO - -I keep [hearing some commotion](https://github.com/npm/npm/releases/tag/v3.0.0). -Is there something going on? Like, a party or something? Anyway, here's a small -release with at least two significant bug fixes, at least one of which some of -you have been waiting for for quite a while. - -#### REMEMBER WHEN I SAID "REMEMBER WHEN I SAID THAT THING ABOUT PERMISSIONS?"? - -`npm@2.12.0` has a change that introduces a fix for a permissions problem -whereby the `_locks` directory in the cache directory can up being owned by -root. The fix in 2.12.0 takes care of that problem, but introduces a new -problem for Windows users where npm tries to call `process.getuid()`, which -doesn't exist on Windows. It was easy enough to fix (but more or less -impossible to test, thanks to all the external dependencies involved with -permissions and platforms and whatnot), but as a result, Windows users might -want to skip `npm@2.12.0` and go straight to `npm@2.12.1`. Sorry about that! - -* [`7e5da23`](https://github.com/npm/npm/commit/7e5da238ee869201fdb9027c27b79b0f76b440a8) - When using the new, "fixed" cache directory creator, be extra-careful to not - call `process.getuid()` on platforms that lack it. - ([@othiym23](https://github.com/othiym23)) - -#### WHEW! ALL DONE FIXING GIT FOREVER! - -New npm CLI team hero [@zkat](https://github.com/zkat) has finally (FINALLY) -fixed the regression somebody (hi!) introduced a couple months ago whereby git -URLs of the format `git+ssh://user@githost.com:org/repo.git` suddenly stopped -working, and also started being saved (and cached) incorrectly. I am 100% sure -there are absolutely no more bugs in the git caching code at all ever. Mm hm. -Yep. Pretty sure. Maybe. Hmm... I hope. - -*Sighs audibly.* - -[Let us know](http://github.com/npm/npm/issues/new) if we broke something else -with this fix. - -* [`94ca4a7`](https://github.com/npm/npm/commit/94ca4a711619ba8e40ce3d20bc42b13cdb7611b7) - [#8031](https://github.com/npm/npm/issues/8031) Even though - `git+ssh://user@githost.com:org/repo.git` isn't a URL, treat it like one for - the purposes of npm. ([@zkat](https://github.com/zkat)) -* [`e7f56e5`](https://github.com/npm/npm/commit/e7f56e5a97fcf1c52d5c5bee71303b0126129815) - [#8031](https://github.com/npm/npm/issues/8031) `normalize-git-url@2.0.0`: - Handle git URLs (and URL-like remote refs) in a manner consistent with npm's - docs. ([@zkat](https://github.com/zkat)) - -#### YEP, THERE ARE STILL DEPENDENCY UPGRADES - -* [`679bf47`](https://github.com/npm/npm/commit/679bf4745ac2cfbb01c9ce273e189807fd04fa33) - [#40](http://github.com/npm/read-installed/issues/40) `read-installed@4.0.1`: - Handle prerelease versions in top-level dependencies not in `package.json` - without marking those packages as invalid. - ([@benjamn](https://github.com/benjamn)) -* [`3a67410`](https://github.com/npm/npm/commit/3a6741068c9119174c920496778aeee870ebdac0) - `tap@1.3.1` ([@isaacs](https://github.com/isaacs)) -* [`151904a`](https://github.com/npm/npm/commit/151904af39dc24567f8c98529a2a64a4dbcc960a) - `nopt@3.0.3` ([@isaacs](https://github.com/isaacs)) - -### v2.12.0 (2015-06-18): - -#### REMEMBER WHEN I SAID THAT THING ABOUT PERMISSIONS? - -About [a million people](https://github.com/npm/npm/issues?utf8=%E2%9C%93&q=is%3Aissue+EACCES+_locks) -have filed issues related to having a tough time using npm after they've run -npm once or twice with sudo. "Don't worry about it!" I said. "We've fixed all -those permissions problems ages ago! Use this one weird trick and you'll never -have to deal with this again!" - -Well, uh, if you run npm with root the first time you run npm on a machine, it -turns out that the directory npm uses to store lockfiles ends up being owned by -the wrong user (almost always root), and that can, well, it can cause problems -sometimes. By which I mean every time you run npm without being root it'll barf -with `EACCES` errors. Whoops! - -This is an obnoxious regression, and to prevent it from recurring, we've made -it so that the cache, cached git remotes, and the lockfile directories are all -created and maintained using the same utilty module, which not only creates the -relevant paths with the correct permissions, but will fix the permissions on -those directories (if it can) when it notices that they're broken. An `npm -install` run as root ought to be sufficient to fix things up (and if that -doesn't work, first tell us about it, and then run `sudo chown -R $(whoami) -$HOME/.npm`) - -Also, I apologize for inadvertently gaslighting any of you by claiming this bug -wasn't actually a bug. I do think we've got this permanently dealt with now, -but I'll be paying extra-close attention to permissions issues related to the -cache for a while. - -* [`85d1a53`](https://github.com/npm/npm/commit/85d1a53d7b5e0fc04823187e522ae3711ede61fa) - Set permissions on lock directory to the owner of the process. - ([@othiym23](https://github.com/othiym23)) - -#### I WENT TO NODECONF AND ALL I GOT WAS THIS LOUSY SPDX T-SHIRT - -That's not literally true. We spent very little time discussing SPDX, -[@kemitchell](https://github.com/kemitchell) is a champ, and I had a lot of fun -playing drum & bass to a mostly empty Boogie Barn and only ended up with one -moderately severe cold for my pains. Another winner of a NodeConf! (I would -probably wear a SPDX T-shirt if somebody gave me one, though.) - -A bunch of us did have a spirited discussion of the basics of open-source -intellectual property, and the convergence of me, -[@kemitchell](https://github.com/kemitchell), and -[@jandrieu](https://github.com/jandrieu) in one place allowed us to hammmer out -a small but significant issue that had been bedeviling early adopters of the -new SPDX expression syntax in `package.json` license fields: how to deal with -packages that are left without a license on purpose. - -Refer to [the docs](https://github.com/npm/npm/blob/16a3dd545b10f8a2464e2037506ce39124739b41/doc/files/package.json.md#license) -for the specifics, but the short version is that instead of using -`LicenseRef-LICENSE` for proprietary licenses, you can now use either -`UNLICENSED` if you want to make it clear that you don't _want_ your software -to be licensed (and want npm to stop warning you about this), or `SEE LICENSE -IN <filename>` if there's a license with custom text you want to use. At some -point in the near term, we'll be updating npm to verify that the mentioned -file actually exists, but for now you're all on the honor system. - -* [`4827fc7`](https://github.com/npm/npm/commit/4827fc784117c17f35dd9b51b21d1eff6094f661) - [#8557](https://github.com/npm/npm/issues/8557) - `normalize-package-data@2.2.1`: Allow `UNLICENSED` and `SEE LICENSE IN - <filename>` in "license" field of `package.json`. - ([@kemitchell](https://github.com/kemitchell)) -* [`16a3dd5`](https://github.com/npm/npm/commit/16a3dd545b10f8a2464e2037506ce39124739b41) - [#8557](https://github.com/npm/npm/issues/8557) Document the new accepted - values for the "license" field. - ([@kemitchell](https://github.com/kemitchell)) -* [`8155311`](https://github.com/npm/npm/commit/81553119350deaf199e79e38e35b52a5c8ad206c) - [#8557](https://github.com/npm/npm/issues/8557) `init-package-json@1.7.0`: - Support new "license" field values at init time. - ([@kemitchell](https://github.com/kemitchell)) - -#### SMALLISH BUG FIXES - -* [`9d8cac9`](https://github.com/npm/npm/commit/9d8cac94a258db648a2b1069b1c8c6529c79d013) - [#8548](https://github.com/npm/npm/issues/8548) Remove extraneous newline - from `npm view` output, making it easier to use in shell scripts. - ([@eush77](https://github.com/eush77)) -* [`765fd4b`](https://github.com/npm/npm/commit/765fd4bfca8ea3e2a4a399765b17eec40a3d893d) - [#8521](https://github.com/npm/npm/issues/8521) When checking for outdated - packages, or updating packages, raise an error when the registry is - unreachable instead of silently "succeeding". - ([@ryantemple](https://github.com/ryantemple)) - -#### SMALLERISH DOCUMENTATION TWEAKS - -* [`5018335`](https://github.com/npm/npm/commit/5018335ce1754a9f771954ecbc1a93acde9b8c0a) - [#8365](https://github.com/npm/npm/issues/8365) Add details about which git - environment variables are whitelisted by npm. - ([@nmalaguti](https://github.com/nmalaguti)) -* [`bed9edd`](https://github.com/npm/npm/commit/bed9edddfdcc6d22a80feab33b53e4ef9172ec72) - [#8554](https://github.com/npm/npm/issues/8554) Fix typo in version docs. - ([@rainyday](https://github.com/rainyday)) - -#### WELL, I GUESS THERE ARE MORE DEPENDENCY UPGRADES - -* [`7ce2f06`](https://github.com/npm/npm/commit/7ce2f06f6f34d469b1d2e248084d4f3fef10c05e) - `request@2.58.0`: Refactor tunneling logic, and use `extend` instead of - abusing `util._extend`. ([@simov](https://github.com/simov)) -* [`e6c6195`](https://github.com/npm/npm/commit/e6c61954aad42e20eec49745615c7640b2026a6c) - `nock@2.6.0`: Refined interception behavior. - ([@pgte](https://github.com/pgte)) -* [`9583cc3`](https://github.com/npm/npm/commit/9583cc3cb192c2fced006927cfba7cd37b588605) - `fstream-npm@1.0.3`: Ensure that `main` entry in `package.json` is always - included in the bundled package tarball. - ([@coderhaoxin](https://github.com/coderhaoxin)) -* [`df89493`](https://github.com/npm/npm/commit/df894930f2716adac28740b29b2e863170919990) - `fstream@1.0.7` ([@isaacs](https://github.com/isaacs)) -* [`9744049`](https://github.com/npm/npm/commit/974404934758124aa8ae5b54f7d5257c3bd6b588) - `dezalgo@1.0.3`: `dezalgo` should be usable in the browser, and can be now - that `asap` has been upgraded to be browserifiable. - ([@mvayngrib](https://github.com/mvayngrib)) - -### v2.11.3 (2015-06-11): - -This was a very quiet week. This release was done by -[@iarna](https://github.com/iarna), while the rest of the team hangs out at -NodeConf Adventure! - -#### TESTS IN 0.8 FAIL LESS - -* [`5b3b3c2`](https://github.com/npm/npm/commit/5b3b3c2) - [#8491](//github.com/npm/npm/pull/8491) - Updates a test to use only 0.8 compatible features - ([@watilde](https://github.com/watilde)) - -#### THE TREADMILL OF UPDATES NEVER CEASES - -* [`9f439da`](https://github.com/npm/npm/commit/9f439da) - `spdx@0.4.1`: License range updates - ([@kemitchell](https://github.com/kemitchell)) -* [`2dd055b`](https://github.com/npm/npm/commit/2dd055b) - `normalize-package-data@2.2.1`: Fixes a crashing bug when the package.json - `scripts` property is not an object. - ([@iarna](https://github.com/iarna)) -* [`e02e85d`](https://github.com/npm/npm/commit/e02e85d) - `osenv@0.1.2`: Switches to using the `os-tmpdir` module instead of - `os.tmpdir()` for greater consistency in behavior between node versions. - ([@iarna](https://github.com/iarna)) -* [`a6f0265`](https://github.com/npm/npm/commit/a6f0265) - `ini@1.3.4` ([@isaacs](https://github.com/isaacs)) -* [`7395977`](https://github.com/npm/npm/commit/7395977) - `rimraf@2.4.0` ([@isaacs](https://github.com/isaacs)) - -### v2.11.2 (2015-06-04): - -Another small release this week, brought to you by the latest addition to the -CLI team, [@zkat](https://github.com/zkat) (Hi, all!) - -Mostly small documentation tweaks and version updates. Oh! And `npm outdated` -is actually sorted now. Rejoice! - -It's gonna be a while before we get another palindromic version number. Enjoy it -while it lasts. :3 - -#### QUALITY OF LIFE HAS NEVER BEEN BETTER - -* [`31aada4`](https://github.com/npm/npm/commit/31aada4ccc369c0903ff7f233f464955d12c6fe2) - [#8401](https://github.com/npm/npm/issues/8401) `npm outdated` output is just - that much nicer to consume now, due to sorting by name. - ([@watilde](https://github.com/watilde)) -* [`458a919`](https://github.com/npm/npm/commit/458a91925d8b20c5e672ba71a86745aad654abaf) - [#8469](https://github.com/npm/npm/pull/8469) Explicitly set `cwd` for - `preversion`, `version`, and `postversion` scripts. This makes the scripts - findable relative to the root dir. - ([@alexkwolfe](https://github.com/alexkwolfe)) -* [`55d6d71`](https://github.com/npm/npm/commit/55d6d71562e979e745c9db88861cc39f99b9f3ec) - Ensure package name and version are included in display during `npm version` - lifecycle execution. Gets rid of those little `undefined`s in the console. - ([@othiym23](https://github.com/othiym23)) - -#### WORDS HAVE NEVER BEEN QUITE THIS READABLE - -* [`3901e49`](https://github.com/npm/npm/commit/3901e4974c800e7f9fba4a5b2ff88da1126d5ef8) - [#8462](https://github.com/npm/npm/pull/8462) English apparently requires - correspondence between indefinite articles and attached nouns. - ([@Enet4](https://github.com/Enet4)) -* [`5a744e4`](https://github.com/npm/npm/commit/5a744e4b143ef7b2f50c80a1d96fdae4204d452b) - [#8421](https://github.com/npm/npm/pull/8421) The effect of `npm prune`'s - `--production` flag and how to use it have been documented a bit better. - ([@foiseworth](https://github.com/foiseworth)) -* [`eada625`](https://github.com/npm/npm/commit/eada625993485f0a2c5324b06f02bfa0a95ce4bc) - We've updated our `.mailmap` and `AUTHORS` files to make sure credit is given - where credit is due. ([@othiym23](https://github.com/othiym23)) - -#### VERSION NUMBERS HAVE NEVER BEEN BIGGER - -* [`c929fd1`](https://github.com/npm/npm/commit/c929fd1d0604b5878ed05706447e078d3e41f5b3) - `readable-stream@1.1.13`: Manually deduped `v1.1.13` (streams3) to make - deduping more reliable on `npm@<3`. ([@othiym23](https://github.com/othiym23)) -* [`a9b4b78`](https://github.com/npm/npm/commit/a9b4b78dcc85571fd1cdd737903f7f37a5e6a755) - `request@2.57.0`: Replace dependency on IncomingMessage's `.client` with - `.socket` as the former was deprecated in io.js 2.2.0. - ([@othiym23](https://github.com/othiym23)) -* [`4b5e557`](https://github.com/npm/npm/commit/4b5e557a23cdefd521ad154111e3d4dcc81f1cdb) - `abbrev@1.0.7`: Better testing, with coverage. - ([@othiym23](https://github.com/othiym23)) -* [`561affe`](https://github.com/npm/npm/commit/561affee21df9bbea5a47298f2452f533be8f359) - `semver@4.3.6`: .npmignore added for less cruft, and better testing, with coverage. - ([@othiym23](https://github.com/othiym23)) -* [`60aef3c`](https://github.com/npm/npm/commit/60aef3cf5d84d757752db3eb8ede2cb385469e7b) - `graceful-fs@3.0.8`: io.js fixes. - ([@zkat](https://github.com/zkat)) -* [`f8bd453`](https://github.com/npm/npm/commit/f8bd453b1a1c46ba7666cb166595e8a011eae443) - `config-chain@1.1.9`: Added MIT license to package.json - ([@zkat](https://github.com/zkat)) - -### v2.11.1 (2015-05-28): - -This release brought to you from poolside at the Omni Amelia Island Resort and -JSConf 2015, which is why it's so tiny. - -#### CONFERENCE WIFI CAN'T STOP THESE BUG FIXES - -* [`cf109a6`](https://github.com/npm/npm/commit/cf109a682f38a059a994da953d5c1b4aaece5e2f) - [#8381](https://github.com/npm/npm/issues/8381) Documented a subtle gotcha - with `.npmrc`, which is that it needs to have its permissions set such that - only the owner can read or write the file. - ([@colakong](https://github.com/colakong)) -* [`180da67`](https://github.com/npm/npm/commit/180da67c9fa53103d625e2f031626c2453c7ebcd) - [#8365](https://github.com/npm/npm/issues/8365) Git 2.3 adds support for - `GIT_SSH_COMMAND`, which allows you to pass an explicit git command (with, - for example, a specific identity passed in on the command line). - ([@nmalaguti](https://github.com/nmalaguti)) - -#### MY (VIRGIN) PINA COLADA IS GETTING LOW, BETTER UPGRADE THESE DEPENDENCIES - -* [`b72de41`](https://github.com/npm/npm/commit/b72de41c5cc9f0c46d3fa8f062c75bd273641474) - `node-gyp@2.0.0`: Use a newer version of `gyp`, and generally improve support - for Visual Studios and Windows. - ([@TooTallNate](https://github.com/TooTallNate)) -* [`8edbe21`](https://github.com/npm/npm/commit/8edbe210af41e8f248f5bb92c72de92f54fda3b1) - `node-gyp@2.0.1`: Don't crash when Python's version doesn't parse as valid - semver. ([@TooTallNate](https://github.com/TooTallNate)) -* [`ba0e0a8`](https://github.com/npm/npm/commit/ba0e0a845a4f29717aba566b416a27d1a22f5d08) - `glob@5.0.10`: Add coverage to tests. ([@isaacs](https://github.com/isaacs)) -* [`7333701`](https://github.com/npm/npm/commit/7333701b5d4f01673f37d64992c63c4e15864d6d) - `request@2.56.0`: Bug fixes and dependency upgrades. - ([@simov](https://github.com/simov)) - -### v2.11.0 (2015-05-21): - -For the first time in a very long time, we've added new events to the life -cycle used by `npm run-script`. Since running `npm version (major|minor|patch)` -is typically the last thing many developers do before publishing their updated -packages, it makes sense to add life cycle hooks to run tests or otherwise -preflight the package before doing a full publish. Thanks, as always, to the -indefatigable [@watilde](https://github.com/watilde) for yet another great -usability improvement for npm! - -#### FEATURELETS - -* [`b07f7c7`](https://github.com/npm/npm/commit/b07f7c7c1e5021730b3c320f1b3a46e70f8a21ff) - [#7906](https://github.com/npm/npm/issues/7906) - Add new [`scripts`](https://github.com/npm/npm/blob/master/doc/misc/npm-scripts.md) to - allow you to run scripts before and after - the [`npm version`](https://github.com/npm/npm/blob/master/doc/cli/npm-version.md) - command has run. This makes it easy to, for instance, require that your - test suite passes before bumping the version by just adding `"preversion": - "npm test"` to the scripts section of your `package.json`. - ([@watilde](https://github.com/watilde)) -* [`8a46136`](https://github.com/npm/npm/commit/8a46136f42e416cbadb533bcf89d73d681ed421d) - [#8185](https://github.com/npm/npm/issues/8185) - When we get a "not found" error from the registry, we'll now check to see - if the package name you specified is invalid and if so, give you a better - error message. ([@thefourtheye](https://github.com/thefourtheye)) - -#### BUG FIXES - -* [`9bcf573`](https://github.com/npm/npm/commit/9bcf5730bd0316f210dafea898afe9103849cea9) - [#8324](https://github.com/npm/npm/pull/8324) On Windows, when you've configured a - custom `node-gyp`, run it with node itself instead of using the default open action (which - is almost never what you want). ([@bangbang93](https://github.com/bangbang93)) -* [`1da9b04`](https://github.com/npm/npm/commit/1da9b0411d3416c7fca17d08cbbcfca7ae86e92d) - [#7195](https://github.com/npm/npm/issues/7195) - [#7260](https://github.com/npm/npm/issues/7260) `npm-registry-client@6.4.0`: - (Re-)allow publication of existing mixed-case packages (part 1). - ([@smikes](https://github.com/smikes)) -* [`e926783`](https://github.com/npm/npm/commit/e9267830ab261c751f12723e84d2458ae9238646) - [#7195](https://github.com/npm/npm/issues/7195) - [#7260](https://github.com/npm/npm/issues/7260) - `normalize-package-data@2.2.0`: (Re-)allow publication of existing mixed-case - packages (part 2). ([@smikes](https://github.com/smikes)) - -#### DOCUMENTATION IMPROVEMENTS - -* [`f62ee05`](https://github.com/npm/npm/commit/f62ee05333b141539a8e851c620dd2e82ff06860) - [#8314](https://github.com/npm/npm/issues/8314) Update the README to warn - folks away from using the CLI's internal API. For the love of glob, just use a - child process to run the CLI! ([@claycarpenter](https://github.com/claycarpenter)) -* [`1093921`](https://github.com/npm/npm/commit/1093921c04db41ab46db24a170a634a4b2acd8d9) - [#8279](https://github.com/npm/npm/pull/8279) - Update the documentation to note that, yes, you can publish scoped packages to the - public registry now! ([@mantoni](https://github.com/mantoni)) -* [`f87cde5`](https://github.com/npm/npm/commit/f87cde5234a760d3e515ffdaacaed6f5b71dbf44) - [#8292](https://github.com/npm/npm/pull/8292) - Fix typo in an example and grammar in the description in - the [shrinkwrap documentation](https://github.com/npm/npm/blob/master/doc/cli/npm-shrinkwrap.md). - ([@vshih](https://github.com/vshih)) -* [`d3526ce`](https://github.com/npm/npm/commit/d3526ceb09a0c29fdb7d4124536ae09057d033e7) - Improve the formatting in - the [shrinkwrap documentation](https://github.com/npm/npm/blob/master/doc/cli/npm-shrinkwrap.md). - ([@othiym23](https://github.com/othiym23)) -* [`19fe6d2`](https://github.com/npm/npm/commit/19fe6d20883e28956ff916fe4dae42d73ee6195b) - [#8311](https://github.com/npm/npm/pull/8311) - Update [README.md](https://github.com/npm/npm#readme) to use syntax highlighting in - its code samples and bits of shell scripts. ([@SimenB](https://github.com/SimenB)) - -#### DEPENDENCY UPDATES! ALWAYS AND FOREVER! - -* [`fc52160`](https://github.com/npm/npm/commit/fc52160d0223226fffe4166f42fdfd3b899b3c1e) - [#4700](https://github.com/npm/npm/issues/4700) [#5044](https://github.com/npm/npm/issues/5044) - `init-package-json@1.6.0`: Make entering an invalid version while running `npm init` give - you an immediate error and prompt you to correct it. ([@watilde](https://github.com/watilde)) -* [`738853e`](https://github.com/npm/npm/commit/738853eb1f55636476a2a410c2c04732eec9d51e) - [#7763](https://github.com/npm/npm/issues/7763) `fs-write-stream-atomic@1.0.3`: Fix a bug - where errors would not propagate, making error messages unhelpful. - ([@iarna](https://github.com/iarna)) -* [`6d74a2d`](https://github.com/npm/npm/commit/6d74a2d2ac7f92750cf6a2cfafae1af23b569098) - `npm-package-arg@4.0.1`: Fix tests on windows ([@Bacra](https://github.com)) and with - more recent `hosted-git-info`. ([@iarna](https://github.com/iarna)) -* [`50f7178`](https://github.com/npm/npm/commit/50f717852fbf713ef6cbc4e0a9ab42657decbbbd) - `hosted-git-info@2.1.4`: Correct spelling in its documentation. - ([@iarna](https://github.com/iarna)) -* [`d7956ca`](https://github.com/npm/npm/commit/d7956ca17c057d5383ff0d3fc5cf6ac2940b034d) - `glob@5.0.7`: Fix a bug where unusual error conditions could make - further use of the module fail. ([@isaacs](https://github.com/isaacs)) -* [`44f7d74`](https://github.com/npm/npm/commit/44f7d74c5d3181d37da7ea7949c86b344153f8d9) - `tap@1.1.0`: Update to the most recent tap to get a whole host of bug - fixes and integration with [coveralls](https://coveralls.io/). - ([@isaacs](https://github.com/isaacs)) -* [`c21e8a8`](https://github.com/npm/npm/commit/c21e8a8d94bcf0ad79dc583ddc53f8366d4813b3) - `nock@2.2.0` ([@othiym23](https://github.com/othiym23)) - -#### LICENSE FILES FOR THE LICENSE GOD - -* Add missing ISC license file to package ([@kasicka](https://github.com/kasicka)): - * [`aa9908c`](https://github.com/npm/npm/commit/aa9908c20017729673b9d410b77f9a16b7aae8a4) `realize-package-specifier@3.0.1` - * [`23a3b1a`](https://github.com/npm/npm/commit/23a3b1a726b9176c70ce0ccf3cd9d25c54429bdf) `fs-vacuum@1.2.6` - * [`8e04bba`](https://github.com/npm/npm/commit/8e04bba830d4353d84751d21803cd127c96153a7) `dezalgo@1.0.2` - * [`50f7178`](https://github.com/npm/npm/commit/50f717852fbf713ef6cbc4e0a9ab42657decbbbd) `hosted-git-info@2.1.4` - * [`6a54917`](https://github.com/npm/npm/commit/6a54917fbd4df995495a95d4b548defd44b77c93) `write-file-atomic@1.1.2` - * [`971f92c`](https://github.com/npm/npm/commit/971f92c4a4e5514217d1e4db45d1ccf71a60ff19) `async-some@1.0.2` - * [`67b50b7`](https://github.com/npm/npm/commit/67b50b7667a42bb3340a660eb2e617e1a554d2d4) `normalize-git-url@1.0.1` - -#### SPDX LICENSE UPDATES - -* Switch license to - [BSD-2-Clause](http://spdx.org/licenses/BSD-2-Clause.html#licenseText) from - plain "BSD" ([@isaacs](https://github.com/isaacs)): - * [`efdb733`](https://github.com/npm/npm/commit/efdb73332eeedcad4c609796929070b62abb37ab) `npm-user-validate@0.1.2` - * [`e926783`](https://github.com/npm/npm/commit/e9267830ab261c751f12723e84d2458ae9238646) `normalize-package-data@2.2.0` -* Switch license to [ISC](http://spdx.org/licenses/ISC.html#licenseText) from - [BSD](http://spdx.org/licenses/BSD-2-Clause.html#licenseText) - ([@isaacs](https://github.com/isaacs)): - * [`c300956`](https://github.com/npm/npm/commit/c3009565a964f0ead4ac4ab234b1a458e2365f17) `block-stream@0.0.8` - * [`1de1253`](https://github.com/npm/npm/commit/1de125355765fecd31e682ed0ff9d2edbeac0bb0) `lockfile@1.0.1` - * [`0d5698a`](https://github.com/npm/npm/commit/0d5698ab132e376c7aec93ae357c274932116220) `osenv@0.1.1` - * [`2e84921`](https://github.com/npm/npm/commit/2e84921474e1ffb18de9fce4616e73171fa8046d) `abbrev@1.0.6` - * [`872fac9`](https://github.com/npm/npm/commit/872fac9d10c11607e4d0348c08a683b84e64d30b) `chmodr@0.1.1` - * [`01eb7f6`](https://github.com/npm/npm/commit/01eb7f60acba584346ad8aae846657899f3b6887) `chownr@0.0.2` - * [`294336f`](https://github.com/npm/npm/commit/294336f0f31c7b9fe31a50075ed750db6db134d1) `read@1.0.6` - * [`ebdf6a1`](https://github.com/npm/npm/commit/ebdf6a14d17962cdb7128402c53b452f91d44ca7) `graceful-fs@3.0.7` -* Switch license to [ISC](http://spdx.org/licenses/ISC.html#licenseText) from - [MIT](http://spdx.org/licenses/MIT.html#licenseText) - ([@isaacs](https://github.com/isaacs)): - * [`e5d237f`](https://github.com/npm/npm/commit/e5d237fc0f436dd2a89437ebf8a9632a2e35ccbe) `nopt@3.0.2` - * [`79fef14`](https://github.com/npm/npm/commit/79fef1421b78f044980f0d1bf0e97039b6992710) `rimraf@2.3.4` - * [`22527da`](https://github.com/npm/npm/commit/22527da4816e7c2746cdc0317c5fb4a85152d554) `minimatch@2.0.8` - * [`882ac87`](https://github.com/npm/npm/commit/882ac87a6c4123ca985d7ad4394ea5085e5b0ef5) `lru-cache@2.6.4` - * [`9d9d015`](https://github.com/npm/npm/commit/9d9d015a2e972f68664dda54fbb204db28b21ede) `npmlog@1.2.1` - -### v2.10.1 (2015-05-14): - -#### BUG FIXES & DOCUMENTATION TWEAKS - -* [`dc77520`](https://github.com/npm/npm/commit/dc7752013ffce13a3d3f13e518a0052c22fc1158) - When getting back a 404 from a request to a private registry that uses a - registry path that extends past the root - (`http://registry.enterprise.co/path/to/registry`), display the name of the - nonexistent package, rather than the first element in the registry API path. - Sorry, Artifactory users! ([@hayes](https://github.com/hayes)) -* [`f70dea9`](https://github.com/npm/npm/commit/f70dea9b4766f6eaa55012c3e8087e9cb04fd4ce) - Make clearer that `--registry` can be used on a per-publish basis to push a - package to a non-default registry. ([@mischkl](https://github.com/mischkl)) -* [`a3e26f5`](https://github.com/npm/npm/commit/a3e26f5b4465991a941a325468ab7725670d2a94) - Did you know that GitHub shortcuts can have commit-ishes included - (`org/repo#branch`)? They can! ([@iarna](https://github.com/iarna)) -* [`0e2c091`](https://github.com/npm/npm/commit/0e2c091a539b61fdc60423b6bbaaf30c24e4b1b8) - Some errors from `readPackage` were being swallowed, potentially leading to - invalid package trees on disk. ([@smikes](https://github.com/smikes)) - -#### DEPENDENCY UPDATES! STILL! MORE! AGAIN! - -* [`0b901ad`](https://github.com/npm/npm/commit/0b901ad0811d84dda6ca0755a9adc8d47825edd0) - `lru-cache@2.6.3`: Removed some cruft from the published package. - ([@isaacs](https://github.com/isaacs)) -* [`d713e0b`](https://github.com/npm/npm/commit/d713e0b14930c563e3fdb6ac6323bae2a8924652) - `mkdirp@0.5.1`: Made compliant with `standard`, dropped support for Node 0.6, - added (Travis) support for Node 0.12 and io.js. - ([@isaacs](https://github.com/isaacs)) -* [`a2d6578`](https://github.com/npm/npm/commit/a2d6578b6554c5c9d48fe2006751759f4da57520) - `glob@1.0.3`: Updated to use `tap@1`. ([@isaacs](https://github.com/isaacs)) -* [`64cd1a5`](https://github.com/npm/npm/commit/64cd1a570aaa5f24ccba190948ec9456297c97f5) - `fstream@ 1.0.6`: Made compliant with [`standard`](http://npm.im/standard) - (done by [@othiym23](https://github.com/othiym23), and then debugged and - fixed by [@iarna](https://github.com/iarna)), and license changed to ISC. - ([@othiym23](https://github.com/othiym23) / - [@iarna](https://github.com/iarna)) -* [`b527a7c`](https://github.com/npm/npm/commit/b527a7c2ba3c4002f443dd2c536ff4ff41a38b86) - `which@1.1.1`: Callers can pass in their own `PATH` instead of relying on - `process.env`. ([@isaacs](https://github.com/isaacs)) - -### v2.10.0 (2015-05-8): - -#### THE IMPLICATIONS ARE MORE PROFOUND THAN THEY APPEAR - -If you've done much development in The Enterprise®™, you know that keeping -track of software licenses is far more important than one might expect / hope / -fear. Tracking licenses is a hassle, and while many (if not most) of us have -(reluctantly) gotten around to setting a license to use by default with all our -new projects (even if it's just WTFPL), that's about as far as most of us think -about it. In big enterprise shops, ensuring that projects don't inadvertently -use software with unacceptably encumbered licenses is serious business, and -developers spend a surprising (and appalling) amount of time ensuring that -licensing is covered by writing automated checkers and other license auditing -tools. - -The Linux Foundation has been working on a machine-parseable syntax for license -expressions in the form of [SPDX](https://spdx.org/), an appropriately -enterprisey acronym. IP attorney and JavaScript culture hero [Kyle -Mitchell](http://kemitchell.com/) has put a considerable amount of effort into -bringing SPDX to JavaScript and Node. He's written -[`spdx.js`](https://github.com/kemitchell/spdx.js), a JavaScript SPDX -expression parser, and has integrated it into npm in a few different ways. - -For you as a user of npm, this means: - -* npm now has proper support for dual licensing in `package.json`, due to - SPDX's compound expression syntax. Run `npm help package.json` for details. -* npm will warn you if the `package.json` for your project is either missing a - `"license"` field, or if the value of that field isn't a valid SPDX - expression (pro tip: `"BSD"` becomes `"BSD-2-Clause"` in SPDX (unless you - really want one of its variants); `"MIT"` and `"ISC"` are fine as-is; the - [full list](https://github.com/shinnn/spdx-license-ids/blob/master/spdx-license-ids.json) - is its own package). -* `npm init` now demands that you use a valid SPDX expression when using it - interactively (pro tip: I mostly use `npm init -y`, having previously run - `npm config set init.license=MIT` / `npm config set init.author.email=foo` / - `npm config set init.author.name=me`). -* The documentation for `package.json` has been updated to tell you how to use - the `"license"` field properly with SPDX. - -In general, this shouldn't be a big deal for anybody other than people trying -to run their own automated license validators, but in the long run, if -everybody switches to this format, many people's lives will be made much -simpler. I think this is an important improvement for npm and am very thankful -to Kyle for taking the lead on this. Also, even if you think all of this is -completely stupid, just [choose a license](http://en.wikipedia.org/wiki/License-free_software) -anyway. Future you will thank past you someday, unless you are -[djb](http://cr.yp.to/), in which case you are djb, and more power to you. - -* [`8669f7d`](https://github.com/npm/npm/commit/8669f7d88c472ccdd60e140106ac43cca636a648) - [#8179](https://github.com/npm/npm/issues/8179) Document how to use SPDX in - `license` stanzas in `package.json`, including how to migrate from old busted - license declaration arrays to fancy new compound-license clauses. - ([@kemitchell](https://github.com/kemitchell)) -* [`98ad98c`](https://github.com/npm/npm/commit/98ad98cb11f3d3ba29a488ef1ab050b066d9c7f6) - [#8197](https://github.com/npm/npm/issues/8197) `init-package-json@1.5.0` - Ensure that packages bootstrapped with `npm init` use an SPDX-compliant - license expression. ([@kemitchell](https://github.com/kemitchell)) -* [`2ad3905`](https://github.com/npm/npm/commit/2ad3905e9139b0be2b22accf707b814469de813e) - [#8197](https://github.com/npm/npm/issues/8197) - `normalize-package-data@2.1.0`: Warn when a package is missing a license - declaration, or using a license expression that isn't valid SPDX. - ([@kemitchell](https://github.com/kemitchell)) -* [`127bb73`](https://github.com/npm/npm/commit/127bb73ccccc59a1267851c702d8ebd3f3a97e81) - [#8197](https://github.com/npm/npm/issues/8197) `tar@2.1.1`: Switch from - `BSD` to `ISC` for license, where the latter is valid SPDX. - ([@othiym23](https://github.com/othiym23)) -* [`e9a933a`](https://github.com/npm/npm/commit/e9a933a9148180d9d799f99f4154f5110ff2cace) - [#8197](https://github.com/npm/npm/issues/8197) `once@1.3.2`: Switch from - `BSD` to `ISC` for license, where the latter is valid SPDX. - ([@othiym23](https://github.com/othiym23)) -* [`412401f`](https://github.com/npm/npm/commit/412401fb6a19b18f3e02d97a24d4dafed650c186) - [#8197](https://github.com/npm/npm/issues/8197) `semver@4.3.4`: Switch from - `BSD` to `ISC` for license, where the latter is valid SPDX. - ([@othiym23](https://github.com/othiym23)) - -As a corollary to the previous changes, I've put some work into making `npm -install` spew out fewer pointless warnings about missing values in transitive -dependencies. From now on, npm will only warn you about missing READMEs, -license fields, and the like for top-level projects (including packages you -directly install into your application, but we may relax that eventually). - -Practically _nobody_ liked having those warnings displayed for child -dependencies, for the simple reason that there was very little that anybody -could _do_ about those warnings, unless they happened to be the maintainers of -those dependencies themselves. Since many, many projects don't have -SPDX-compliant licenses, the number of warnings reached a level where they ran -the risk of turning into a block of visual noise that developers (read: me, and -probably you) would ignore forever. - -So I fixed it. If you still want to see the messages about child dependencies, -they're still there, but have been pushed down a logging level to `info`. You -can display them by running `npm install -d` or `npm install --loglevel=info`. - -* [`eb18245`](https://github.com/npm/npm/commit/eb18245f55fb4cd62a36867744bcd1b7be0a33e2) - Only warn on normalization errors for top-level dependencies. Transitive - dependency validation warnings are logged at `info` level. - ([@othiym23](https://github.com/othiym23)) - -#### BUG FIXES - -* [`e40e809`](https://github.com/npm/npm/commit/e40e8095d2bc9fa4eb8f01aa22067e0068fa8a54) - `tap@1.0.1`: TAP: The Next Generation. Fix up many tests to they work - properly with the new major version of `node-tap`. Look at all the colors! - ([@isaacs](https://github.com/isaacs)) -* [`f9314e9`](https://github.com/npm/npm/commit/f9314e97d26532c0ef2b03e98f3ed300b7cd5026) - `nock@1.9.0`: Minor tweaks and bug fixes. ([@pgte](https://github.com/pgte)) -* [`45c2b1a`](https://github.com/npm/npm/commit/45c2b1aaa051733fa352074994ae6e569fd51e8b) - [#8187](https://github.com/npm/npm/issues/8187) `npm ls` wasn't properly - recognizing dependencies installed from GitHub repositories as git - dependencies, and so wasn't displaying them as such. - ([@zornme](https://github.com/zornme)) -* [`1ab57c3`](https://github.com/npm/npm/commit/1ab57c38116c0403965c92bf60121f0f251433e4) - In some cases, `npm help` was using something that looked like a regular - expression where a glob pattern should be used, and vice versa. - ([@isaacs](https://github.com/isaacs)) - -### v2.9.1 (2015-04-30): - -#### WOW! MORE GIT FIXES! YOU LOVE THOSE! - -The first item below is actually a pretty big deal, as it fixes (with a -one-word change and a much, much longer test case (thanks again, -[@iarna](https://github.com/iarna))) a regression that's been around for months -now. If you're depending on multiple branches of a single git dependency in a -single project, you probably want to check out `npm@2.9.1` and verify that -things (again?) work correctly in your project. - -* [`178a6ad`](https://github.com/npm/npm/commit/178a6ad540215820d16217465a5f220d8c95a313) - [#7202](https://github.com/npm/npm/issues/7202) When caching git - dependencies, do so by the whole URL, including the branch name, so that if a - single application depends on multiple branches from the same repository (in - practice, multiple version tags), every install is of the correct version, - instead of reusing whichever branch the caching process happened to check out - first. ([@iarna](https://github.com/iarna)) -* [`63b79cc`](https://github.com/npm/npm/commit/63b79ccde092a9cb3b1f34abe43e1d2ba69c0dbf) - [#8084](https://github.com/npm/npm/issues/8084) Ensure that Bitbucket, - GitHub, and Gitlab dependencies are installed the same way as non-hosted git - dependencies, fixing `npm install --link`. - ([@laiso](https://github.com/laiso)) - -#### DOCUMENTATION FIXES AND TWEAKS - -These changes may seem simple and small (except Lin's fix to the package name -restrictions, which was more an egregious oversight on our part), but cleaner -documentation makes npm significantly more pleasant to use. I really appreciate -all the typo fixes, clarifications, and formatting tweaks people send us, and -am delighted that we get so many of these pull requests. Thanks, everybody! - -* [`ca478dc`](https://github.com/npm/npm/commit/ca478dcaa29b8f07cd6fe515a3c4518166819291) - [#8137](https://github.com/npm/npm/issues/8137) Somehow, we had failed to - clearly document the full restrictions on package names. - [@linclark](https://github.com/linclark) has now fixed that, although we will - take with us to our graves the reasons why the maximum package name length is 214 - characters (well, OK, it was that that was the longest name in the registry - when we decided to put a cap on the name length). - ([@linclark](https://github.com/linclark)) -* [`b574076`](https://github.com/npm/npm/commit/b5740767c320c1eff3576a8d63952534a0fbb936) - [#8079](https://github.com/npm/npm/issues/8079) Make the `npm shrinkwrap` - documentation use code formatting for examples consistently. It would be - great to do this for more commands HINT HINT. - ([@RichardLitt](https://github.com/RichardLitt)) -* [`1ff636e`](https://github.com/npm/npm/commit/1ff636e2db3852a53e38c866fed7eafdacd307fc) - [#8105](https://github.com/npm/npm/issues/8105) Document that the global - `npmrc` goes in `$PREFIX/etc/npmrc`, instead of `$PREFIX/npmrc`. - ([@anttti](https://github.com/anttti)) -* [`c3f2f7c`](https://github.com/npm/npm/commit/c3f2f7c299342e1c1eccc55a976a63c607f51621) - [#8127](https://github.com/npm/npm/issues/8127) Document how to use `npm run - build` directly (hint: it's different from `npm build`!). - ([@mikemaccana](https://github.com/mikemaccana)) -* [`873e467`](https://github.com/npm/npm/commit/873e46757e1986761b15353f94580a071adcb383) - [#8069](https://github.com/npm/npm/issues/8069) Take the old, dead npm - mailing list address out of `package.json`. It seems that people don't have - much trouble figuring out how to report errors to npm. - ([@robertkowalski](https://github.com/robertkowalski)) - -#### ENROBUSTIFICATIONMENT - -* [`5abfc9c`](https://github.com/npm/npm/commit/5abfc9c9017da714e47a3aece750836b4f9af6a9) - [#7973](https://github.com/npm/npm/issues/7973) `npm run-script` completion - will only suggest run scripts, instead of including dependencies. If for some - reason you still wanted it to suggest dependencies, let us know. - ([@mantoni](https://github.com/mantoni)) -* [`4b564f0`](https://github.com/npm/npm/commit/4b564f0ce979dc74c09604f4d46fd25a2ee63804) - [#8081](https://github.com/npm/npm/issues/8081) Use `osenv` to parse the - environment's `PATH` in a platform-neutral way. - ([@watilde](https://github.com/watilde)) -* [`a4b6238`](https://github.com/npm/npm/commit/a4b62387b41848818973eeed056fd5c6570274f3) - [#8094](https://github.com/npm/npm/issues/8094) When we refactored the - configuration code to split out checking for IPv4 local addresses, we - inadvertently completely broke it by failing to return the values. In - addition, just the call to `os.getInterfaces()` could throw on systems where - querying the network configuration requires elevated privileges (e.g. Amazon - Lambda). Add the return, and trap errors so they don't cause npm to explode. - Thanks to [@mhart](https://github.com/mhart) for bringing this to our - attention! ([@othiym23](https://github.com/othiym23)) - -#### DEPENDENCY UPDATES WAIT FOR NO SOPHONT - -* [`000cd8b`](https://github.com/npm/npm/commit/000cd8b52104942ac3404f0ad0651d82f573da37) - `rimraf@2.3.3`: More informative assertions on argument validation failure. - ([@isaacs](https://github.com/isaacs)) -* [`530a2e3`](https://github.com/npm/npm/commit/530a2e369128270f3e098f0e9be061533003b0eb) - `lru-cache@2.6.2`: Revert to old key access-time behavior, as it was correct - all along. ([@isaacs](https://github.com/isaacs)) -* [`d88958c`](https://github.com/npm/npm/commit/d88958ca02ce81b027b9919aec539d0145875a59) - `minimatch@2.0.7`: Feature detection and test improvements. - ([@isaacs](https://github.com/isaacs)) -* [`3fa39e4`](https://github.com/npm/npm/commit/3fa39e4d492609d5d045033896dcd99f7b875329) - `nock@1.7.1` ([@pgte](https://github.com/pgte)) - -### v2.9.0 (2015-04-23): - -This week was kind of a breather to concentrate on fixing up the tests on the -`multi-stage` branch, and not mess with git issues for a little while. -Unfortunately, There are now enough severe git issues that we'll probably have -to spend another couple weeks tackling them. In the meantime, enjoy these two -small features. They're just enough to qualify for a semver-minor bump: - -#### NANOFEATURES - -* [`2799322`](https://github.com/npm/npm/commit/279932298ce5b589c5eea9439ac40b88b99c6a4a) - [#7426](https://github.com/npm/npm/issues/7426) Include local modules in `npm - outdated` and `npm update`. ([@ArnaudRinquin](https://github.com/ArnaudRinquin)) -* [`2114862`](https://github.com/npm/npm/commit/21148620fa03a582f4ec436bb16bd472664f2737) - [#8014](https://github.com/npm/npm/issues/8014) The prefix used before the - version on version tags is now configurable via `tag-version-prefix`. Be - careful with this one and read the docs before using it. - ([@kkragenbrink](https://github.com/kkragenbrink)) - -#### OTHER MINOR TWEAKS - -* [`18ce0ec`](https://github.com/npm/npm/commit/18ce0ecd2d94ad3af01e997f1396515892dd363c) - [#3032](https://github.com/npm/npm/issues/3032) `npm unpublish` will now use - the registry set in `package.json`, just like `npm publish`. This only - applies, for now, when unpublishing the entire package, as unpublishing a - single version requires the name be included on the command line and - therefore doesn't read from `package.json`. ([@watilde](https://github.com/watilde)) -* [`9ad2100`](https://github.com/npm/npm/commit/9ad210042242e51d52b2a8b633d8e59248f5faa4) - [#8008](https://github.com/npm/npm/issues/8008) Once again, when considering - what to install on `npm install`, include `devDependencies`. - ([@smikes](https://github.com/smikes)) -* [`5466260`](https://github.com/npm/npm/commit/546626059909dca1906454e820ca4e315c1795bd) - [#8003](https://github.com/npm/npm/issues/8003) Clarify the documentation - around scopes to make it easier to understand how they support private - packages. ([@smikes](https://github.com/smikes)) - -#### DEPENDENCIES WILL NOT STOP UNTIL YOU ARE VERY SLEEPY - -* [`faf65a7`](https://github.com/npm/npm/commit/faf65a7bbb2fad13216f64ed8f1243bafe743f97) - `init-package-json@1.4.2`: If there are multiple validation errors and - warnings, ensure they all get displayed (includes a rad new way of testing - `init-package-json` contributed by - [@michaelnisi](https://github.com/michaelnisi)). - ([@MisumiRize](https://github.com/MisumiRize)) -* [`7f10f38`](https://github.com/npm/npm/commit/7f10f38d29a8423d7cde8103fa7b64ac728da1e0) - `editor@1.0.0`: `1.0.0` is literally more than `0.1.0` (no change aside from - version number). ([@substack](https://github.com/substack)) -* [`4979af3`](https://github.com/npm/npm/commit/4979af3fcae5a3962383b7fdad3162381e62eefe) - [#6805](https://github.com/npm/npm/issues/6805) `npm-registry-client@6.3.3`: - Decode scoped package names sent by the registry so they look nicer. - ([@mmalecki](https://github.com/mmalecki)) - -### v2.8.4 (2015-04-16): - -This is the fourth release of npm this week, so it's mostly just landing a few -small outstanding PRs on dependencies and some tiny documentation tweaks. -`npm@2.8.3` is where the real action is. - -* [`ee2bd77`](https://github.com/npm/npm/commit/ee2bd77f3c64d38735d1d31028224a5c40422a9b) - [#7983](https://github.com/npm/npm/issues/7983) `tar@2.1.0`: Better error - reporting in corrupted tar files, and add support for the `fromBase` flag - (rescued from the dustbin of history by - [@deanmarano](https://github.com/deanmarano)). - ([@othiym23](https://github.com/othiym23)) -* [`d8eee6c`](https://github.com/npm/npm/commit/d8eee6cf9d2ff7aca68dfaed2de76824a3e0d9af) - `init-package-json@1.4.1`: Add support for a default author, and only add - scope to a package name once. ([@othiym23](https://github.com/othiym23)) -* [`4fc5d98`](https://github.com/npm/npm/commit/4fc5d98b785f601c60d4dc0a2c8674f0cccf6262) - `lru-cache@2.6.1`: Small tweaks to cache value aging and entry counting that - are irrelevant to npm. ([@isaacs](https://github.com/isaacs)) -* [`1fe5840`](https://github.com/npm/npm/commit/1fe584089f5bef133de5518aa26eaf6064be2bf7) - [#7946](https://github.com/npm/npm/issues/7946) Make `npm init` text - friendlier. ([@sandfox](https://github.com/sandfox)) - -### v2.8.3 (2015-04-15): - -#### TWO SMALL GIT TWEAKS - -This is the last of a set of releases intended to ensure npm's git support is -robust enough that we can stop working on it for a while. These fixes are -small, but prevent a common crasher and clear up one of the more confusing -error messages coming out of npm when working with repositories hosted on git. - -* [`387f889`](https://github.com/npm/npm/commit/387f889c0e8fb617d9cc9a42ed0a3ec49424ab5d) - [#7961](https://github.com/npm/npm/issues/7961) Ensure that hosted git SSH - URLs always have a valid protocol when stored in `resolved` fields in - `npm-shrinkwrap.json`. ([@othiym23](https://github.com/othiym23)) -* [`394c2f5`](https://github.com/npm/npm/commit/394c2f5a1227232c0baf42fbba1402aafe0d6ffb) - Switch the order in which hosted Git providers are checked to `git:`, - `git+https:`, then `git+ssh:` (from `git:`, `git+ssh:`, then `git+https:`) in - an effort to go from most to least likely to succeed, to make for less - confusing error message. ([@othiym23](https://github.com/othiym23)) - -### v2.8.2 (2015-04-14): - -#### PEACE IN OUR TIME - -npm has been having an issue with CouchDB's web server since the release -of io.js and Node.js 0.12.0 that has consumed a huge amount of my time -to little visible effect. Sam Mikes picked up the thread from me, and -after a [_lot_ of effort](https://github.com/npm/npm/issues/7699#issuecomment-93091111) -figured out that ultimately there are probably a couple problems with -the new HTTP Agent keep-alive handling in new versions of Node. In -addition, `npm-registry-client` was gratuitously sending a body along -with a GET request which was triggering the bugs. Sam removed about 10 bytes from -one file in `npm-registry-client`, and this problem, which has been bugging us for months, -completely went away. - -In conclusion, Sam Mikes is great, and anybody using a private registry -hosted on CouchDB should thank him for his hard work. Also, thanks to -the community at large for pitching in on this bug, which has been -around for months now. - -* [`431c3bf`](https://github.com/npm/npm/commit/431c3bf6cdec50f9f0c735f478cb2f3f337d3313) - [#7699](https://github.com/npm/npm/issues/7699) `npm-registry-client@6.3.2`: - Don't send body with HTTP GET requests when logging in. - ([@smikes](https://github.com/smikes)) - -### v2.8.1 (2015-04-12): - -#### CORRECTION: NPM'S GIT INTEGRATION IS DOING OKAY - -A [helpful bug report](https://github.com/npm/npm/issues/7872#issuecomment-91809553) -led to another round of changes to -[`hosted-git-info`](https://github.com/npm/hosted-git-info/commit/827163c74531b69985d1ede7abced4861e7b0cd4), -some additional test-writing, and a bunch of hands-on testing against actual -private repositories. While the complexity of npm's git dependency handling is -nearly fractal (because npm is very complex, and git is even more complex), -it's feeling way more solid than it has for a while. We think this is a -substantial improvement over what we had before, so give `npm@2.8.1` a shot if -you have particularly complex git use cases and -[let us know](https://github.com/npm/npm/issues/new) how it goes. - -(NOTE: These changes mostly affect cloning and saving references to packages -hosted in git repositories, and don't address some known issues with things -like lifecycle scripts not being run on npm dependencies. Work continues on -other issues that affect parity between git and npm registry packages.) - -* [`66377c6`](https://github.com/npm/npm/commit/66377c6ece2cf4d53d9a618b7d9824e1452bc293) - [#7872](https://github.com/npm/npm/issues/7872) `hosted-git-info@2.1.2`: Pass - through credentials embedded in SSH and HTTPs git URLs. - ([@othiym23](https://github.com/othiym23)) -* [`15efe12`](https://github.com/npm/npm/commit/15efe124753257728a0ddc64074fa5a4b9c2eb30) - [#7872](https://github.com/npm/npm/issues/7872) Use the new version of - `hosted-git-info` to pass along credentials embedded in git URLs. Test it. - Test it a lot. ([@othiym23](https://github.com/othiym23)) - -#### SCOPED DEPENDENCIES AND PEER DEPENDENCIES: NOT QUITE REESE'S - -Big thanks to [@ewie](https://github.com/ewie) for identifying an issue with -how npm was handling `peerDependencies` that were implicitly installed from the -`package.json` files of scoped dependencies. This -[will be a moot point](https://github.com/npm/npm/issues/6565#issuecomment-74971689) -with the release of `npm@3`, but until then, it's important that -`peerDependency` auto-installation work as expected. - -* [`b027319`](https://github.com/npm/npm/commit/b0273190c71eba14395ddfdd1d9f7ba625297523) - [#7920](https://github.com/npm/npm/issues/7920) Scoped packages with - `peerDependencies` were installing the `peerDependencies` into the wrong - directory. ([@ewie](https://github.com/ewie)) -* [`649e31a`](https://github.com/npm/npm/commit/649e31ae4fd02568bae5dc6b4ea783431ce3d63e) - [#7920](https://github.com/npm/npm/issues/7920) Test `peerDependency` - installs involving scoped packages using `npm-package-arg` instead of simple - path tests, for consistency. ([@othiym23](https://github.com/othiym23)) - -#### MAKING IT EASIER TO WRITE NPM TESTS, VERSION 0.0.1 - -[@iarna](https://github.com/iarna) and I -([@othiym23](https://github.com/othiym23)) have been discussing a -[candidate plan](https://github.com/npm/npm/wiki/rewriting-npm's-tests:-a-plan-maybe) -for improving npm's test suite, with the goal of making it easier for new -contributors to get involved with npm by reducing the learning curve -necessary to be able to write good tests for proposed changes. This is the -first substantial piece of that effort. Here's what the commit message for -[`ed7e249`](https://github.com/npm/npm/commit/ed7e249d50444312cd266942ce3b89e1ca049bdf) -had to say about this work: - -> It's too difficult for npm contributors to figure out what the conventional -> style is for tests. Part of the problem is that the documentation in -> CONTRIBUTING.md is inadequate, but another important factor is that the tests -> themselves are written in a variety of styles. One of the most notable -> examples of this is the fact that many tests use fixture directories to store -> precooked test scenarios and package.json files. -> -> This had some negative consequences: -> -> * tests weren't idempotent -> * subtle dependencies between tests existed -> * new tests get written in this deprecated style because it's not -> obvious that the style is out of favor -> * it's hard to figure out why a lot of those directories existed, -> because they served a variety of purposes, so it was difficult to -> tell when it was safe to remove them -> -> All in all, the fixture directories were a major source of technical debt, and -> cleaning them up, while time-consuming, makes the whole test suite much more -> approachable, and makes it more likely that new tests written by outside -> contributors will follow a conventional style. To support that, all of the -> tests touched by this changed were cleaned up to pass the `standard` style -> checker. - -And here's a little extra context from a comment I left on [#7929](https://github.com/npm/npm/issues/7929): - -> One of the other things that encouraged me was looking at this -> [presentation on technical debt](http://www.slideshare.net/nnja/pycon-2015-technical-debt-the-monster-in-your-closet) -> from Pycon 2015, especially slide 53, which I interpreted in terms of -> difficulty getting new contributors to submit patches to an OSS project like -> npm. npm has a long ways to go, but I feel good about this change. - -* [`ed7e249`](https://github.com/npm/npm/commit/ed7e249d50444312cd266942ce3b89e1ca049bdf) - [#7929](https://github.com/npm/npm/issues/7929) Eliminate fixture directories - from `test/tap`, leaving each test self-contained. - ([@othiym23](https://github.com/othiym23)) -* [`4928d30`](https://github.com/npm/npm/commit/4928d30140821c63e03fffed73f8d88ebdc43710) - [#7929](https://github.com/npm/npm/issues/7929) Move fixture files from - `test/tap/*` to `test/fixtures`. ([@othiym23](https://github.com/othiym23)) -* [`e925deb`](https://github.com/npm/npm/commit/e925debca91092a814c1a00933babc3a8cf975be) - [#7929](https://github.com/npm/npm/issues/7929) Tweak the run scripts to stop - slaughtering the CPU on doc rebuild. - ([@othiym23](https://github.com/othiym23)) -* [`65bf7cf`](https://github.com/npm/npm/commit/65bf7cffaf91c426b676c47529eee796f8b8b75c) - [#7923](https://github.com/npm/npm/issues/7923) Use an alias of scripts and - run-scripts in `npm run test-all` ([@watilde](https://github.com/watilde)) -* [`756a3fb`](https://github.com/npm/npm/commit/756a3fbb852a2469afe706635ed88d22c37743e5) - [#7923](https://github.com/npm/npm/issues/7923) Sync timeout time of `npm - run-script test-all` to be the same as `test` and `tap` scripts. - ([@watilde](https://github.com/watilde)) -* [`8299b5f`](https://github.com/npm/npm/commit/8299b5fb6373354a7fbaab6f333863758812ae90) - Set a timeout for tap tests for `npm run-script test-all`. - ([@othiym23](https://github.com/othiym23)) - -#### THE EVER-BEATING DRUM OF DEPENDENCY UPDATES - -* [`d90d0b9`](https://github.com/npm/npm/commit/d90d0b992acbf62fd5d68debf9d1dbd6cfa20804) - [#7924](https://github.com/npm/npm/issues/7924) Remove `child-process-close`, - as it was included for Node 0.6 compatibility, and npm no longer supports - 0.6. ([@robertkowalski](https://github.com/robertkowalski)) -* [`16427c1`](https://github.com/npm/npm/commit/16427c1f3ea3d71ee753c62eb4c2663c7b32b84f) - `lru-cache@2.5.2`: More accurate updating of expiry times when `maxAge` is - set. ([@isaacs](https://github.com/isaacs)) -* [`03cce83`](https://github.com/npm/npm/commit/03cce83b64344a9e0fe036dce214f4d68cfcc9e7) - `nock@1.6.0`: Mocked network error handling. - ([@pgte](https://github.com/pgte)) -* [`f93b1f0`](https://github.com/npm/npm/commit/f93b1f0b7eb5d1b8a7967e837bbd756db1091d00) - `glob@5.0.5`: Use `path-is-absolute` polyfill, allowing newer Node.js and - io.js versions to use `path.isAbsolute()`. - ([@sindresorhus](https://github.com/sindresorhus)) -* [`a70d694`](https://github.com/npm/npm/commit/a70d69495a6e96997e64855d9e749d943ee6d64f) - `request@2.55.0`: Bug fixes and simplification. - ([@simov](https://github.com/simov)) -* [`2aecc6f`](https://github.com/npm/npm/commit/2aecc6f4083526feeb14615b4e5484edc66175b5) - `columnify@1.5.1`: Switch to using babel from 6to5. - ([@timoxley](https://github.com/timoxley)) - -### v2.8.0 (2015-04-09): - -#### WE WILL NEVER BE DONE FIXING NPM'S GIT SUPPORT - -If you look at [the last release's release -notes](https://github.com/npm/npm/blob/master/CHANGELOG.md#git-mean-git-tuff-git-all-the-way-away-from-my-stuff), -you will note that they confidently assert that it's perfectly OK to force all -GitHub URLs through the same `git:` -> `git+ssh:` fallback flow for cloning. It -turns out that many users depend on `git+https:` URLs in their build -environments because they use GitHub auth tokens instead of SSH keys. Also, in -some cases you just want to be able to explicitly say how a given dependency -should be cloned from GitHub. - -Because of the way we resolved the inconsistency in GitHub shorthand handling -[before](https://github.com/npm/npm/blob/master/CHANGELOG.md#bug-fixes-1), this -turned out to be difficult to work around. So instead of hacking around it, we -completely redid how git is handled within npm and its attendant packages. -Again. This time, we changed things so that `normalize-package-data` and -`read-package-json` leave more of the git logic to npm itself, which makes -handling shorthand syntax consistently much easier, and also allows users to -resume using explicit, fully-qualified git URLs without npm messing with them. - -Here's a summary of what's changed: - -* Instead of converting the GitHub shorthand syntax to a `git+ssh:`, `git:`, or - `git+https:` URL and saving that, save the shorthand itself to - `package.json`. -* If presented with shortcuts, try cloning via the git protocol, SSH, and HTTPS - (in that order). -* No longer prompt for credentials -- it didn't work right with the spinner, - and wasn't guaranteed to work anyway. We may experiment with doing this a - better way in the future. Users can override this by setting `GIT_ASKPASS` in - their environment if they want to experiment with interactive cloning, but - should also set `--no-spin` on the npm command line (or run `npm config set - spin=false`). -* **EXPERIMENTAL FEATURE**: Add support for `github:`, `gist:`, `bitbucket:`, - and `gitlab:` shorthand prefixes. GitHub shortcuts will continue to be - normalized to `org/repo` instead of being saved as `github:org/repo`, but - `gitlab:`, `gist:`, and `bitbucket:` prefixes will be used on the command - line and from `package.json`. BE CAREFUL WITH THIS. `package.json` files - published with the new shorthand syntax can _only_ be read by `npm@2.8.0` and - later, and this feature is mostly meant for playing around with it. If you - want to save git dependencies in a form that older versions of npm can read, - use `--save-exact`, which will save the git URL and resolved commit hash of - the head of the branch in a manner similar to the way that `--save-exact` - pins versions for registry dependencies. This is documented (so check `npm - help install` for details), but we're not going to make a lot of noise about - it until it has a chance to bake in a little more. - -It is [@othiym23](https://github.com/othiym23)'s sincere hope that this will -resolve all of the inconsistencies users were seeing with GitHub and git-hosted -packages, but given the level of change here, that may just be a fond wish. -Extra testing of this change is requested. - -* [`6b0f588`](https://github.com/npm/npm/commit/6b0f58877f37df9904490ffbaaad33862bd36dce) - [#7867](https://github.com/npm/npm/issues/7867) Use git shorthand and git - URLs as presented by user. Support new `hosted-git-info` shortcut syntax. - Save shorthand in `package.json`. Try cloning via `git:`, `git+ssh:`, and - `git+https:`, in that order, when supported by the underlying hosting - provider. ([@othiym23](https://github.com/othiym23)) -* [`75d4267`](https://github.com/npm/npm/commit/75d426787869d54ca7400408f562f971b34649ef) - [#7867](https://github.com/npm/npm/issues/7867) Document new GitHub, GitHub - gist, Bitbucket, and GitLab shorthand syntax. - ([@othiym23](https://github.com/othiym23)) -* [`7d92c75`](https://github.com/npm/npm/commit/7d92c7592998d90ec883fa989ca74f04ec1b93de) - [#7867](https://github.com/npm/npm/issues/7867) When `--save-exact` is used - with git shorthand or URLs, save the fully-resolved URL, with branch name - resolved to the exact hash for the commit checked out. - ([@othiym23](https://github.com/othiym23)) -* [`9220e59`](https://github.com/npm/npm/commit/9220e59f8def8c82c6d331a39ba29ad4c44e3a9b) - [#7867](https://github.com/npm/npm/issues/7867) Ensure that non-prefixed and - non-normalized GitHub shortcuts are saved to `package.json`. - ([@othiym23](https://github.com/othiym23)) -* [`dd398e9`](https://github.com/npm/npm/commit/dd398e98a8eba27eeba84378200da3d078fdf980) - [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.1.1`: - Ensure that `gist:` shorthand survives being round-tripped through - `package.json`. ([@othiym23](https://github.com/othiym23)) -* [`33d1420`](https://github.com/npm/npm/commit/33d1420bf2f629332fceb2ac7e174e63ac48f96a) - [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.1.0`: Add - support for auth embedded directly in git URLs. - ([@othiym23](https://github.com/othiym23)) -* [`23a1d5a`](https://github.com/npm/npm/commit/23a1d5a540e8db27f5cd0245de7c3694e2bddad1) - [#7867](https://github.com/npm/npm/issues/7867) `hosted-git-info@2.0.2`: Make - it possible to determine in which form a hosted git URL was passed. - ([@iarna](https://github.com/iarna)) -* [`eaf75ac`](https://github.com/npm/npm/commit/eaf75acb718611ad5cfb360084ec86938d9c66c5) - [#7867](https://github.com/npm/npm/issues/7867) - `normalize-package-data@2.0.0`: Normalize GitHub specifiers so they pass - through shortcut syntax and preserve explicit URLs. - ([@iarna](https://github.com/iarna)) -* [`95e0535`](https://github.com/npm/npm/commit/95e0535e365e0aca49c634dd2061a0369b0475f1) - [#7867](https://github.com/npm/npm/issues/7867) `npm-package-arg@4.0.0`: Add - git URL and shortcut to hosted git spec and use `hosted-git-info@2.0.2`. - ([@iarna](https://github.com/iarna)) -* [`a808926`](https://github.com/npm/npm/commit/a8089268d5f3d57f42dbaba02ff6437da5121191) - [#7867](https://github.com/npm/npm/issues/7867) - `realize-package-specifier@3.0.0`: Use `npm-package-arg@4.0.0` and test - shortcut specifier behavior. ([@iarna](https://github.com/iarna)) -* [`6dd1e03`](https://github.com/npm/npm/commit/6dd1e039bddf8cf5383343f91d84bc5d78acd083) - [#7867](https://github.com/npm/npm/issues/7867) `init-package-json@1.4.0`: - Allow dependency on `read-package-json@2.0.0`. - ([@iarna](https://github.com/iarna)) -* [`63254bb`](https://github.com/npm/npm/commit/63254bb6358f66752aca6aa1a275271b3ae03f7c) - [#7867](https://github.com/npm/npm/issues/7867) `read-installed@4.0.0`: Use - `read-package-json@2.0.0`. ([@iarna](https://github.com/iarna)) -* [`254b887`](https://github.com/npm/npm/commit/254b8871f5a173bb464cc5b0ace460c7878b8097) - [#7867](https://github.com/npm/npm/issues/7867) `read-package-json@2.0.0`: - Use `normalize-package-data@2.0.0`. ([@iarna](https://github.com/iarna)) -* [`0b9f8be`](https://github.com/npm/npm/commit/0b9f8be62fe5252abe54d49e36a696f4816c2eca) - [#7867](https://github.com/npm/npm/issues/7867) `npm-registry-client@6.3.0`: - Mark compatibility with `normalize-package-data@2.0.0` and - `npm-package-arg@4.0.0`. ([@iarna](https://github.com/iarna)) -* [`f40ecaa`](https://github.com/npm/npm/commit/f40ecaad68f77abc50eb6f5b224e31dec3d250fc) - [#7867](https://github.com/npm/npm/issues/7867) Extract a common method to - use when cloning git repos for testing. - ([@othiym23](https://github.com/othiym23)) - -#### TEST FIXES FOR NODE 0.8 - -npm continues to [get closer](https://github.com/npm/npm/issues/7842) to being -completely green on Travis for Node 0.8. - -* [`26d36e9`](https://github.com/npm/npm/commit/26d36e9cf0eca69fe1863d2ea536c28555b9e8de) - [#7842](https://github.com/npm/npm/issues/7842) When spawning child - processes, map exit code 127 to ENOENT so Node 0.8 handles child process - failures the same as later versions. - ([@SonicHedgehog](https://github.com/SonicHedgehog)) -* [`54cd895`](https://github.com/npm/npm/commit/54cd8956ea783f96749e46597d8c2cb9397c5d5f) - [#7842](https://github.com/npm/npm/issues/7842) Node 0.8 requires -e with -p - when evaluating snippets; fix test. - ([@SonicHedgehog](https://github.com/SonicHedgehog)) - -#### SMALL FIX AND DOC TWEAK - -* [`20e9003`](https://github.com/npm/npm/commit/20e90031b847e9f7c7168f3dad8b1e526f9a2586) - `tar@2.0.1`: Fix regression where relative symbolic links within an - extraction root that pointed within an extraction root would get normalized - to absolute symbolic links. ([@isaacs](https://github.com/isaacs)) -* [`2ef8898`](https://github.com/npm/npm/commit/2ef88989c41bee1578570bb2172c90ede129dbd1) - [#7879](https://github.com/npm/npm/issues/7879) Better document that `npm - publish --tag=foo` will not set `latest` to that version. - ([@linclark](https://github.com/linclark)) - -### v2.7.6 (2015-04-02): - -#### GIT MEAN, GIT TUFF, GIT ALL THE WAY AWAY FROM MY STUFF - -Part of the reason that we're reluctant to take patches to how npm deals with -git dependencies is that every time we touch the git support, something breaks. -The last few releases are a case in point. `npm@2.7.4` completely broke -installing private modules from GitHub, and `npm@2.7.5` fixed them at the cost -of logging a misleading error message that caused many people to believe that -their dependencies hadn't been successfully installed when they actually had -been. - -This all started from a desire to ensure that GitHub shortcut syntax is being -handled correctly. The correct behavior is for npm to try to clone all -dependencies on GitHub (whether they're specified with the GitHub -`organization/repository` shortcut syntax or not) via the plain `git:` protocol -first, and to fall back to using `git+ssh:` if `git:` doesn't work. Previously, -sometimes npm would use `git:` and `git+ssh:` in some cases (most notably when -using GitHub shortcut syntax on the command line), and use `git+https:` in -others (when the GitHub shortcut syntax was present in `package.json`). This -led to subtle and hard-to-understand inconsistencies, and we're glad that as of -`npm@2.7.6`, we've finally gotten things to where they were before we started, -only slightly more consistent overall. - -We are now going to go back to our policy of being extremely reluctant to touch -the code that handles Git dependencies. - -* [`b747593`](https://github.com/npm/npm/commit/b7475936f473f029e6a027ba1b16277523747d0b) - [#7630](https://github.com/npm/npm/issues/7630) Don't automatically log all - git failures as errors. `maybeGithub` needs to be able to fail without - logging to support its fallback logic. - ([@othiym23](https://github.com/othiym23)) -* [`cd67a0d`](https://github.com/npm/npm/commit/cd67a0db07891d20871822696c26692c8a84866a) - [#7829](https://github.com/npm/npm/issues/7829) When fetching a git remote - URL, handle failures gracefully (without assuming standard output exists). - ([@othiym23](https://github.com/othiym23)) -* [`637c7d1`](https://github.com/npm/npm/commit/637c7d1411fe07f409cf91f2e65fd70685cb253c) - [#7829](https://github.com/npm/npm/issues/7829) When fetching a git remote - URL, handle failures gracefully (without assuming standard _error_ exists). - ([@othiym23](https://github.com/othiym23)) - -#### OTHER SIGNIFICANT FIXES - -* [`78005eb`](https://github.com/npm/npm/commit/78005ebb6f4103c20f077669c3929b7ea46a4c0d) - [#7743](https://github.com/npm/npm/issues/7743) Always quote arguments passed - to `npm run-script`. This allows build systems and the like to safely escape - glob patterns passed as arguments to `run-scripts` with `npm run-script - <script> -- <arguments>`. This is a tricky change to test, and may be - reverted or moved to `npm@3` if it turns out it breaks things for users. - ([@mantoni](https://github.com/mantoni)) -* [`da015ee`](https://github.com/npm/npm/commit/da015eee45f6daf384598151d06a9b57ffce136e) - [#7074](https://github.com/npm/npm/issues/7074) `read-package-json@1.3.3`: - `read-package-json` no longer caches `package.json` files, which trades a - very small performance loss for the elimination of a large class of really - annoying race conditions. See [#7074](https://github.com/npm/npm/issues/7074) - for the grisly details. ([@othiym23](https://github.com/othiym23)) -* [`dd20f57`](https://github.com/npm/npm/commit/dd20f5755291b9433f0d298ee0eead22cda6db36) - `init-package-json@1.3.2`: Only add the `@` to scoped package names if it's - not already there when reading from the filesystem - ([@watilde](https://github.com/watilde)), and support inline validation of - package names ([@michaelnisi](https://github.com/michaelnisi)). - -#### SMALL FIXES AND DEPENDENCY UPGRADES - -* [`1f380f6`](https://github.com/npm/npm/commit/1f380f66c1e944b8ffbf096fa94d09e931626e12) - [#7820](https://github.com/npm/npm/issues/7820) `are-we-there-yet@1.0.4`: Use - `readable-stream` instead of built-in `stream` module to better support - Node.js 0.8.x. ([@SonicHedgehog](https://github.com/SonicHedgehog)) -* [`d380188`](https://github.com/npm/npm/commit/d380188e161be31f5a4f53947de6bc28df4732d8) - `semver@4.3.3`: Don't throw on `semver.parse(null)`, and parse numeric - version strings more robustly. ([@isaacs](https://github.com/isaacs)) -* [`01d9964`](https://github.com/npm/npm/commit/01d99649265f921e1c61cf406613e7042bcea008) - `nock@1.4.0`: This change may need to be rolled back, or rolled forward, - because [nock depends on - `setImmediate`](https://github.com/npm/npm/issues/7842), which causes tests - to fail when run with Node.js 0.8. ([@othiym23](https://github.com/othiym23)) -* [`91f5cb1`](https://github.com/npm/npm/commit/91f5cb1fb91520fbe25a4da5b80848ed540b9ad3) - [#7791](https://github.com/npm/npm/issues/7791) Fix brackets in npmconf so - that `loaded` is set correctly. - ([@charmander](https://github.com/charmander)) -* [`1349e27`](https://github.com/npm/npm/commit/1349e27c936a8b0fc9f6440a6d6404ef3b19c587) - [#7818](https://github.com/npm/npm/issues/7818) Update `README.md` to point - out that the install script now lives on https://www.npmjs.com. - ([@weisjohn](https://github.com/weisjohn)) - -### v2.7.5 (2015-03-26): - -#### SECURITY FIXES - -* [`300834e`](https://github.com/npm/npm/commit/300834e91a4e2a95fb7fb59c309e7c3fc91d2312) - `tar@2.0.0`: Normalize symbolic links that point to targets outside the - extraction root. This prevents packages containing symbolic links from - overwriting targets outside the expected paths for a package. Thanks to [Tim - Cuthbertson](http://gfxmonk.net/) and the team at [Lift - Security](https://liftsecurity.io/) for working with the npm team to identify - this issue. ([@othiym23](https://github.com/othiym23)) -* [`0dc6875`](https://github.com/npm/npm/commit/0dc68757cffd5397c280bc71365d106523a5a052) - `semver@4.3.2`: Package versions can be no more than 256 characters long. - This prevents a situation in which parsing the version number can use - exponentially more time and memory to parse, leading to a potential denial of - service. Thanks to Adam Baldwin at Lift Security for bringing this to our - attention. ([@isaacs](https://github.com/isaacs)) - -#### BUG FIXES - -* [`5811468`](https://github.com/npm/npm/commit/5811468e104ccb6b26b8715dff390d68daa10066) - [#7713](https://github.com/npm/npm/issues/7713) Add a test for `npm link` and - `npm link <package>`. ([@watilde](https://github.com/watilde)) -* [`3cf3b0c`](https://github.com/npm/npm/commit/3cf3b0c8fddb6b66f969969feebea85fabd0360b) - [#7713](https://github.com/npm/npm/issues/7713) Only use absolute symbolic - links when `npm link`ing. ([@hokaccha](https://github.com/hokaccha)) -* [`f35aa93`](https://github.com/npm/npm/commit/f35aa933e136228a89e3fcfdebe8c7cc4f1e7c00) - [#7443](https://github.com/npm/npm/issues/7443) Keep relative URLs when - hitting search endpoint. ([@othiym23](https://github.com/othiym23)) -* [`eab6184`](https://github.com/npm/npm/commit/eab618425c51e3aa4416da28dcd8ca4ba63aec41) - [#7766](https://github.com/npm/npm/issues/7766) One last tweak to ensure that - GitHub shortcuts work with private repositories. - ([@iarna](https://github.com/iarna)) -* [`5d7f704`](https://github.com/npm/npm/commit/5d7f704823f5f92ddd7ff3e7dd2b8bcc66c73005) - [#7656](https://github.com/npm/npm/issues/7656) Don't try to load a deleted - CA file, allowing the `cafile` config to be changed. - ([@KenanY](https://github.com/KenanY)) -* [`a840a13`](https://github.com/npm/npm/commit/a840a13bbf0330157536381ea8e58d0bd93b4c05) - [#7746](https://github.com/npm/npm/issues/7746) Only fix up URL paths when - there are paths to fix up. ([@othiym23](https://github.com/othiym23)) - -#### DEPENDENCY UPDATES - -* [`94df809`](https://github.com/npm/npm/commit/94df8095985bf5ba9d8db99dc445d05dac136aaf) - `request@2.54.0`: Fixes for Node.js 0.12 and io.js. - ([@simov](https://github.com/simov)) -* [`98a13ea`](https://github.com/npm/npm/commit/98a13eafdf098b53069ad15297008fcab9c61653) - `opener@1.4.1`: Deal with `start` on Windows more conventionally. - ([@domenic](https://github.com/domenic)) -* [`c2417c7`](https://github.com/npm/npm/commit/c2417c7702459a446f07d43ca3c4e99bde7fe9d6) - `require-inject@1.2.0`: Add installGlobally to bypass cleanups. - ([@iarna](https://github.com/iarna)) - -#### DOCUMENTATION FIXES - -* [`f87c728`](https://github.com/npm/npm/commit/f87c728f8732c9e977c0dc2060c0610649e79155) - [#7696](https://github.com/npm/npm/issues/7696) Months and minutes were - swapped in doc-build.sh ([@MeddahJ](https://github.com/MeddahJ)) -* [`4e216b2`](https://github.com/npm/npm/commit/4e216b29b30463f06afe6e3c645e205da5f50922) - [#7752](https://github.com/npm/npm/issues/7752) Update string examples to be - properly quoted. ([@snuggs](https://github.com/snuggs)) -* [`402f52a`](https://github.com/npm/npm/commit/402f52ab201efa348feb87cad753fc4b91e8a3fb) - [#7635](https://github.com/npm/npm/issues/7635) Clarify Windows installation - instructions. ([@msikma](https://github.com/msikma)) -* [`c910399`](https://github.com/npm/npm/commit/c910399ecfd8db49fe4496dd26887765a8aed20f) - small typo fix to `CHANGELOG.md` ([@e-jigsaw](https://github.com/e-jigsaw)) - -### v2.7.4 (2015-03-20): - -#### BUG FIXES - -* [`fe1bc38`](https://github.com/npm/npm/commit/fe1bc387a14475e373557de669e03d9d006d3173) - [#7672](https://github.com/npm/npm/issues/7672) `npm-registry-client@3.1.2`: - Fix client-side certificate handling by correcting property name. - ([@atamon](https://github.com/atamon)) -* [`3ce3cc2`](https://github.com/npm/npm/commit/3ce3cc242fc345bca6820185a4f5a013c5bc1944) - [#7635](https://github.com/npm/npm/issues/7635) `fstream-npm@1.0.2`: Raise a - more descriptive error when `bundledDependencies` isn't an array. - ([@KenanY](https://github.com/KenanY)) -* [`3a12723`](https://github.com/npm/npm/commit/3a127235076a1f00bc8befba56c024c6d0e7f477) - [#7661](https://github.com/npm/npm/issues/7661) Allow setting `--registry` on - the command line to trump the mapped registry for `--scope`. - ([@othiym23](https://github.com/othiym23)) -* [`89ce829`](https://github.com/npm/npm/commit/89ce829a00b526d0518f5cd855c323bffe182af0) - [#7630](https://github.com/npm/npm/issues/7630) `hosted-git-info@1.5.3`: Part - 3 of ensuring that GitHub shorthand is handled consistently. - ([@othiym23](https://github.com/othiym23)) -* [`63313eb`](https://github.com/npm/npm/commit/63313eb0c37891c355546fd1093010c8a0c3cd81) - [#7630](https://github.com/npm/npm/issues/7630) - `realize-package-specifier@2.2.0`: Part 2 of ensuring that GitHub shorthand - is handled consistently. ([@othiym23](https://github.com/othiym23)) -* [`3ed41bf`](https://github.com/npm/npm/commit/3ed41bf64a1bb752bb3155c74dd6ffbbd28c89c9) - [#7630](https://github.com/npm/npm/issues/7630) `npm-package-arg@3.1.1`: Part - 1 of ensuring that GitHub shorthand is handled consistently. - ([@othiym23](https://github.com/othiym23)) - -#### DEPENDENCY UPDATES - -* [`6a498c6`](https://github.com/npm/npm/commit/6a498c6aaa00611a0a1ea405255900c327103f8b) - `npm-registry-couchapp@2.6.7`: Ensure that npm continues to work with new - registry architecture. ([@bcoe](https://github.com/bcoe)) -* [`bd72c47`](https://github.com/npm/npm/commit/bd72c47ce8c58e287d496902c11845c8fea420d6) - `glob@5.0.3`: Updated to latest version. - ([@isaacs](https://github.com/isaacs)) -* [`4bfbaa2`](https://github.com/npm/npm/commit/4bfbaa2d8b9dc7067d999de8f55676db3a4f4196) - `npmlog@1.2.0`: Getting up to date with latest version (but not using any of - the new features). ([@othiym23](https://github.com/othiym23)) - -#### A NEW REGRESSION TEST - -* [`3703b0b`](https://github.com/npm/npm/commit/3703b0b87c127a64649bdbfc3bc697ebccc4aa24) - Add regression test for `npm version` to ensure `message` property in config - continues to be honored. ([@dannyfritz](https://github.com/dannyfritz)) - -### v2.7.3 (2015-03-16): - -#### HAHA WHOOPS LIL SHINKWRAP ISSUE THERE LOL - -* [`1549106`](https://github.com/npm/npm/commit/1549106f518000633915686f5f1ccc6afcf77f8f) - [#7641](https://github.com/npm/npm/issues/7641) Due to 448efd0, running `npm - shrinkwrap --dev` caused production dependencies to no longer be included in - `npm-shrinkwrap.json`. Whoopsie! ([@othiym23](https://github.com/othiym23)) - -### v2.7.2 (2015-03-12): - -#### NPM GASTROENTEROLOGY - -* [`fb0ac26`](https://github.com/npm/npm/commit/fb0ac26eecdd76f6eaa4a96a865b7c6f52ce5aa5) - [#7579](https://github.com/npm/npm/issues/7579) Only block removing files and - links when we're sure npm isn't responsible for them. This change is hard to - summarize, because if things are working correctly you should never see it, - but if you want more context, just [go read the commit - message](https://github.com/npm/npm/commit/fb0ac26eecdd76f6eaa4a96a865b7c6f52ce5aa5), - which lays it all out. ([@othiym23](https://github.com/othiym23)) -* [`051c473`](https://github.com/npm/npm/commit/051c4738486a826300f205b71590781ce7744f01) - [#7552](https://github.com/npm/npm/issues/7552) `bundledDependencies` are now - properly included in the installation context. This is another fantastically - hard-to-summarize bug, and once again, I encourage you to [read the commit - message](https://github.com/npm/npm/commit/051c4738486a826300f205b71590781ce7744f01) - if you're curious about the details. The snappy takeaway is that this - unbreaks many use cases for `ember-cli`. ([@othiym23](https://github.com/othiym23)) - -#### LESS DRAMATIC CHANGES - -* [`fcd9247`](https://github.com/npm/npm/commit/fcd92476f3a9092f6f8c83a19a24fe63b206edcd) - [#7597](https://github.com/npm/npm/issues/7597) Awk varies pretty - dramatically from platform to platform, so use Perl to generate the AUTHORS - list instead. ([@KenanY](https://github.com/KenanY)) -* [`721b17a`](https://github.com/npm/npm/commit/721b17a31690bec074eb8763d823d6de63406005) - [#7598](https://github.com/npm/npm/issues/7598) `npm install --save` really - isn't experimental anymore. ([@RichardLitt](https://github.com/RichardLitt)) - -#### DEPENDENCY REFRESH - -* [`a91f2c7`](https://github.com/npm/npm/commit/a91f2c7c9a5183d9cde7aae040ebd9ccdf104be7) - [#7559](https://github.com/npm/npm/issues/7559) `node-gyp@1.0.3` Switch - `node-gyp` to use `stdio` instead of `customFds` so it stops printing a - deprecation warning every time you build a native dependency. - ([@jeffbski](https://github.com/jeffbski)) -* [`0c85db7`](https://github.com/npm/npm/commit/0c85db7f0dde41762411e40a029153e6a65ef483) - `rimraf@2.3.2`: Globbing now deals with paths containing valid glob - metacharacters better. ([@isaacs](https://github.com/isaacs)) -* [`d14588e`](https://github.com/npm/npm/commit/d14588ed09b032c4c770e34b4c0f2436f5fccf6e) - `minimatch@2.0.4`: Bug fixes. ([@isaacs](https://github.com/isaacs)) -* [`aa9952e`](https://github.com/npm/npm/commit/aa9952e8270a6c1b7f97e579875dd6e3aa22abfd) - `graceful-fs@3.0.6`: Bug fixes. ([@isaacs](https://github.com/isaacs)) - -### v2.7.1 (2015-03-05): - -#### GITSANITY - -* [`6823807`](https://github.com/npm/npm/commit/6823807bba6c00228a724e1205ae90d67df0adad) - [#7121](https://github.com/npm/npm/issues/7121) `npm install --save` for Git - dependencies saves the URL passed in, instead of the temporary directory used - to clone the remote repo. Fixes using Git dependencies when shrinkwrapping. - In the process, rewrote the Git dependency caching code. Again. No more - single-letter variable names, and a much clearer workflow. - ([@othiym23](https://github.com/othiym23)) -* [`c8258f3`](https://github.com/npm/npm/commit/c8258f31365b045e5fcf15b865a363abbc3be616) - [#7486](https://github.com/npm/npm/issues/7486) When installing Git remotes, - the caching code was passing in the function `gitEnv` instead of the results - of invoking it. ([@functino](https://github.com/functino)) -* [`c618eed`](https://github.com/npm/npm/commit/c618eeda3e321fd454d77c476b53a0330f2344cc) - [#2556](https://github.com/npm/npm/issues/2556) Make it possible to install - Git dependencies when using `--link` by not linking just the Git - dependencies. ([@smikes](https://github.com/smikes)) - -#### WHY DID THIS TAKE SO LONG. - -* [`abdd040`](https://github.com/npm/npm/commit/abdd040da90932535472f593d5433a67ee074801) - `read-package-json@1.3.2`: Provide more helpful error messages when JSON - parse errors are encountered by using a more forgiving JSON parser than - JSON.parse. ([@smikes](https://github.com/smikes)) - -#### BUGS & TWEAKS - -* [`c56cfcd`](https://github.com/npm/npm/commit/c56cfcd79cd8ab4ccd06d2c03d7e04030d576683) - [#7525](https://github.com/npm/npm/issues/7525) `npm dedupe` handles scoped - packages. ([@KidkArolis](https://github.com/KidkArolis)) -* [`1b8ba74`](https://github.com/npm/npm/commit/1b8ba7426393cbae2c76ad2c35953782d4401871) - [#7531](https://github.com/npm/npm/issues/7531) `npm stars` and `npm whoami` - will no longer send the registry the error text saying you need to log in as - your username. ([@othiym23](https://github.com/othiym23)) -* [`6de1e91`](https://github.com/npm/npm/commit/6de1e91116a5105dfa75126532b9083d8672e034) - [#6441](https://github.com/npm/npm/issues/6441) Prevent needless reinstalls - by only updating packages when the current version isn't the same as the - version returned as `wanted` by `npm outdated`. - ([@othiym23](https://github.com/othiym23)) -* [`2abc3ee`](https://github.com/npm/npm/commit/2abc3ee08f0cabc4e7bfd7b973c0b59dc44715ff) - Add `npm upgrade` as an alias for `npm update`. - ([@othiym23](https://github.com/othiym23)) -* [`bcd4722`](https://github.com/npm/npm/commit/bcd47224e18884191a5d0057c2b2fff83ac8206e) - [#7508](https://github.com/npm/npm/issues/7508) FreeBSD uses `EAI_FAIL` - instead of `ENOTFOUND`. ([@othiym23](https://github.com/othiym23)) -* [`21c1ac4`](https://github.com/npm/npm/commit/21c1ac41280f0716a208cde14025a2ad5ef61fed) - [#7507](https://github.com/npm/npm/issues/7507) Update support URL in generic - error handler to `https:` from `http:`. - ([@watilde](https://github.com/watilde)) -* [`b6bd99a`](https://github.com/npm/npm/commit/b6bd99a73f575545fbbaef95c12237c47dd32561) - [#7492](https://github.com/npm/npm/issues/7492) On install, the - `package.json` `engineStrict` deprecation only warns for the current package. - ([@othiym23](https://github.com/othiym23)) -* [`4ef1412`](https://github.com/npm/npm/commit/4ef1412d0061239da2b1c4460ed6db37cc9ded27) - [#7075](https://github.com/npm/npm/issues/7075) If you try to tag a release - as a valid semver range, `npm publish` and `npm tag` will error early instead - of proceeding. ([@smikes](https://github.com/smikes)) -* [`ad53d0f`](https://github.com/npm/npm/commit/ad53d0f666125d9f50d661b54901c6e5bab4d603) - Use `rimraf` in npm build script because Windows doesn't know what rm is. - ([@othiym23](https://github.com/othiym23)) -* [`8885c4d`](https://github.com/npm/npm/commit/8885c4dfb618f2838930b5c5149abea300a762d6) - `rimraf@2.3.1`: Better Windows support. - ([@isaacs](https://github.com/isaacs)) -* [`8885c4d`](https://github.com/npm/npm/commit/8885c4dfb618f2838930b5c5149abea300a762d6) - `glob@4.4.2`: Handle bad symlinks properly. - ([@isaacs](https://github.com/isaacs)) - -###E TYPSO & CLARFIICATIONS - -dId yuo know that submiting fxies for doc tpyos is an exclelent way to get -strated contriburting to a new open-saurce porject? - -* [`42c605c`](https://github.com/npm/npm/commit/42c605c7b401f603c32ea70427e1a7666adeafd9) - Fix typo in `CHANGELOG.md` ([@adrianblynch](https://github.com/adrianblynch)) -* [`c9bd58d`](https://github.com/npm/npm/commit/c9bd58dd637b9c41441023584a13e3818d5db336) - Add note about `node_modules/.bin` being added to the path in `npm - run-script`. ([@quarterto](https://github.com/quarterto)) -* [`903bdd1`](https://github.com/npm/npm/commit/903bdd105b205d6e45d3a2ab83eea8e4071e9aeb) - Matt Ranney confused the world when he renamed `node-redis` to `redis`. "The - world" includes npm's documentation. - ([@RichardLitt](https://github.com/RichardLitt)) -* [`dea9bb2`](https://github.com/npm/npm/commit/dea9bb2319183fe54bf4d173d8533d46d2c6611c) - Fix typo in contributor link. ([@watilde](https://github.com/watilde)) -* [`1226ca9`](https://github.com/npm/npm/commit/1226ca98d4d7650cc3ba16bf7ac62e44820f3bfa) - Properly close code block in npm-install.md. - ([@olizilla](https://github.com/olizilla)) - -### v2.7.0 (2015-02-26): - -#### SOMETIMES SEMVER MEANS "SUBJECTIVE-EMPATHETIC VERSIONING" - -For a very long time (maybe forever?), the documentation for `npm run-script` -has said that `npm restart` will only call `npm stop` and `npm start` when -there is no command defined as `npm restart` in `package.json`. The problem -with this documentation is that `npm run-script` was apparently never wired up -to actually work this way. - -Until now. - -If the patch below were landed on its own, free of context, it would be a -breaking change. But, since the "new" behavior is how the documentation claims -this feature has always worked, I'm classifying it as a patch-level bug fix. I -apologize in advance if this breaks anybody's deployment scripts, and if it -turns out to be a significant regression in practice, we can revert this change -and move it to `npm@3`, which is allowed to make breaking changes due to being -a new major version of semver. - -* [`2f6a1df`](https://github.com/npm/npm/commit/2f6a1df3e1e3e0a3bc4abb69e40f59a64204e7aa) - [#1999](https://github.com/npm/npm/issues/1999) Only run `stop` and `start` - scripts (plus their pre- and post- scripts) when there's no `restart` script - defined. This makes it easier to support graceful restarts of services - managed by npm. ([@watilde](https://github.com/watilde) / - [@scien](https://github.com/scien)) - -#### A SMALL FEATURE WITH BIG IMPLICATIONS - -* [`145af65`](https://github.com/npm/npm/commit/145af6587f45de135cc876be2027ed818ed4ca6a) - [#4887](https://github.com/npm/npm/issues/4887) Replace calls to the - `node-gyp` script bundled with npm by passing the - `--node-gyp=/path/to/node-gyp` option to npm. Swap in `pangyp` or a version - of `node-gyp` modified to work better with io.js without having to touch - npm's code! ([@ackalker](https://github.com/ackalker)) - -#### [@WATILDE'S](https://github.com/watilde) NPM USABILITY CORNER - -Following `npm@2.6.1`'s unexpected fix of many of the issues with `npm update --g` simply by making `--depth=0` the default for `npm outdated`, friend of npm -[@watilde](https://github.com/watilde) has made several modest changes to npm's -behavior that together justify bumping npm's minor version, as well as making -npm significantly more pleasant to use: - -* [`448efd0`](https://github.com/npm/npm/commit/448efd0eaa6f97af0889bf47efc543a1ea2f8d7e) - [#2853](https://github.com/npm/npm/issues/2853) Add support for `--dev` and - `--prod` to `npm ls`, so that you can list only the trees of production or - development dependencies, as desired. - ([@watilde](https://github.com/watilde)) -* [`a0a8777`](https://github.com/npm/npm/commit/a0a87777af8bee180e4e9321699f050c29ed5ac4) - [#7463](https://github.com/npm/npm/issues/7463) Split the list printed by - `npm run-script` into lifecycle scripts and scripts directly invoked via `npm - run-script`. ([@watilde](https://github.com/watilde)) -* [`a5edc17`](https://github.com/npm/npm/commit/a5edc17d5ef1435b468a445156a4a109df80f92b) - [#6749](https://github.com/npm/npm/issues/6749) `init-package-json@1.3.1`: - Support for passing scopes to `npm init` so packages are initialized as part - of that scope / organization / team. ([@watilde](https://github.com/watilde)) - -#### SMALLER FEATURES AND FIXES - -It turns out that quite a few pull requests had piled up on npm's issue -tracker, and they included some nice small features and fixes: - -* [`f33e8b8`](https://github.com/npm/npm/commit/f33e8b8ff2de094071c5976be95e35110cf2ab1a) - [#7354](https://github.com/npm/npm/issues/7354) Add `--if-present` flag to - allow e.g. CI systems to call (semi-) standard build tasks defined in - `package.json`, but don't raise an error if no such script is defined. - ([@jussi-kalliokoski](https://github.com/jussi-kalliokoski)) -* [`7bf85cc`](https://github.com/npm/npm/commit/7bf85cc372ab5698593b01e139c383fa62c92516) - [#4005](https://github.com/npm/npm/issues/4005) - [#6248](https://github.com/npm/npm/issues/6248) Globally unlink a package - when `npm rm` / `npm unlink` is called with no arguments. - ([@isaacs](https://github.com/isaacs)) -* [`a2e04bd`](https://github.com/npm/npm/commit/a2e04bd921feab8f9e40a27e180ca9308eb709d7) - [#7294](https://github.com/npm/npm/issues/7294) Ensure that when depending on - `git+<proto>` URLs, npm doesn't keep tacking additional `git+` prefixes onto - the front. ([@twhid](https://github.com/twhid)) -* [`0f87f5e`](https://github.com/npm/npm/commit/0f87f5ed28960d962f34977953561d22983da4f9) - [#6422](https://github.com/npm/npm/issues/6422) When depending on GitHub - private repositories, make sure we construct the Git URLS correctly. - ([@othiym23](https://github.com/othiym23)) -* [`50f461d`](https://github.com/npm/npm/commit/50f461d248c4d22e881a9535dccc1d57d994dbc7) - [#4595](https://github.com/npm/npm/issues/4595) Support finding compressed - manpages. It's still up to the system to figure out how to display them, - though. ([@pshevtsov](https://github.com/pshevtsov)) -* [`44da664`](https://github.com/npm/npm/commit/44da66456b530c049ff50953f78368460df87461) - [#7465](https://github.com/npm/npm/issues/7465) When calling git, log the - **full** command, with all arguments, on error. - ([@thriqon](https://github.com/thriqon)) -* [`9748d5c`](https://github.com/npm/npm/commit/9748d5cd195d0269b32caf45129a93d29359a796) - Add parent to error on `ETARGET` error. - ([@davglass](https://github.com/davglass)) -* [`37038d7`](https://github.com/npm/npm/commit/37038d7db47a986001f77ac17b3e164000fc8ff3) - [#4663](https://github.com/npm/npm/issues/4663) Remove hackaround for Linux - tests, as it's evidently no longer necessary. - ([@mmalecki](https://github.com/mmalecki)) -* [`d7b7853`](https://github.com/npm/npm/commit/d7b785393dffce93bb70317fbc039a6428ca37c5) - [#2612](https://github.com/npm/npm/issues/2612) Add support for path - completion on `npm install`, which narrows completion to only directories - containing `package.json` files. ([@deestan](https://github.com/deestan)) -* [`628fcdb`](https://github.com/npm/npm/commit/628fcdb0be4e14c0312085a50dc2ae01dc713fa6) - Remove all command completion calls to `-/short`, because it's been removed - from the primary registry for quite some time, and is generally a poor idea - on any registry with more than a few hundred packages. - ([@othiym23](https://github.com/othiym23)) -* [`3f6061d`](https://github.com/npm/npm/commit/3f6061d75650441ee690472d1fa9c8dd7a7b1b28) - [#6659](https://github.com/npm/npm/issues/6659) Instead of removing zsh - completion global, make it a local instead. - ([@othiym23](https://github.com/othiym23)) - -#### DOCUMENTATION TWEAKS - -* [`5bc70e6`](https://github.com/npm/npm/commit/5bc70e6cfb3598da433806c6f447fc94c8e1d35d) - [#7417](https://github.com/npm/npm/issues/7417) Provide concrete examples of - how the new `npm update` defaults work in practice, tied to actual test - cases. Everyone interested in using `npm update -g` now that it's been fixed - should read these documents, as should anyone interested in writing - documentation for npm. ([@smikes](https://github.com/smikes)) -* [`8ac6f21`](https://github.com/npm/npm/commit/8ac6f2123a6af13dc9447fad96ec9cb583c45a71) - [#6543](https://github.com/npm/npm/issues/6543) Clarify `npm-scripts` - warnings to de-emphasize dangers of using `install` scripts. - ([@zeke](https://github.com/zeke)) -* [`ebe3b37`](https://github.com/npm/npm/commit/ebe3b37098efdada41dcc4c52a291e29296ea242) - [#6711](https://github.com/npm/npm/issues/6711) Note that git tagging of - versions can be disabled via `--no-git-tag-verson`. - ([@smikes](https://github.com/smikes)) -* [`2ef5771`](https://github.com/npm/npm/commit/2ef5771632006e6cee8cf17f836c0f98ab494bd1) - [#6711](https://github.com/npm/npm/issues/6711) Document `git-tag-version` - configuration option. ([@KenanY](https://github.com/KenanY)) -* [`95e59b2`](https://github.com/npm/npm/commit/95e59b287c9517780318e145371a859e8ebb2d20) - Document that `NODE_ENV=production` behaves analogously to `--production` on - `npm install`. ([@stefaneg](https://github.com/stefaneg)) -* [`687117a`](https://github.com/npm/npm/commit/687117a5bcd6a838cd1532ea7020ec6fcf0c33c0) - [#7463](https://github.com/npm/npm/issues/7463) Document the new script - grouping behavior in the man page for `npm run-script`. - ([@othiym23](https://github.com/othiym23)) -* [`536b2b6`](https://github.com/npm/npm/commit/536b2b6f55c349247b3e79b5d11b4c033ef5a3df) - Rescue one of the the disabled tests and make it work properly. - ([@smikes](https://github.com/smikes)) - -#### DEPENDENCY UPDATES - -* [`89fc6a4`](https://github.com/npm/npm/commit/89fc6a4e7ff8c524675fcc14493ca0a1e3a76d38) - `which@1.0.9`: Test for being run as root, as well as the current user. - ([@isaacs](https://github.com/isaacs)) -* [`5d0612f`](https://github.com/npm/npm/commit/5d0612f31e226cba32a05351c47b055c0ab6c557) - `glob@4.4.1`: Better error message to explain why calling sync glob with a - callback results in an error. ([@isaacs](https://github.com/isaacs)) -* [`64b07f6`](https://github.com/npm/npm/commit/64b07f6caf6cb07e4102f1e4e5f2ff2b944e452e) - `tap@0.7.1`: More accurate counts of pending & skipped tests. - ([@rmg](https://github.com/rmg)) -* [`8fda451`](https://github.com/npm/npm/commit/8fda45195dae1d6f792be556abe87f7763fab09b) - `semver@4.3.1`: Make official the fact that `node-semver` has moved from - [@isaacs](https://github.com/isaacs)'s organization to - [@npm](https://github.com/npm)'s. ([@isaacs](https://github.com/isaacs)) - -### v2.6.1 (2015-02-19): - -* [`8b98f0e`](https://github.com/npm/npm/commit/8b98f0e709d77a8616c944aebd48ab726f726f76) - [#4471](https://github.com/npm/npm/issues/4471) `npm outdated` (and only `npm - outdated`) now defaults to `--depth=0`. See the [docs for - `--depth`](https://github.com/npm/npm/blob/82f484672adb1a3caf526a8a48832789495bb43d/doc/misc/npm-config.md#depth) - for the mildly confusing details. ([@smikes](https://github.com/smikes)) -* [`aa79194`](https://github.com/npm/npm/commit/aa791942a9f3c8af6a650edec72a675deb7a7c6e) - [#6565](https://github.com/npm/npm/issues/6565) Tweak `peerDependency` - deprecation warning to include which peer dependency on which package is - going to need to change. ([@othiym23](https://github.com/othiym23)) -* [`5fa067f`](https://github.com/npm/npm/commit/5fa067fd47682ac3cdb12a2b009d8ca59b05f992) - [#7171](https://github.com/npm/npm/issues/7171) Tweak `engineStrict` - deprecation warning to include which `package.json` is using it. - ([@othiym23](https://github.com/othiym23)) -* [`0fe0caa`](https://github.com/npm/npm/commit/0fe0caa7eddb7acdacbe5ee81ceabaca27175c78) - `glob@4.4.0`: Glob patterns can now ignore matches. - ([@isaacs](https://github.com/isaacs)) - -### v2.6.0 (2015-02-12): - -#### A LONG-AWAITED GUEST - -* [`38c4825`](https://github.com/npm/npm/commit/38c48254d3d217b4babf5027cb39492be4052fc2) - [#5068](https://github.com/npm/npm/issues/5068) Add new logout command, and - make it do something useful on both bearer-based and basic-based authed - clients. ([@othiym23](https://github.com/othiym23)) -* [`4bf0f5d`](https://github.com/npm/npm/commit/4bf0f5d56c33649124b486e016ba4a620c105c1c) - `npm-registry-client@6.1.1`: Support new `logout` endpoint to invalidate - token for sessions. ([@othiym23](https://github.com/othiym23)) - -#### DEPRECATIONS - -* [`c8e08e6`](https://github.com/npm/npm/commit/c8e08e6d91f4016c80f572aac5a2080df0f78098) - [#6565](https://github.com/npm/npm/issues/6565) Warn that `peerDependency` - behavior is changing and add a note to the docs. - ([@othiym23](https://github.com/othiym23)) -* [`7c81a5f`](https://github.com/npm/npm/commit/7c81a5f5f058941f635a92f22641ea68e79b60db) - [#7171](https://github.com/npm/npm/issues/7171) Warn that `engineStrict` in - `package.json` will be going away in the next major version of npm (coming - soon!) ([@othiym23](https://github.com/othiym23)) - -#### BUG FIXES & TWEAKS - -* [`add5890`](https://github.com/npm/npm/commit/add5890ce447dabf120b907a85f715df1e065f44) - [#4668](https://github.com/npm/npm/issues/4668) `read-package-json@1.3.1`: - Warn when a `bin` symbolic link is a dangling reference. - ([@nicks](https://github.com/nicks)) -* [`4b42071`](https://github.com/npm/npm/commit/4b420714dfb84338d85def78c30bd665e32d72c1) - `semver@4.3.0`: Add functions to extract parts of the version triple, fix a - typo. ([@isaacs](https://github.com/isaacs)) -* [`a9aff38`](https://github.com/npm/npm/commit/a9aff38719918486fc381d67ad3371c475632ff7) - Use full path for man pages as the symbolic link source, instead of just the - file name. ([@bengl](https://github.com/bengl)) -* [`6fd0fbd`](https://github.com/npm/npm/commit/6fd0fbd8a0347fd47cb7ee0064e0902a2f8a087c) - [#7233](https://github.com/npm/npm/issues/7233) Ensure `globalconfig` path - exists before trying to edit it. ([@ljharb](https://github.com/ljharb)) -* [`a0a2620`](https://github.com/npm/npm/commit/a0a262047647d9e2690cebe5a89e6a0dd33202bb) - `ini@1.3.3`: Allow embedded, quoted equals signs in ini field names. - ([@isaacs](https://github.com/isaacs)) - -Also typos and other documentation issues were addressed by -[@rutsky](https://github.com/rutsky), [@imurchie](https://github.com/imurchie), -[@marcin-wosinek](https://github.com/marcin-wosinek), -[@marr](https://github.com/marr), [@amZotti](https://github.com/amZotti), and -[@karlhorky](https://github.com/karlhorky). Thank you, everyone! - -### v2.5.1 (2015-02-06): - -This release doesn't look like much, but considerable effort went into ensuring -that npm's tests will pass on io.js 1.1.0 and Node 0.11.16 / 0.12.0 on both OS -X and Linux. - -**NOTE:** there are no actual changes to npm's code in `npm@2.5.1`. Only test -code (and the upgrade of `request` to the latest version) has changed. - -#### `npm-registry-mock@1.0.0`: - -* [`0e8d473`](https://github.com/npm/npm/commit/0e8d4736a1cbdda41ae8eba8a02c7ff7ce80c2ff) - [#7281](https://github.com/npm/npm/issues/7281) `npm-registry-mock@1.0.0`: - Clean up API, set `connection: close`. - ([@robertkowalski](https://github.com/robertkowalski)) -* [`4707bba`](https://github.com/npm/npm/commit/4707bba7d44dfab85cc45c2ecafa9c1601ba2e9a) - Further update tests to work with `npm-registry-mock@1.0.0`. - ([@othiym23](https://github.com/othiym23)) -* [`41a0f89`](https://github.com/npm/npm/commit/41a0f8959d4e02af9661588afa7d2b4543cc21b6) - Got rid of completely gratuitous global config manipulation in tests. - ([@othiym23](https://github.com/othiym23)) - -#### MINOR DEPENDENCY TWEAK - -* [`a4c7af9`](https://github.com/npm/npm/commit/a4c7af9c692f250c0fd017397ed9514fc263b752) - `request@2.53.0`: Tweaks to tunneling proxy behavior. - ([@nylen](https://github.com/nylen)) - -### v2.5.0 (2015-01-29): - -#### SMALL FEATURE I HAVE ALREADY USED TO MAINTAIN NPM ITSELF - -* [`9d61e96`](https://github.com/npm/npm/commit/9d61e96fb1f48687a85c211e4e0cd44c7f95a38e) - `npm outdated --long` now includes a column showing the type of dependency. - ([@watilde](https://github.com/watilde)) - -#### BUG FIXES & TWEAKS - -* [`fec4c96`](https://github.com/npm/npm/commit/fec4c967ee235030bf31393e8605e9e2811f4a39) - Allow `--no-proxy` to override `HTTP_PROXY` setting in environment. - ([@othiym23](https://github.com/othiym23)) -* [`589acb9`](https://github.com/npm/npm/commit/589acb9714f395c2ad0d98cb0ac4236f1842d2cc) - Only set `access` when publshing when it's explicitly set. - ([@othiym23](https://github.com/othiym23)) -* [`1027087`](https://github.com/npm/npm/commit/102708704c8c4f0ea99775d38f8d1efecf584940) - Add script and `Makefile` stanza to update AUTHORS. - ([@KenanY](https://github.com/KenanY)) -* [`eeff04d`](https://github.com/npm/npm/commit/eeff04da7979a0181becd36b8777d607e7aa1787) - Add `NPMOPTS` to top-level install in `Makefile` to override `userconfig`. - ([@aredridel](https://github.com/aredridel)) -* [`0d17328`](https://github.com/npm/npm/commit/0d173287336650606d4c91818bb7bcfb0c5d57a1) - `fstream@1.0.4`: Run chown only when necessary. - ([@silkentrance](https://github.com/silkentrance)) -* [`9aa4622`](https://github.com/npm/npm/commit/9aa46226ee63b9e183fd49fc72d9bdb0fae9605e) - `columnify@1.4.1`: ES6ified! ([@timoxley](https://github.com/timoxley)) -* [`51b2fd1`](https://github.com/npm/npm/commit/51b2fd1974e38b825ac5ca4a852ab3c4142624cc) - Update default version in `docs/npm-config.md`. - ([@lucthev](https://github.com/lucthev)) - -#### `npm-registry-client@6.0.7`: - -* [`f9313a0`](https://github.com/npm/npm/commit/f9313a066c9889a0ee898d8a35676e40b8101e7f) - [#7226](https://github.com/npm/npm/issues/7226) Ensure that all request - settings are copied onto the agent. - ([@othiym23](https://github.com/othiym23)) -* [`e186f6e`](https://github.com/npm/npm/commit/e186f6e7cfeb4db9c94d7375638f0b2f0d472947) - Only set `access` on publish when it differs from the norm. - ([@othiym23](https://github.com/othiym23)) -* [`f9313a0`](https://github.com/npm/npm/commit/f9313a066c9889a0ee898d8a35676e40b8101e7f) - Allow overriding request's environment-based proxy handling. - ([@othiym23](https://github.com/othiym23)) -* [`f9313a0`](https://github.com/npm/npm/commit/f9313a066c9889a0ee898d8a35676e40b8101e7f) - Properly handle retry failures on fetch. - ([@othiym23](https://github.com/othiym23)) - -### v2.4.1 (2015-01-23): - -![bridge that doesn't meet in the middle](http://www.static-18.themodernnomad.com/wp-content/uploads/2011/08/bridge-fail.jpg) - -Let's accentuate the positive: the `dist-tag` endpoints for `npm dist-tag -{add,rm,ls}` are now live on the public npm registry. - -* [`f70272b`](https://github.com/npm/npm/commit/f70272bed7d77032d1e21553371dd5662fef32f2) - `npm-registry-client@6.0.3`: Properly escape JSON tag version strings and - filter `_etag` from CouchDB docs. ([@othiym23](https://github.com/othiym23)) - -### v2.4.0 (2015-01-22): - -#### REGISTRY 2: ACCESS AND DIST-TAGS - -NOTE: This week's registry-2 commands are leading the implementation on -registry.npmjs.org a little bit, so some of the following may not work for -another week or so. Also note that `npm access` has documentation and -subcommands that are not yet finished, because they depend on incompletely -specified registry API endpoints. Things are coming together very quickly, -though, so expect the missing pieces to be filled in the coming weeks. - -* [`c963eb2`](https://github.com/npm/npm/commit/c963eb295cf766921b1680f4a71fd0ed3e1bcad8) - [#7181](https://github.com/npm/npm/issues/7181) NEW `npm access public` and - `npm access restricted`: Toggle visibility of scoped packages. - ([@othiym23](https://github.com/othiym23)) -* [`dc51810`](https://github.com/npm/npm/commit/dc51810e08c0f104259146c9c035d255de4f7d1d) - [#6243](https://github.com/npm/npm/issues/6243) / - [#6854](https://github.com/npm/npm/issues/6854) NEW `npm dist-tags`: Directly - manage `dist-tags` on packages. Most notably, `dist-tags` can now be deleted. - ([@othiym23](https://github.com/othiym23)) -* [`4c7c132`](https://github.com/npm/npm/commit/4c7c132a6b8305dca2974943226c39c0cdc64ff9) - [#7181](https://github.com/npm/npm/issues/7181) / - [#6854](https://github.com/npm/npm/issues/6854) `npm-registry-client@6.0.1`: - Add new `access` and `dist-tags` endpoints - ([@othiym23](https://github.com/othiym23)) - -#### NOT EXACTLY SELF-DEPRECATING - -* [`10d5c77`](https://github.com/npm/npm/commit/10d5c77653487f15759ac7de262a97e9c655240c) - [#6274](https://github.com/npm/npm/issues/6274) Deprecate `npm tag` in favor - of `npm dist-tag`. ([@othiym23](https://github.com/othiym23)) - -#### BUG FIX AND TINY FEATURE - -* [`29a6ef3`](https://github.com/npm/npm/commit/29a6ef38ef86ac318c5d9ea4bee28ce614672fa6) - [#6850](https://github.com/npm/npm/issues/6850) Be smarter about determining - base of file deletion when unbuilding. ([@phated](https://github.com/phated)) -* [`4ad01ea`](https://github.com/npm/npm/commit/4ad01ea2930a7a1cf88be121cc5ce9eba40c6807) - `init-package-json@1.2.0`: Support `--save-exact` in `npm init`. - ([@gustavnikolaj](https://github.com/gustavnikolaj)) - -### v2.3.0 (2015-01-15): - -#### REGISTRY 2: OH MY STARS! WHO AM I? - -* [`e662a60`](https://github.com/npm/npm/commit/e662a60e2f9a542effd8e72279d4622fe514415e) - The new `whoami` endpoint might not return a value. - ([@othiym23](https://github.com/othiym23)) -* [`c2cccd4`](https://github.com/npm/npm/commit/c2cccd4bbc65885239ed646eb510155f7b8af13d) - `npm-registry-client@5.0.0`: Includes the following fine changes - ([@othiym23](https://github.com/othiym23)): - * [`ba6b73e`](https://github.com/npm/npm-registry-client/commit/ba6b73e351027246c228622014e4441412409bad) - [#92](https://github.com/npm/npm-registry-client/issues/92) BREAKING CHANGE: - Move `/whoami` endpoint out of the package namespace (to `/-/whoami`). - ([@othiym23](https://github.com/othiym23)) - * [`3b174b7`](https://github.com/npm/npm-registry-client/commit/3b174b75c0c9ea77e298e6bb664fb499824ecc7c) - [#93](https://github.com/npm/npm-registry-client/issues/93) Registries based - on token-based auth can now offer starring. - ([@bcoe](https://github.com/bcoe)) - * [`4701a29`](https://github.com/npm/npm-registry-client/commit/4701a29bcda41bc14aa91f361dd0d576e24677d7) - Fix HTTP[S] connection keep-alive on Node 0.11 / io.js 1.0. - ([@fengmk2](https://github.com/fengmk2)) - -#### BETTER REGISTRY METADATA CACHING - -* [`98e1e10`](https://github.com/npm/npm/commit/98e1e1080df1f2cab16ed68035603950ea3d2d48) - [#6791](https://github.com/npm/npm/issues/6791) Add caching based on - Last-Modified / If-Modified-Since headers. Includes this - `npm-registry-client@5.0.0` change ([@lxe](https://github.com/lxe)): - * [`07bc335`](https://github.com/npm/npm-registry-client/commit/07bc33502b93554cd7539bfcce37d6e2d5404cd0) - [#86](https://github.com/npm/npm-registry-client/issues/86) Add Last-Modified - / If-Modified-Since cache header handling. ([@lxe](https://github.com/lxe)) - -#### HOW MUCH IS THAT WINDOWS IN THE DOGGY? - -* [`706d49a`](https://github.com/npm/npm/commit/706d49ab45521360fce1a68779b8de899015d8c2) - [#7107](https://github.com/npm/npm/issues/7107) `getCacheStat` passes a stub - stat on Windows. ([@rmg](https://github.com/rmg)) -* [`5fce278`](https://github.com/npm/npm/commit/5fce278a688a1cb79183e012bde40b089c2e97a4) - [#5267](https://github.com/npm/npm/issues/5267) Use `%COMSPEC%` when set on - Windows. ([@edmorley](https://github.com/edmorley)) -* [`cc2e099`](https://github.com/npm/npm/commit/cc2e09912ce2f91567c485422e4e797c4deb9842) - [#7083](https://github.com/npm/npm/issues/7083) Ensure Git cache prefix - exists before repo clone on Windows. - ([@othiym23](https://github.com/othiym23)) - -#### THRILLING BUG FIXES - -* [`c6fb430`](https://github.com/npm/npm/commit/c6fb430e55672b3caf87d25cbd2aeeebc449e2f2) - [#4197](https://github.com/npm/npm/issues/4197) Report `umask` as a 0-padded - octal literal. ([@smikes](https://github.com/smikes)) -* [`209713e`](https://github.com/npm/npm/commit/209713ebd4b77da11ce27d90c3346f78d760ba52) - [#4197](https://github.com/npm/npm/issues/4197) `umask@1.1.0`: Properly - handle `umask`s (i.e. not decimal numbers). - ([@smikes](https://github.com/smikes)) -* [`9eac0a1`](https://github.com/npm/npm/commit/9eac0a14488c5979ebde4c17881c8cd74f395069) - Make the example for bin links non-destructive. - ([@KevinSheedy](https://github.com/KevinSheedy)) -* [`6338bcf`](https://github.com/npm/npm/commit/6338bcfcd9cd1b0cc48b051dae764dc436ab5332) - `glob@4.3.5`: " -> ', for some reason. ([@isaacs](https://github.com/isaacs)) - -### v2.2.0 (2015-01-08): - -* [`88c531d`](https://github.com/npm/npm/commit/88c531d1c0b3aced8f2a09632db01b5635e7226a) - [#7056](https://github.com/npm/npm/issues/7056) version doesn't need a - package.json. ([@othiym23](https://github.com/othiym23)) -* [`2656c19`](https://github.com/npm/npm/commit/2656c19f6b915c3173acc3b6f184cc321563da5f) - [#7095](https://github.com/npm/npm/issues/7095) Link to npm website instead - of registry. ([@konklone](https://github.com/konklone)) -* [`c76b801`](https://github.com/npm/npm/commit/c76b8013bf1758587565822626171b76cb465c9e) - [#7067](https://github.com/npm/npm/issues/7067) Obfuscate secrets, including - nerfed URLs. ([@smikes](https://github.com/smikes)) -* [`17f66ce`](https://github.com/npm/npm/commit/17f66ceb1bd421084e4ae82a6b66634a6e272929) - [#6849](https://github.com/npm/npm/issues/6849) Explain the tag workflow more - clearly. ([@smikes](https://github.com/smikes)) -* [`e309df6`](https://github.com/npm/npm/commit/e309df642de33d10d6dffadaa8a5d214a924d0dc) - [#7096](https://github.com/npm/npm/issues/7096) Really, `npm update -g` is - almost always a terrible idea. ([@smikes](https://github.com/smikes)) -* [`acf287d`](https://github.com/npm/npm/commit/acf287d2547c8a0a8871652c164019261b666d55) - [#6999](https://github.com/npm/npm/issues/6999) `npm run-script env`: add a - new default script that will print out environment values. - ([@gcb](https://github.com/gcb)) -* [`560c009`](https://github.com/npm/npm/commit/560c00945d4dec926cd29193e336f137c7f3f951) - [#6745](https://github.com/npm/npm/issues/6745) Document `npm update --dev`. - ([@smikes](https://github.com/smikes)) -* [`226a677`](https://github.com/npm/npm/commit/226a6776a1a9e28570485623b8adc2ec4b041335) - [#7046](https://github.com/npm/npm/issues/7046) We have never been the Node - package manager. ([@linclark](https://github.com/linclark)) -* [`38eef22`](https://github.com/npm/npm/commit/38eef2248f03bb8ab04cae1833e2a228fb887f3c) - `npm-install-checks@1.0.5`: Compatibility with npmlog@^1. - ([@iarna](https://github.com/iarna)) - -### v2.1.18 (2015-01-01): - -* [`bf8640b`](https://github.com/npm/npm/commit/bf8640b0395b5dff71260a0cede7efc699a7bcf5) - [#7044](https://github.com/npm/npm/issues/7044) Document `.npmignore` syntax. - ([@zeke](https://github.com/zeke)) - -### v2.1.17 (2014-12-25): - -merry npm xmas - -Working with [@phated](https://github.com/phated), I discovered that npm still -had some lingering race conditions around how it handles Git dependencies. The -following changes were intended to remedy to these issues. Thanks to -[@phated](https://github.com/phated) for all his help getting to the bottom of -these. - -* [`bdf1c84`](https://github.com/npm/npm/commit/bdf1c8483f5c4ad79b712db12d73276e15883923) - [#7006](https://github.com/npm/npm/issues/7006) Only `chown` template and - top-level Git cache directories. ([@othiym23](https://github.com/othiym23)) -* [`581a72d`](https://github.com/npm/npm/commit/581a72da18f35ec87edef6255adf4ef4714a478c) - [#7006](https://github.com/npm/npm/issues/7006) Map Git remote inflighting to - clone paths rather than Git URLs. ([@othiym23](https://github.com/othiym23)) -* [`1c48d08`](https://github.com/npm/npm/commit/1c48d08dea31a11ac11a285cac598a482481cade) - [#7009](https://github.com/npm/npm/issues/7009) `normalize-git-url@1.0.0`: - Normalize Git URLs while caching. ([@othiym23](https://github.com/othiym23)) -* [`5423cf0`](https://github.com/npm/npm/commit/5423cf0be8ff2b76bfff7c8e780e5f261235a86a) - [#7009](https://github.com/npm/npm/issues/7009) Pack tarballs to their final - locations atomically. ([@othiym23](https://github.com/othiym23)) -* [`7f6557f`](https://github.com/npm/npm/commit/7f6557ff317469ee4a87c542ff9a991e74ce9f38) - [#7009](https://github.com/npm/npm/issues/7009) Inflight local directory - packing, just to be safe. ([@othiym23](https://github.com/othiym23)) - -Other changes: - -* [`1c491e6`](https://github.com/npm/npm/commit/1c491e65d70af013e8d5ac008d6d9762d6d91793) - [#6991](https://github.com/npm/npm/issues/6991) `npm version`: fix regression - in dirty-checking behavior ([@rlidwka](https://github.com/rlidwka)) -* [`55ceb2b`](https://github.com/npm/npm/commit/55ceb2b08ff8a0f56b94cc972ca15d7862e8733c) - [#1991](https://github.com/npm/npm/issues/1991) modify docs to reflect actual - `npm restart` behavior ([@smikes](https://github.com/smikes)) -* [`fb8e31b`](https://github.com/npm/npm/commit/fb8e31b95476a50bda35a665a99eec8a5d25a4db) - [#6982](https://github.com/npm/npm/issues/6982) when doing registry - operations, ensure registry URL always ends with `/` - ([@othiym23](https://github.com/othiym23)) -* [`5bcba65`](https://github.com/npm/npm/commit/5bcba65bed2678ffe80fb596f72abe9871d131c8) - pull whitelisted Git environment variables out into a named constant - ([@othiym23](https://github.com/othiym23)) -* [`be04bbd`](https://github.com/npm/npm/commit/be04bbdc52ebfc820cd939df2f7d79fe87067747) - [#7000](https://github.com/npm/npm/issues/7000) No longer install badly-named - manpage files, and log an error when trying to uninstall them. - ([@othiym23](https://github.com/othiym23)) -* [`6b7c5ec`](https://github.com/npm/npm/commit/6b7c5eca6b65e1247d0e51f6400cf2637ac880ce) - [#7011](https://github.com/npm/npm/issues/7011) Send auth for tarball fetches - for packages in `npm-shrinkwrap.json` from private registries. - ([@othiym23](https://github.com/othiym23)) -* [`9b9de06`](https://github.com/npm/npm/commit/9b9de06a99893b40aa23f0335726dec6df7979db) - `glob@4.3.2`: Better handling of trailing slashes. - ([@isaacs](https://github.com/isaacs)) -* [`030f3c7`](https://github.com/npm/npm/commit/030f3c7450b8ce124a19073bfbae0948a0a1a02c) - `semver@4.2.0`: Diffing between version strings. - ([@isaacs](https://github.com/isaacs)) - -### v2.1.16 (2014-12-22): - -* [`a4e4e33`](https://github.com/npm/npm/commit/a4e4e33edb35c68813f04bf42bdf933a6f727bcd) - [#6987](https://github.com/npm/npm/issues/6987) `read-installed@3.1.5`: fixed - a regression where a new / empty package would cause read-installed to throw. - ([@othiym23](https://github.com/othiym23) / - [@pgilad](https://github.com/pgilad)) - -### v2.1.15 (2014-12-18): - -* [`e5a2dee`](https://github.com/npm/npm/commit/e5a2dee47c74f26c56fee5998545b97497e830c8) - [#6951](https://github.com/npm/npm/issues/6951) `fs-vacuum@1.2.5`: Use - `path-is-inside` for better Windows normalization. - ([@othiym23](https://github.com/othiym23)) -* [`ac6167c`](https://github.com/npm/npm/commit/ac6167c2b9432939c57296f7ddd11ad5f8f918b2) - [#6955](https://github.com/npm/npm/issues/6955) Call `path.normalize` in - `lib/utils/gently-rm.js` for better Windows normalization. - ([@ben-page](https://github.com/ben-page)) -* [`c625d71`](https://github.com/npm/npm/commit/c625d714795e3b5badd847945e2401adfad5a196) - [#6964](https://github.com/npm/npm/issues/6964) Clarify CA configuration - docs. ([@jeffjo](https://github.com/jeffjo)) -* [`58b8cb5`](https://github.com/npm/npm/commit/58b8cb5cdf26a854358b7c2ab636572dba9bac16) - [#6950](https://github.com/npm/npm/issues/6950) Fix documentation typos. - ([@martinvd](https://github.com/martinvd)) -* [`7c1299d`](https://github.com/npm/npm/commit/7c1299d00538ea998684a1903a4091eafc63b7f1) - [#6909](https://github.com/npm/npm/issues/6909) Remove confusing mention of - rubygems `~>` semver operator. ([@mjtko](https://github.com/mjtko)) -* [`7dfdcc6`](https://github.com/npm/npm/commit/7dfdcc6debd8ef1fc52a2b508997d15887aad824) - [#6909](https://github.com/npm/npm/issues/6909) `semver@4.1.1`: Synchronize - documentation with PR [#6909](https://github.com/npm/npm/issues/6909) - ([@othiym23](https://github.com/othiym23)) -* [`adfddf3`](https://github.com/npm/npm/commit/adfddf3b682e0ae08e4b59d87c1b380dd651c572) - [#6925](https://github.com/npm/npm/issues/6925) Correct typo in - `doc/api/npm-ls.md` ([@oddurs](https://github.com/oddurs)) -* [`f5c534b`](https://github.com/npm/npm/commit/f5c534b711ab173129baf366c4f08d68f6117333) - [#6920](https://github.com/npm/npm/issues/6920) Remove recommendation to run - as root from `README.md`. - ([@robertkowalski](https://github.com/robertkowalski)) -* [`3ef4459`](https://github.com/npm/npm/commit/3ef445922cd39f25b992d91bd22c4d367882ea22) - [#6920](https://github.com/npm/npm/issues/6920) `npm-@googlegroups.com` has - gone the way of all things. That means it's gone. - ([@robertkowalski](https://github.com/robertkowalski)) - -### v2.1.14 (2014-12-13): - -* [`cf7aeae`](https://github.com/npm/npm/commit/cf7aeae3c3a24e48d3de4006fa082f0c6040922a) - [#6923](https://github.com/npm/npm/issues/6923) Overaggressive link update - for new website broke node-gyp. ([@othiym23](https://github.com/othiym23)) - -### v2.1.13 (2014-12-11): - -* [`cbb890e`](https://github.com/npm/npm/commit/cbb890eeacc0501ba1b8c6955f1c829c8af9f486) - [#6897](https://github.com/npm/npm/issues/6897) npm is a nice package manager - that runs server-side JavaScript. ([@othiym23](https://github.com/othiym23)) -* [`d9043c3`](https://github.com/npm/npm/commit/d9043c3b8d7450c3cb9ca795028c0e1c05377820) - [#6893](https://github.com/npm/npm/issues/6893) Remove erroneous docs about - preupdate / update / postupdate lifecycle scripts, which have never existed. - ([@devTristan](https://github.com/devTristan)) -* [`c5df4d0`](https://github.com/npm/npm/commit/c5df4d0d683cd3506808d1cd1acebff02a8b82db) - [#6884](https://github.com/npm/npm/issues/6884) Update npmjs.org to npmjs.com - in docs. ([@linclark](https://github.com/linclark)) -* [`cb6ff8d`](https://github.com/npm/npm/commit/cb6ff8dace1b439851701d4784d2d719c22ca7a7) - [#6879](https://github.com/npm/npm/issues/6879) npm version: Update - shrinkwrap post-check. ([@othiym23](https://github.com/othiym23)) -* [`2a340bd`](https://github.com/npm/npm/commit/2a340bdd548c6449468281e1444a032812bff677) - [#6868](https://github.com/npm/npm/issues/6868) Use magic numbers instead of - regexps to distinguish tarballs from other things. - ([@daxxog](https://github.com/daxxog)) -* [`f1c8bdb`](https://github.com/npm/npm/commit/f1c8bdb3f6b753d0600597e12346bdc3a34cb9c1) - [#6861](https://github.com/npm/npm/issues/6861) `npm-registry-client@4.0.5`: - Distinguish between error properties that are part of the response and error - strings that should be returned to the user. - ([@disrvptor](https://github.com/disrvptor)) -* [`d3a1b63`](https://github.com/npm/npm/commit/d3a1b6397fddef04b5198ca89d36d720aeb05eb6) - [#6762](https://github.com/npm/npm/issues/6762) Make `npm outdated` ignore - private packages. ([@KenanY](https://github.com/KenanY)) -* [`16d8542`](https://github.com/npm/npm/commit/16d854283ca5bcdb0cb2812fc5745d841652b952) - install.sh: Drop support for node < 0.8, remove engines bits. - ([@isaacs](https://github.com/isaacs)) -* [`b9c6046`](https://github.com/npm/npm/commit/b9c60466d5b713b1dc2947da14a5dfe42352e029) - `init-package-json@1.1.3`: ([@terinstock](https://github.com/terinstock)) - noticed that `init.license` configuration doesn't stick. Make sure that - dashed defaults don't trump dotted parameters. - ([@othiym23](https://github.com/othiym23)) -* [`b6d6acf`](https://github.com/npm/npm/commit/b6d6acfc02c8887f78067931babab8f7c5180fed) - `which@1.0.8`: No longer use graceful-fs for some reason. - ([@isaacs](https://github.com/isaacs)) -* [`d39f673`](https://github.com/npm/npm/commit/d39f673caf08a90fb2bb001d79c98062d2cd05f4) - `request@2.51.0`: Incorporate bug fixes. ([@nylen](https://github.com/nylen)) -* [`c7ad727`](https://github.com/npm/npm/commit/c7ad7279cc879930ec58ccc62fa642e621ecb65c) - `columnify@1.3.2`: Incorporate bug fixes. - ([@timoxley](https://github.com/timoxley)) - -### v2.1.12 (2014-12-04): - -* [`e5b1e44`](https://github.com/npm/npm/commit/e5b1e448bb4a9d6eae4ba0f67b1d3c2cea8ed383) - add alias verison=version ([@isaacs](https://github.com/isaacs)) -* [`5eed7bd`](https://github.com/npm/npm/commit/5eed7bddbd7bb92a44c4193c93e8529500c558e6) - `request@2.49.0` ([@nylen](https://github.com/nylen)) -* [`e72f81d`](https://github.com/npm/npm/commit/e72f81d8412540ae7d1e0edcc37c11bcb8169051) - `glob@4.3.1` / `minimatch@2.0.1` ([@isaacs](https://github.com/isaacs)) -* [`b8dcc36`](https://github.com/npm/npm/commit/b8dcc3637b5b71933b97162b7aff1b1a622c13e2) - `graceful-fs@3.0.5` ([@isaacs](https://github.com/isaacs)) - -### v2.1.11 (2014-11-27): - -* [`4861d28`](https://github.com/npm/npm/commit/4861d28ad0ebd959fe6bc15b9c9a50fcabe57f55) - `which@1.0.7`: License update. ([@isaacs](https://github.com/isaacs)) -* [`30a2ea8`](https://github.com/npm/npm/commit/30a2ea80c891d384b31a1cf28665bba4271915bd) - `ini@1.3.2`: License update. ([@isaacs](https://github.com/isaacs)) -* [`6a4ea05`](https://github.com/npm/npm/commit/6a4ea054f6ddf52fc58842ba2046564b04c5c0e2) - `fstream@1.0.3`: Propagate error events to downstream streams. - ([@gfxmonk](https://github.com/gfxmonk)) -* [`a558695`](https://github.com/npm/npm/commit/a5586954f1c18df7c96137e0a79f41a69e7a884e) - `tar@1.0.3`: Don't extract broken files, propagate `drain` event. - ([@gfxmonk](https://github.com/gfxmonk)) -* [`989624e`](https://github.com/npm/npm/commit/989624e8321f87734c1b1272fc2f646e7af1f81c) - [#6767](https://github.com/npm/npm/issues/6767) Actually pass parameters when - adding git repo to cache under Windows. - ([@othiym23](https://github.com/othiym23)) -* [`657af73`](https://github.com/npm/npm/commit/657af7308f7d6cd2f81389fcf0d762252acaf1ce) - [#6774](https://github.com/npm/npm/issues/6774) When verifying paths on - unbuild, resolve both source and target as symlinks. - ([@hokaccha](https://github.com/hokaccha)) -* [`fd19c40`](https://github.com/npm/npm/commit/fd19c4046414494f9647a6991c00f8406a939929) - [#6713](https://github.com/npm/npm/issues/6713) - `realize-package-specifier@1.3.0`: Make it so that `npm install foo@1` work - when a file named `1` exists. ([@iarna](https://github.com/iarna)) -* [`c8ac37a`](https://github.com/npm/npm/commit/c8ac37a470491b2ed28514536e2e198494638c79) - `npm-registry-client@4.0.4`: Fix regression in failed fetch retries. - ([@othiym23](https://github.com/othiym23)) - -### v2.1.10 (2014-11-20): - -* [`756f3d4`](https://github.com/npm/npm/commit/756f3d40fe18bc02bc93afe17016dfcc266c4b6b) - [#6735](https://github.com/npm/npm/issues/6735) Log "already built" messages - at info, not error. ([@smikes](https://github.com/smikes)) -* [`1b7330d`](https://github.com/npm/npm/commit/1b7330dafba3bbba171f74f1e58b261cb1b9301e) - [#6729](https://github.com/npm/npm/issues/6729) `npm-registry-client@4.0.3`: - GitHub won't redirect you through an HTML page to a compressed tarball if you - don't tell it you accept JSON responses. - ([@KenanY](https://github.com/KenanY)) -* [`d9c7857`](https://github.com/npm/npm/commit/d9c7857be02dacd274e55bf6d430d90d91509d53) - [#6506](https://github.com/npm/npm/issues/6506) - `readdir-scoped-modules@1.0.1`: Use `graceful-fs` so the whole dependency - tree gets read, even in case of `EMFILE`. - ([@sakana](https://github.com/sakana)) -* [`3a085be`](https://github.com/npm/npm/commit/3a085be158ace8f1e4395e69f8c102d3dea00c5f) - Grammar fix in docs. ([@icylace](https://github.com/icylace)) -* [`3f8e2ff`](https://github.com/npm/npm/commit/3f8e2ff8342d327d6f1375437ecf4bd945dc360f) - Did you know that npm has a Code of Conduct? Add a link to it to - CONTRIBUTING.md. ([@isaacs](https://github.com/isaacs)) -* [`319ccf6`](https://github.com/npm/npm/commit/319ccf633289e06e57a80d74c39706899348674c) - `glob@4.2.1`: Performance tuning. ([@isaacs](https://github.com/isaacs)) -* [`835f046`](https://github.com/npm/npm/commit/835f046e7568c33e81a0b48c84cff965024d8b8a) - `readable-stream@1.0.33`: Bug fixes. ([@rvagg](https://github.com/rvagg)) -* [`a34c38d`](https://github.com/npm/npm/commit/a34c38d0732fb246d11f2a776d2ad0d8db654338) - `request@2.48.0`: Bug fixes. ([@nylen](https://github.com/nylen)) - -### v2.1.9 (2014-11-13): - -* [`eed9f61`](https://github.com/npm/npm/commit/eed9f6101963364acffc59d7194fc1655180e80c) - [#6542](https://github.com/npm/npm/issues/6542) `npm owner add / remove` now - works properly with scoped packages - ([@othiym23](https://github.com/othiym23)) -* [`cd25973`](https://github.com/npm/npm/commit/cd25973825aa5315b7ebf26227bd32bd6be5533f) - [#6548](https://github.com/npm/npm/issues/6548) using sudo won't leave the - cache's git directories with bad permissions - ([@othiym23](https://github.com/othiym23)) -* [`56930ab`](https://github.com/npm/npm/commit/56930abcae6a6ea41f1b75e23765c61259cef2dd) - fixed irregular `npm cache ls` output (yes, that's a thing) - ([@othiym23](https://github.com/othiym23)) -* [`740f483`](https://github.com/npm/npm/commit/740f483db6ec872b453065842da080a646c3600a) - legacy tests no longer poison user's own cache - ([@othiym23](https://github.com/othiym23)) -* [`ce37f14`](https://github.com/npm/npm/commit/ce37f142a487023747a9086335618638ebca4372) - [#6169](https://github.com/npm/npm/issues/6169) add terse output similar to - `npm publish / unpublish` for `npm owner add / remove` - ([@KenanY](https://github.com/KenanY)) -* [`bf2b8a6`](https://github.com/npm/npm/commit/bf2b8a66d7188900bf1e957c052b893948b67e0e) - [#6680](https://github.com/npm/npm/issues/6680) pass auth credentials to - registry when downloading search index - ([@terinjokes](https://github.com/terinjokes)) -* [`00ecb61`](https://github.com/npm/npm/commit/00ecb6101422984696929f602e14da186f9f669c) - [#6400](https://github.com/npm/npm/issues/6400) `.npmignore` is respected for - git repos on cache / pack / publish - ([@othiym23](https://github.com/othiym23)) -* [`d1b3a9e`](https://github.com/npm/npm/commit/d1b3a9ec5e2b6d52765ba5da5afb08dba41c49c1) - [#6311](https://github.com/npm/npm/issues/6311) `npm ls -l --depth=0` no - longer prints phantom duplicate children - ([@othiym23](https://github.com/othiym23)) -* [`07c5f34`](https://github.com/npm/npm/commit/07c5f34e45c9b18c348ed53b5763b1c5d4325740) - [#6690](https://github.com/npm/npm/issues/6690) `uid-number@0.0.6`: clarify - confusing names in error-handling code ([@isaacs](https://github.com/isaacs)) -* [`1ac9be9`](https://github.com/npm/npm/commit/1ac9be9f3bab816211d72d13cb05b5587878a586) - [#6684](https://github.com/npm/npm/issues/6684) `npm init`: don't report - write if canceled ([@smikes](https://github.com/smikes)) -* [`7bb207d`](https://github.com/npm/npm/commit/7bb207d1d6592a9cffc986871e4b671575363c2f) - [#5754](https://github.com/npm/npm/issues/5754) never remove app directories - on failed install ([@othiym23](https://github.com/othiym23)) -* [`705ce60`](https://github.com/npm/npm/commit/705ce601e7b9c5428353e02ebb30cb76c1991fdd) - [#5754](https://github.com/npm/npm/issues/5754) `fs-vacuum@1.2.2`: don't - throw when another fs task writes to a directory being vacuumed - ([@othiym23](https://github.com/othiym23)) -* [`1b650f4`](https://github.com/npm/npm/commit/1b650f4f217c413a2ffb96e1701beb5aa67a0de2) - [#6255](https://github.com/npm/npm/issues/6255) ensure that order credentials - are used from `.npmrc` doesn't regress - ([@othiym23](https://github.com/othiym23)) -* [`9bb2c34`](https://github.com/npm/npm/commit/9bb2c3435cedef40b45d3e9bd7a8edfb8cbe7209) - [#6644](https://github.com/npm/npm/issues/6644) `warn` rather than `info` on - fetch failure ([@othiym23](https://github.com/othiym23)) -* [`e34a7b6`](https://github.com/npm/npm/commit/e34a7b6b7371b1893a062f627ae8e168546d7264) - [#6524](https://github.com/npm/npm/issues/6524) `npm-registry-client@4.0.2`: - proxy via `request` more transparently - ([@othiym23](https://github.com/othiym23)) -* [`40afd6a`](https://github.com/npm/npm/commit/40afd6aaf34c11a10e80ec87b115fb2bb907e3bd) - [#6524](https://github.com/npm/npm/issues/6524) push proxy settings into - `request` ([@tauren](https://github.com/tauren)) - -### v2.1.8 (2014-11-06): - -* [`063d843`](https://github.com/npm/npm/commit/063d843965f9f0bfa5732d7c2d6f5aa37a8260a2) - npm version now updates version in npm-shrinkwrap.json - ([@faiq](https://github.com/faiq)) -* [`3f53cd7`](https://github.com/npm/npm/commit/3f53cd795f8a600e904a97f215ba5b5a9989d9dd) - [#6559](https://github.com/npm/npm/issues/6559) save local dependencies in - npm-shrinkwrap.json ([@Torsph](https://github.com/Torsph)) -* [`e249262`](https://github.com/npm/npm/commit/e24926268b2d2220910bc81cce6d3b2e08d94eb1) - npm-faq.md: mention scoped pkgs in namespace Q - ([@smikes](https://github.com/smikes)) -* [`6b06ec4`](https://github.com/npm/npm/commit/6b06ec4ef5da490bdca1512fa7f12490245c192b) - [#6642](https://github.com/npm/npm/issues/6642) `init-package-json@1.1.2`: - Handle both `init-author-name` and `init.author.name`. - ([@othiym23](https://github.com/othiym23)) -* [`9cb334c`](https://github.com/npm/npm/commit/9cb334c8a895a55461aac18791babae779309a0e) - [#6409](https://github.com/npm/npm/issues/6409) document commit-ish with - GitHub URLs ([@smikes](https://github.com/smikes)) -* [`0aefae9`](https://github.com/npm/npm/commit/0aefae9bc2598a4b7a3ee7bb2306b42e3e12bb28) - [#2959](https://github.com/npm/npm/issues/2959) npm run no longer fails - silently ([@flipside](https://github.com/flipside)) -* [`e007a2c`](https://github.com/npm/npm/commit/e007a2c1e4fac1759fa61ac6e78c6b83b2417d11) - [#3908](https://github.com/npm/npm/issues/3908) include command in spawn - errors ([@smikes](https://github.com/smikes)) - -### v2.1.7 (2014-10-30): - -* [`6750b05`](https://github.com/npm/npm/commit/6750b05dcba20d8990a672957ec56c48f97e241a) - [#6398](https://github.com/npm/npm/issues/6398) `npm-registry-client@4.0.0`: - consistent API, handle relative registry paths, use auth more consistently - ([@othiym23](https://github.com/othiym23)) -* [`7719cfd`](https://github.com/npm/npm/commit/7719cfdd8b204dfeccc41289707ea58b4d608905) - [#6560](https://github.com/npm/npm/issues/6560) use new npm-registry-client - API ([@othiym23](https://github.com/othiym23)) -* [`ed61971`](https://github.com/npm/npm/commit/ed619714c93718b6c1922b8c286f4b6cd2b97c80) - move caching of search metadata from `npm-registry-client` to npm itself - ([@othiym23](https://github.com/othiym23)) -* [`3457041`](https://github.com/npm/npm/commit/34570414cd528debeb22943873440594d7f47abf) - handle caching of metadata independently from `npm-registry-client` - ([@othiym23](https://github.com/othiym23)) -* [`20a331c`](https://github.com/npm/npm/commit/20a331ced6a52faac6ec242e3ffdf28bcd447c40) - [#6538](https://github.com/npm/npm/issues/6538) map registry URLs to - credentials more safely ([@indexzero](https://github.com/indexzero)) -* [`4072e97`](https://github.com/npm/npm/commit/4072e97856bf1e7affb38333d080c172767eea27) - [#6589](https://github.com/npm/npm/issues/6589) `npm-registry-client@4.0.1`: - allow publishing of packages with names identical to built-in Node modules - ([@feross](https://github.com/feross)) -* [`254f0e4`](https://github.com/npm/npm/commit/254f0e4adaf2c56e9df25c7343c43b0b0804a3b5) - `tar@1.0.2`: better error-handling ([@runk](https://github.com/runk)) -* [`73ee2aa`](https://github.com/npm/npm/commit/73ee2aa4f1a47e43fe7cf4317a5446875f7521fa) - `request@2.47.0` ([@mikeal](https://github.com/mikeal)) - -### v2.1.6 (2014-10-23): - -* [`681b398`](https://github.com/npm/npm/commit/681b3987a18e7aba0aaf78c91a23c7cc0ab82ce8) - [#6523](https://github.com/npm/npm/issues/6523) fix default `logelevel` doc - ([@KenanY](https://github.com/KenanY)) -* [`80b368f`](https://github.com/npm/npm/commit/80b368ffd786d4d008734b56c4a6fe12d2cb2926) - [#6528](https://github.com/npm/npm/issues/6528) `npm version` should work in - a git directory without git ([@terinjokes](https://github.com/terinjokes)) -* [`5f5f9e4`](https://github.com/npm/npm/commit/5f5f9e4ddf544c2da6adf3f8c885238b0e745076) - [#6483](https://github.com/npm/npm/issues/6483) `init-package-json@1.1.1`: - Properly pick up default values from environment variables. - ([@othiym23](https://github.com/othiym23)) -* [`a114870`](https://github.com/npm/npm/commit/a1148702f53f82d49606b2e4dac7581261fff442) - perl 5.18.x doesn't like -pi without filenames - ([@othiym23](https://github.com/othiym23)) -* [`de5ba00`](https://github.com/npm/npm/commit/de5ba007a48db876eb5bfb6156435f3512d58977) - `request@2.46.0`: Tests and cleanup. - ([@othiym23](https://github.com/othiym23)) -* [`76933f1`](https://github.com/npm/npm/commit/76933f169f17b5273b32e924a7b392d5729931a7) - `fstream-npm@1.0.1`: Always include `LICENSE[.*]`, `LICENCE[.*]`, - `CHANGES[.*]`, `CHANGELOG[.*]`, and `HISTORY[.*]`. - ([@jonathanong](https://github.com/jonathanong)) - -### v2.1.5 (2014-10-16): - -* [`6a14b23`](https://github.com/npm/npm/commit/6a14b232a0e34158bd95bb25c607167be995c204) - [#6397](https://github.com/npm/npm/issues/6397) Defactor npmconf back into - npm. ([@othiym23](https://github.com/othiym23)) -* [`4000e33`](https://github.com/npm/npm/commit/4000e3333a76ca4844681efa8737cfac24b7c2c8) - [#6323](https://github.com/npm/npm/issues/6323) Install `peerDependencies` - from top. ([@othiym23](https://github.com/othiym23)) -* [`5d119ae`](https://github.com/npm/npm/commit/5d119ae246f27353b14ff063559d1ba8c616bb89) - [#6498](https://github.com/npm/npm/issues/6498) Better error messages on - malformed `.npmrc` properties. ([@nicks](https://github.com/nicks)) -* [`ae18efb`](https://github.com/npm/npm/commit/ae18efb65fed427b1ef18e4862885bf60b87b92e) - [#6093](https://github.com/npm/npm/issues/6093) Replace instances of 'hash' - with 'object' in documentation. ([@zeke](https://github.com/zeke)) -* [`53108b2`](https://github.com/npm/npm/commit/53108b276fec5f97a38250933a2768d58b6928da) - [#1558](https://github.com/npm/npm/issues/1558) Clarify how local paths - should be used. ([@KenanY](https://github.com/KenanY)) -* [`344fa1a`](https://github.com/npm/npm/commit/344fa1a219ac8867022df3dc58a47636dde8a242) - [#6488](https://github.com/npm/npm/issues/6488) Work around bug in marked. - ([@othiym23](https://github.com/othiym23)) - -OUTDATED DEPENDENCY CLEANUP JAMBOREE - -* [`60c2942`](https://github.com/npm/npm/commit/60c2942e13655d9ecdf6e0f1f97f10cb71a75255) - `realize-package-specifier@1.2.0`: Handle names and rawSpecs more - consistently. ([@iarna](https://github.com/iarna)) -* [`1b5c95f`](https://github.com/npm/npm/commit/1b5c95fbda77b87342bd48c5ecac5b1fd571ccfe) - `sha@1.3.0`: Change line endings? - ([@ForbesLindesay](https://github.com/ForbesLindesay)) -* [`d7dee3f`](https://github.com/npm/npm/commit/d7dee3f3f7d9e7c2061a4ecb4dd93e3e4bfe4f2e) - `request@2.45.0`: Dependency updates, better proxy support, better compressed - response handling, lots of 'use strict'. - ([@mikeal](https://github.com/mikeal)) -* [`3d75180`](https://github.com/npm/npm/commit/3d75180c2cc79fa3adfa0e4cb783a27192189a65) - `opener@1.4.0`: Added gratuitous return. - ([@Domenic](https://github.com/Domenic)) -* [`8e2703f`](https://github.com/npm/npm/commit/8e2703f78d280d1edeb749e257dda1f288bad6e3) - `retry@0.6.1` / `npm-registry-client@3.2.4`: Change of ownership. - ([@tim-kos](https://github.com/tim-kos)) -* [`c87b00f`](https://github.com/npm/npm/commit/c87b00f82f92434ee77831915012c77a6c244c39) - `once@1.3.1`: Wrap once with wrappy. ([@isaacs](https://github.com/isaacs)) -* [`01ec790`](https://github.com/npm/npm/commit/01ec790fd47def56eda6abb3b8d809093e8f493f) - `npm-user-validate@0.1.1`: Correct repository URL. - ([@robertkowalski](https://github.com/robertkowalski)) -* [`389e52c`](https://github.com/npm/npm/commit/389e52c2d94c818ca8935ccdcf392994fec564a2) - `glob@4.0.6`: Now absolutely requires `graceful-fs`. - ([@isaacs](https://github.com/isaacs)) -* [`e15ab15`](https://github.com/npm/npm/commit/e15ab15a27a8f14cf0d9dc6f11dee452080378a0) - `ini@1.3.0`: Tighten up whitespace handling. - ([@isaacs](https://github.com/isaacs)) -* [`7610f3e`](https://github.com/npm/npm/commit/7610f3e62e699292ece081bfd33084d436e3246d) - `archy@1.0.0` ([@substack](https://github.com/substack)) -* [`9c13149`](https://github.com/npm/npm/commit/9c1314985e513e20ffa3ea0ca333ba2ab78299c9) - `semver@4.1.0`: Add support for prerelease identifiers. - ([@bromanko](https://github.com/bromanko)) -* [`f096c25`](https://github.com/npm/npm/commit/f096c250441b031d758f03afbe8d2321f94c7703) - `graceful-fs@3.0.4`: Add a bunch of additional tests, skip the unfortunate - complications of `graceful-fs@3.0.3`. ([@isaacs](https://github.com/isaacs)) - -### v2.1.4 (2014-10-09): - -* [`3aeb440`](https://github.com/npm/npm/commit/3aeb4401444fad83cc7a8d11bf2507658afa5248) - [#6442](https://github.com/npm/npm/issues/6442) proxying git needs `GIT_SSL_CAINFO` - ([@wmertens](https://github.com/wmertens)) -* [`a8da8d6`](https://github.com/npm/npm/commit/a8da8d6e0cd56d97728c0b76b51604ee06ef6264) - [#6413](https://github.com/npm/npm/issues/6413) write builtin config on any - global npm install ([@isaacs](https://github.com/isaacs)) -* [`9e4d632`](https://github.com/npm/npm/commit/9e4d632c0142ba55df07d624667738b8727336fc) - [#6343](https://github.com/npm/npm/issues/6343) don't pass run arguments to - pre & post scripts ([@TheLudd](https://github.com/TheLudd)) -* [`d831b1f`](https://github.com/npm/npm/commit/d831b1f7ca1a9921ea5b394e39b7130ecbc6d7b4) - [#6399](https://github.com/npm/npm/issues/6399) race condition: inflight - installs, prevent `peerDependency` problems - ([@othiym23](https://github.com/othiym23)) -* [`82b775d`](https://github.com/npm/npm/commit/82b775d6ff34c4beb6c70b2344d491a9f2026577) - [#6384](https://github.com/npm/npm/issues/6384) race condition: inflight - caching by URL rather than semver range - ([@othiym23](https://github.com/othiym23)) -* [`7bee042`](https://github.com/npm/npm/commit/7bee0429066fedcc9e6e962c043eb740b3792809) - `inflight@1.0.4`: callback can take arbitrary number of parameters - ([@othiym23](https://github.com/othiym23)) -* [`3bff494`](https://github.com/npm/npm/commit/3bff494f4abf17d6d7e0e4a3a76cf7421ecec35a) - [#5195](https://github.com/npm/npm/issues/5195) fixed regex color regression - for `npm search` ([@chrismeyersfsu](https://github.com/chrismeyersfsu)) -* [`33ba2d5`](https://github.com/npm/npm/commit/33ba2d585160a0a2a322cb76c4cd989acadcc984) - [#6387](https://github.com/npm/npm/issues/6387) allow `npm view global` if - package is specified ([@evanlucas](https://github.com/evanlucas)) -* [`99c4cfc`](https://github.com/npm/npm/commit/99c4cfceed413396d952cf05f4e3c710f9682c23) - [#6388](https://github.com/npm/npm/issues/6388) npm-publish → - npm-developers(7) ([@kennydude](https://github.com/kennydude)) - -TEST CLEANUP EXTRAVAGANZA: - -* [`8d6bfcb`](https://github.com/npm/npm/commit/8d6bfcb88408f5885a2a67409854c43e5c3a23f6) - tap tests run with no system-wide side effects - ([@chrismeyersfsu](https://github.com/chrismeyersfsu)) -* [`7a1472f`](https://github.com/npm/npm/commit/7a1472fbdbe99956ad19f629e7eb1cc07ba026ef) - added npm cache cleanup script - ([@chrismeyersfsu](https://github.com/chrismeyersfsu)) -* [`0ce6a37`](https://github.com/npm/npm/commit/0ce6a3752fa9119298df15671254db6bc1d8e64c) - stripped out dead test code (othiym23) -* replace spawn with common.npm (@chrismeyersfsu): - * [`0dcd614`](https://github.com/npm/npm/commit/0dcd61446335eaf541bf5f2d5186ec1419f86a42) - test/tap/cache-shasum-fork.js - * [`97f861c`](https://github.com/npm/npm/commit/97f861c967606a7e51e3d5047cf805d9d1adea5a) - test/tap/false_name.js - * [`d01b3de`](https://github.com/npm/npm/commit/d01b3de6ce03f25bbf3db97bfcd3cc85830d6801) - test/tap/git-cache-locking.js - * [`7b63016`](https://github.com/npm/npm/commit/7b63016778124c6728d6bd89a045c841ae3900b6) - test/tap/pack-scoped.js - * [`c877553`](https://github.com/npm/npm/commit/c877553265c39673e03f0a97972f692af81a595d) - test/tap/scripts-whitespace-windows.js - * [`df98525`](https://github.com/npm/npm/commit/df98525331e964131299d457173c697cfb3d95b9) - test/tap/prepublish.js - * [`99c4cfc`](https://github.com/npm/npm/commit/99c4cfceed413396d952cf05f4e3c710f9682c23) - test/tap/prune.js - -### v2.1.3 (2014-10-02): - -BREAKING CHANGE FOR THE SQRT(i) PEOPLE ACTUALLY USING `npm submodule`: - -* [`1e64473`](https://github.com/npm/npm/commit/1e6447360207f45ad6188e5780fdf4517de6e23d) - `rm -rf npm submodule` command, which has been broken since the Carter - Administration ([@isaacs](https://github.com/isaacs)) - -BREAKING CHANGE IF YOU ARE FOR SOME REASON STILL USING NODE 0.6 AND YOU SHOULD -NOT BE DOING THAT CAN YOU NOT: - -* [`3e431f9`](https://github.com/npm/npm/commit/3e431f9d6884acb4cde8bcb8a0b122a76b33ee1d) - [joyent/node#8492](https://github.com/joyent/node/issues/8492) bye bye - customFds, hello stdio ([@othiym23](https://github.com/othiym23)) - -Other changes: - -* [`ea607a8`](https://github.com/npm/npm/commit/ea607a8a20e891ad38eed11b5ce2c3c0a65484b9) - [#6372](https://github.com/npm/npm/issues/6372) noisily error (without - aborting) on multi-{install,build} ([@othiym23](https://github.com/othiym23)) -* [`3ee2799`](https://github.com/npm/npm/commit/3ee2799b629fd079d2db21d7e8f25fa7fa1660d0) - [#6372](https://github.com/npm/npm/issues/6372) only make cache creation - requests in flight ([@othiym23](https://github.com/othiym23)) -* [`1a90ec2`](https://github.com/npm/npm/commit/1a90ec2f2cfbefc8becc6ef0c480e5edacc8a4cb) - [#6372](https://github.com/npm/npm/issues/6372) wait to put Git URLs in - flight until normalized ([@othiym23](https://github.com/othiym23)) -* [`664795b`](https://github.com/npm/npm/commit/664795bb7d8da7142417b3f4ef5986db3a394071) - [#6372](https://github.com/npm/npm/issues/6372) log what is and isn't in - flight ([@othiym23](https://github.com/othiym23)) -* [`00ef580`](https://github.com/npm/npm/commit/00ef58025a1f52dfabf2c4dc3898621d16a6e062) - `inflight@1.0.3`: fix largely theoretical race condition, because we really - really hate race conditions ([@isaacs](https://github.com/isaacs)) -* [`1cde465`](https://github.com/npm/npm/commit/1cde4658d897ae0f93ff1d65b258e1571b391182) - [#6363](https://github.com/npm/npm/issues/6363) - `realize-package-specifier@1.1.0`: handle local dependencies better - ([@iarna](https://github.com/iarna)) -* [`86f084c`](https://github.com/npm/npm/commit/86f084c6c6d7935cd85d72d9d94b8784c914d51e) - `realize-package-specifier@1.0.2`: dependency realization! in its own module! - ([@iarna](https://github.com/iarna)) -* [`553d830`](https://github.com/npm/npm/commit/553d830334552b83606b6bebefd821c9ea71e964) - `npm-package-arg@2.1.3`: simplified semver, better tests - ([@iarna](https://github.com/iarna)) -* [`bec9b61`](https://github.com/npm/npm/commit/bec9b61a316c19f5240657594f0905a92a474352) - `readable-stream@1.0.32`: for some reason - ([@rvagg](https://github.com/rvagg)) -* [`ff08ec5`](https://github.com/npm/npm/commit/ff08ec5f6d717bdbd559de0b2ede769306a9a763) - `dezalgo@1.0.1`: use wrappy for instrumentability - ([@isaacs](https://github.com/isaacs)) - -### v2.1.2 (2014-09-29): - -* [`a1aa20e`](https://github.com/npm/npm/commit/a1aa20e44bb8285c6be1e7fa63b9da920e3a70ed) - [#6282](https://github.com/npm/npm/issues/6282) - `normalize-package-data@1.0.3`: don't prune bundledDependencies - ([@isaacs](https://github.com/isaacs)) -* [`a1f5fe1`](https://github.com/npm/npm/commit/a1f5fe1005043ce20a06e8b17a3e201aa3215357) - move locks back into cache, now path-aware - ([@othiym23](https://github.com/othiym23)) -* [`a432c4b`](https://github.com/npm/npm/commit/a432c4b48c881294d6d79b5f41c2e1c16ad15a8a) - convert lib/utils/tar.js to use atomic streams - ([@othiym23](https://github.com/othiym23)) -* [`b8c3c74`](https://github.com/npm/npm/commit/b8c3c74a3c963564233204161cc263e0912c930b) - `fs-write-stream-atomic@1.0.2`: Now works with streams1 fs.WriteStreams. - ([@isaacs](https://github.com/isaacs)) -* [`c7ab76f`](https://github.com/npm/npm/commit/c7ab76f44cce5f42add5e3ba879bd10e7e00c3e6) - logging cleanup ([@othiym23](https://github.com/othiym23)) -* [`4b2d95d`](https://github.com/npm/npm/commit/4b2d95d0641435b09d047ae5cb2226f292bf38f0) - [#6329](https://github.com/npm/npm/issues/6329) efficiently validate tmp - tarballs safely ([@othiym23](https://github.com/othiym23)) - -### v2.1.1 (2014-09-26): - -* [`563225d`](https://github.com/npm/npm/commit/563225d813ea4c12f46d4f7821ac7f76ba8ee2d6) - [#6318](https://github.com/npm/npm/issues/6318) clean up locking; prefix - lockfile with "." ([@othiym23](https://github.com/othiym23)) -* [`c7f30e4`](https://github.com/npm/npm/commit/c7f30e4550fea882d31fcd4a55b681cd30713c44) - [#6318](https://github.com/npm/npm/issues/6318) remove locking code around - tarball packing and unpacking ([@othiym23](https://github.com/othiym23)) - -### v2.1.0 (2014-09-25): - -NEW FEATURE: - -* [`3635601`](https://github.com/npm/npm/commit/36356011b6f2e6a5a81490e85a0a44eb27199dd7) - [#5520](https://github.com/npm/npm/issues/5520) Add `'npm view .'`. - ([@evanlucas](https://github.com/evanlucas)) - -Other changes: - -* [`f24b552`](https://github.com/npm/npm/commit/f24b552b596d0627549cdd7c2d68fcf9006ea50a) - [#6294](https://github.com/npm/npm/issues/6294) Lock cache → lock cache - target. ([@othiym23](https://github.com/othiym23)) -* [`ad54450`](https://github.com/npm/npm/commit/ad54450104f94c82c501138b4eee488ce3a4555e) - [#6296](https://github.com/npm/npm/issues/6296) Ensure that npm-debug.log - file is created when rollbacks are done. - ([@isaacs](https://github.com/isaacs)) -* [`6810071`](https://github.com/npm/npm/commit/681007155a40ac9d165293bd6ec5d8a1423ccfca) - docs: Default loglevel "http" → "warn". - ([@othiym23](https://github.com/othiym23)) -* [`35ac89a`](https://github.com/npm/npm/commit/35ac89a940f23db875e882ce2888208395130336) - Skip installation of installed scoped packages. - ([@timoxley](https://github.com/timoxley)) -* [`e468527`](https://github.com/npm/npm/commit/e468527256ec599892b9b88d61205e061d1ab735) - Ensure cleanup executes for scripts-whitespace-windows test. - ([@timoxley](https://github.com/timoxley)) -* [`ef9101b`](https://github.com/npm/npm/commit/ef9101b7f346797749415086956a0394528a12c4) - Ensure cleanup executes for packed-scope test. - ([@timoxley](https://github.com/timoxley)) -* [`69b4d18`](https://github.com/npm/npm/commit/69b4d18cdbc2ae04c9afaffbd273b436a394f398) - `fs-write-stream-atomic@1.0.1`: Fix a race condition in our race-condition - fixer. ([@isaacs](https://github.com/isaacs)) -* [`26b17ff`](https://github.com/npm/npm/commit/26b17ff2e3b21ee26c6fdbecc8273520cff45718) - [#6272](https://github.com/npm/npm/issues/6272) `npmconf` decides what the - default prefix is. ([@othiym23](https://github.com/othiym23)) -* [`846faca`](https://github.com/npm/npm/commit/846facacc6427dafcf5756dcd36d9036539938de) - Fix development dependency is preferred over dependency. - ([@andersjanmyr](https://github.com/andersjanmyr)) -* [`9d1a9db`](https://github.com/npm/npm/commit/9d1a9db3af5adc48a7158a5a053eeb89ee41a0e7) - [#3265](https://github.com/npm/npm/issues/3265) Re-apply a71615a. Fixes - [#3265](https://github.com/npm/npm/issues/3265) again, with a test! - ([@glasser](https://github.com/glasser)) -* [`1d41db0`](https://github.com/npm/npm/commit/1d41db0b2744a7bd50971c35cc060ea0600fb4bf) - `marked-man@0.1.4`: Fixes formatting of synopsis blocks in man docs. - ([@kapouer](https://github.com/kapouer)) -* [`a623da0`](https://github.com/npm/npm/commit/a623da01bea1b2d3f3a18b9117cfd2d8e3cbdd77) - [#5867](https://github.com/npm/npm/issues/5867) Specify dummy git template - dir when cloning to prevent copying hooks. - ([@boneskull](https://github.com/boneskull)) - -### v2.0.2 (2014-09-19): - -* [`42c872b`](https://github.com/npm/npm/commit/42c872b32cadc0e555638fc78eab3a38a04401d8) - [#5920](https://github.com/npm/npm/issues/5920) - `fs-write-stream-atomic@1.0.0` ([@isaacs](https://github.com/isaacs)) -* [`6784767`](https://github.com/npm/npm/commit/6784767fe15e28b44c81a1d4bb1738c642a65d78) - [#5920](https://github.com/npm/npm/issues/5920) make all write streams atomic - ([@isaacs](https://github.com/isaacs)) -* [`f6fac00`](https://github.com/npm/npm/commit/f6fac000dd98ebdd5ea1d5921175735d463d328b) - [#5920](https://github.com/npm/npm/issues/5920) barf on 0-length cached - tarballs ([@isaacs](https://github.com/isaacs)) -* [`3b37592`](https://github.com/npm/npm/commit/3b37592a92ea98336505189ae8ca29248b0589f4) - `write-file-atomic@1.1.0`: use graceful-fs - ([@iarna](https://github.com/iarna)) - -### v2.0.1 (2014-09-18): - -* [`74c5ab0`](https://github.com/npm/npm/commit/74c5ab0a676793c6dc19a3fd5fe149f85fecb261) - [#6201](https://github.com/npm/npm/issues/6201) `npmconf@2.1.0`: scope - always-auth to registry URI ([@othiym23](https://github.com/othiym23)) -* [`774b127`](https://github.com/npm/npm/commit/774b127da1dd6fefe2f1299e73505d9146f00294) - [#6201](https://github.com/npm/npm/issues/6201) `npm-registry-client@3.2.2`: - use scoped always-auth settings ([@othiym23](https://github.com/othiym23)) -* [`f2d2190`](https://github.com/npm/npm/commit/f2d2190aa365d22378d03afab0da13f95614a583) - [#6201](https://github.com/npm/npm/issues/6201) support saving - `--always-auth` when logging in ([@othiym23](https://github.com/othiym23)) -* [`17c941a`](https://github.com/npm/npm/commit/17c941a2d583210fe97ed47e2968d94ce9f774ba) - [#6163](https://github.com/npm/npm/issues/6163) use `write-file-atomic` - instead of `fs.writeFile()` ([@fiws](https://github.com/fiws)) -* [`fb5724f`](https://github.com/npm/npm/commit/fb5724fd98e1509c939693568df83d11417ea337) - [#5925](https://github.com/npm/npm/issues/5925) `npm init -f`: allow `npm - init` to run without prompting - ([@michaelnisi](https://github.com/michaelnisi)) -* [`b706d63`](https://github.com/npm/npm/commit/b706d637d5965dbf8f7ce07dc5c4bc80887f30d8) - [#3059](https://github.com/npm/npm/issues/3059) disable prepublish when - running `npm install --production` - ([@jussi-kalliokoski](https://github.com/jussi-kalliokoski)) -* [`119f068`](https://github.com/npm/npm/commit/119f068eae2a36fa8b9c9ca557c70377792243a4) - attach the node version used when publishing a package to its registry - metadata ([@othiym23](https://github.com/othiym23)) -* [`8fe0081`](https://github.com/npm/npm/commit/8fe008181665519c2ac201ee432a3ece9798c31f) - seriously, don't use `npm -g update npm` - ([@thomblake](https://github.com/thomblake)) -* [`ea5b3d4`](https://github.com/npm/npm/commit/ea5b3d446b86dcabb0dbc6dba374d3039342ecb3) - `request@2.44.0` ([@othiym23](https://github.com/othiym23)) - -### v2.0.0 (2014-09-12): - -BREAKING CHANGES: - -* [`4378a17`](https://github.com/npm/npm/commit/4378a17db340404a725ffe2eb75c9936f1612670) - `semver@4.0.0`: prerelease versions no longer show up in ranges; `^0.x.y` - behaves the way it did in `semver@2` rather than `semver@3`; docs have been - reorganized for comprehensibility ([@isaacs](https://github.com/isaacs)) -* [`c6ddb64`](https://github.com/npm/npm/commit/c6ddb6462fe32bf3a27b2c4a62a032a92e982429) - npm now assumes that node is newer than 0.6 - ([@isaacs](https://github.com/isaacs)) - -Other changes: - -* [`ea515c3`](https://github.com/npm/npm/commit/ea515c3b858bf493a7b87fa4cdc2110a0d9cef7f) - [#6043](https://github.com/npm/npm/issues/6043) `slide@1.1.6`: wait until all - callbacks have finished before proceeding - ([@othiym23](https://github.com/othiym23)) -* [`0b0a59d`](https://github.com/npm/npm/commit/0b0a59d504f20f424294b1590ace73a7464f0378) - [#6043](https://github.com/npm/npm/issues/6043) defer rollbacks until just - before the CLI exits ([@isaacs](https://github.com/isaacs)) -* [`a11c88b`](https://github.com/npm/npm/commit/a11c88bdb1488b87d8dcac69df9a55a7a91184b6) - [#6175](https://github.com/npm/npm/issues/6175) pack scoped packages - correctly ([@othiym23](https://github.com/othiym23)) -* [`e4e48e0`](https://github.com/npm/npm/commit/e4e48e037d4e95fdb6acec80b04c5c6eaee59970) - [#6121](https://github.com/npm/npm/issues/6121) `read-installed@3.1.2`: don't - mark linked dev dependencies as extraneous - ([@isaacs](https://github.com/isaacs)) -* [`d673e41`](https://github.com/npm/npm/commit/d673e4185d43362c2b2a91acbca8c057e7303c7b) - `cmd-shim@2.0.1`: depend on `graceful-fs` directly - ([@ForbesLindesay](https://github.com/ForbesLindesay)) -* [`9d54d45`](https://github.com/npm/npm/commit/9d54d45e602d595bdab7eae09b9fa1dc46370147) - `npm-registry-couchapp@2.5.3`: make tests more reliable on Travis - ([@iarna](https://github.com/iarna)) -* [`673d738`](https://github.com/npm/npm/commit/673d738c6142c3d043dcee0b7aa02c9831a2e0ca) - ensure permissions are set correctly in cache when running as root - ([@isaacs](https://github.com/isaacs)) -* [`6e6a5fb`](https://github.com/npm/npm/commit/6e6a5fb74af10fd345411df4e121e554e2e3f33e) - prepare for upgrade to `node-semver@4.0.0` - ([@isaacs](https://github.com/isaacs)) -* [`ab8dd87`](https://github.com/npm/npm/commit/ab8dd87b943262f5996744e8d4cc30cc9358b7d7) - swap out `ronn` for `marked-man@0.1.3` ([@isaacs](https://github.com/isaacs)) -* [`803da54`](https://github.com/npm/npm/commit/803da5404d5a0b7c9defa3fe7fa0f2d16a2b19d3) - `npm-registry-client@3.2.0`: prepare for `node-semver@4.0.0` and include more - error information ([@isaacs](https://github.com/isaacs)) -* [`4af0e71`](https://github.com/npm/npm/commit/4af0e7134f5757c3d456d83e8349224a4ba12660) - make default error display less scary ([@isaacs](https://github.com/isaacs)) -* [`4fd9e79`](https://github.com/npm/npm/commit/4fd9e7901a15abff7a3dd478d99ce239b9580bca) - `npm-registry-client@3.2.1`: handle errors returned by the registry much, - much better ([@othiym23](https://github.com/othiym23)) -* [`ca791e2`](https://github.com/npm/npm/commit/ca791e27e97e51c1dd491bff6622ac90b54c3e23) - restore a long (always?) missing pass for deduping - ([@othiym23](https://github.com/othiym23)) -* [`ca0ef0e`](https://github.com/npm/npm/commit/ca0ef0e99bbdeccf28d550d0296baa4cb5e7ece2) - correctly interpret relative paths for local dependencies - ([@othiym23](https://github.com/othiym23)) -* [`5eb8db2`](https://github.com/npm/npm/commit/5eb8db2c370eeb4cd34f6e8dc6a935e4ea325621) - `npm-package-arg@2.1.2`: support git+file:// URLs for local bare repos - ([@othiym23](https://github.com/othiym23)) -* [`860a185`](https://github.com/npm/npm/commit/860a185c43646aca84cb93d1c05e2266045c316b) - tweak docs to no longer advocate checking in `node_modules` - ([@hunterloftis](https://github.com/hunterloftis)) -* [`80e9033`](https://github.com/npm/npm/commit/80e9033c40e373775e35c674faa6c1948661782b) - add links to nodejs.org downloads to docs - ([@meetar](https://github.com/meetar)) - -### v2.0.0-beta.3 (2014-09-04): - -* [`fa79413`](https://github.com/npm/npm/commit/fa794138bec8edb7b88639db25ee9c010d2f4c2b) - [#6119](https://github.com/npm/npm/issues/6119) fall back to registry installs - if package.json is missing in a local directory ([@iarna](https://github.com/iarna)) -* [`16073e2`](https://github.com/npm/npm/commit/16073e2d8ae035961c4c189b602d4aacc6d6b387) - `npm-package-arg@2.1.0`: support file URIs as local specs - ([@othiym23](https://github.com/othiym23)) -* [`9164acb`](https://github.com/npm/npm/commit/9164acbdee28956fa816ce5e473c559395ae4ec2) - `github-url-from-username-repo@1.0.2`: don't match strings that are already - URIs ([@othiym23](https://github.com/othiym23)) -* [`4067d6b`](https://github.com/npm/npm/commit/4067d6bf303a69be13f3af4b19cf4fee1b0d3e12) - [#5629](https://github.com/npm/npm/issues/5629) support saving of local packages - in `package.json` ([@dylang](https://github.com/dylang)) -* [`1b2ffdf`](https://github.com/npm/npm/commit/1b2ffdf359a8c897a78f91fc5a5d535c97aaec97) - [#6097](https://github.com/npm/npm/issues/6097) document scoped packages - ([@seldo](https://github.com/seldo)) -* [`0a67d53`](https://github.com/npm/npm/commit/0a67d536067c4808a594d81288d34c0f7e97e105) - [#6007](https://github.com/npm/npm/issues/6007) `request@2.42.0`: properly - set headers on proxy requests ([@isaacs](https://github.com/isaacs)) -* [`9bac6b8`](https://github.com/npm/npm/commit/9bac6b860b674d24251bb7b8ba412fdb26cbc836) - `npmconf@2.0.8`: disallow semver ranges in tag configuration - ([@isaacs](https://github.com/isaacs)) -* [`d2d4d7c`](https://github.com/npm/npm/commit/d2d4d7cd3c32f91a87ffa11fe464d524029011c3) - [#6082](https://github.com/npm/npm/issues/6082) don't allow tagging with a - semver range as the tag name ([@isaacs](https://github.com/isaacs)) - -### v2.0.0-beta.2 (2014-08-29): - -SPECIAL LABOR DAY WEEKEND RELEASE PARTY WOOO - -* [`ed207e8`](https://github.com/npm/npm/commit/ed207e88019de3150037048df6267024566e1093) - `npm-registry-client@3.1.7`: Clean up auth logic and improve logging around - auth decisions. Also error on trying to change a user document without - writing to it. ([@othiym23](https://github.com/othiym23)) -* [`66c7423`](https://github.com/npm/npm/commit/66c7423b7fb07a326b83c83727879410d43c439f) - `npmconf@2.0.7`: support -C as an alias for --prefix - ([@isaacs](https://github.com/isaacs)) -* [`0dc6a07`](https://github.com/npm/npm/commit/0dc6a07c778071c94c2251429c7d107e88a45095) - [#6059](https://github.com/npm/npm/issues/6059) run commands in prefix, not - cwd ([@isaacs](https://github.com/isaacs)) -* [`65d2179`](https://github.com/npm/npm/commit/65d2179af96737eb9038eaa24a293a62184aaa13) - `github-url-from-username-repo@1.0.1`: part 3 handle slashes in branch names - ([@robertkowalski](https://github.com/robertkowalski)) -* [`e8d75d0`](https://github.com/npm/npm/commit/e8d75d0d9f148ce2b3e8f7671fa281945bac363d) - [#6057](https://github.com/npm/npm/issues/6057) `read-installed@3.1.1`: - properly handle extraneous dev dependencies of required dependencies - ([@othiym23](https://github.com/othiym23)) -* [`0602f70`](https://github.com/npm/npm/commit/0602f708f070d524ad41573afd4c57171cab21ad) - [#6064](https://github.com/npm/npm/issues/6064) ls: do not show deps of - extraneous deps ([@isaacs](https://github.com/isaacs)) - -### v2.0.0-beta.1 (2014-08-28): - -* [`78a1fc1`](https://github.com/npm/npm/commit/78a1fc12307a0cbdbc944775ed831b876ee65855) - `github-url-from-git@1.4.0`: add support for git+https and git+ssh - ([@stefanbuck](https://github.com/stefanbuck)) -* [`bf247ed`](https://github.com/npm/npm/commit/bf247edf5429c6b3ec4d4cb798fa0eb0a9c19fc1) - `columnify@1.2.1` ([@othiym23](https://github.com/othiym23)) -* [`4bbe682`](https://github.com/npm/npm/commit/4bbe682a6d4eabcd23f892932308c9f228bf4de3) - `cmd-shim@2.0.0`: upgrade to graceful-fs 3 - ([@ForbesLindesay](https://github.com/ForbesLindesay)) -* [`ae1d590`](https://github.com/npm/npm/commit/ae1d590bdfc2476a4ed446e760fea88686e3ae05) - `npm-package-arg@2.0.4`: accept slashes in branch names - ([@thealphanerd](https://github.com/thealphanerd)) -* [`b2f51ae`](https://github.com/npm/npm/commit/b2f51aecadf585711e145b6516f99e7c05f53614) - `semver@3.0.1`: semver.clean() is cleaner - ([@isaacs](https://github.com/isaacs)) -* [`1d041a8`](https://github.com/npm/npm/commit/1d041a8a5ebd5bf6cecafab2072d4ec07823adab) - `github-url-from-username-repo@1.0.0`: accept slashes in branch names - ([@robertkowalski](https://github.com/robertkowalski)) -* [`02c85d5`](https://github.com/npm/npm/commit/02c85d592c4058e5d9eafb0be36b6743ae631998) - `async-some@1.0.1` ([@othiym23](https://github.com/othiym23)) -* [`5af493e`](https://github.com/npm/npm/commit/5af493efa8a463cd1acc4a9a394699e2c0793b9c) - ensure lifecycle spawn errors caught properly - ([@isaacs](https://github.com/isaacs)) -* [`60fe012`](https://github.com/npm/npm/commit/60fe012fac9570d6c72554cdf34a6fa95bf0f0a6) - `npmconf@2.0.6`: init.version defaults to 1.0.0 - ([@isaacs](https://github.com/isaacs)) -* [`b4c717b`](https://github.com/npm/npm/commit/b4c717bbf58fb6a0d64ad229036c79a184297ee2) - `npm-registry-client@3.1.4`: properly encode % in passwords - ([@isaacs](https://github.com/isaacs)) -* [`7b55f44`](https://github.com/npm/npm/commit/7b55f44420252baeb3f30da437d22956315c31c9) - doc: Fix 'npm help index' ([@isaacs](https://github.com/isaacs)) - -### v2.0.0-beta.0 (2014-08-21): - -* [`685f8be`](https://github.com/npm/npm/commit/685f8be1f2770cc75fd0e519a8d7aac72735a270) - `npm-registry-client@3.1.3`: Print the notification header returned by the - registry, and make sure status codes are printed without gratuitous quotes - around them. ([@isaacs](https://github.com/isaacs) / - [@othiym23](https://github.com/othiym23)) -* [`a8cb676`](https://github.com/npm/npm/commit/a8cb676aef0561eaf04487d2719672b097392c85) - [#5900](https://github.com/npm/npm/issues/5900) remove `npm` from its own - `engines` field in `package.json`. None of us remember why it was there. - ([@timoxley](https://github.com/timoxley)) -* [`6c47201`](https://github.com/npm/npm/commit/6c47201a7d071e8bf091b36933daf4199cc98e80) - [#5752](https://github.com/npm/npm/issues/5752), - [#6013](https://github.com/npm/npm/issues/6013) save git URLs correctly in - `_resolved` fields ([@isaacs](https://github.com/isaacs)) -* [`e4e1223`](https://github.com/npm/npm/commit/e4e1223a91c37688ba3378e1fc9d5ae045654d00) - [#5936](https://github.com/npm/npm/issues/5936) document the use of tags in - `package.json` ([@KenanY](https://github.com/KenanY)) -* [`c92b8d4`](https://github.com/npm/npm/commit/c92b8d4db7bde2a501da5b7d612684de1d629a42) - [#6004](https://github.com/npm/npm/issues/6004) manually installed scoped - packages are tracked correctly ([@dead](https://github.com/dead)-horse) -* [`21ca0aa`](https://github.com/npm/npm/commit/21ca0aaacbcfe2b89b0a439d914da0cae62de550) - [#5945](https://github.com/npm/npm/issues/5945) link scoped packages - correctly ([@dead](https://github.com/dead)-horse) -* [`16bead7`](https://github.com/npm/npm/commit/16bead7f2c82aec35b83ff0ec04df051ba456764) - [#5958](https://github.com/npm/npm/issues/5958) ensure that file streams work - in all versions of node ([@dead](https://github.com/dead)-horse) -* [`dbf0cab`](https://github.com/npm/npm/commit/dbf0cab29d0db43ac95e4b5a1fbdea1e0af75f10) - you can now pass quoted args to `npm run-script` - ([@bcoe](https://github.com/bcoe)) -* [`0583874`](https://github.com/npm/npm/commit/05838743f01ccb8d2432b3858d66847002fb62df) - `tar@1.0.1`: Add test for removing an extract target immediately after - unpacking. - ([@isaacs](https://github.com/isaacs)) -* [`cdf3b04`](https://github.com/npm/npm/commit/cdf3b0428bc0b0183fb41dcde9e34e8f42c5e3a7) - `lockfile@1.0.0`: Fix incorrect interaction between `wait`, `stale`, and - `retries` options. Part 2 of race condition leading to `ENOENT` - ([@isaacs](https://github.com/isaacs)) - errors. -* [`22d72a8`](https://github.com/npm/npm/commit/22d72a87a9e1a9ab56d9585397f63551887d9125) - `fstream@1.0.2`: Fix a double-finish call which can result in excess FS - operations after the `close` event. Part 1 of race condition leading to - `ENOENT` errors. - ([@isaacs](https://github.com/isaacs)) - -### v2.0.0-alpha.7 (2014-08-14): - -* [`f23f1d8`](https://github.com/npm/npm/commit/f23f1d8e8f86ec1b7ab8dad68250bccaa67d61b1) - doc: update version doc to include `pre-*` increment args - ([@isaacs](https://github.com/isaacs)) -* [`b6bb746`](https://github.com/npm/npm/commit/b6bb7461824d4dc1c0936f46bd7929b5cd597986) - build: add 'make tag' to tag current release as latest - ([@isaacs](https://github.com/isaacs)) -* [`27c4bb6`](https://github.com/npm/npm/commit/27c4bb606e46e5eaf604b19fe8477bc6567f8b2e) - build: publish with `--tag=v1.4-next` ([@isaacs](https://github.com/isaacs)) -* [`cff66c3`](https://github.com/npm/npm/commit/cff66c3bf2850880058ebe2a26655dafd002495e) - build: add script to output `v1.4-next` publish tag - ([@isaacs](https://github.com/isaacs)) -* [`22abec8`](https://github.com/npm/npm/commit/22abec8833474879ac49b9604c103bc845dad779) - build: remove outdated `docpublish` make target - ([@isaacs](https://github.com/isaacs)) -* [`1be4de5`](https://github.com/npm/npm/commit/1be4de51c3976db8564f72b00d50384c921f0917) - build: remove `unpublish` step from `make publish` - ([@isaacs](https://github.com/isaacs)) -* [`e429e20`](https://github.com/npm/npm/commit/e429e2011f4d78e398f2461bca3e5a9a146fbd0c) - doc: add new changelog ([@othiym23](https://github.com/othiym23)) -* [`9243d20`](https://github.com/npm/npm/commit/9243d207896ea307082256604c10817f7c318d68) - lifecycle: test lifecycle path modification - ([@isaacs](https://github.com/isaacs)) -* [`021770b`](https://github.com/npm/npm/commit/021770b9cb07451509f0a44afff6c106311d8cf6) - lifecycle: BREAKING CHANGE do not add the directory containing node executable - ([@chulkilee](https://github.com/chulkilee)) -* [`1d5c41d`](https://github.com/npm/npm/commit/1d5c41dd0d757bce8b87f10c4135f04ece55aeb9) - install: rename .gitignore when unpacking foreign tarballs - ([@isaacs](https://github.com/isaacs)) -* [`9aac267`](https://github.com/npm/npm/commit/9aac2670a73423544d92b27cc301990a16a9563b) - cache: detect non-gzipped tar files more reliably - ([@isaacs](https://github.com/isaacs)) -* [`3f24755`](https://github.com/npm/npm/commit/3f24755c8fce3c7ab11ed1dc632cc40d7ef42f62) - `readdir-scoped-modules@1.0.0` ([@isaacs](https://github.com/isaacs)) -* [`151cd2f`](https://github.com/npm/npm/commit/151cd2ff87b8ac2fc9ea366bc9b7f766dc5b9684) - `read-installed@3.1.0` ([@isaacs](https://github.com/isaacs)) -* [`f5a9434`](https://github.com/npm/npm/commit/f5a94343a8ebe4a8cd987320b55137aef53fb3fd) - test: fix Travis timeouts ([@dylang](https://github.com/dylang)) -* [`126cafc`](https://github.com/npm/npm/commit/126cafcc6706814c88af3042f2ffff408747bff4) - `npm-registry-couchapp@2.5.0` ([@othiym23](https://github.com/othiym23)) - -### v2.0.0-alpha.6 (2014-08-07): - -BREAKING CHANGE: - -* [`ea547e2`](https://github.com/npm/npm/commit/ea547e2) Bump semver to - version 3: `^0.x.y` is now functionally the same as `=0.x.y`. - ([@isaacs](https://github.com/isaacs)) - -Other changes: - -* [`d987707`](https://github.com/npm/npm/commit/d987707) move fetch into - npm-registry-client ([@othiym23](https://github.com/othiym23)) -* [`9b318e2`](https://github.com/npm/npm/commit/9b318e2) `read-installed@3.0.0` - ([@isaacs](https://github.com/isaacs)) -* [`9d73de7`](https://github.com/npm/npm/commit/9d73de7) remove unnecessary - mkdirps ([@isaacs](https://github.com/isaacs)) -* [`33ccd13`](https://github.com/npm/npm/commit/33ccd13) Don't squash execute - perms in `_git-remotes/` dir ([@adammeadows](https://github.com/adammeadows)) -* [`48fd233`](https://github.com/npm/npm/commit/48fd233) `npm-package-arg@2.0.1` - ([@isaacs](https://github.com/isaacs)) - -### v2.0.0-alpha-5 (2014-07-22): - -This release bumps up to 2.0 because of this breaking change, which could -potentially affect how your package's scripts are run: - -* [`df4b0e7`](https://github.com/npm/npm/commit/df4b0e7fc1abd9a54f98db75ec9e4d03d37d125b) - [#5518](https://github.com/npm/npm/issues/5518) BREAKING CHANGE: support - passing arguments to `run` scripts ([@bcoe](https://github.com/bcoe)) - -Other changes: - -* [`cd422c9`](https://github.com/npm/npm/commit/cd422c9de510766797c65720d70f085000f50543) - [#5748](https://github.com/npm/npm/issues/5748) link binaries for scoped - packages ([@othiym23](https://github.com/othiym23)) -* [`4c3c778`](https://github.com/npm/npm/commit/4c3c77839920e830991e0c229c3c6a855c914d67) - [#5758](https://github.com/npm/npm/issues/5758) `npm link` includes scope - when linking scoped package ([@fengmk2](https://github.com/fengmk2)) -* [`f9f58dd`](https://github.com/npm/npm/commit/f9f58dd0f5b715d4efa6619f13901916d8f99c47) - [#5707](https://github.com/npm/npm/issues/5707) document generic pre- / - post-commands ([@sudodoki](https://github.com/sudodoki)) -* [`ac7a480`](https://github.com/npm/npm/commit/ac7a4801d80361b41dce4a18f22bcdf75e396000) - [#5406](https://github.com/npm/npm/issues/5406) `npm cache` displays usage - when called without arguments - ([@michaelnisi](https://github.com/michaelnisi)) -* [`f4554e9`](https://github.com/npm/npm/commit/f4554e99d34f77a8a02884493748f7d49a9a9d8b) - Test fixes for Windows ([@isaacs](https://github.com/isaacs)) -* update dependencies ([@othiym23](https://github.com/othiym23)) diff --git a/changelogs/CHANGELOG-3.md b/changelogs/CHANGELOG-3.md deleted file mode 100644 index fc55a696fb22a..0000000000000 --- a/changelogs/CHANGELOG-3.md +++ /dev/null @@ -1,5245 +0,0 @@ -### v3.10.10 (2016-11-04) - -See the discussion on [#14042](https://github.com/npm/npm/issues/14042) for -more context on this release, which is intended to address a serious regression -in shrinkwrap behavior in the version of the CLI currently bundled with Node.js -6 LTS "Boron". You should never install this version directly; instead update -to `npm@4`, which has everything in this release and more. - -#### REGRESSION FIX - -* [`9aebe98`](https://github.com/npm/npm/commit/9aebe982114ea2107f46baa1dcb11713b4aaad04) - [#14117](https://github.com/npm/npm/pull/14117) - Fixes a bug where installing a shrinkwrapped package would fail if the - platform failed to install an optional dependency included in the shrinkwrap. - ([@watilde](https://github.com/watilde)) - -#### UPDATE SUPPORT MATRIX - -With the advent of the second official Node.js LTS release, Node 6.x -'Boron', the Node.js project has now officially dropped versions 0.10 -and 0.12 out of the maintenance phase of LTS. (Also, Node 5 was never -part of LTS, and will see no further support now that Node 7 has been -released.) As a small team with limited resources, the npm CLI team is -following suit and dropping those versions of Node from its CI test -matrix. - -* [`c82ecfd`](https://github.com/npm/npm/commit/c82ecfdbe0b5f318a175714a8753efe4dfd3e4b3) - [#14503](https://github.com/npm/npm/pull/14503) - Node 6 is LTS; 5.x, 0.10, and 0.12 are unsupported. - ([@othiym23](https://github.com/othiym23)) - -### v3.10.9 (2016-10-06) - -Hi everyone! This is the last of our monthly releases. We're going to give -an every-two-weeks schedule a try starting with our next release. We'll -reevaluate in a quarter, but we suspect that will be what we'll stick with. -You might be wondering _why_ we've been fiddling with the release cadence? Well, -we've been trying to tune it to to minimize the overhead for our little team. - -This is ALSO the ULTIMATE release of `npm` version 3. That's right, in -just two weeks' time (October 20th for you fans of calendar time), our dear -`npm` will be hitting the big 4.0. - -**DON'T PANIC** - -This is gonna be a much, MUCH smaller major version than 3.x was. Maybe even -smaller than 2.x was. I can't tell you everything that'll be in there just -yet, but at the very least it's going to have what's in our -[4.x milestone](https://github.com/npm/npm/pulls?q=is%3Aopen+is%3Apr+milestone%3A4.x), -PLUS, the first steps in -[making `prepublish` work](https://github.com/npm/npm/issues/10074) the way -people expect it to. - -**NOW ABOUT THIS RELEASE** - -This release sees a whole slew of bug fixes. Notably a bunch of lifecycle -fixes and a really important shrinkwrap fix. - -#### LIFECYCLE FIXES - -* [`d388f90`](https://github.com/npm/npm/commit/d388f90732981633b3cdb4fc7fb0fababd4e64ab) - [#13942](https://github.com/npm/npm/pull/13942) - Fix current working directory while running shrinkwrap lifecycle scripts. - Previously if you ran a shrinkwrap from another lifecycle script AND - `node_modules` existed (and if you're running `npm shrinkwrap` it probably - should) then `npm` would run the shrinkwrap lifecycle from the - `node_modules` folder instead of the package folder. - ([@evocateur](https://github.com/evocateur)) - ([@iarna](https://github.com/iarna)) -* [`c3b6cdf`](https://github.com/npm/npm/commit/c3b6cdfedcdb4d9e7712be5245d9b274828d88d1) - [#13964](https://github.com/npm/npm/pull/13964) - Fix bug where the `uninstall` lifecycles weren't being run when you - reinstalled/updated an existing module. - ([@iarna](https://github.com/iarna)) -* [`72bb89c`](https://github.com/npm/npm/commit/72bb89c1aa9811a18cbd766f3da73da76eb920c6) - [#13344](https://github.com/npm/npm/pull/13344) - When running lifecycles use `TMPDIR` if it's writable and fall back to the - current working directory if not. Previously we just assumed `TMPDIR` - wouldn't be writable (as we might have been running as `nobody` and - `nobody` on some systems can't write to `TMPDIR`). - ([@aaronjensen](https://github.com/aaronjensen)) - -#### SHRINKWRAP GIT & TAGGED DEPENDENCY FIX - -* [`3b5eee0`](https://github.com/npm/npm/commit/3b5eee0d31737d1c2518ed95dcc7aaaaa93c253c) - [#13941](https://github.com/npm/npm/pull/13941) - Fix git and tagged dependency matching with shrinkwraps. Previously git - and tag (ie `foo@latest`) dependencies installed from a shrinkwrap would - always be flagged as invalid. - ([@iarna](https://github.com/iarna)) - -#### BUG FIXES - -* [`bf3bd1e`](https://github.com/npm/npm/commit/bf3bd1e4347ee2c5de08d23558c4444749178c8b) - [#14143](https://github.com/npm/npm/pull/14143) - Fix bug in `npm version` where `npm-shrinkwrap.json` wouldn't be updated - if you ran `npm version` from outside of your project root. - ([@lholmquist](https://github.com/lholmquist)) -* [`1089878`](https://github.com/npm/npm/commit/1089878f58977559414c8a9addfc69a9c68905b0) - [#13613](https://github.com/npm/npm/pull/13613) - Log 'skipping action' as 'verbose' instead of 'warn'. This removes a lot of - clutter when there are links in your `node_modules`. The long term plan is - to entirely blind `npm` to what's inside links, which will make this code - go away entirely. - ([@timoxley](https://github.com/timoxley)) -* [`952f1e1`](https://github.com/npm/npm/commit/952f1e109a070ab4066179f6104ba9394300e342) - [#13999](https://github.com/npm/npm/pull/13999) - Fix a bug where setting `bin` to `null` in your `package.json` would result - in `npm` crashing. - ([@IonicaBizau](https://github.com/IonicaBizau)) -* [`fcf8b11`](https://github.com/npm/npm/commit/fcf8b11fb7fcf8902f6a887c3d5f0aef2897dde0) - [#14032](https://github.com/npm/npm/pull/14032) - When using `npm view`, if you specified a version that didn't exist it - would previously print `undefined` (even if you asked for JSON output). It - now prints nothing in this situation. This brings `npm@3`'s behavior in - line with `npm@2`. - ([@roblg](https://github.com/roblg)) -* [`93c689f`](https://github.com/npm/npm/commit/93c689ff44c6042a2dcde7fe0d74d2264237d666) - [#14032](https://github.com/npm/npm/pull/14032) - When using `npm view --json` with a version range that matches multiple - versions we now return a list of all of the metadata for all of those - versions. Previously we picked one and only returned that. This brings - `npm@3`'s behavior in line with `npm@2`. - ([@roblg](https://github.com/roblg)) -* [`2411728`](https://github.com/npm/npm/commit/24117289e09c373b845150c45e4793d98fe7cf4b) - [#14045](https://github.com/npm/npm/pull/14045) - Fix a Windows-only bug in the `git` tests. The tests had rather particular - ideas about what arguments would be passed to `git` and on Windows they - got this wrong. - ([@watilde](https://github.com/watilde)) - -#### DOCUMENTATION & MISC - -* [`30772cc`](https://github.com/npm/npm/commit/30772cc5f80923bf21c003fbe53e5fed9d3a5d97) - [#13904](https://github.com/npm/npm/pull/13904) - Update `package.json` example to include GitHub branches. - ([@stevokk](https://github.com/stevokk)) -* [`f66876f`](https://github.com/npm/npm/commit/f66876f75c204fb78028cf2ff7979f80355bd06c) - [#14010](https://github.com/npm/npm/pull/14010) - Update the GitHub issue template to reflect Apple's change in name of its - desktop operating system. - ([@AlexChesters](https://github.com/AlexChesters)) - -#### DEPENDENCY UPDATES - -* [`b3f9bf1`](https://github.com/npm/npm/commit/b3f9bf1ada3f93e6775f5c232350030db6635d0c) - [#13918](https://github.com/npm/npm/issues/13918) - `graceful-fs@4.1.9`: - Fix the _uid must be an unsigned int_ bug that's been around forever but that - `npm` started tickling in v3.10.8. - ([@addaleax](https://github.com/addaleax)) - Also fixes wrapper to `fs.readdir` to actually pass through (rather than - drop) optional arguments. - ([@isaacs](https://github.com/isaacs)) -* [`9402ead`](https://github.com/npm/npm/commit/9402ead67e3be9b431ade637fbfac86204ee96fe) - [isaacs/node-glob#293](https://github.com/isaacs/node-glob/pull/293) - `glob@7.1.0`: - Add `absolute` option for `match` event. - ([@phated](https://github.com/phated)) -* [`58b83db`](https://github.com/npm/npm/commit/58b83db327dd87bf7cb5a7d503303537718f2f30) - `asap@2.0.5` - ([@kriskowal](https://github.com/kriskowal)) -* [`5707e6e`](https://github.com/npm/npm/commit/5707e6e55b220439c3f83e77daf4c70d72eb46f0) - `sorted-object@2.0.1` - ([@domenic](https://github.com/domenic)) -* [`9d20910`](https://github.com/npm/npm/commit/9d209107ce49a7424c50459284280cd2e6e215d1) - `request@2.75.0` - ([@simov](https://github.com/simov)) -* [`dea4848`](https://github.com/npm/npm/commit/dea48487a9d03492edc68670d05776d32d9ee8cf) - `path-is-inside@1.0.2` - ([@domenic](https://github.com/domenic)) -* [`b3f3db5`](https://github.com/npm/npm/commit/b3f3db52e864d607b6d9b18920e2f58acc4b1616) - `opener@1.4.2` - ([@dominic](https://github.com/dominic)) -* [`6bb5f95`](https://github.com/npm/npm/commit/6bb5f953888bbaaeeb624d623c2a9746d1c243a0) - `lockfile@1.0.2` - ([@isaacs](https://github.com/isaacs)) -* [`13f7c0a`](https://github.com/npm/npm/commit/13f7c0a73212284b53a2d96882fc298afbf9609c) - `config-chain@1.1.11` - ([@dominictarr](https://github.com/dominictarr)) - -### v3.10.8 (2016-09-08) - -Monthly releases are so big! Just look at all this stuff! - -Our quarter of monthly releases is almost over. The next one, in October, might -very well be our last one as we move to trying something different and learning -lessons from our little experiment. - -You may also want to keep an eye our for `npm@4` next month, since we're -planning on finally releasing it then and including a (small) number of breaking -changes we've been meaning to do for a long time. Don't worry, though: `npm@3` -will still be around for a bit and will keep getting better and better, and is -most likely going to be the version that `node@6` uses once it goes to LTS. - -As some of us have mentioned before, npm is likely to start doing more regular -semver-major bumps, while keeping those bumps significantly smaller than the -huge effort that was `npm@3` -- we're not very likely to do a world-shaking -thing like that for a while, if ever. - -All that said, let's move on to the patches included in v3.10.8! - -#### SHRINKWRAP LEVEL UP - -The most notable part of this release is a series of commits meant to make `npm -shrinkwrap` more consistent. By itself, shrinkwrap seems like a fairly -straightforward thing to implement, but things get complicated when it starts -interacting with `devDependencies`, `optionalDependencies`, and -`bundledDependencies`. These commits address some corner cases related to these. - -* [`a7eca32`](https://github.com/npm/npm/commit/a7eca3246fbbcbb05434cb6677f65d14c945d74f) - [#10073](https://github.com/npm/npm/pull/10073) - Record if a dependency is only used as a devDependency and exclude it from the - shrinkwrap file. - ([@bengl](https://github.com/bengl)) -* [`1eabcd1`](https://github.com/npm/npm/commit/1eabcd16bf2590364ca20831096350073539bf3a) - [#10073](https://github.com/npm/npm/pull/10073) - Record if a dependency is optional to shrinkwrap. - ([@bengl](https://github.com/bengl)) -* [`03efc89`](https://github.com/npm/npm/commit/03efc89522c99ee0fa37d8f4a99bc3b44255ef98) - [#13692](https://github.com/npm/npm/pull/13692/) - We were doing a weird thing where we used a `package.json` field `installable` - to check to see if we'd checked for platform compatibility, and if not did - so. But this was the only place that was ever done so there was no reason to - implement it in such an obfuscated manner. - Instead it now just directly checks and then records that its done so on the - node object with `knownInstallable`. This is useful to know because modules - expanded via shrinkwrap don't go through this– `inflateShrinkwrap` does not - currently have any rollback semantics and so checking this sort of thing there - is unhelpful. - ([@iarna](https://github.com/iarna)) -* [`ff87938`](https://github.com/npm/npm/commit/ff879382fda21dac7216a5f666287b3a7e74a947) - [#11735](https://github.com/npm/npm/issues/11735) - Running `npm install --save-dev` will now update shrinkwrap file, but only - if there already are devDependencies in it. - ([@szimek](https://github.com/szimek)) -* [`c00ca3a`](https://github.com/npm/npm/commit/c00ca3aef836709eeaeade91c5305bc2fbda2e8a) - [#13394](https://github.com/npm/npm/issues/13394) - Check installability of modules from shrinkwrap, since modules that came into - the tree vie shrinkwrap won't already have this information recorded in - advance. - ([@iarna](https://github.com/iarna)) - -#### INSTALLER ERROR REPORTING LEVEL UP - -As part of the shrinkwrap push, there were also a lot of error-reporting -improvements. Some to add more detail to error objects, others to fix bugs and -inconsistencies. - -* [`2cdd713`](https://github.com/npm/npm/commit/2cdd7132abddcc7f826a355c14348ce9a5897ffe) - Consistently set code on `ETARGET` when fetching package metadata if no - compatible version is found. - ([@iarna](https://github.com/iarna)) -* [`cabcd17`](https://github.com/npm/npm/commit/cabcd173f2923cb5b77e7be0e42eea2339a24727) - [#13692](https://github.com/npm/npm/pull/13692/) - Include installer warning details at the `verbose` log level. - ([@iarna](https://github.com/iarna)) -* [`95a4044`](https://github.com/npm/npm/commit/95a4044cbae93d19d0da0f3cd04ea8fa620295d9) - [`dbb14c2`](https://github.com/npm/npm/commit/dbb14c241d982596f1cdaee251658f5716989fd2) - [`9994383`](https://github.com/npm/npm/commit/9994383959798f80749093301ec43a8403566bb6) - [`7417000`](https://github.com/npm/npm/commit/74170003db0c53def9b798cb6fe3fe7fc3e06482) - [`f45f85d`](https://github.com/npm/npm/commit/f45f85dac800372d63dfa8653afccbf5bcae7295) - [`e79cc1b`](https://github.com/npm/npm/commit/e79cc1b11440f0d122c4744d5eff98def9553f4a) - [`146ee39`](https://github.com/npm/npm/commit/146ee394b1f7a33cf409a30b835a85d939acb438) - [#13692](https://github.com/npm/npm/pull/13692/) - Improve various bits of error reporting, adding more error information and - some related refactoring. - ([@iarna](https://github.com/iarna)) - -#### MISCELLANEOUS BUGS LEVEL UP - -* [`116b6c6`](https://github.com/npm/npm/commit/116b6c60a174ea0cc49e4d62717e4e26175b6534) - [#13456](https://github.com/npm/npm/issues/13456) - In lifecycle scripts, any `node_modules/.bin` existing in the hierarchy - should be turned into an entry in the PATH environment variable. - However, prior to this commit, it was splitting based on the string - `node_modules`, rather than restricting it to only path portions like - `/node_modules/` or `\node_modules\`. So, a path containing an entry - like `my_node_modules` would be improperly split. - ([@isaacs](https://github.com/isaacs)) -* [`0a28dd0`](https://github.com/npm/npm/commit/0a28dd0104e5b4a8cc0cb038bd213e6a50827fe8) - [npm/fstream-npm#23](https://github.com/npm/fstream-npm/pull/23) - `fstream-npm@1.2.0`: - Always ignore `*.orig` files, which are generated by git when using `git - mergetool`, by default. - ([@zkat](https://github.com/zkat)) -* [`a3a2fb9`](https://github.com/npm/npm/commit/a3a2fb97adc87c2aa9b2b8957861b30efafc7ad0) - [#13708](https://github.com/npm/npm/pull/13708) - Always ignore `*.orig` files, which are generated by git when using `git - mergetool`, by default. - ([@boneskull](https://github.com/boneskull)) - -#### TOOLING LEVEL UP - -* [`e1d7e6c`](https://github.com/npm/npm/commit/e1d7e6ce551cbc42026cdcadcb37ea515059c972) - Add helper for generating test skeletons. - ([@iarna](https://github.com/iarna)) -* [`4400b35`](https://github.com/npm/npm/commit/4400b356bca9175935edad1469c608c909bc01bf) - Fix fixture creation and cleanup in `maketest`. - ([@iarna](https://github.com/iarna)) - -#### DOCUMENTATION LEVEL UP - -* [`8eb9460`](https://github.com/npm/npm/commit/8eb94601fe895b97cbcf8c6134e6b371c5371a1e) - [#13717](https://github.com/npm/npm/pull/13717) - Document that `npm link` will link the files specified in the `bin` field of - `package.json` to `{prefix}/bin/{name}`. - ([@legodude17](https://github.com/legodude17)) -* [`a66e5e9`](https://github.com/npm/npm/commit/a66e5e9c388878fe03fb29014c3b95d28bedd3c1) - [#13682](https://github.com/npm/npm/pull/13682) - Minor grammar fix in documentation for `npm scripts`. - ([@Ajedi32](https://github.com/Ajedi32)) -* [`74b8043`](https://github.com/npm/npm/commit/74b80437ffdfcf8172f6ed4f39bfb021608dd9dd) - [#13655](https://github.com/npm/npm/pull/13655) - Document line comment syntax for `.npmrc`. - ([@mdjasper](https://github.com/mdjasper)) -* [`b352a84`](https://github.com/npm/npm/commit/b352a84c2c7ad15e9c669af75f65cdaa964f86c0) - [#12438](https://github.com/npm/npm/issues/12438) - Remind folks to use `#!/usr/bin/env node` in their `bin` scripts to make files - executable directly. - ([@mxstbr](https://github.com/mxstbr)) -* [`b82fd83`](https://github.com/npm/npm/commit/b82fd838edbfff5d2833a62f6d8ae8ea2df5a1f2) - [#13493](https://github.com/npm/npm/pull/13493) - Document that the user config file can itself be configured either through the - `$NPM_CONFIG_USERCONFIG` environment variable, or `--userconfig` command line - flag. - ([@jasonkarns](https://github.com/jasonkarns)) -* [`8a02699`](https://github.com/npm/npm/commit/8a026992a03d90e563a97c70e90926862120693b) - [#13911](https://github.com/npm/npm/pull/13911) - Minor documentation reword and cleanup. - ([@othiym23](https://github.com/othiym23)) - -#### DEPENDENCY LEVEL UP - -* [`2818fb0`](https://github.com/npm/npm/commit/2818fb0f6081d68a91f0905945ad102f26c6cf85) - `glob@7.0.6` - ([@isaacs](https://github.com/isaacs)) -* [`d88ec81`](https://github.com/npm/npm/commit/d88ec81ad33eb2268fcd517d35346a561bc59aff) - `graceful-fs@4.1.6` - ([@francescoinfante](https://github.com/francescoinfante)) -* [`4727f86`](https://github.com/npm/npm/commit/4727f8646daca7b3e3c1c95860e02acf583b9dae) - `lodash.clonedeep@4.5.0` - ([@jdalton](https://github.com/jdalton)) -* [`c347678`](https://github.com/npm/npm/commit/c3476780ef4483425e4ae1d095a5884b46b8db86) - `lodash.union@4.6.0` - ([@jdalton](https://github.com/jdalton)) -* [`530bd4d`](https://github.com/npm/npm/commit/530bd4d2ae6f704f624e4f7bf64f911f37e2b7f8) - `lodash.uniq@4.5.0` - ([@jdalton](https://github.com/jdalton)) -* [`483d56a`](https://github.com/npm/npm/commit/483d56ae8137eca0c0f7acd5d1c88ca6d5118a6a) - `lodash.without@4.4.0` - ([@jdalton](https://github.com/jdalton)) -* [`6c934df`](https://github.com/npm/npm/commit/6c934df6e74bacd0ed40767b319936837a43b586) - `inherits@2.0.3` - ([@isaacs](https://github.com/isaacs)) -* [`a65ed7c`](https://github.com/npm/npm/commit/a65ed7cbd3c950383a14461a4b2c87b67ef773b9) - `npm-registry-client@7.2.1`: - * [npm/npm-registry-client#142](https://github.com/npm/npm-registry-client/pull/142) Fix `EventEmitter` warning spam from error handlers on socket. ([@addaleax](https://github.com/addaleax)) - * [npm/npm-registry-client#131](https://github.com/npm/npm-registry-client/pull/131) Adds support for streaming request bodies. ([@aredridel](https://github.com/aredridel)) - * Fixes [#13656](https://github.com/npm/npm/issues/13656). - * Dependency updates. - * Documentation improvements. - ([@othiym23](https://github.com/othiym23)) -* [`2b88d62`](https://github.com/npm/npm/commit/2b88d62e6a730716b27052c0911c094d01830a60) - [npm/npmlog#34](https://github.com/npm/npmlog/pull/34) - `npmlog@4.0.0`: - Allows creating log levels that are empty strings or 0 - ([@rwaldron](https://github.com/rwaldron)) -* [`242babb`](https://github.com/npm/npm/commit/242babbd02274ee2d212ae143992c20f47ef0066) - `once@1.4.0` - ([@zkochan](https://github.com/zkochan)) -* [`6d8ba2b`](https://github.com/npm/npm/commit/6d8ba2b4918e2295211130af68ee8a67099139e0) - `readable-stream@2.1.5` - ([@calvinmetcalf](https://github.com/calvinmetcalf)) -* [`855c099`](https://github.com/npm/npm/commit/855c099482a8d93b7f0646bd7bcf8a31f81868e0) - `retry@0.10.0` - ([@tim-kos](https://github.com/tim-kos)) -* [`80540c5`](https://github.com/npm/npm/commit/80540c52b252615ae8a6271b3df870eabfea935e) - `semver@5.3.0`: - * Add `minSatisfying` - * Add `prerelease(v)` - ([@isaacs](https://github.com/isaacs)) -* [`8aaac52`](https://github.com/npm/npm/commit/8aaac52ffae8e689fae265712913b1e2a36b1aa6) - `which@1.2.1` - ([@isaacs](https://github.com/isaacs)) -* [`85108a2`](https://github.com/npm/npm/commit/85108a29108ab0a57997572dc14f87eb706890ba) - `write-file-atomic@1.2.0`: - Preserve chmod and chown from the overwritten file - ([@iarna](https://github.com/iarna)) -* [`291a377`](https://github.com/npm/npm/commit/291a377f32f5073102a8ede61a27e6a9b37154c2) - Update npm documentation to reflect documentation for `semver@5.3.0`. - ([@zkat](https://github.com/zkat)) - -### v3.10.7 (2016-08-11) - -Hi all, today's our first release coming out of the new monthly release -cadence. See below for details. We're all recovered from conferences now -and raring to go! We've got some pretty keen bug fixes and a bunch of -documentation and dependency updates. It's hard to narrow it down to just a -few, but of note are scoped packages in bundled dependencies, the -`preinstall` lifecycle fix, the shrinkwrap and Git dependencies fix and the -fix to a crasher involving cycles in development dependencies. - -#### NEW RELEASE CADENCE - -Releasing npm has been, for the most part, a very prominent part of our -weekly process process. As part of our efforts to find the most effective -ways to allocate our team's resources, we decided last month that we would -try and slow our releases down to a monthly cadence, and see if we found -ourselves with as much extra time and attention as we expected to have. -Process experiments are useful for finding more effective ways to do our -work, and we're at least going to keep doing this for a whole quarter, and -then measure how well it worked out. It's entirely likely that we'll switch -back to a more frequent cadence, specially if we find that the value that -weekly cadence was providing the community is not worth sacrificing for a -bit of extra time. Does this affect you significantly? Let us know! - -#### SCOPED PACKAGES IN BUNDLED DEPENDENCIES - -Prior to this release and -[v2.15.10](https://github.com/npm/npm/releases/v2.15.10), npm had ignored -scoped modules found in `bundleDependencies`. - -* [`29cf56d`](https://github.com/npm/npm/commit/29cf56dbae8e3dd16c24876f998051623842116a) - [#8614](https://github.com/npm/npm/issues/8614) - Include scoped packages in bundled dependencies. - ([@forivall](https://github.com/forivall)) - -#### `preinstall` LIFECYCLE IN CURRENT PROJECT - -* [`b7f13bc`](https://github.com/npm/npm/commit/b7f13bc80b89b025be0c53d81b90ec8f2cebfab7) - [#13259](https://github.com/npm/npm/pull/13259) - Run top level preinstall before installing dependencies - ([@palmerj3](https://github.com/palmerj3)) - -#### BETTER SHRINKWRAP WITH GIT DEPENDENCIES - -* [`0f7e319`](https://github.com/npm/npm/commit/0f7e3197bcec7a328b603efdffd3681bbc40f585) - [#12718](https://github.com/npm/npm/issues/12718.) - Update outdated git dependencies found in shrinkwraps. Previously, if the - module version was the same then no update would be completed even if the - committish had changed. - ([@kossnocorp](https://github.com/kossnocorp)) - - -#### CYCLES IN DEVELOPMENT DEPENDENCIES NO LONGER CRASH - -* [`1691de6`](https://github.com/npm/npm/commit/1691de668d34cd92ab3de08bf3a06085388f2f07) - [#13327](https://github.com/npm/npm/issues/13327) - Fix bug where cycles found in development dependencies could result in - infinite recursion that resulted in crashes. - ([@iarna](https://github.com/iarna)) - -#### IMPROVE "NOT UPDATING LINKED MODULE" WARNINGS - -* [`1619871`](https://github.com/npm/npm/commit/1619871ac0cc8839dc9962c78e736095976c1eb4) - [#12893](https://github.com/npm/npm/pull/12893) - Only warn about symlink update if version number differs - The update-linked action outputs a warning that it needs to update the - linked package, but can't, There is no need for the package to be updated if - it is already at the correct version. This change does a check before - logging the warning. - ([@DaveEmmerson](https://github.com/DaveEmmerson)) - -#### MORE BUG FIXES - -* [`8f8d1b3`](https://github.com/npm/npm/commit/8f8d1b33a78c79aff9de73df362abaa7f05751d2) - [#11398](https://github.com/npm/npm/issues/11398) - Fix bug where `package.json` files that contained a `type` property could - cause crashes. `type` is not a `package.json` property that npm makes use - of and having it should be (and now is) harmless. - ([@zkat](https://github.com/zkat)) -* [`e7fa6c6`](https://github.com/npm/npm/commit/e7fa6c6a2c1de2a214479daa8c6901eebb350381) - [#13353](https://github.com/npm/npm/issues/13353) - Add GIT_EXEC_PATH to Git environment whitelist. - ([@mhart](https://github.com/mhart)) -* [`c23af21`](https://github.com/npm/npm/commit/c23af21d4cedd7fedcb4168672044db76ad054a8) - [#13626](https://github.com/npm/npm/pull/13626) - Use HTTPS issues URL in the error message for type validation errors. - ([@watilde](https://github.com/watilde)) - -#### INCLUDE `npm login` IN COMMAND SUMMARY - -* [`ab0c4b1`](https://github.com/npm/npm/commit/ab0c4b137b05762e75e0913038b606f087b58aa0) - [#13581](https://github.com/npm/npm/issues/13581) - The `login` command has long been an alias for `adduser`. - At the same time, there is an expectation not just of that - particular word being something to look for, but of there being - clear symmetry with `logout`. - So it was a bit confusing when `login` didn't show up in - `npm help` on a technicality. This seems like an acceptable - exception to the rule that says "no aliases in `npm help`". - ([@zkat](https://github.com/zkat)) - -#### DOCUMENTATION - -* [`e2d7e78`](https://github.com/npm/npm/commit/e2d7e7820a7875ed96e0382dc1e91b8df4e83746) - [#13319](https://github.com/npm/npm/pull/13319) - As Node.js 0.8 is no longer supported, remove mention of it from the README. - ([@watilde](https://github.com/watilde)) -* [`c565d89`](https://github.com/npm/npm/commit/c565d893a38efb6006e841450503329c9e58f100) - [#13349](https://github.com/npm/npm/pull/13349) - Updated the scripts documentation to explain the different between `version` and `preversion`. - ([@christophehurpeau](https://github.com/christophehurpeau)) -* [`fa8f87f`](https://github.com/npm/npm/commit/fa8f87f1ec92e543dd975156c4b184eb3e0b80cb) - [#10167](https://github.com/npm/npm/pull/10167) - Clarify in scope documentation that npm@2 is required for scoped packages. - ([@danpaz](https://github.com/danpaz)) - -#### DEPENDENCIES - -* [`124427e`](https://github.com/npm/npm/commit/124427eabbfd200aa145114e389e19692559ff1e) - [#8614](https://github.com/npm/npm/issues/8614) - `fstream-npm@1.1.1`: - Fixes bug with inclusion of scoped bundled dependencies. - ([@forivall](https://github.com/forivall)) -* [`7e0cdff`](https://github.com/npm/npm/commit/7e0cdff04714709f6dc056b19422d3f937502f1c) - [#13497](https://github.com/npm/npm/pull/13497) - `graceful-fs@4.1.5`: - `graceful-fs` had a [bug fix](https://github.com/isaacs/node-graceful-fs/pull/71) which - fixes a problem ([nodejs/node#7846](https://github.com/nodejs/node/pull/7846)) exposed - by recent changes to Node.js. - ([@thefourtheye](https://github.com/thefourtheye)) -* [`9b88cb8`](https://github.com/npm/npm/commit/9b88cb89f138443f324094685f4de073f33ecef0) - [#9984](https://github.com/npm/npm/issues/9984) - `request@2.74.0`: - Update request library to at least 2.73 to fix a bug where `npm install` would crash with - _Cannot read property 'emit' of null._ - - Update `request` dependency `tough-cookie` to `2.3.0` to - to address [https://nodesecurity.io/advisories/130](https://nodesecurity.io/advisories/130). - Versions 0.9.7 through 2.2.2 contain a vulnerable regular expression that, - under certain conditions involving long strings of semicolons in the - "Set-Cookie" header, causes the event loop to block for excessive amounts of - time. - ([@zarenner](https://github.com/zarenner)) - ([@stash-sfdc](https://github.com/stash-sfdc)) -* [`bf78ce5`](https://github.com/npm/npm/commit/bf78ce5ef5d2d6e95177193cca5362dd27bff968) - [#13387](https://github.com/npm/npm/issues/13387) - `minimatch@3.0.3`: - Handle extremely long and terrible patterns more gracefully. - There were some magic numbers that assumed that every extglob pattern starts - and ends with a specific number of characters in the regular expression. - Since !(||) patterns are a little bit more complicated, this led to creating - an invalid regular expression and throwing. - ([@isaacs](https://github.com/isaacs)) -* [`803e538`](https://github.com/npm/npm/commit/803e538efaae4b56a764029742adcf6761e8398b) - [isaacs/rimraf#111](https://github.com/isaacs/rimraf/issues/111) - `rimraf@2.5.4`: Clarify assertions: cb is required, options are not. - ([@isaacs](https://github.com/isaacs)) -* [`a9f84ef`](https://github.com/npm/npm/commit/a9f84ef61b4c719b646bf9cda00577ef16e3a113) - `lodash.without@4.2.0` - ([@jdalton](https://github.com/jdalton)) -* [`f59ff1c`](https://github.com/npm/npm/commit/f59ff1c2701f1bfd21bfdb97b4571823b614f694) - `lodash.uniq@4.4.0` - ([@jdalton](https://github.com/jdalton)) -* [`8cc027e`](https://github.com/npm/npm/commit/8cc027e5e81623260a49b31fe406ce483258b203) - `lodash.union@4.5.0` - ([@jdalton](https://github.com/jdalton)) -* [`0a6c1e4`](https://github.com/npm/npm/commit/0a6c1e4302a153fb055f495043ed33afd8324193) - `lodash.without@4.3.0` - ([@jdalton](https://github.com/jdalton)) -* [`4ab0181`](https://github.com/npm/npm/commit/4ab0181fca2eda18888b865ef691b83d30fb0c33) - `lodash.clonedeep@4.4.1` - ([@jdalton](https://github.com/jdalton)) - -### v3.10.6 (2016-07-07) - -This week we have a bunch of bug fixes for ya! A shrinkwrap regression -introduced in 3.10.0, better lifecycle `PATH` behavior, improvements when -working with registries other than `registry.npmjs.org` and a fix for -hopefully the last _don't print a progress bar over my interactive thingy_ -bug. - -#### SHRINKWRAP AND DEV DEPENDENCIES - -The rewrite in 3.10.0 triggered a bug where dependencies of devDependencies -would be included in your shrinkwrap even if you didn't request -devDependencies. - -* [`2484529`](https://github.com/npm/npm/commit/2484529ab56a42e5d6f13c48006f39a596d9e327) - [#13308](https://github.com/npm/npm/pull/13308) - Fix bug where deps of devDependencies would be incorrectly included in - shrinkwraps. - ([@iarna](https://github.com/iarna)) - -#### BETTER PATH LIFECYCLE BEHAVIOR - -We've been around the details on this one a few times in recent months and -hopefully this will bring is to where we want to be. - -* [`81051a9`](https://github.com/npm/npm/commit/81051a90eee66a843f76eb8cccedbb1d0a5c1f47) - [#12968](https://github.com/npm/npm/pull/12968) - When running lifecycle scripts, only prepend directory containing the node - binary to PATH if not already in PATH. - ([@segrey](https://github.com/segrey)) - -#### BETTER INTERACTIONS WITH THIRD PARTY REGISTRIES - -* [`071193c`](https://github.com/npm/npm/commit/071193c8e193767dd1656cb27556cb3751d77a3b) - [#10869](https://github.com/npm/npm/pull/10869) - If the registry returns a list of versions some of which are invalid, skip - those when picking a version to install. This can't happen with - registry.npmjs.org as it will normalize versions published with it, but it - can happen with other registries. - ([@gregersrygg](https://github.com/gregersrygg)) - -#### ONE LAST TOO-MUCH-PROGRESS CORNER - -* [`1244cc1`](https://github.com/npm/npm/commit/1244cc16dc5a0536acf26816a1deeb8e221d67eb) - [#13305](https://github.com/npm/npm/pull/13305) - Disable progress bar in `npm edit` and `npm config edit`. - ([@watilde](https://github.com/watilde)) - -#### HTML DOCS IMPROVEMENTS - -* [`58da923`](https://github.com/npm/npm/commit/58da9234ae72a5474b997f890a1155ee9785e6f1) - [#13225](https://github.com/npm/npm/issues/13225) - Fix HTML character set declaration in generated HTML documentation. - ([@KenanY](https://github.com/KenanY)) -* [`d1f0bf4`](https://github.com/npm/npm/commit/d1f0bf4303566f8690502034f82bbb449850958d) - [#13250](https://github.com/npm/npm/pull/13250) - Optimize png images using zopflipng. - ([@PeterDaveHello](https://github.com/PeterDaveHello)) - -#### DEPENDENCY UPDATES (THAT MATTER) - -* [`c7567e5`](https://github.com/npm/npm/commit/c7567e58618b63f97884afa104d2f560c9272dd5) - [npm/npm-user-validate#9](https://github.com/npm/npm-user-validate/pull/9) - `npm-user-validate@0.1.5`: - Lower the username length limits to 214 from 576 to match `registry.npmjs.org`'s limits. - ([@aredridel](https://github.com/aredridel)) -* [`22802c9`](https://github.com/npm/npm/commit/22802c9db3cf990c905e8f61304db9b5571d7964) - [#isaacs/rimraf](https://github.com/npm/npm/issues/isaacs/rimraf) - `rimraf@2.5.3`: - Fixes EPERM errors when running `lstat` on read-only directories. - ([@isaacs](https://github.com/isaacs)) -* [`ce6406f`](https://github.com/npm/npm/commit/ce6406f4b6c4dffbb5cd8a3c049f6663a5665522) - `glob@7.0.5`: - Forces the use of `minimatch` to 3.0.2, which improved handling of long and - complicated patterns. - ([@isaacs](https://github.com/isaacs)) - - -### v3.10.5 (2016-07-05) - -This is a fix to this week's testing release to correct the update of -`node-gyp` which somehow got mangled. - -* [`ca97ce2`](https://github.com/npm/npm/commit/ca97ce2e8d8ba44c445b39ffa40daf397d5601b3) - [#13256](https://github.com/npm/npm/issues/13256) - Fresh reinstall of `node-gyp@3.4.0`. - ([@zkat](https://github.com/zkat)) - -### v3.10.4 (2016-06-30) - -Hey y'all! This release includes a bunch of fixes we've been working on as we -continue on our `big-bug` push. There's still [a lot of it left to -do](https://github.com/npm/npm/labels/big-bug), but once this is done, things -should just generally be more stable, installs should be more reliable and -correct, and we'll be able to move on to more future work. We'll keep doing our -best! 🙌 - -#### RACES AS WACKY AS [REDLINE](https://en.wikipedia.org/wiki/Redline_\(2009_film\)) - -Races are notoriously hard to squash, and tend to be some of the more common -recurring bugs we see on the CLI. [@julianduque](https://github.com/julianduque) -did some pretty awesome [sleuthing -work](https://github.com/npm/npm/issues/12669) to track down a cache race and -helpfully submitted a patch. There were some related races in the same area that -also got fixed at around the same time, mostly affecting Windows users. - -* [`2a37c97`](https://github.com/npm/npm/commit/2a37c97121483db2b6f817fe85c2a5a77b76080e) - [#12669](https://github.com/npm/npm/issues/12669) - [#13023](https://github.com/npm/npm/pull/13023) - The CLI is pretty aggressive about correcting permissions across the cache - whenever it writes to it. This aggressiveness caused a couple of races where - temporary cache files would get picked up by `fs.readdir`, and removed before - `chownr` was called on them, causing `ENOENT` errors. While the solution might - seem a bit hamfisted, it's actually perfectly safe and appropriate in this - case to just ignore those resulting `ENOENT` errors. - ([@julianduque](https://github.com/julianduque)) -* [`ea018b9`](https://github.com/npm/npm/commit/ea018b9e3856d1798d199ae3ebce4ed07eea511b) - [#13023](https://github.com/npm/npm/pull/13023) - If a user were to have SUDO_UID and SUDO_GID, they'd be able to get into a - pretty weird state. This fixes that corner case. - ([@zkat](https://github.com/zkat)) -* [`703ca3a`](https://github.com/npm/npm/commit/703ca3abbf4f1cb4dff08be32acd2142d5493482) - [#13023](https://github.com/npm/npm/pull/13023) - A missing `return` was causing `chownr` to be called on Windows, even though - that's literally pointless, and causing crashes in the process, instead of - short-circuiting. This was entirely dependent on which callback happened to be - called first, and in some cases, the failing one would win the race. This - should prevent this from happening in the future. - ([@zkat](https://github.com/zkat)) -* [`69267f4`](https://github.com/npm/npm/commit/69267f4fbd1467ce576f173909ced361f8fe2a9d) - [#13023](https://github.com/npm/npm/pull/13023) - Added tests to verify `correct-mkdir` race patch. - ([@zkat](https://github.com/zkat)) -* [`e5f50ea`](https://github.com/npm/npm/commit/e5f50ea9f84fe8cac6978d18f7efdf43834928e7) - [#13023](https://github.com/npm/npm/pull/13023) - Added tests to verify `addLocal` race patch. - ([@zkat](https://github.com/zkat)) - -#### SHRINKWRAP IS COMPLICATED BUT IT'S BETTER NOW - -[@iarna](https://github.com/iarna) did some heroic hacking to refactor a bunch -of `shrinkwrap`-related bits and fixed some resolution and pathing issues that -were biting users. The code around that stuff got more readable/maintainable in -the process, too! - -* [`346bba1`](https://github.com/npm/npm/commit/346bba1e1fee9cc814b07c56f598a73be5c21686) - [#13214](https://github.com/npm/npm/pull/13214) - Resolve local dependencies in `npm-shrinkwrap.json` relative to the top of the - tree. - ([@iarna](https://github.com/iarna)) -* [`4a67fdb`](https://github.com/npm/npm/commit/4a67fdbd0f160deb6644a9c4c5b587357db04d2d) - [#13213](https://github.com/npm/npm/pull/13213) - If you run `npm install modulename` it should, if a `npm-shrinkwrap.json` is - present, use the version found there. If not, it'll use the version found in - your `package.json`, and failing *that*, use `latest`. - This fixes a case where the first check was being bypassed because version - resolution was being done prior to loading the shrinkwrap, and so checks to - match the shrinkwrap version couldn't succeed. - ([@iarna](https://github.com/iarna)) -* [`afa2133`](https://github.com/npm/npm/commit/afa2133a5d8ac4f6f44cdc6083d89ad7f946f5bb) - [#13214](https://github.com/npm/npm/pull/13214) - Refactor shrinkwrap specifier lookup into shared function. - ([@iarna](https://github.com/iarna)) -* [`2820b56`](https://github.com/npm/npm/commit/2820b56a43e1cc1e12079a4c886f6c14fe8c4f10) - [#13214](https://github.com/npm/npm/pull/13214) - Refactor operations in `inflate-shrinkwrap.js` into separate functions for - added clarity. - ([@iarna](https://github.com/iarna)) -* [`ee5bfb3`](https://github.com/npm/npm/commit/ee5bfb3e56ee7ae582bec9f741f32b224c279947) - Fix Windows path issue in a shrinkwrap test. - ([@zkat](https://github.com/zkat)) - -#### OTHER BUGFIXES - -* [`a11a7b2`](https://github.com/npm/npm/commit/a11a7b2e7df9478ac9101b06eead4a74c41a648d) - [#13212](https://github.com/npm/npm/pull/13212) - Resolve local paths passed in through the command line relative to current - directory, instead of relative to the `package.json`. - ([@iarna](https://github.com/iarna)) - -#### DEPENDENCY UPDATES - -* [`900a5b7`](https://github.com/npm/npm/commit/900a5b7f18b277786397faac05853c030263feb8) - [#13199](https://github.com/npm/npm/pull/13199) - [`node-gyp@3.4.0`](https://github.com/nodejs/node-gyp/blob/master/CHANGELOG.md): - AIX, Visual Studio 2015, and logging improvements. Oh my~! - ([@rvagg](https://github.com/rvagg)) - -#### DOCUMENTATION FIXES - -* [`c6942a7`](https://github.com/npm/npm/commit/c6942a7d6acb2b8c73206353bbec03380a056af4) - [#13134](https://github.com/npm/npm/pull/13134) - Fixed a few typos in `CHANGELOG.md`. - ([@watilde](https://github.com/watilde)) -* [`e63d913`](https://github.com/npm/npm/commit/e63d913127731ece56dcd69c7c0182af21be58f8) - [#13156](https://github.com/npm/npm/pull/13156) - Fix old reference to `doc/install` in a source comment. - ([@sheerun](https://github.com/sheerun)) -* [`099d23c`](https://github.com/npm/npm/commit/099d23cc8f38b524dc19a25857b2ebeca13c49d6) - [#13113](https://github.com/npm/npm/issues/13113) - [#13189](https://github.com/npm/npm/pull/13189) - Fixes a link to `npm-tag(3)` that was breaking to instead point to - `npm-dist-tag(1)`, as reported by [@SimenB](https://github.com/SimenB) - ([@macdonst](https://github.com/macdonst)) - -### v3.10.3 (2016-06-23) - -Given that we had not one, but two updates to our RC this past week, it -should come as no surprise that this week's full release is a bit -lighter. We have some documentation patches and a couple of bug fixes via -dependency updates. - -If you haven't yet checked out last week's release, -[v3.10.0](https://github.com/npm/npm/releases/tag/v3.10.0) -and the two follow up releases -[v3.10.1](https://github.com/npm/npm/releases/tag/v3.10.1) -and -[v3.10.2](https://github.com/npm/npm/releases/tag/v3.10.2), -you really should do so. They're the most important releases we've had in -quite a while, fixing a bunch of critical bugs (including an issue -impacting publishing with Node.js 6.x) and of course, bringing in the new -and improved progress bar. - -#### BUM SYMLINKS BURN NO MORE - -There's been a bug lurking where broken symlinks in your `node_modules` -folder could cause all manner of mischief, from crashes to empty `npm ls` -results. The intrepid [@watilde](https://github.com/watilde) tracked this -down for us. - -This addresses the root cause of the outdated crasher we protected -against earlier this week in -[#13115](https://github.com/npm/npm/issues/13115). - -This also fixes [#9564](https://github.com/npm/npm/issues/9564), the -problem where a bad symlink in your global modules would result in an -empty result when you ran `npm ls -g`. - -This ALSO likely fixes numerous "Missing argument #1" errors. (But surely -not all of them as that's actually just a generic arity and -type-validation failure.) - -* [`ca92ac4`](https://github.com/npm/npm/commit/ca92ac455b841a708dd89262ff88d503b125d717) - [npm/read-package-tree#6](https://github.com/npm/read-package-tree/pull/6) - `read-package-tree@5.1.5`: - Make bad symlinks be non-fatal errors when reading the tree off disk. - ([@watilde](https://github.com/watilde)) - -#### BETTER UNICODE DETECTION - -* [`6c3f7f0`](https://github.com/npm/npm/commit/6c3f7f043f09fc2aa19ffd3f956787635fa6f4d0) - `has-unicode@2.0.1`: - Fix unicode detection on a number of Linux distributions. - ([@Darkhogg](https://github.com/Darkhogg)) ([@gagern](https://github.com/gagern)) - - -#### DOCUMENTATION FIXES - -* [`b9243ee`](https://github.com/npm/npm/commit/b9243ee60a3d60505c2502dc8633811b42c8aaea) - [#13127](https://github.com/npm/npm/pull/13127) - Remove extra backtick from `npm ls` documentation. - ([@shvaikalesh](https://github.com/shvaikalesh)) -* [`e05c0c2`](https://github.com/npm/npm/commit/e05c0c243cc702f9c392c001f668a90b57eaeb0e) - [iarna/has-unicode#3](https://github.com/iarna/has-unicode/pull/3) - [iarna/has-unicode#4](https://github.com/iarna/has-unicode/pull/4) - [#13084](https://github.com/npm/npm/pull/13084) - Correct changelog entry for shrinkwrap lifecycle order. - ([@SimenB](https://github.com/SimenB)) -* [`823994f`](https://github.com/npm/npm/commit/823994f100a0e59e1dd109e312811f971968ec75) - [#13080](https://github.com/npm/npm/pull/13080) - Describe using `npm pack` to see a dry run of publication results in - the `npm publish` documentation. - ([@laughinghan](https://github.com/laughinghan)) - -#### DEPENDENCY UPDATES - -* [`e44d2db`](https://github.com/npm/npm/commit/e44d2db1ad0d860ca08e99c81135bd399fb733b1) - `aproba@1.0.4`: Documentation updates and minor refactoring. - ([@iarna](https://github.com/iarna)) - -### v3.10.2 (2016-06-17): - -This is a quick hotfix release with two small bug fixes. First, there was -an issue where the new progress bar would overwrite interactive prompts, -that is, those found in `npm login` and `npm init`. Second, if the -directory you were running `npm outdated` on was a bad link or otherwise had -unrecoverable errors then npm would crash instead of printing the error. - -* [`fbefb86`](https://github.com/npm/npm/commit/fbefb8675b26320b295f481b4872ce99f0180807) - [`7779e9f`](https://github.com/npm/npm/commit/7779e9fb9430f6547532c67f2471864d62bbd5bc) - [#13105](https://github.com/npm/npm/issues/13105) - Disable progress bar in `adduser` and `init`. -* [`6a33b2c`](https://github.com/npm/npm/commit/6a33b2c13f637a41e25cd0339925bc430b50358a) - [#13115](https://github.com/npm/npm/issues/13115) - Ensure that errors reading the package tree for `outdated` does not result - in crashes. - ([@iarna](https://github.com/iarna)) - -### v3.10.1 (2016-06-17): - -There are two very important bug fixes and one long-awaited (and significant!) -deprecation in this hotfix release. [Hold on.](http://butt.holdings/) - -#### *WHOA* - -When Node.js 6.0.0 was released, the CLI team noticed an alarming upsurge in -bugs related to important files (like `README.md`) not being included in -published packages. The new bugs looked much like -[#5082](https://github.com/npm/npm/issues/5082), which had been around in one -form or another since April, 2014. #5082 used to be a very rare (and obnoxious) -bug that the CLI team hadn't had much luck reproducing, and we'd basically -marked it down as a race condition that arose on machines using slow and / or -rotating-media-based hard drives. - -Under 6.0.0, the behavior was reliable enough to be nearly deterministic, and -made it very difficult for publishers using `.npmignore` files in combination -with `"files"` stanzas in `package.json` to get their packages onto the -registry without one or more files missing from the packed tarball. The entire -saga is contained within [the issue](https://github.com/npm/npm/issues/5082), -but the summary is that an improvement to the performance of -[`fs.realpath()`](https://nodejs.org/api/fs.html#fs_fs_realpath_path_options_callback) -made it much more likely that the packing code would lose the race. - -Fixing this has proven to be very difficult, in part because the code used by -npm to produce package tarballs is more complicated than, strictly speaking, it -needs to be. [**@evanlucas**](https://github.com/evanlucas) contributed [a -patch](https://github.com/npm/fstream/pull/50) that passed the tests in a -[special test suite](https://github.com/othiym23/eliminate-5082) that I -([**@othiym23**](https://github.com/othiym23)) created (with help from -[**@addaleax**](https://github.com/addaleax)), but only _after_ we'd released -the fixed version of that package did we learn that it actually made the -problem _worse_ in other situations in npm proper. Eventually, -[**@rvagg**](https://github.com/rvagg) put together a more durable fix that -appears to completely address the errant behavior under Node.js 6.0.0. That's -the patch included in this release. Everybody should chip in for redback -insurance for Rod and his family; he's done the community a huge favor. - -Does this mean the long (2+ year) saga of #5082 is now over? At this point, I'm -going to quote from my latest summary on the issue: - -> The CLI team (mostly me, with input from the rest of the team) has decided that -> the overall complexity of the interaction between `fstream`, `fstream-ignore`, -> `fstream-npm`, and `node-tar` has grown more convoluted than the team is -> comfortable (maybe even capable of) supporting. -> -> - While I believe that @rvagg's (very targeted) fix addresses _this_ issue, I -> would be shocked if there aren't other race conditions in npm's packing -> logic. I've already identified a couple other places in the code that are -> most likely race conditions, even if they're harder to trigger than the -> current one. -> - The way that dependency bundling is integrated leads to a situation in -> which a bunch of logic is duplicated between `fstream-npm` and -> `lib/utils/tar.js` in npm itself, and the way `fstream`'s extension -> mechanism works makes this difficult to clean up. This caused a nasty -> regression ([#13088](https://github.com/npm/fstream/pull/50), see below) as -> of ~`npm@3.8.7` where the dependencies of `bundledDependencies` were no -> longer being included in the built package tarballs. -> - The interaction between `.npmignore`, `.gitignore`, and `files` is hopelessly -> complicated, scattered in many places throughout the code. We've been -> discussing [making the ignores and includes logic clearer and more -> predictable](https://github.com/npm/npm/wiki/Files-and-Ignores), and the -> current code fights our efforts to clean that up. -> -> So, our intention is still to replace `fstream`, `fstream-ignore`, and -> `fstream-npm` with something much simpler and purpose-built. There's no real -> reason to have a stream abstraction here when a simple recursive-descent -> filesystem visitor and a synchronous function that can answer whether a given -> path should be included in the packed tarball would do the job adequately. -> -> What's not yet clear is whether we'll need to replace `node-tar` in the -> process. `node-tar` is a very robust implementation of tar (it handles, like, -> everything), and it also includes some very important tweaks to prevent several -> classes of security exploits involving maliciously crafted packages. However, -> its packing API involves passing in an `fstream` instance, so we'd either need -> to produce something that follows enough of `fstream`'s contract for `node-tar` -> to keep working, or swap `node-tar` out for something like `tar-stream` (and -> then ensuring that our use of `tar-stream` is secure, which could involve -> security patches for either npm or `tar-stream`). - -The testing and review of `fstream@1.0.10` that the team has done leads us to -believe that this bug is fixed, but I'm feeling more than a little paranoid -about fstream now, so it's important that people keep a close eye on their -publishes for a while and let us know immediately if they notice any -irregularities. - -* [`8802f6c`](https://github.com/npm/npm/commit/8802f6c152ea35cb9e5269c077c3a2f9df411afc) - [#5082](https://github.com/npm/npm/issues/5082) `fstream@1.0.10`: Ensure that - entries are collected after a paused stream resumes. - ([@rvagg](https://github.com/rvagg)) -* [`c189723`](https://github.com/npm/npm/commit/c189723110497a17dac3b0596f2916deeed93ee7) - [#5082](https://github.com/npm/npm/issues/5082) Remove the warning introduced - in `npm@3.10.0`, because it should no longer be necessary. - ([@othiym23](https://github.com/othiym23)) - -#### *ERK* - -Because the interaction between `fstream`, `fstream-ignore`, `fsream-npm`, and -`node-tar` is so complex, it's proven difficult to add support for npm features -like `bundledDependencies` without duplicating some logic within npm's code -base. While [fixing a completely unrelated -bug](https://github.com/npm/npm/issues/9642), we "cleaned up" some of this -seemingly duplicated code, and in the process removed the code that ensured -that the dependencies of `bundledDependencies` are themselves bundled. We've -brought that code back into the code base (without reopening #9642), and added -a test to ensure that this regression can't recur. - -* [`1b6ceca`](https://github.com/npm/npm/commit/1b6ceca32fc81ca7cc7ac2eb7d11f687e6f87f26) - [#13088](https://github.com/npm/npm/issues/13088) Partially restore npm's own - version of the `fstream-npm` function `applyIgnores` to ensure that the - dependencies of `bundledDependencies` are included in published packages. - ([@iarna](https://github.com/iarna)) - -#### GOODBYE, FAITHFUL FRIEND - -At NodeConf Adventure 2016 (RIP in peace, Mikeal Rogers's NodeConf!), the CLI -team had an opportunity to talk to representatives from some of the larger -companies that we knew were still using Node.js 0.8 in production. After asking -them whether they were still using 0.8, we got back blank stares and questions -like, "0.8? You mean, from four years ago?" After establishing that being able -to run npm in their legacy environments was no longer necessary, the CLI team -made the decision to drop support for 0.8. (Faithful observers of our [team -meetings](https://github.com/npm/npm/issues?utf8=%E2%9C%93&q=is%3Aissue+npm+cli+team+meeting+) -will have known this was the plan for NodeConf since the beginning of 2016.) - -In practice, this means only what's in the commit below: we've removed 0.8 from -our continuous integration test matrix below, and will no longer be habitually -testing changes under Node 0.8. We may also give ourselves permission to use -`setImmediate()` in test code. However, since the project still supports -Node.js 0.10 and 0.12, it's unlikely that patches that rely on ES 2015 -functionality will land anytime soon. - -Looking forward, the team's current plan is to drop support for Node.js 0.10 -when its LTS maintenance window expires in October, 2016, and 0.12 when its -maintenance / LTS window ends at the end of 2016. We will also drop support for -Node.js 5.x when Node.js 6 becomes LTS and Node.js 7 is released, also in the -October-December 2016 timeframe. - -(Confused about Node.js's LTS policy? [Don't -be!](https://github.com/nodejs/LTS) If you look at [this -diagram](https://github.com/nodejs/LTS/blob/ce364a94b0e0619eba570cd57be396573e1ef889/schedule.png), -it should make all of the preceding clear.) - -If, in practice, this doesn't work with distribution packagers or other -community stakeholders responsible for packaging and distributing Node.js and -npm, please reach out to us. Aligning the npm CLI's LTS policy with Node's -helps everybody minimize the amount of work they need to do, and since all of -our teams are small and very busy, this is somewhere between a necessity and -non-negotiable. - -* [`d6afd5f`](https://github.com/npm/npm/commit/d6afd5ffb1b19e5d94aeee666afcb8adaced58db) - Remove 0.8 from the Node.js testing matrix, and reorder to match real-world - priority, with comments. ([@othiym23](https://github.com/othiym23)) - -### v3.10.0 (2016-06-16): - -Do we have a release for you! We have our first new lifecycle since -`version`, a new progress bar and a bunch of bug fixes. -[I'm](https://github.com/iarna) really excited about this release, let me -tell you!! - -#### DANGER: PUBLISHING ON NODE 6.0.0 - -Publishing and packing are buggy under Node versions greater than 6.0.0. -Please use Node.js LTS (4.4.x) to publish packages. See -[#5082](https://github.com/npm/npm/issues/5082) for details and current -status. - -* [`4e52cef`](https://github.com/npm/npm/commit/4e52cef3d4170c8abab98149666ec599f8363233) - [#13077](https://github.com/npm/npm/pull/13077) - Warn when using Node 6+. - ([@othiym23](https://github.com/othiym23)) - -#### NEW LIFECYCLE SCRIPT: `shrinkwrap` - -* [`e8c80f2`](https://github.com/npm/npm/commit/e8c80f20bfd5d1618e85dbab41660d6f3e5ce405) - [#10744](https://github.com/npm/npm/issues/10744) - You can now add `preshrinkwrap`, `shrinkwrap` and `postshrinkwrap` to your `package.json` - scripts section. They are run when you run `npm shrinkwrap` or `npm install --save` with - an `npm-shrinkwrap.json` present in your module directory. - - `preshrinkwrap` and `shrinkwrap` is run prior to generating the new `npm-shrinkwrap.json` - and `postshrinkwrap` is run after. - ([@SimenB](https://github.com/SimenB)) - -#### NEW PROGRESS BAR - -![Install with new progress bar](http://shared.by.re-becca.org/misc-images/new-gauge-color.gif) - -We have a new progress bar and a bunch of related improvements! - -##### BLOCKING BLOCKING - -**!!WARNING!!** As a part of this change we now explicitly set -`process.stdout` and `process.stderr` to be _blocking_ if they are ttys, -using [set-blocking](https://www.npmjs.com/package/set-blocking). This is -necessary to ensure that we can fully erase the progress bar before we start -writing other things out to the console. - -Prior to Node.js 6.0.0, they were already blocking on Windows, and MacOS. -Meanwhile, on Linux they were always non-blocking but had large (64kb) -buffers, which largely made this a non-issue there. Starting with Node.js -6.0.0 they became non-blocking on MacOS and that caused some unexpected -issues (see [nodejs/node#6456](https://github.com/nodejs/node/issues/6456)). - -If you are a Linux user, it's plausible that this might have a performance -impact if your terminal can't keep up with output rate. If you experience -this, we want to know! Please [file an -issue](https://github.com/npm/npm/issues/new) at our issue tracker. - -##### BETTER LAYOUT - -Let's start by talking about what goes into the new progress bar: - -``` -⸨░░░░░░░░░░⠂⠂⠂⠂⠂⠂⠂⠂⸩ ⠹ loadExtraneous: verb afterAdd /Users/rebecca/.npm/null/0.0.0/package/package.json written - ↑‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ ↑ ‾‾‾‾‾‾‾‾‾↑‾‾‾‾ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾↑‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - percent complete spinner current thing we're doing most recent log line -``` - -The _spinner_ is intended as an activity indicator–it moves whenever -npm sends something to its logs. It also spins at a constant speed while -waiting on the network. - -The _current thing we're doing_ relates to how we track how much work has -been done. It's the name of the unit of work we most recently started or -completed some of. Sometimes these names are more obvious than others and -that's something we'll look at improving over time. - -And finally, the _most recent log line_ is exactly that, it's the most -recent line that you would have seen if you were running with -`--loglevel=silly` or were watching the `npm-debug.log`. These are written -to be useful to the npm developers above all else, so they may sometimes be -a little cryptic. - -* [`6789978`](https://github.com/npm/npm/commit/6789978ab0713f67928177a9109fed43953ccbda) - [#13075](https://github.com/npm/npm/pull/13075) - `npmlog@3.1.2`: Update to the latest npmlog, which includes the new and - improved progress bar layout. - ([@iarna](https://github.com/iarna)) - -##### MORE PERFORMANT - -The underlying code for the progress bar was rewritten, in part with -performance in mind. Previously whenever you updated the progress bar it -would check an internal variable for how long it had been since the last -update and if it had been long enough, it would print out what you gave it. -With the new progress bar we do updates at a fixed interval (with -`setInterval`) and "updating" the progress bar just updates some variables -that will be used when the next tick of the progress bar happens. Currently -progress bar updates happen every 50ms, although that's open to tuning. - -##### WIDE(R) COMPATIBILITY - -I spent a lot of time working our Unicode support. There were a few issues -that plagued us: - -Previously one of the characters we used was _ambiguous width_ which means -that it was possible to configure your terminal to display it as _full -width_. If you did this, the output would be broken because we assumed it -was a _half width_ character. We no longer use any of these characters. - -Previously, we defaulted to using Unicode on Windows. This isn't a safe -assumption, however, as folks in non-US locales often use other code pages -for their terminals. Windows doesn't provide* any facility available to -Node.js for determining the current code page, so we no longer try to use -Unicode on Windows. - -_\* The facilities it does provide are a command line tool and a windows -system call. The former isn't satisfactory for speed reasons and the latter -can't be accessed from a JS-only Node.js program._ - -##### FOR THE FUTURE: THEMES - -The new version of the progress bar library supports plugable themes. Adding -support to npm shouldn't be too difficult. The built in themes are: - -* `ASCII` – The fallback theme which is always available. -* `colorASCII` – Inverts the color of the completed portion of the progress - bar. The default on Windows and usually on Linux. (Color support is - determined by looking at the `TERM` environment variable.) -* `brailleSpinner` – A braille based spinner and other unicode enhancements. MacOS only. -* `colorBrailleSpinner` – The default on MacOS, a combination of the above two. - -##### LESS GARBLED OUTPUT - -As a part of landing this I've also taken the opportunity to more -systematically disable the progress bar prior to printing to `stdout` or -running external commands (in particular: git). This should ensure that the -progress bar doesn't get left on screen after something else prints -something. We also are now much more zealous about erasing the progress bar -on exit, so if you `Ctrl-C` out of an install we'll still cleanup the -progress bar. - -* [`63f153c`](https://github.com/npm/npm/commit/63f153c743f9354376bfb9dad42bd028a320fd1f) - [#13075](https://github.com/npm/npm/pull/13075) - Consistently make sure that the progress bar is hidden before we try to - write to stdout. - ([@iarna](https://github.com/iarna)) -* [`8da79fa`](https://github.com/npm/npm/commit/8da79fa60de4972dca406887623d4e430d1609a1) - [#13075](https://github.com/npm/npm/pull/13075) - Be more methodical about disabling progress bars before running external - commands. - ([@iarna](https://github.com/iarna)) - -#### REPLACE `process.nextTick` WITH `asap` ASAP - -* [`5873b56`](https://github.com/npm/npm/commit/5873b56cb315437dfe97e747811c0b9c297bfd38) - [`254ad7e`](https://github.com/npm/npm/commit/254ad7e38f978b81046d242297fe8b122bfb5852) - [#12754](https://github.com/npm/npm/issues/12754) - Use `asap` in preference over `process.nextTick` to avoid recursion warnings. - Under the hood `asap` uses `setImmediate` when available and falls back to - `process.nextTick` when it's not. Versions of node that don't support - `setImmediate` have a version of `process.nextTick` that actually behaves - like the current `setImmediate`. - ([@lxe](https://github.com/lxe)) - -#### FIXES AND REFACTORING - -Sometimes the installer would get it into its head that it could move or -remove things that it really shouldn't have. While the reproducers for this were -often a bit complicated (the core reproducer involved five symlinks(!)), it turns -out this is an easy scenario to end up in if your project has a bunch of small -modules and you're linking them while developing them. - -Fixing this ended up involving doing an important and overdue rewrite of how -the installer keeps track of (and interrogates) the relationships between -modules. This likely fixes other related bugs, and in the coming weeks -we'll verify and close them as we find them. There are a whole slew of -commits related to this rewrite, and if you'd like to learn more check -out the PR where I describe what I did in detail: [#12775](https://github.com/npm/npm/pull/12775) - -* [`8f3e111`](https://github.com/npm/npm/commit/8f3e111fdd2ce7824864f77b04e5206bdaf961a1) - [`c0b0ed1`](https://github.com/npm/npm/commit/c0b0ed1e9945c01b2e68bf22af3fe4005aa4bcd4) - [#10800](https://github.com/npm/npm/issues/10800) - Remove install pruning stage–this was obsoleted by making the installer keep - itself up to date as it goes along. This is NOT related to `npm prune`. - ([@iarna](https://github.com/iarna)) - -#### MAKE OUTDATED MORE WIDELY LEGIBLE - -* [`21c60e9`](https://github.com/npm/npm/commit/21c60e9bb56d47da17b79681f2142b3dcf4c804b) - [#12843](https://github.com/npm/npm/pull/12843) - In `npm outdated, stop coloring the _Location_ and _Package Type_ columns. - Previously they were colored dark gray, which was hard to read for some - users. - ([@tribou](https://github.com/tribou)) - -#### DOCUMENTATION UPDATE - -* [`eb0a72e`](https://github.com/npm/npm/commit/eb0a72eb95862c1d0d41a259d138ab601d538793) - [#12983](https://github.com/npm/npm/pull/12983) - Describe how to run the lifecycle scripts of dependencies. How you do - this changed with `npm` v2. - ([@Tapppi](https://github.com/Tapppi)) - -### DEPENDENCY UPDATES - -* [`da743dc`](https://github.com/npm/npm/commit/da743dc2153fed8baca3dada611b188f53ab5931) - `which@1.2.10`: - Fix bug where unnecessary special case path handling for Windows could - produce unexpected results on Unix systems. - ([@isaacs](https://github.com/isaacs)) -* [`4533bd5`](https://github.com/npm/npm/commit/4533bd501d54aeedfec3884f4fd54e8c2edd6020) - `npm-user-validate@0.1.4`: - Validate the length of usernames. - ([@aredridel](https://github.com/aredridel)) -* [`4a18922`](https://github.com/npm/npm/commit/4a18922e56f9dc902fbb4daa8f5fafa4a1b89376) - `glob@7.0.4`: - Fixes issues with Node 6 and "long or excessively symlink-looping paths". - ([@isaacs](https://github.com/isaacs)) -* [`257fe11`](https://github.com/npm/npm/commit/257fe11052987e5cfec2abdf52392dd95a6c6ef3) - `npm-package-arg@4.2.0`: - Add `escapedName` to the result. It is suitable for passing through to a - registry without further processing. - ([@nexdrew](https://github.com/nexdrew)) -* [`dda3ca7`](https://github.com/npm/npm/commit/dda3ca70f74879106589ef29e167c8b91ef5aa4c) - `wrappy@1.0.2` - ([@zkat](https://github.com/zkat)) -* [`25f1db5`](https://github.com/npm/npm/commit/25f1db504d0fd8c97211835f0027027fe95e0ef3) - `readable-stream@2.1.4` - ([@calvinmetcalf](https://github.com/calvinmetcalf)) -* [`9d64fe6`](https://github.com/npm/npm/commit/9d64fe676ebc6949c687ffb85bd93eca3137fc0d) - `abbrev@1.0.9` - ([@isaacs](https://github.com/isaacs)) - -### v3.9.6 (2016-06-02): - -#### SMALL OUTPUT TWEAK - -* [`0bdc9d1`](https://github.com/npm/npm/commit/0bdc9d13b73df07e63a58470ea001fda490e5869) - [#12879](https://github.com/npm/npm/pull/12879) - The usage output for npm commands was somehow under the impression that - the singular form of `aliases` is `aliase`. This has been corrected to show - `alias` instead. - ([@intelliot](https://github.com/intelliot)) - -#### DOC UPDATES - -* [`f771b49`](https://github.com/npm/npm/commit/f771b49f5d65bbef540c231fbfcca71cacdce4db) - [#12933](https://github.com/npm/npm/pull/12933) - Add `config.gypi` to list of files that are always ignored in the - `package.json` manpage. - ([@Jokero](https://github.com/Jokero)) - -#### DEPENDENCY UPDATES - -* [`61c1d9c`](https://github.com/npm/npm/commit/61c1d9cd4b2296bd41d55a5c58e35ca5f028b9bc) - [#12926](https://github.com/npm/npm/pull/12926) - Removed unused dependency `lodash.isarray`. - ([@mmalecki](https://github.com/mmalecki)) -* [`168ed28`](https://github.com/npm/npm/commit/168ed2834b2c6db8bb39f81baadc0bf275807328) - [#12926](https://github.com/npm/npm/pull/12926) - Removed unused dependency `lodash.keys`. - ([@mmalecki](https://github.com/mmalecki)) - -### v3.9.5 (2016-05-27): - -Just a quick point release. We had an issue where I (Kat) included the -`.nyc_output/` directory in `npm@3.9.3` and `npm@3.9.4`. The issue got reported -right after that second release -([`#12873`](https://github.com/npm/npm/issues/12873)), and now there's this -small point release that's there to fix the issue sooner. - -* [`f96aea0`](https://github.com/npm/npm/commit/f96aea085be981cdb59bd09f16da40717426f981) - [#12878](https://github.com/npm/npm/pull/12878) - Ignore `.nyc_output` to avoid an accidental publish or commit filled with - code coverage data. - ([@TheAlphaNerd](https://github.com/TheAlphaNerd)) - -### v3.9.4 (2016-05-26): - -Hey all! It's that time again! - -This week continues our current `big-bug` squashing push, although there's none -that are ready to release quite yet -- we're working on it! - -It's also worth noting that we're entering the main part of conference season, -so you can probably expect a bit of a dev slowdown as a lot of us wombats attend -or speak at the various conferences. Remember [npm.camp](npm.camp) is happening -in 2 months and the lineup is looking pretty great! Tickets are still on sale. -Come hang out with us! WOO FUN! 🎉😸 - -#### BUGFIX - -* [`cac0038`](https://github.com/npm/npm/commit/cac0038868b18295f9f299e762e20034f32a3e11) - [#12845](https://github.com/npm/npm/pull/12845) - Progress bar during tarball packing now prints `pack:packagename` instead of - `pack:[object Object]`. - ([@iarna](https://github.com/iarna)) - -#### DOC UPDATES - -* [`0b81622`](https://github.com/npm/npm/commit/0b816225c743c9203db5d92fb4dd3a9293833298) - [#12840](https://github.com/npm/npm/pull/12840) - Remove sexualized language from comment in code. - ([@geek](https://github.com/geek)) -* [`d6dff24`](https://github.com/npm/npm/commit/d6dff2481cb587c392f22afb893ac3136371a64c) - [#12802](https://github.com/npm/npm/pull/12802) - Small grammar fix in `cli/npm.md`. - ([@andresilveira](https://github.com/andresilveira)) -* [`cb38e0f`](https://github.com/npm/npm/commit/cb38e0fff82a6c1c110026b95b07a8c32e27ec01) - [#12782](https://github.com/npm/npm/pull/12782) - Documents that `NOTICE` files started getting included after - [npm/fstream-npm#17](https://github.com/npm/fstream-npm/pull/17). - ([@SimenB](https://github.com/SimenB)) -* [`70a3ae4`](https://github.com/npm/npm/commit/70a3ae4d4ec76b3ec51f00bf5261f1147829f9fe) - [#12776](https://github.com/npm/npm/pull/12776) - `npm run-script` used to have a `<pkg>` argument that allowed you to target - specific packages' scripts. This was removed as one of the breaking changes - for `npm@2`. - This patch removes a mention of that argument, which really doesn't exist - anymore. - ([@fibo](https://github.com/fibo)) - -#### DEP UPDATES - -* [`4a4470d`](https://github.com/npm/npm/commit/4a4470ddd1d9b0b62cb94f3bff5ab6b8e6db527a) - `aproba@1.0.3` - ([@iarna](https://github.com/iarna)) - -#### TEST IMPROVEMENTS - -So it turns out, `t.comment` in `tap` is actually pretty nice! -There's also a couple other test improvements by Rebecca landing here. - -* [`9fd04dd`](https://github.com/npm/npm/commit/9fd04dd6be493465d7ac5f14dd9328e66069c1bf) - [#12851](https://github.com/npm/npm/pull/12851) - Rewrite `shrinkwrap-prod-dependency-also` test to use `common.npm` - ([@iarna](https://github.com/iarna)) -* [`3bc4a8e`](https://github.com/npm/npm/commit/3bc4a8ee58cb0e0adc84b4f135330f2b1e20d992) - [#12851](https://github.com/npm/npm/pull/12851) - Clean up `rm-linked` test. - ([@iarna](https://github.com/iarna)) -* [`bf7f7f2`](https://github.com/npm/npm/commit/bf7f7f273a794f7573bbbc84b1c216fdcd9e0ef9) - [#12851](https://github.com/npm/npm/pull/12851) - Clean up `outdated-symlink` test. - ([@iarna](https://github.com/iarna)) -* [`ca0baa4`](https://github.com/npm/npm/commit/ca0baa4dac85b1df4e26ef0c73d39314ca6858ca) - [#12851](https://github.com/npm/npm/pull/12851) - Improve diagnostics for `shrinkwrap-scoped-auth` test. - ([@iarna](https://github.com/iarna)) -* [`fbec9fd`](https://github.com/npm/npm/commit/fbec9fd5bb0abce589120d14c1f2b03b58cecce1) - [#12851](https://github.com/npm/npm/pull/12851) - Rewrite `shrinkwrap-dev-dependency` test to use `common.npm`. - ([@iarna](https://github.com/iarna)) - -### v3.9.3 (2016-05-19): - -This week continues our `big-bug` squashing adventure! Things are churning along -nicely, and we've gotten a lot of fantastic contributions from the community. -Please keep it up! - -A quick note on last week's release: We had a small `npm shrinkwrap`-related -crasher in `npm@3.9.1`, so once this release goes out, `v3.9.2` is going to be -`npm@latest`. Please update if you ended up in with that previous version! - -Remember we have a weekly team meeting, and you can [suggest agenda items in the -GitHub issue](https://github.com/npm/npm/issues/12761). Keep an eye out for the -`#npmweekly` tag on Twitter, too, and join the conversation! We'll do our best -to address questions y'all send us. ✌ - -#### FIXES - -* [`42d71be`](https://github.com/npm/npm/commit/42d71be2cec674dd9e860ad414f53184f667620d) - [#12685](https://github.com/npm/npm/pull/12685) - When using `npm ls <pkg>` without a semver specifier, `npm ls` would skip - any packages in your tree that matched by name, but had a prerelease version - in their `package.json`. This patch fixes it so `npm ls` does a simple name - match unless you use the `npm ls <pkg>@<version>` format. - ([@zkat](https://github.com/zkat)) -* [`c698ae6`](https://github.com/npm/npm/commit/c698ae666afc92fbc0fcba3c082cfa9b34a4420d) - [#12685](https://github.com/npm/npm/pull/12685) - Added some tests for more basic `npm ls` functionality. - ([@zkat](https://github.com/zkat)) - -### NOTABLE DEPENDENCY UPDATES - -* [`3a6fe23`](https://github.com/npm/npm/commit/3a6fe2373c45e80a1f28aaf176d552f6f97cf131) - [npm/fstream-npm#17](https://github.com/npm/fstream-npm/pull/17) - `fstream-npm@1.1.0`: - `fstream-npm` always includes NOTICE files now. - ([@kemitchell](https://github.com/kemitchell)) -* [`df04e05`](https://github.com/npm/npm/commit/df04e05af1f257a1903372e1baf334c0969fbdbd) - [#10013](https://github.com/npm/npm/issues/10013) - `read-package-tree@5.1.4`: - Fixes an issue where `npm install` would fail if your `node_modules` was - symlinked. - ([@iarna](https://github.com/iarna)) -* [`584676f`](https://github.com/npm/npm/commit/584676f85eaebcb9d6c4d70d2ad320be8a8d6a74) - [npm/init-package-json#62](https://github.com/npm/init-package-json/pull/62) - `init-package-json@1.9.4`: - Stop using `package` for a variable, which defeats some bundlers and linters. - ([@adius](https://github.com/adius)) -* [`935a7e3`](https://github.com/npm/npm/commit/935a7e359535e13924934811b77924cbad82619a) - `readable-stream@2.1.3`: - Node 6 build and buffer-related updates. - ([@calvinmetcalf](https://github.com/calvinmetcalf)) - -#### OTHER DEPENDENCY UPDATES - -* [`4c4609e`](https://github.com/npm/npm/commit/4c4609ea49e77303f9d72af6757620e6b3a9a6a9) - `inflight@1.0.5` - ([@zkat](https://github.com/zkat)) -* [`7a3030d`](https://github.com/npm/npm/commit/7a3030d3d44ea2136425f72950ba22e6efd441d9) - `hosted-git-info@2.1.5` - ([@zkat](https://github.com/zkat)) -* [`5ed4b58`](https://github.com/npm/npm/commit/5ed4b58409eeb134bca1c96252682fd7600d9906) - `which@1.2.9` - ([@isaacs](https://github.com/isaacs)) - -### v3.9.2 (2016-05-17) - -This is a quick patch release. The previous release, 3.9.1, introduced a -bug where npm would crash given a combination of specific package tree on -disk and a shrinkwrap. - -* [`cde367f`](https://github.com/npm/npm/commit/cde367fbb6eebc5db68a44b12a5c7bea158d70db) - [#12724](https://github.com/npm/npm/issues/12724) - Fix crasher when inflating shrinkwraps with packages on disk that were - installed by older npm versions. - ([@iarna](https://github.com/iarna)) - -### v3.9.1 (2016-05-12) - -HI all! We have bug fixes to a couple of the hairy corners of `npm`, in the -form of shrinkwraps and bundled dependencies. Plus some documentation improvements -and our lodash deps bot a bump. - -This is our first week really focused on getting the -[big bugs](https://github.com/npm/npm/issues?q=is%3Aopen+is%3Aissue+label:big-bug) -list down. Our work from this week will be landing next week, and I can't -wait to tell you about that! (It's about symlinks!) - -#### SHRINKWRAP FIX - -* [`b894413`](https://github.com/npm/npm/commit/b8944139a935680c4a267468bb2d3c3082b5609f) - [#12372](https://github.com/npm/npm/issues/12372) - Changing a nested dependency in an `npm-shrinkwrap.json` and then running `npm install` - would not get up the updated package. This corrects that. - ([@misterbyrne](https://github.com/misterbyrne)) - -#### BUNDLED DEPENDENCIES FIX - -* [`d0c6d19`](https://github.com/npm/npm/commit/d0c6d194471be8ce3e7b41b744b24f63dd1a3f6f) - [#12476](https://github.com/npm/npm/pull/12476) - Protects against a crasher when a bundled dep is missing a package.json. - ([@dflupu](https://github.com/dflupu)) - -#### DOCS IMPROVEMENTS - -* [`6699aa5`](https://github.com/npm/npm/commit/6699aa53c0a729cfc921ac1d8107c320e5a5ac95) - [#12585](https://github.com/npm/npm/pull/12585) - Document that engineStrict is quite gone. Not "deprecated" so much as "extirpated". - ([@othiym23](https://github.com/othiym23)) -* [`7a41a84`](https://github.com/npm/npm/commit/7a41a84b655be3204d2e80848278a510e42c80e7) - [#12636](https://github.com/npm/npm/pull/12636) - Improve `npm-scripts` documentation regarding when `node-gyp` is used. - ([@reconbot](https://github.com/reconbot)) -* [`4c4b4ba`](https://github.com/npm/npm/commit/4c4b4badf09b9b50cdca85314429a0111bb35cb1) - [#12586](https://github.com/npm/npm/pull/12586) - Correct `package.json` documentation as to when `node-gyp rebuild` called. - This now matches https://docs.npmjs.com/misc/scripts#default-values - ([@reconbot](https://github.com/reconbot)) - -#### DEPENDENCY UPDATES - -* [`cfa797f`](https://github.com/npm/npm/commit/cfa797fedd34696d45b61e3ae0398407afece880) - `lodash._baseuniq@4.6.0` - ([@jdalton](https://github.com/jdalton)) -* [`ab6f180`](https://github.com/npm/npm/commit/ab6f1801971b513f9294b4b8902034ab402af02d) - `lodash.keys@4.0.7` - ([@jdalton](https://github.com/jdalton)) -* [`4b8d8b6`](https://github.com/npm/npm/commit/4b8d8b63e760a8aa03e8bffa974495dfafbfcb06) - `lodash.union@4.4.0` - ([@jdalton](https://github.com/jdalton)) -* [`46099d3`](https://github.com/npm/npm/commit/46099d34542760098e5d13c7468a405a724ca407) - `lodash.uniq@4.3.0` - ([@jdalton](https://github.com/jdalton)) -* [`fff89c6`](https://github.com/npm/npm/commit/fff89c6826c86e9e789adcc9c398385539306042) - `lodash.without@4.2.0` - ([@jdalton](https://github.com/jdalton)) - -### v3.9.0 (2016-05-05) - -Wow! This is a big release week! We've completed the fixes that let the -test suite pass on Windows, plus more general bug fixes we found while -fixing things on Windows. Plus a warning to help folks work around a common -footgun. PLUS an improvement to how npm works with long cache timeouts. - -#### INFINITE CACHE A LITTLE BETTER - -* [`111ae3e`](https://github.com/npm/npm/commit/111ae3ec366ece7ebcf5988f5bc2a7cd70737dfe) - [#8581](https://github.com/npm/npm/issues/8581) - When a package is fetched from the cache which cannot satisfy the version - requirements, an attempt to fetch it from the network is made. This is - helpful for folks using high values for `--cache-min` who are willing to - accept possibly not-the-most-recent modules in return for less network - traffic. - ([@Zirak](https://github.com/Zirak)) - -#### WARNING: FOOTGUN - -* [`60b9a05`](https://github.com/npm/npm/commit/60b9a051aa46b8892fe63b3681839a6fd6642bfd) - [#12475](https://github.com/npm/npm/pull/12475) - Options can only start with ASCII dashes. Ordinarily this isn't a problem - but many web documentation tools "helpfully" convert `--` into an emdash - (–), or `-` into an endash (–). If you copy and paste from this documentation - your commands won't work the way you expect. This adds a warning that tries - to be a little more descriptive about why your command is failing. - ([@iarna](https://github.com/iarna)) - -#### WINDOWS CI - -We have [Windows CI](https://ci.appveyor.com/project/npm/npm) setup now! We still have to -tweak it a little bit around paths to the git binaries, but it's otherwise ready! - -* [`bb5d6cb`](https://github.com/npm/npm/commit/bb5d6cbf46b2609243d3b384caadd196e665a797) - [#11444](https://github.com/npm/npm/pull/11444) - Add AppVeyor to CI matrix. - ([@othiym23](https://github.com/othiym23)) - -#### COVERAGE DATA - -Not only do our tests produce coverage reports after they run now, we also -automatically [update Coveralls](https://coveralls.io/github/npm/npm) with -results from [Travis CI](travis-ci.org/npm/npm) runs. - -* [`044cbab`](https://github.com/npm/npm/commit/044cbab0d49adeeb0d9310c64fee6c9759cc7428) - [#11444](https://github.com/npm/npm/pull/11444) - Enable coverage reporting for every test run. - ([@othiym23](https://github.com/othiym23)) - -#### EVERYONE BUGS - -* [`37c6a51`](https://github.com/npm/npm/commit/37c6a51c71b0feec8f639b3199a8a9172e58deec) - [#12150](https://github.com/npm/npm/pull/12150) - Ensure that 'npm cache ls' outputs real filenames. Previously it would - sometimes double up the package name in the path it printed. - ([@isaacs](https://github.com/isaacs)) -* [`d3ce0b2`](https://github.com/npm/npm/commit/d3ce0b253eb519375071aee29db4ee129dbcdf5c) - [#11444](https://github.com/npm/npm/pull/11444) - Fix unbuilding bins for scoped modules. - ([@iarna](https://github.com/iarna)) -* [`e928a30`](https://github.com/npm/npm/commit/e928a30947477a09245f54e9381f46b97bee32d5) - [#11444](https://github.com/npm/npm/pull/11444) - Make handling of local modules (eg `npm install /path/to/my/module`) more - consistent when saved to a `package.json`. There were bugs previously where - it wouldn't consistently resolve relative paths in the same way. - ([@iarna](https://github.com/iarna)) -* [`b820ed4`](https://github.com/npm/npm/commit/b820ed4fc04e21577fa66f7c9482b5ab002e7985) - [#11444](https://github.com/npm/npm/pull/11444) - Under certain circumstances the paths produced for linking, either - relative or absolute, would end up basing off the wrong virtual cwd. - This resulted in failures for `npm link` in this situations. - ([@iarna](https://github.com/iarna)) - -#### WINDOWS BUGS - -* [`7380425`](https://github.com/npm/npm/commit/7380425d810fb8bfc69405a9cbbdec19978a7bee) - [#11444](https://github.com/npm/npm/pull/11444) - Scoped module names were not being correctly inferred from the path on Windows. - ([@zkat](https://github.com/zkat)) -* [`91fc24f`](https://github.com/npm/npm/commit/91fc24f2763c2e0591093099ffc866c735f27fde) - [#11444](https://github.com/npm/npm/pull/11444) - Explore with a command to run didn't work properly in Windows– it would pop open a new - cmd window and leave it there. - ([@iarna](https://github.com/iarna)) - -#### WINDOWS REFACTORING - -* [`f07e643`](https://github.com/npm/npm/commit/f07e6430d4ca02f811138f6140a8bad927607a1f) - [#11444](https://github.com/npm/npm/pull/11444) - Move exec path escaping out to its own function. This turns out to be - tricky to get right because how you escape commands to run on Windows via - cmd is different then how you escape them at other times. Specifically, - you HAVE to quote each directory segment that has a quote in it, that is: - `C:\"Program Files"\MyApp\MyApp.exe` By contrast, if that were an argument - to a command being run, you CAN'T DO quote it that way, instead you have - to wrap the entire path in quotes, like so: `"C:\Program - Files\MyApp\MyApp.exe"`. - ([@iarna](https://github.com/iarna)) -* [`2e01d29`](https://github.com/npm/npm/commit/2e01d299f8244134b1aa040cab1b59c72c9df4da) - [#11444](https://github.com/npm/npm/pull/11444) - Create a single function for detecting if we're running on Windows (and - using a Windows shell like cmd) and use this instead of doing it one-off - all over the place. - ([@iarna](https://github.com/iarna)) - -#### FIX WINDOWS TESTS - -As I said before, our tests are passing on Windows! 🎉 - -* [`ef0dd74`](https://github.com/npm/npm/commit/ef0dd74583be25c72343ed07d1127e4d0cc02df9) - [#11444](https://github.com/npm/npm/pull/11444) - The fruits of many weeks of labor, fix our tests to pass on Windows. - ([@zkat](https://github.com/zkat)) - ([@iarna](https://github.com/iarna)) - -#### DEPENDENCY UPDATES - -* [`8fccda8`](https://github.com/npm/npm/commit/8fccda8587209659c469ab55c608b0e2d7533530) - [#11444](https://github.com/npm/npm/pull/11444) - `normalize-git-url@3.0.2`: - Fix file URLs on Windows. - ([@zkat](https://github.com/zkat)) -* [`f53a154`](https://github.com/npm/npm/commit/f53a154df8e0696623e6a71f33e0a7c11a7555aa) - `readable-stream@2.1.2`: - When readable-stream is disabled, reuse result of `require('stream')` - instead of calling it every time. - ([@calvinmetcalf](https://github.com/calvinmetcalf)) -* [`02841cf`](https://github.com/npm/npm/commit/02841cfb81d6ba86f691ab43d9bbdac29aec27e7) - [#11444](https://github.com/npm/npm/pull/11444) - `realize-package-specifier@3.0.2`: - Resolve local package paths relative to package root, not cwd. - ([@zkat](https://github.com/zkat)) - ([@iarna](https://github.com/iarna)) -* [`247c1c5`](https://github.com/npm/npm/commit/247c1c5ae08c882c9232ca605731039168bae6ed) - [#11444](https://github.com/npm/npm/pull/11444) - `npm-package-arg@4.1.1`: - Fix Windows file URIs with leading slashes. - ([@zkat](https://github.com/zkat)) -* [`365c72b`](https://github.com/npm/npm/commit/365c72bc3ecd9e45f9649725dd635d5625219d8c) - `which@1.2.8` - ([@isaacs](https://github.com/isaacs)) -* [`e568caa`](https://github.com/npm/npm/commit/e568caabb8390a924ce1cfa51fc914ee6c1637a2) - `graceful-fs@4.1.4` - ([@isaacs](https://github.com/isaacs)) -* [`304b974`](https://github.com/npm/npm/commit/304b97434959a58f84383bcccc0357c51a4eb39a) - [#11444](https://github.com/npm/npm/pull/11444) - `standard@6.0.8` - ([@feross](https://github.com/feross)) - -### v3.8.9 (2016-04-28) - -Our biggest news this week is that we got the -[Windows test suite passing](https://github.com/npm/npm/pull/11444)! -It'll take a little longer to get it passing in our -[Windows CI](https://ci.appveyor.com/project/npm/npm/) but that's coming -soon too. - -That means we'll be shifting gears away from tests to fixing -[Big Bugs™](https://github.com/npm/npm/issues?q=is%3Aopen+is%3Aissue+label%3Abig-bug) again. -Join us at our [team meeting](https://github.com/npm/npm/issues/12517) next -Tuesday to learn more about that. - -#### BUG FIXES AND REFACTORING - -* [`60da618`](https://github.com/npm/npm/commit/60da61862885fa904afba7d121860b4282a5b0df) - [#12347](https://github.com/npm/npm/issues/12347) - Fix a bug that could result in shrinkwraps missing the `resolved` field, which is - necessary in producing a fully reproducible build. - ([@sminnee](https://github.com/sminnee)) -* [`8597ba4`](https://github.com/npm/npm/commit/8597ba432e91245a1000953b612eb01308178bad) - [#12009](https://github.com/npm/npm/issues/12009) - Fix a bug in `npm view <packagename> versions` that resulted in bad output if you - didn't also pass in `--json`. - ([@watilde](https://github.com/watilde)) -* [`20125f1`](https://github.com/npm/npm/commit/20125f19b96fd05af63f8c0bd243ffb25780279a) - [`a53feac`](https://github.com/npm/npm/commit/a53feac2647f7dc4245f1700dfbdd1aba8745672) - [`6cfbae4`](https://github.com/npm/npm/commit/6cfbae403abc3cf690565b09569f71cdd41a8372) - [#12485](https://github.com/npm/npm/pull/12485) - Refactor how the help summaries for commands are produced, such that we only have - one list of command aliases. - ([@watilde](https://github.com/watilde)) -* [`2ae210c`](https://github.com/npm/npm/commit/2ae210c76ab6fd15fcf15dc1808b01ca0b94fc9e) - `read-package-json@2.0.4`: - Fix a crash we discovered while fixing up the Windows test suite where if - you had a file in your `node_modules` it would cause a crash on Windows - (but not MacOS/Linux). - - This makes the error code you get on Windows match that from MacOS/Linux - if you try to read a `package.json` from a path that includes a file, not - a folder. - ([@zkat](https://github.com/zkat)) - -### v3.8.8 (2016-04-21) - -Hi all! Long time no see! We've been heads-down working through getting -[our test suite passing on Windows](https://github.com/npm/npm/pull/11444). -Did you know that we have -[Windows CI](https://ci.appveyor.com/project/npm/npm) now running over at -Appveyor? In the meantime, we've got a bunch of dependency updates, some -nice documentation improvements and error messages when your `package.json` -contains invalid JSON. (Yeah, I thought we did that last one before too!) - -#### BAD JSON IS BAD - -* [`769e620`](https://github.com/npm/npm/commit/769e6200722d8060b6769e47354032c51cfa85a1) - [#12406](https://github.com/npm/npm/pull/12406) - Failing to parse the top level `package.json` should be an error. - ([@watilde](https://github.com/watilde)) - -#### DOCUMENTATION - -* [`7d64301`](https://github.com/npm/npm/commit/7d643018af5051c920cc73f17bfe32b7ff86e108) - [#12415](https://github.com/npm/npm/pull/12415) - Clarify that when configuring client-side certificates for authenticating - to non-npm registries that `cert` and `key` are not filesystem paths and should - actually include the certificate and key data. - ([@rvedotrc](https://github.com/rvedotrc)) -* [`f8539b8`](https://github.com/npm/npm/commit/f8539b8c986e81771ccc8ced7e716718423d3187) - [#12324](https://github.com/npm/npm/pull/12324) - Describe how `npm run` sets `NODE` and `PATH` in more detail. - Note that `npm run` changes `PATH` to include the current node - interpreter’s directory. - ([@addaleax](https://github.com/addaleax)) -* [`2b57606`](https://github.com/npm/npm/commit/2b57606852a2c2a03e4c4b7dcda85b807619c2cf) - [#11461](https://github.com/npm/npm/pull/11461) - Clarify the documentation for the package.json homepage field. - ([@stevemao](https://github.com/stevemao)) - -#### TESTS - -* [`b5a0fbb`](https://github.com/npm/npm/commit/b5a0fbb9e1a2c4fb003dd748264571aa6e3c9e70) - [#12329](https://github.com/npm/npm/pull/12329) - Fix progress config testing to ignore local user configs. - Previously, _any_ local setting would cause the tests to fail as - they were trying to test what the default values for the progress - bar would be in different environments and any explicit setting - overrides those defaults. - ([@iarna](https://github.com/iarna)) -* [`3d195bc`](https://github.com/npm/npm/commit/3d195bc0a72b40df02a5c56e4f3be44152e8222b) - The lifecycle-signal test could crash on v0.8 due to its use of `Number.parseInt`, which - isn't available in that version of node. Fortunately `global.parseInt` _is_, so - we just use that instead. - ([@iarna](https://github.com/iarna)) - -#### DEPENDENCY UPDATES - -* [`05a28e3`](https://github.com/npm/npm/commit/05a28e38586082ac4bbf26ee6f863cc8d07054d6) - `npm-package-arg@4.1.1`: - Under some circumstances `file://` URLs on Windows were not handled correctly. - - Also, stop converting local module/tarballs into full paths in this - module. We do already do that in `realize-package-specifier`, which is - more appropriate as it knows what package we're installing relative to. - ([@zkat](https://github.com/zkat)) -* [`ada2e93`](https://github.com/npm/npm/commit/ada2e93e8b276000150a9aa93fff69ec366e03d6) - `realize-package-specifier@3.0.3`: - Require the new `npm-package-arg`, plus fix a case where specifiers that were - maybe a tag, maybe a local filename were resolved differently than those that were - definitely a local filename. - ([@zkat](https://github.com/zkat)) ([@iarna](https://github.com/iarna)) -* [`adc515b`](https://github.com/npm/npm/commit/adc515b22775871386cd62390079fb4bf8e1714a) - `fs-vacuum@1.2.9`: - A fix for AIX where a non-empty directory can cause `fs.rmDir` to fail with `EEXIST` instead of `ENOTEMPTY` - and three new tests - ([@richardlau](https://github.com/richardlau)) - - Code cleanup, CI & dependency updates. - ([@othiym23](https://github.com/othiym23)) -* [`ef53a46`](https://github.com/npm/npm/commit/ef53a46906ce872a4541b605dd42a563cc26e614) - `tap@5.7.1` - ([@isaacs](https://github.com/isaacs)) -* [`df1f2e4`](https://github.com/npm/npm/commit/df1f2e4838b4d7ea2ea2321a95ae868c0ec0a520) - `request@2.72.0`: - Fix crashes when response headers indicate gzipped content but the body is - empty. - Add support for the deflate content encoding. - ([@simov](https://github.com/simov)) -* [`776c599`](https://github.com/npm/npm/commit/776c599b204632aca9d29fd92ea5c4f099fdea9f) - `readable-stream@2.1.0`: - Adds READABLE_STREAM env var that, if set to `disable`, will make - `readable-stream` use the local native node streams instead. - ([@calvinmetcalf](https://github.com/calvinmetcalf)) -* [`10d6d55`](https://github.com/npm/npm/commit/10d6d5547354fcf50e930c7932ba4d63c0b6009c) - `normalize-git-url@3.0.2`: - Add support `git+file://` type URLs. - ([@zkat](https://github.com/zkat)) -* [`75017ae`](https://github.com/npm/npm/commit/75017aeecec69a1efd546df908aa5befc4467f36) - `lodash.union@4.3.0` - ([@jdalton](https://github.com/jdalton)) - -### v3.8.7 (2016-04-07) - -#### IMPROVED DIAGNOSTICS - -* [`38cf79f`](https://github.com/npm/npm/commit/38cf79ffa564ef5cb6677b476e06d0e45351592a) - [#12083](https://github.com/npm/npm/pull/12083) - If you `ignore-scripts` to disable lifecycles, this makes npm report when it skips running - a script. - ([@bfred-it](https://github.com/bfred-it)) - -#### IMPROVE AUTO-INCLUDES - -* [`c615182`](https://github.com/npm/npm/commit/c615182c8b47e418338eb1317b99bb66987cda54) - [#11995](https://github.com/npm/npm/pull/11995) - There were bugs where modules whose names matched the special files that npm always - includes would be included, for example, the `history` package was always included. - - With `npm@3` such extraneously bundled modules would not be ordinarily - used, as things in `node_modules` in packages are ignored entirely if the - package isn't marked as bundling modules. - - Because of this `npm@3` behavior, the `files-and-ignores` test failed to catch this as - it was testing _install output_ not what got packed. That has also been fixed. - ([@glenjamin](https://github.com/glenjamin)) - -#### DOCUMENTATION UPDATES - -* [`823d9df`](https://github.com/npm/npm/commit/823d9dfa91d7086a26620f007aee4e3cd77b6153) - [#12107](https://github.com/npm/npm/pull/12107) - In the command summary for `adduser` mention that `login` is an alias. - ([@gnerkus](https://github.com/gnerkus)) -* [`7aaf47e`](https://github.com/npm/npm/commit/7aaf47e124c45dde72c961638b770ee535fb2776) - [#12244](https://github.com/npm/npm/pull/12244) - Update the README to suggest npm@3 for Windows users. Also add a reference to - [Microsoft's npm upgrade tool](https://github.com/felixrieseberg/npm-windows-upgrade). - ([@felixrieseberg](https://github.com/felixrieseberg)) - -#### DEPENDENCY UPDATES - -* [`486bbc0`](https://github.com/npm/npm/commit/486bbc0e1b101f847e890e6f1925dc8cb253cf3e) - `request@2.70.0` - ([@simov](https://github.com/simov)) -* [`b1aff34`](https://github.com/npm/npm/commit/b1aff346fc41f13e3306b437e1831942aacf2f54) - `lodash.keys@4.0.6` - ([@jdalton](https://github.com/jdalton)) - -### v3.8.6 (2016-03-31) - -Heeeeeey y'all. - -Kat here! Rebecca's been schmoozing with folks at [Microsoft -Build](https://build.microsoft.com/), so I'm doing the `npm@3` release this -week. - -Speaking of Build, it looks like Microsoft is doing some bash thing. This might -be really good news for our Windows users once it rolls around. We're keeping an -eye out and feeling hopeful. 🙆 - -As far as the release goes: We're really happy to be getting more and more -community contributions! Keep it up! We really appreciate folks trying to help -us, and we'll do our best to help point you in the right direction. Even things -like documentation are a huge help. And remember -- you get socks for it, too! - -#### FIXES - -* [`f8fb4d8`](https://github.com/npm/npm/commit/f8fb4d83923810eb78d075bd200a9376c64c3e3a) - [#12079](https://github.com/npm/npm/pull/12079) - Back in `npm@3.2.2` we included [a patch that made it so `npm install pkg` was - basically `npm install pkg@latest` instead of - `pkg@*`](https://github.com/npm/npm/pull/9170) - This is probably what most users expected, but it also ended up [breaking `npm - deprecate`](https://github.com/npm/npm/pull/9170) when no version was provided - for a package. In that case, we were using `*` to mean "deprecate all - versions" and relying on the `pkg` -> `pkg@*` conversion. - This patch fixes `npm deprecate pkg` to work as it used to by special casing - that particular command's behavior. - ([@polm](https://github.com/polm)) -* [`458f773`](https://github.com/npm/npm/commit/458f7734f3376aba0b6ff16d34a25892f7717e40) - [#12146](https://github.com/npm/npm/pull/12146) - Adds `make doc-clean` to `prepublish` script, to clear out previously built - docs before publishing a new npm version - ([@watilde](https://github.com/watilde)) -* [`f0d1521`](https://github.com/npm/npm/commit/f0d1521038e956b2197673f36c464684293ce99d) - [#12146](https://github.com/npm/npm/pull/12146) - Adds `doc-clean` phony target to `make publish`. - ([@watilde](https://github.com/watilde)) - -#### DOC UPDATES - -* [`ea92ffc`](https://github.com/npm/npm/commit/ea92ffc9dd2a063896353fc52c104e85ec061360) - [#12147](https://github.com/npm/npm/pull/12147) - Document that the current behavior of `engines` is just to warn if the node - platform is incompatible. - ([@reconbot](https://github.com/reconbot)) -* [`cd1ba44`](https://github.com/npm/npm/commit/cd1ba4423b3ca889c741141b95b0d9472b9f71ea) - [#12143](https://github.com/npm/npm/pull/12143) - Remove `npm faq` command, since the [FAQ was - removed](https://github.com/npm/npm/pull/10547). - ([@watilde](https://github.com/watilde)) -* [`50a12cb`](https://github.com/npm/npm/commit/50a12cb1f5f158af78d6962ad20ff0a98bc18f18) - [#12143](https://github.com/npm/npm/pull/12143) - Remove references to the FAQ from the docs, since [it was - removed](https://github.com/npm/npm/pull/10547). - ([@watilde](https://github.com/watilde)) -* [`60051c2`](https://github.com/npm/npm/commit/60051c25e2ab80c667137dfcd04b242eea25980e) - [#12093](https://github.com/npm/npm/pull/12093) - Update `bugs` url in `package.json` to use the `https` URL for Github. - ([@watilde](https://github.com/watilde)) -* [`af30c37`](https://github.com/npm/npm/commit/af30c374ef22ed1a1c71b14fced7c4b8350e4e82) - [#12075](https://github.com/npm/npm/pull/12075) - Add the `--ignore-scripts` flag to the `npm install` docs. - ([@paulirish](https://github.com/paulirish)) -* [`632b214`](https://github.com/npm/npm/commit/632b214b2f2450e844410792e5947e46844612ff) - [#12063](https://github.com/npm/npm/pull/12063) - Various minor fixes to the html docs homepage. - ([@watilde](https://github.com/watilde)) - -#### DEP BUMPS - -* [`3da0171`](https://github.com/npm/npm/commit/3da01716a0e41d6b5adee2b4fc70fcaf08c0eb24) - `lodash.without@4.1.2` - ([@jdalton](https://github.com/jdalton)) -* [`69ccf6d`](https://github.com/npm/npm/commit/69ccf6dd4caf95cd0628054307487cae1885acd0) - `lodash.uniq@4.2.1` - ([@jdalton](https://github.com/jdalton)) -* [`b50c41a`](https://github.com/npm/npm/commit/b50c41a9930dc5353a23c5ae2ff87bb99e11d482) - `lodash.union@4.2.1` - ([@jdalton](https://github.com/jdalton)) -* [`59c1ad7`](https://github.com/npm/npm/commit/59c1ad7b6f243d07618ed5703bd11d787732fc57) - `lodash.clonedeep@4.3.2` - ([@jdalton](https://github.com/jdalton)) -* [`2b4f797`](https://github.com/npm/npm/commit/2b4f797dba8e7a1376c8335b7223e82d02cd8243) - `lodash._baseuniq@4.5.1` - ([@jdalton](https://github.com/jdalton)) - -### v3.8.5 (2016-03-24) - -Like my esteemed colleague [@zkat](https://github.com/zkat) said in this -week's [LTS release notes](https://github.com/npm/npm/releases/tag/v2.15.2), -this week is another small release but we are continuing to work on our -[Windows efforts](https://github.com/npm/npm/pull/11444). - -You may also be interested in reading the [LTS process and -policy](https://github.com/npm/npm/wiki/LTS) that -[@othiym23](https://github.com/othiym23) put together recently. If you have any -feedback, we would love to hear. - -#### DOCTOR IT HURTS WHEN LINK TO MY LINK - -Well then, don't do that. - -* [`0d4a0b1`](https://github.com/npm/npm/commit/0d4a0b1) - [#11442](https://github.com/npm/npm/pull/11442) - Fail if the user asks us to make a link from a module back on to itself. - ([@antialias](https://github.com/antialias)) - -#### ERR MODULE LIST TOO LONG - -* [`b271ed2`](https://github.com/npm/npm/commit/b271ed2) - [#11983](https://github.com/npm/npm/issues/11983) - Exit early if no arguments were provided to search instead of trying to display all the modules, - running out of memory, and then crashing. - ([@SimenB](https://github.com/SimenB)) - -#### ELIMINATE UNUSED MODULE - -* [`b8c7cd7`](https://github.com/npm/npm/commit/b8c7cd7) - [#12000](https://github.com/npm/npm/pull/12000) - Stop depending on [`async-some`](https://npmjs.com/package/async-some) as it's no - longer used in npm. - ([@watilde](https://github.com/watilde)) - -#### DOCUMENTATION IMPROVEMENTS - -* [`fdd6b28`](https://github.com/npm/npm/commit/fdd6b28) - [#11884](https://github.com/npm/npm/pull/11884) - Include `node_modules` in the list of files and directories that npm won't - include in packages ordinarily. (Modules listed in `bundledDependencies` and things - that those modules rely on, ARE included of course.) - ([@Jameskmonger](https://github.com/Jameskmonger)) -* [`aac15eb`](https://github.com/npm/npm/commit/aac15eb) - [#12006](https://github.com/npm/npm/pull/12006) - Fix typo in npm-orgs documentation, where teams docs went to access docs and vice versa. - ([@yaelz](https://github.com/yaelz)) - -#### FEWER NETWORK TESTS - -* [`3e41360`](https://github.com/npm/npm/commit/3e41360) - [#11987](https://github.com/npm/npm/pull/11987) - Fix test that was inappropriately hitting the network - ([@yodeyer](https://github.com/yodeyer)) - -### v3.8.4 (2016-03-24) - -Was erroneously released with just a changelog typo correction and was -otherwise the same as 3.8.3. - -### v3.8.3 (2016-03-17): - -#### SECURITY ADVISORY: BEARER TOKEN DISCLOSURE - -This release includes [the fix for a -vulnerability](https://github.com/npm/npm/commit/f67ecad59e99a03e5aad8e93cd1a086ae087cb29) -that could cause the unintentional leakage of bearer tokens. - -Here are details on this vulnerability and how it affects you. - -##### DETAILS - -Since 2014, npm’s registry has used HTTP bearer tokens to authenticate requests -from the npm’s command-line interface. A design flaw meant that the CLI was -sending these bearer tokens with _every_ request made by logged-in users, -regardless of the destination of their request. (The bearers only should have -been included for requests made against a registry or registries used for the -current install.) - -An attacker could exploit this flaw by setting up an HTTP server that could -collect authentication information, then use this authentication information to -impersonate the users whose tokens they collected. This impersonation would -allow them to do anything the compromised users could do, including publishing -new versions of packages. - -With the fixes we’ve released, the CLI will only send bearer tokens with -requests made against a registry. - -##### THINK YOU'RE AT RISK? REGENERATE YOUR TOKENS - -If you believe that your bearer token may have been leaked, [invalidate your -current npm bearer tokens](https://www.npmjs.com/settings/tokens) and rerun -`npm login` to generate new tokens. Keep in mind that this may cause continuous -integration builds in services like Travis to break, in which case you’ll need -to update the tokens in your CI server’s configuration. - -##### WILL THIS BREAK MY CURRENT SETUP? - -Maybe. - -npm’s CLI team believes that the fix won’t break any existing registry setups. -Due to the large number of registry software suites out in the wild, though, -it’s possible our change will be breaking in some cases. - -If so, please [file an issue](https://github.com/npm/npm/issues/new) describing -the software you’re using and how it broke. Our team will work with you to -mitigate the breakage. - -##### CREDIT & THANKS - -Thanks to Mitar, Will White & the team at Mapbox, Max Motovilov, and James -Taylor for reporting this vulnerability to npm. - -#### PERFORMANCE IMPROVEMENTS - -The updated [`are-we-there-yet`](https://npmjs.com/package/are-we-there-yet) -changes how it tracks how complete things are to be much more efficient. -The summary is that `are-we-there-yet` was refactored to remove an expensive -tree walk. - -The result for you should be faster installs when working with very large trees. - -Previously `are-we-there-yet` computed this when you asked by passing the request down -its tree of progress indicators, totaling up the results. In doing so, it had to walk the -entire tree of progress indicators. - -By contrast, `are-we-there-yet` now updates a running total when a change -is made, bubbling that up the tree from whatever branch made progress. This -bubbling was already going on so there was nearly no cost associated with taking advantage of it. - -* [`32f2bd0`](https://github.com/npm/npm/commit/32f2bd0e26116db253e619d67c4feae1de3ad2c2) - `npmlog@2.0.3`: - Bring in substantial performance improvements from `are-we-there-yet`. - ([@iarna](https://github.com/iarna)) - -#### DUCT TAPE FOR BUGS - -* [`473d324`](https://github.com/npm/npm/commit/473d3244a8ddfd6b260d0aa0d395b119d595bf97) - [#11947](https://github.com/npm/npm/pull/11947) - Guard against bugs that could cause the installer to crash with errors like: - - ``` - TypeError: Cannot read property 'target' of null - ``` - - This doesn't fix the bugs, but it does at least make the installer less - likely to explode. - ([@thefourtheye](https://github.com/thefourtheye)) - -#### DOC FIXES - -* [`ffa428a`](https://github.com/npm/npm/commit/ffa428a4eee482aa620819bc8df994a76fad7b0c) - [#11880](https://github.com/npm/npm/pull/11880) - Fix typo in `npm install` documentation. - ([@watilde](https://github.com/watilde)) - -#### DEPENDENCY UPDATES - -* [`7537fe1`](https://github.com/npm/npm/commit/7537fe1748c27e6f1144b279b256cd3376d5c41c) - `sorted-object@2.0.0`: - Create objects with `{}` instead of `Object.create(null)` to make the results - strictly equal to what, say, parsed JSON would provide. - ([@domenic](https://github.com/domenic)) -* [`8defb0f`](https://github.com/npm/npm/commit/8defb0f7b3ebdbe15c9ef5036052c10eda7e3161) - `readable-stream@2.0.6`: - Fix sync write issue on 0.10. - ([@calvinmetcalf](https://github.com/calvinmetcalf)) - -#### TEST FIXES FOR THE SELF TESTS - -* [`c3edeab`](https://github.com/npm/npm/commit/c3edeabece4400308264e7cf4bc4448bd2729f55) - [#11912](https://github.com/npm/npm/pull/11912) - Change the self installation test to do its work in `/tmp`. - Previously this was installing into a temp subdir in `test/tap`, which - wouldn't catch the case where a module was installed in the local - `node_modules` folder but not in dependencies, as node would look up - the tree and use the copy from the version of npm being tested. - ([@iarna](https://github.com/iarna)) - -### v3.8.2 (2016-03-10): - -#### HAVING TROUBLE INSTALLING C MODULES ON ANDROID? - -This release includes an updated `node-gyp` with fixes for Android. - -* [`634ecba`](https://github.com/npm/npm/commit/634ecba320fb5a3287e8b7debfd8b931827b9e19) - `node-gyp@3.3.1`: - Fix bug in builds for Android. - ([@bnoordhuis](https://github.com/bnoordhuis)) - -#### NPM LOGOUT CLEANS UP BETTER - -* [`460ed21`](https://github.com/npm/npm/commit/460ed217876ac78d21477c288f1c06563fb770b4) - [#10529](https://github.com/npm/npm/issues/10529) - If you ran `npm logout` with a scope, while we did invalidate your auth - token, we weren't removing the auth token from your config file. This patch causes - the auth token to be removed. - ([@wyze](https://github.com/wyze)) - -#### HELP MORE HELPFUL - -* [`d1d0233`](https://github.com/npm/npm/commit/d1d02335d297da2734b538de44d8967bdcd354cf) - [#11003](https://github.com/npm/npm/issues/11003) - Update help to only show command names and their shortcuts. Previously - some typo corrections were shown, along with various alternate - spellings. - ([@watilde](https://github.com/watilde)) -* [`47928cd`](https://github.com/npm/npm/commit/47928cd6264e1d6d0ef67435b71c66d01bea664a) - [#11003](https://github.com/npm/npm/issues/11003) - Remove "version" typo from the help listing. - ([@doug-wade](https://github.com/doug-wade)) - -#### MORE COMPLETE CONFIG LISTINGS - -* [`cf5fd40`](https://github.com/npm/npm/commit/cf5fd401494d96325d74a8bb8c326aa0045a714c) - [#11472](https://github.com/npm/npm/issues/11472) - Make `npm config list` include the per-project `.npmrc` in the output. - ([@mjomble](https://github.com/mjomble)) - -#### DEPTH LIMITED PARSEABLE DEP LISTINGS - -* [`611070f`](https://github.com/npm/npm/commit/611070f0f7a1e185c75cadae46179194084b398f) - [#11495](https://github.com/npm/npm/issues/11495) - Made `npm ls --parseable` honor the `--depth=#` option. - ([@zacdoe](https://github.com/zacdoe)) - -#### PROGRESS FOR THE (NON) UNICODE REVOLUTION - -* [`ff90382`](https://github.com/npm/npm/commit/ff9038227a1976b5e936442716d9877f43c6c9b4) - [#11781](https://github.com/npm/npm/issues/11781) - Make the progress bars honor the unicode option. - ([@watilde](https://github.com/watilde)) - -#### `npm view --json`, NOW ACTUALLY JSON - -* [`24ab70a`](https://github.com/npm/npm/commit/24ab70a4ccfeaa005b80252da313bb589510668e) - [#11808](https://github.com/npm/npm/issues/11808) - Make `npm view` produce valid JSON when requested with `--json`. - Previously `npm view` produced some sort of weird hybrid output, with multiple - JSON docs. - ([@doug-wade](https://github.com/doug-wade)) - -#### DOCUMENTATION CHANGES - -* [`6fb0499`](https://github.com/npm/npm/commit/6fb0499bea868fdc637656d210c94f051481ecd4) - [#11726](https://github.com/npm/npm/issues/11726) - Previously we patched the `npm update` docs to suggest using `--depth - Infinity` instead of `--depth 9999`, but that was a mistake. We forgot - that `npm outdated` (on which `npm update` is built) has a special - case where it treats `Infinity` as `0`. This reverts that patch. - ([@GriffinSchneider](https://github.com/GriffinSchneider)) -* [`f0bf684`](https://github.com/npm/npm/commit/f0bf684a87ea5eea03432a17f38678fed4960d43) - [#11748](https://github.com/npm/npm/pull/11748) - Document all of the various aliases for commands in the documentation - for those commands. - ([@watilde](https://github.com/watilde)) -* [`fe04443`](https://github.com/npm/npm/commit/fe04443d8988e2e41bd4047078e06a26d05d380d) - [#10968](https://github.com/npm/npm/issues/10968) - The `npm-scope` document notes that scopes have been available on the - public registry for a while. This adds that you'll need `npm@2` or later - to use them. - ([@doug-wade](https://github.com/doug-wade)) -* [`3db37a5`](https://github.com/npm/npm/commit/3db37a52b2b2e3193ef250ad2cf96dfd2def2777) - [#11820](https://github.com/npm/npm/pull/11820) - The command `npm link` should be linking package from local folder to - global, and `npm link package-name` should be from global to local. The - description in the documentation was reversed and this fixes that. - ([@rhgb](https://github.com/rhgb)) - -#### GLOB FOR THE GLOB THRONE - -* [`be55882`](https://github.com/npm/npm/commit/be55882dc4ee5ce0777b4badc9141dab5bf5be4d) - `glob@7.0.3`: - Fix a race condition and some windows edge cases. - ([@isaacs](https://github.com/isaacs)) - -### v3.8.1 (2016-03-03): - -This week the install summary got better, killing your npm process now -also kills the scripts it was running and a rarely used search flag got -documented. - -Our improvements on the test suite on Windows are beginning to pick up -steam, you can follow along by -[watching the PR](https://github.com/npm/npm/pull/11444). - -#### BETTER INSTALL SUMMARIES - -* [`e40d457`](https://github.com/npm/npm/commit/e40d4572cc98db06757df5b8bb6b7dbd0546d3d7) - [#11699](https://github.com/npm/npm/issues/11699) - Ensure that flags like `--production` passed to install don't result in - the summary at the end being incorrectly filtered. That summary is - produced by the same code as `npm ls` and therefore responds to flags - the same way it does. This is undesirable when it's an install summary, - however, as we don't want it to filter anything. - - This fixes an issue where `npm install --production <module>` would - result in npm exiting with an error code. The `--production` flag would - make `npm ls` filter out `<module>` as it wasn't saved to the - `package.json` and thus wasn't a production dependency. The install - report is limited to show just the modules installed, so with that - filtered out nothing is available. With nothing available `npm ls` - would set `npm` to exit with an error code. - ([@ixalon](https://github.com/ixalon)) -* [`99337b4`](https://github.com/npm/npm/commit/99337b469163a4b211b9c6ff1aa9712ae0d601d2) - [#11600](https://github.com/npm/npm/pull/11600) - Make the report of installed modules really only show those modules - that were installed. Previously it selected which modules from your - tree to display based on `name@version` which worked great when your - tree was deduped but would list things it hadn't touched when there - were duplicates. - ([@iarna](https://github.com/iarna)) - -#### SCRIPTS BETTER FOLLOW THE LEADER - -* [`5454347`](https://github.com/npm/npm/commit/545434766eb3681d3f40b745f9f3187ed63f310a) - [#10868](https://github.com/npm/npm/pull/10868) - When running a lifecycle script, say through `npm start`, killing npm - wouldn't forward that on to the children. It does now. - ([@daniel-pedersen](https://github.com/daniel-pedersen)) - -#### SEARCHING SPECIFIC REGISTRIES - -* [`6020447`](https://github.com/npm/npm/commit/60204479f76458a9864aa530cda2b3333f95c2b0) - [#11490](https://github.com/npm/npm/pull/11490) - Add docs for using the `--registry` flag with search. - ([@plumlee](https://github.com/plumlee)) - -#### LODASH UPDATES - -* [`bb14204`](https://github.com/npm/npm/commit/bb14204183dad620a6650452a26cdc64111f8136) - `lodash.without@4.1.1` - ([@jdalton](https://github.com/jdalton)) -* [`0089059`](https://github.com/npm/npm/commit/0089059c562aee9ad0398e55d2c12c68a6150e79) - `lodash.keys@4.0.5` - ([@jdalton](https://github.com/jdalton)) -* [`6ee1de4`](https://github.com/npm/npm/commit/6ee1de4474d9683a1f7023067d440780eeb10311) - `lodash.clonedeep@4.3.1` - ([@jdalton](https://github.com/jdalton)) - -### v3.8.0 (2016-02-25): - -This week brings a quality of life improvement for some Windows users, and -an important knob to be tuned for folks experiencing network problems. - -#### LIMIT CONCURRENT REQUESTS - -We've long known that `npm`'s tendency to try to request all your -dependencies simultaneously upset some network hardware (particular, -consumer grade routers & proxies of all sorts). One of the reasons that we're -planning to write our own npm specific version of `request` is to be able to -more easily control this sort of thing. - -But fortunately, you don't have to wait for that. -[@misterbyrne](https://github.com/misterbyrne) took a look at our existing -code and realized it could be added painlessly TODAY. The new default -maximum is `50`, instead of `Infinity`. If you're having network issues you -can try setting that value down to something lower (if you do, please let us -know... the default is subject to tuning). - -* [`910f9ac`](https://github.com/npm/npm/commit/910f9accf398466b8497952bee9f566ab50ade8c) - [`f7be667`](https://github.com/npm/npm/commit/f7be667548a132ec190ac9d60a31885a7b4fe2b3) - Add a new config option, `maxsockets` and `npm-registry-client@7.1.0` to - take advantage of it. - ([@misterbyrne](https://github.com/misterbyrne)) - -#### WINDOWS GIT BASH - -We think it's pretty keen too, we were making it really hard to actually -upgrade if you were using it. NO MORE! - -* [`d60351c`](https://github.com/npm/npm/commit/d60351ccae87d71a5f5eac73e3085c6290b52a69) - [#11524](https://github.com/npm/npm/issues/11524) - Prefer locally installed npm in Git Bash -- previous behavior was to use - the global one. This was done previously for other shells, but not for Git - Bash. - ([@destroyerofbuilds](https://github.com/destroyerofbuilds)) - -#### DOCUMENTATION IMPROVEMENTS - -* [`b63de3c`](https://github.com/npm/npm/commit/b63de3c97c4c27078944249a4d5bbe1c502c23bc) - [#11636](https://github.com/npm/npm/issues/11636) - Document `--save-bundle` option in main install page. - ([@datyayu](https://github.com/datyayu)) -* [`3d26453`](https://github.com/npm/npm/commit/3d264532d6d9df60420e985334aebb53c668d32b) - [#11644](https://github.com/npm/npm/pull/11644) - Add `directories.test` to the `package.json` documentation. - ([@lewiscowper](https://github.com/lewiscowper)) -* [`b64d124`](https://github.com/npm/npm/commit/b64d12432fdad344199b678d700306340d3607eb) - [#11441](https://github.com/npm/npm/pull/11441) - Add a link in documentation to the contribution guidelines. - ([@watilde](https://github.com/watilde)) -* [`82fc548`](https://github.com/npm/npm/commit/82fc548b0e2abbdc4f7968c20b118c30cca79a24) - [#11441](https://github.com/npm/npm/pull/11441/commits) - Remove mentions of the long defunct Google group. - ([@watilde](https://github.com/watilde)) -* [`c6ad091`](https://github.com/npm/npm/commit/c6ad09131af2e2766d6034257a8fcaa294184121) - [#11474](https://github.com/npm/npm/pull/11474) - Correct invalid JSON in npm-update docs. - ([@robludwig](https://github.com/robludwig)) -* [`4906c90`](https://github.com/npm/npm/commit/4906c90ed2668adf59ebee759c7ebb811aa46e57) - Expand on the documentation for `bundlededDependencies`, explaining what they are - and when you might want to use them. - ([@gnerkus](https://github.com/gnerkus)) - -#### DEPENDENCY UPDATES - -* [`93cdc25`](https://github.com/npm/npm/commit/93cdc25432b71cbc9c25c54ae316770e18f4b01e) - `strip-ansi@3.0.1`: - Non-user visible tests & maintainer doc updates. - ([@jbnicolai](https://github.com/jbnicolai)) -* [`3b2ccef`](https://github.com/npm/npm/commit/3b2ccef30dc2038b99ba93cd1404a1d01dac8790) - `lodash.keys@4.0.4` - ([@jdalton](https://github.com/jdalton)) -* [`30e9eb9`](https://github.com/npm/npm/commit/30e9eb97397a8f85081d328ea9aa54c2a7852613) - `lodash._baseuniq@4.5.0` - ([@jdalton](https://github.com/jdalton)) - - -### v3.7.5 (2016-02-22): - -A quick fixup release because when I updated glob, I missed the subdep copies of itself -that it installed deeper in the tree. =/ - -This only effected people trying to update to `3.7.4` from `npm@2` or `npm@1`. Updates from -`npm@3` worked fine (as it fixes up the missing subdeps during installation). - -#### OH MY GLOB - -* [`63fa704`](https://github.com/npm/npm/commit/63fa7044569127e6e29510dc499a865189806076) - [#11633](https://github.com/npm/npm/issues/11633) - When updating the top level `npm` to `glob@7`, the subdeps that - still depended on `glob@6` got new versions installed but they - weren't added to the commit. This adds them back in. - ([@iarna](https://github.com/iarna)) - -### v3.7.4 (2016-02-18): - -I'm ([@iarna](https://github.com/iarna)) back from vacation in the frozen -wastes of Maine! This release sees a couple of bug fixes, some -documentation updates, a bunch of dependency updates and improvements to our -test suite. - -#### FIXES FOR `update`, FIXES FOR `ls` - -* [`53cdb96`](https://github.com/npm/npm/commit/53cdb96634fc329378b4ea4e767ba9987986a76e) - [#11362](https://github.com/npm/npm/issues/11362) - Make `npm update` stop trying to update linked packages. - ([@rhendric](https://github.com/rhendric)) -* [`8d90d25`](https://github.com/npm/npm/commit/8d90d25b3da086843ce43911329c9572bd109078) - [#11559](https://github.com/npm/npm/issues/11559) - Only list runtime dependencies when doing `npm ls --production`. - ([@yibn2008](https://github.com/yibn2008)) - -#### @wyze, DOCUMENTATION HERO OF THE PEOPLE, GETS THEIR OWN HEADER - -* [`b78b301`](https://github.com/npm/npm/commit/b78b30171038ab737eff0b070281277e35af25b4) - [#11416](https://github.com/npm/npm/pull/11416) - Logout docs were using a section copy-pasted from the adduser docs. - ([@wyze](https://github.com/wyze)) -* [`649e28f`](https://github.com/npm/npm/commit/649e28f50aa323e75202eeedb824434535a0a4a0) - [#11414](https://github.com/npm/npm/pull/11414) - Add colon for consistency. - ([@wyze](https://github.com/wyze)) - -#### WHITTLING AWAY AT PATH LENGTHS - -So for all of you who don't know -- Node.js does, in fact, support long Windows -paths. Unfortunately, depending on the tool and the Windows version, a lot of -external tooling does not. This means, for example, that some (all?) versions of -Windows Explorer *can literally never delete npm from their system entirely -because of deeply-nested npm dependencies*. Which is pretty gnarly. - -Incidentally, if you run into that in particularly, you can use -[rimraf](npm.im/rimraf) to remove such files 💁. - -The latest victim of this issue was the Node.js CI setup for testing on Windows, -which uses some tooling or another that croaks on the usual path length limit -for that OS: 255 characters. - -This isn't ordinarily an issue with `npm@3` as it produces mostly flat -trees, but you may be surprised to learn that `npm`'s own distribution isn't -flat, due to needing to be compatible with `npm@1.2`, which ships with -`node@0.8`! - -We've taken another baby step towards alleviating this in this release by -updating a couple of dependencies that were preventing `npmlog` from deduping, -and then doing a dedupe on that and `gauge`. Hopefully it helps. - -* [`f3c32bc`](https://github.com/npm/npm/commit/f3c32bc3127301741d2fa3a26be6f5f127a35908) - [#11528](https://github.com/npm/npm/pull/11528) - `node-gyp@3.3.0`: - Update to a more recent version that uses a version of npmlog compatible - with npm itself. Also adds: AIX support, new `gyp`, `--cafile` command - line option, and allows configuration of Node.js and io.js mirrors. - ([@rvagg](https://github.com/rvagg)) - -#### INTERNAL TEST IMPROVEMENTS - -The `npm` core team's time recently has been sunk into `npm`'s many years of -tech debt. Specifically, we've been working on improving the test suite. -This isn't user visible, but in future should mean a more stable, easier to -contribute to `npm`. Ordinarily we don't report these kinds of changes in -the change log, but I thought I might share this week as this chunk is -bigger than usual. - -* [`07f020a`](https://github.com/npm/npm/commit/07f020a09e94ae393c67526985444e128ef6f83c) - [#11292](https://github.com/npm/npm/pull/11292) - `tacks@1.0.9`: - Add a package that provides a tool to generate fixtures from folders and, relatedly, - a module that an create and tear down filesystem fixtures easily. - ([@iarna](https://github.com/iarna)) -* [`0837346`](https://github.com/npm/npm/commit/083734631f9b11b17c08bca8ba8cb736a7b1e3fb) - [#11292](https://github.com/npm/npm/pull/11292) - Remove all the relatively cryptic legacy tests and creates new tap tests - that check the same functionality. The *legacy* tests were tests that - were originally a shell script that was ported to javascript early in - `npm`'s history. - ([@iarna](https://github.com/iarna)) - ([@zkat](https://github.com/zkat)) -* [`5a701e7`](https://github.com/npm/npm/commit/5a701e71a0130787fb98450f9de92117b4ef88e1) - [#11292](https://github.com/npm/npm/pull/11292) - Test that we don't leak auth info into the environment. - ([@zkat](https://github.com/zkat)) -* [`502d7d0`](https://github.com/npm/npm/commit/502d7d0628f08b09d8d13538ebccc63de8b3edf5) - [#11292](https://github.com/npm/npm/pull/11292) - Test that env vars properly passed into scripts. - ([@zkat](https://github.com/zkat)) -* [`420f267`](https://github.com/npm/npm/commit/420f2672ee8c909f18bee10b1fc7d4ad91cf328b) - [#11292](https://github.com/npm/npm/pull/11292) - Test that npm's distribution binary is complete and can be installed and used. - ([@iarna](https://github.com/iarna)) -* [`b7e99be`](https://github.com/npm/npm/commit/b7e99be1b1086f2d6098c653c1e20791269c9177) - [#11292](https://github.com/npm/npm/pull/11292) - Test that the `package.json` `files` section and `.npmignore` do what - they're supposed to. - ([@zkat](https://github.com/zkat)) - -#### DEPENDENCY UPDATES - -* [`4611098`](https://github.com/npm/npm/commit/4611098fd8c65d61a0645deb05bf38c81300ffca) - `rimraf@2.5.2`: - Use `glob@7.0.0`. - ([@isaacs](https://github.com/isaacs)) -* [`41b2772`](https://github.com/npm/npm/commit/41b2772cb83627f3b5b926cf81e150e7148cb124) - `glob@7.0.0`: - Raise error if `options.cwd` is specified, and not a directory. - ([@isaacs](https://github.com/isaacs)) -* [`c14e74a`](https://github.com/npm/npm/commit/c14e74ab5d17c764f3aa37123a9632fa965f8760) - `gauge@1.2.7`: Update to newer lodash versions, for a smaller tree. - ([@iarna](https://github.com/iarna)) -* [`d629363`](https://github.com/npm/npm/commit/d6293630ddc25bfa26d19b6be4fd2685976d7358) - `lodash.without@4.1.0` - ([@jdalton](https://github.com/jdalton)) -* [`3ea4c80`](https://github.com/npm/npm/commit/3ea4c8049ca8df9f64426b1db8a29b9579950134) - `lodash.uniq@4.2.0` - ([@jdalton](https://github.com/jdalton)) -* [`8ddcc8d`](https://github.com/npm/npm/commit/8ddcc8deb554660a3f7f474fae9758c967d94552) - `lodash.union@4.2.0` - ([@jdalton](https://github.com/jdalton)) -* [`2b656a6`](https://github.com/npm/npm/commit/2b656a672d351f32ee2af24dcee528356dcd64f4) - `lodash.keys@4.0.3` - ([@jdalton](https://github.com/jdalton)) -* [`ac171f8`](https://github.com/npm/npm/commit/ac171f8f0318a7dd3c515f3b83502dfa9e87adb8) - `lodash.isarguments@3.0.7` - ([@jdalton](https://github.com/jdalton)) -* [`bcccd90`](https://github.com/npm/npm/commit/bcccd9057b75d800c799ab15f00924f700415d3e) - `lodash.clonedeep@4.3.0` - ([@jdalton](https://github.com/jdalton)) -* [`8165bca`](https://github.com/npm/npm/commit/8165bca537d86305a3d08f080f86223a26615aa8) - `lodash._baseuniq@4.4.0` - ([@jdalton](https://github.com/jdalton)) - -### v3.7.3 (2016-02-11): - -Hey all! We've got a pretty small release this week -- just documentation -updates and a couple of dependencies. This release also includes a particular -dependency upgrade that makes it so we're exclusively using the latest version -of `graceful-fs`, which'll make it so things keep working with future Node.js -releases. - -A certain internal Node.js API was deprecated and slated for future removal from -Node Core. This API was critical for versions of `graceful-fs@<4`, before a -different approach was used to achieve similar ends. By upgrading this library, -and making sure all our dependencies are also updated, we've ensured npm will -continue to work once the API is finally removed. Older versions of npm, on the -other hand, will simply not work on future versions of Node.js. - -#### DEPENDENCY UPGRADES - -* [`29536f4`](https://github.com/npm/npm/commit/29536f42da6c06091c9acbc8952f72daa8a9412c) - `cmd-shim@2.0.2`: - Final straggler using `graceful-fs@<4`. - ([@ForbesLindesay](https://github.com/ForbesLindesay)) -* [`5f59e74`](https://github.com/npm/npm/commit/5f59e748ef4c066756bb204a452cecd0543c7a2f) - `lodash.uniq@4.1.0` - ([@jdalton](https://github.com/jdalton)) -* [`987cabe`](https://github.com/npm/npm/commit/987cabe8a18abcb5a685685958bf74c7258a979c) - `lodash.union@4.1.0` - ([@jdalton](https://github.com/jdalton)) -* [`5c641f0`](https://github.com/npm/npm/commit/5c641f05fdc153c6bb06a89c46fe2a345ce413db) - `lodash.clonedeep@4.1.0` - ([@jdalton](https://github.com/jdalton)) - -#### EVERYONE GETTING SOCKS LIKE IT'S OPRAH'S SHOW - -* [`9ea5658`](https://github.com/npm/npm/commit/9ea56582ca4d0991dbed44f992c88f08a643cb4b) - [#11410](https://github.com/npm/npm/pull/11410) - Fixed a small spelling error in `npm-config.md`. - ([@pra85](https://github.com/pra85)) -* [`2a11e56`](https://github.com/npm/npm/commit/2a11e562a14bce18b6ddca6c20d17f97b6a8ec2f) - [#11403](https://github.com/npm/npm/pull/11403) - Removes `--depth Infinity` warning from documentation -- this operation should - actually be totally safe as of `npm@3`. (The warning remains for `npm@2`.) - ([@Aourin](https://github.com/Aourin)) -* [`42a4727`](https://github.com/npm/npm/commit/42a4727bfb1e21c890b8e2babda55e06ac2bda29) - [#11391](https://github.com/npm/npm/pull/11391) - Fixed versions of `shrinkwrap.json` in examples in documentation for `npm - shrinkwrap`, which did not quite match up. - ([@xcatliu](https://github.com/xcatliu)) - -### v3.7.2 (2016-02-04): - -This week, the CLI team has been busy working on rewriting tests to support -getting coverage reports going and running all of our tests on Windows. -Meanwhile, we've got a bunch of dependency updates and one or two other -things. - -#### TESTS WENT INTO HIDING - -Last week we took a patch from [@substack](https://github.com/substack) to -stop the installer from reordering arrays in an installed module's -`package.json`... but somehow I dropped the test when I was rebasing. - -* [`21b9271`](https://github.com/npm/npm/commit/21b927182514a0ff6d9f34480bfc39f72e3e9f8c) - [#10063](https://github.com/npm/npm/issues/10063) - Restore test that verifies that we don't re-order arrays in a module's - `package.json` on install. - ([@substack](https://github.com/substack)) - -#### DOCUMENTATION FIXES - -* [`c67521d`](https://github.com/npm/npm/commit/c67521dc6c1e41d39d02c74105e41442851d23bb) - [#11348](https://github.com/npm/npm/pull/11348) - Improve the documentation around which files are ALWAYS included in published packages - and which are ALWAYS excluded. - ([@jscissr](https://github.com/jscissr)) -* [`7ef6793`](https://github.com/npm/npm/commit/7ef6793cd191cc8d88340f7e1ce9c9e3d6f0b2f4) - [#11348](https://github.com/npm/npm/pull/11348) - The release date on the 3.7.0 changelog entry was wrong. I honestly don't - know how I keep doing this. =D - ([@rafek](https://github.com/rafek)) - -#### DEPENDENCY UPDATES - -* [`8a3c80c`](https://github.com/npm/npm/commit/8a3c80c4fd3d82fe937f30bc7cbd3dee51a8a893) - `graceful-fs@4.1.3`: - Fix a bug where close wasn't getting made graceful. - ([@isaacs](https://github.com/isaacs)) - -`lodash` saw updates across most of its modules this week with browser -campatibility fixes that don't really impact us. - -* [`2df342b`](https://github.com/npm/npm/commit/2df342bf30efa99b98016acc8a5dc03e00b58b9c) - `lodash.without@4.0.2` - ([@jdalton](https://github.com/jdalton)) -* [`86aa91d`](https://github.com/npm/npm/commit/86aa91dce60f6b6a92bb3ba2bf6e6be1f6afc750) - `lodash.uniq@4.0.2` - ([@jdalton](https://github.com/jdalton)) -* [`0a94bf6`](https://github.com/npm/npm/commit/0a94bf6af0ebd38d080f92257e0cd9bae40b31ff) - `lodash.union@4.0.2` - ([@jdalton](https://github.com/jdalton)) -* [`b4c9582`](https://github.com/npm/npm/commit/b4c9582b4ef5991f3d155e0c6142ed1c631860af) - `lodash.isarguments@3.0.6` - ([@jdalton](https://github.com/jdalton)) -* [`efe766c`](https://github.com/npm/npm/commit/efe766c63c0948a4ae4c0d12f2b834629ab86e92) - `lodash.keys@4.0.2`: Minor code cleanup and the above. - ([@jdalton](https://github.com/jdalton)) -* [`36abb24`](https://github.com/npm/npm/commit/36abb24ef31017adbf325e7f833d5d4b0f03f5d4) - `lodash.clonedeep@4.0.4`: - Add support for cloning prototype objects and the above. - ([@jdalton](https://github.com/jdalton)) - -### v3.7.1 (2016-02-01): - -Super quick Monday patch on last week's release. - -If you ever wondered why we release things to the `npm@next` tag for a week -before promoting them to `npm@latest`, this is it! - -#### RELEASE TRAIN VINDICATED (again) - -* [`adcaf04`](adcaf047811dcc475ab1984fc93fe34540fc03d7) - [#11349](https://github.com/npm/npm/issues/11349) - Revert last weeks change to use JSON clone instead of `lodash.cloneDeep`. - ([@iarna](https://github.com/iarna)) - -### v3.7.0 (2016-01-29): - -Hi all! This week brings us some important performance improvements, -support for git submodules(!) and a bunch of bug fixes. - -#### PERFORMANCE - -`gauge`, the module responsible for drawing `npm`'s progress bars, had an -embarrassing bug in its debounce implementation that resulted in it, on many -systems, actually being _slower_ than if it hadn't been debouncing. This was -due to it destroying and then creating a timer object any time it got an -update while waiting on its minimum update period to elapse. This only was -a measurable slowdown when sending thousands of updates a second, but -unfortunately parts of `npm`'s logging do exactly that. This has been patched -to eliminate that churn, and our testing shows the progress bar as being -eliminated as a source of slow down. - -Meanwhile, `are-we-there-yet` is the module that tracks just how complete -our big asynchronous install process is. [@STRML](https://github.com/STRML) -spent some time auditing its source and made a few smaller performance -improvements to it. Most impactful was eliminating a bizarre bit of code -that was both binding to AND closing over the current object. I don't have -any explanation for how that crept in. =D - -* [`c680fa9`](https://github.com/npm/npm/commit/c680fa9f8135759eb5512f4b86e47fa265733f79) - `npmlog@2.0.2`: New `are-we-there-yet` with performance patches from - [@STRML](https://github.com/STRML). New `gauge` with timer churn - performance patch. - ([@iarna](https://github.com/iarna)) - -We were also using `lodash`'s `cloneDeep` on `package.json` data which is -definitely overkill, seeing as `package.json` data has all the restrictions -of being `json`. The fix for this is just swapping that out for something -that does a pair of `JSON.stringify`/`JSON.parse`, which is distinctly more -speedy. - -* [`1d1ea7e`](https://github.com/npm/npm/commit/1d1ea7eeb958034878eb6573149aeecc686888d3) - [#11306](https://github.com/npm/npm/pull/11306) - Use JSON clone instead of `lodash.cloneDeep`. - ([@STRML](https://github.com/STRML)) - -#### NEW FEATURE: GIT SUBMODULE SUPPORT - -Long, long requested– the referenced issue is from 2011– we're finally -getting rudimentary git submodule support. - -* [`39dea9c`](https://github.com/npm/npm/commit/39dea9ca4216c6ea628f5ca47d2b34a4b251a1ed) - [#1876](https://github.com/npm/npm/issues/1876) - Add support for git submodules in git remotes. This is a fairly simple - approach, which does not leverage the git caching mechanism to cache - submodules. It also doesn't provide a means to disable automatic - initialization, e.g. via a setting in the `.gitmodules` file. - ([@gagern](https://github.com/gagern)) - -#### ROBUSTNESS - -* [`5dec02a`](https://github.com/npm/npm/commit/5dec02a3d0e82202c021e27aff9d006283fdc25a) - [#10347](https://github.com/npm/npm/issues/10347) - There is an obscure feature that lets you monkey-patch npm when it starts - up. If the module being required with this feature failed, it would - previously just make `npm` error out– this reduces that to a warning. - ([@evanlucas](https://github.com/evanlucas)) - -#### BUG FIXES - -* [`9ab8b8d`](https://github.com/npm/npm/commit/9ab8b8d047792612ae7f9a6079745d51d5283a53) - [#10820](https://github.com/npm/npm/issues/10820) - Fix a bug with `npm ls` where if you asked for ONLY production dependencies in output - it would exclude dependencies that were BOTH production AND development dependencies. - ([@davidvgalbraith](https://github.com/davidvgalbraith)) -* [`6803fed`](https://github.com/npm/npm/commit/6803fedadb8f9b36cd85f7338ecf75d1d183c833) - [#8982](https://github.com/npm/npm/issues/8982) - Fix a bug where, under some circumstances, if you had a path that - contained the name of a package being installed somewhere in it, `npm` - would incorrectly refuse to run lifecycle scripts. - ([@elvanja](https://github.com/elvanja)) -* [`3eae40b`](https://github.com/npm/npm/commit/3eae40b7a681aa067dfe4fea8c9a76da5b508b48) - [#9253](https://github.com/npm/npm/issues/9253) - Fix a bug where, when running lifecycle scripts, if the Node.js binary you ran - `npm` with wasn't in your `PATH`, `npm` wouldn't use it to run your scripts. - ([@segrey](https://github.com/segrey)) -* [`61daa6a`](https://github.com/npm/npm/commit/61daa6ae8cbc041d3a0d8a6f8f268b47dd8176eb) - [#11014](https://github.com/npm/npm/issues/11014) - Fix a bug where running `rimraf node_modules/<package>` followed by `npm - rm --save <package>` would fail. `npm` now correctly removes the module - from your `package.json` even though it doesn't exist on disk. - ([@davidvgalbraith](https://github.com/davidvgalbraith)) -* [`a605586`](https://github.com/npm/npm/commit/a605586df134ee97c95f89c4b4bd6bc73f7aa439) - [#9679](https://github.com/npm/npm/issues/9679) - Fix a bug where `npm install --save git+https://…` would save a `https://` - url to your `package.json` which was a problem because `npm` wouldn't then - know that it was a git repo. - ([@gagern](https://github.com/gagern)) -* [`bbdc700`](https://github.com/npm/npm/commit/bbdc70024467c365cc4e06b8410947c04b6f145b) - [#10063](https://github.com/npm/npm/issues/10063) - Fix a bug where `npm` would change the order of array properties in the - `package.json` files of dependencies. `npm` adds a bunch of stuff to - `package.json` files in your `node_modules` folder for debugging and - bookkeeping purposes. As a part of this process it sorts the object to - reduce file churn when it does updates. This fixes a bug where the arrays - in the object were also getting sorted. This wasn't a problem for - properties that `npm` itself maintains, but _is_ a problem for properties - used by other packages. - ([@substack](https://github.com/substack)) - -#### DOCS IMPROVEMENTS - -* [`2609a29`](https://github.com/npm/npm/commit/2609a2950704f577ac888668e81ba514568fab44) - [#11273](https://github.com/npm/npm/pull/11273) - Include an example of viewing package version history in the `npm view` documentation. - ([@vedatmahir](https://github.com/vedatmahir)) -* [`719ea9c`](https://github.com/npm/npm/commit/719ea9c45a5c3233f3afde043b89824aad2df0a7) - [#11272](https://github.com/npm/npm/pull/11272) - Fix typographical issue in `npm update` documentation. - ([@jonathanp](https://github.com/jonathanp)) -* [`cb9df5a`](https://github.com/npm/npm/commit/cb9df5a37091e06071d8704b629e7ebaa41c37fe) - [#11215](https://github.com/npm/npm/pull/11215) - Do not call `SEE LICENSE IN <filename>` an _SPDX expression_, as it's not. - ([@kemitchell](https://github.com/kemitchell)) -* [`f427934`](https://github.com/npm/npm/commit/f4279346c368da4bca09385f773e8eed1d389e5e) - [#11196](https://github.com/npm/npm/pull/11196) - Correct the `package.json` examples in the `npm update` documentation to actually be - valid JSON and not just JavaScript object literals. - ([@s100](https://github.com/s100)) - -#### DEPENDENCY UPDATES - -* [`a7b2407`](https://github.com/npm/npm/commit/a7b24074cb59a1ab17c0d8eff1498047e6a123e5) - `retry@0.9.0`: New features and interface agnostic refactoring. - ([@tim-kos](https://github.com/tim-kos)) -* [`220fc77`](https://github.com/npm/npm/commit/220fc7702ae3e5d601dfefd3e95c14e9b32327de) - `request@2.69.0`: - A bunch of small bug fixes and module updates. - ([@simov](https://github.com/simov)) -* [`9e5c84f`](https://github.com/npm/npm/commit/9e5c84f1903748897e54f8ff099729ff744eab0f) - `which@1.2.4`: - Update `isexe` and fix bug in `pathExt`, in which files without extensions - would sometimes be preferred to files with extensions on Windows, even though - those without extensions aren't executable. - `pathExt` is a list of extensions that are considered executable (exe, cmd, - bat, com on Windows). - ([@isaacs](https://github.com/isaacs)) -* [`375b9c4`](https://github.com/npm/npm/commit/375b9c42fe0c6de47ac2f92527354b2ea79b7968) - `rimraf@2.5.1`: Minor doc formatting fixes. - ([@isaacs](https://github.com/isaacs)) -* [`ef1971e`](https://github.com/npm/npm/commit/ef1971e6270c2bc72e6392b51a8b84f52708f7e7) - `lodash.clonedeep@4.0.2`: - Misc minor code cleanup. No functional changes. - ([@jdalton](https://github.com/jdalton)) - -### v3.6.0 (2016-01-20): - -Hi all! This is a bigger release, in part 'cause we didn't have one last -week. The most important thing you need to know is that when `npm@3.6.0` replaces -`npm@3.5.4` as `next`, `npm@3.5.4` WILL NOT be moved on to `latest`. This is due to -a packaging error that tickles bugs in some earlier releases and makes upgrades to it -from those versions break the install. - -#### NEW FEATURES‼ - -* [`ff504d4`](https://github.com/npm/npm/commit/ff504d449ea1fa996cbb02c8078964643c51e5f6) - [#8752](https://github.com/npm/npm/issues/8752) - In `npm outdated`, report symlinked packages as having a wanted & latest - version of `linked`. - ([@halhenke](https://github.com/halhenke)) -* [`f44d8c9`](https://github.com/npm/npm/commit/f44d8c9a3940f7041f8136f8754a54b13f1f9d60) - [#10775](https://github.com/npm/npm/issues/10775) - Add a success message to `adduser` / `login`. - ([@ekmartin](https://github.com/ekmartin)) -* [`3109303`](https://github.com/npm/npm/commit/310930395c9bf1577cf085b9742210bfc71bb019) - [#10043](https://github.com/npm/npm/pull/10043) - Warn if you try to use `npm run x` if you don't have a `node_modules` folder, since - whatever you're trying to do _probably_ won't work. - ([@timkrins](https://github.com/timkrins)) - -* [`9ed2849`](https://github.com/npm/npm/commit/9ed2849cd7e8cc97111dca42a940905284afe55d) - [`e9f1ad8`](https://github.com/npm/npm/commit/e9f1ad88ce58ecd111811e11afa52ac19fc8696e) - [`f10d300`](https://github.com/npm/npm/commit/f10d300e5effa7a5756c8d461eef284c283a41d1) - [`8b593d8`](https://github.com/npm/npm/commit/8b593d8d187d6ac85d2a59cbe647afb5516c1b94) - [#10717](https://github.com/npm/npm/pull/10717) - `npm version` can now take a `from-git` argument, which instructs `npm` to read the - version from git and update your `package.json` to what it finds. This is in contrast - to its normal use where `npm` _tells_ git about your new version. - ([@ekmartin](https://github.com/ekmartin)) - -#### 3.5.4 WAS NOT SO GREAT - -The `npm@3.5.4` package was missing some dependencies. Specifically, `glob` -and `has-unicode` had major release updates which meant that subdeps that -relied on older major versions couldn't use the npm supplied versions any -more, and so they needed their own copies. - -This went undetected because the actions necessary to run the tests (which -check for this sort of thing) resolved the missing modules. - -Further, it didn't have symptoms when upgrading from _most_ versions of npm. -Unfortunately, some versions had bugs that were tickled by this and resulted -in broken upgrades, most notably, `npm@3.3.12`, the version that's been in -Node.js 5. - -* [`1d3325c`](https://github.com/npm/npm/commit/1d3325c040621a4792db80fb232f4994b9d5c5f2) - [`02611c6`](https://github.com/npm/npm/commit/02611c673a4d2bbe8fcef8d48407768da31c90d2) - [`39d5fea`](https://github.com/npm/npm/commit/39d5feadefdde38d75a18f23343bc6ec37153638) - [`7d0e830`](https://github.com/npm/npm/commit/7d0e830f26c73b9d9277b29949227ba9cca27fd9) - [#11129](https://github.com/npm/npm/pull/11129) - Update the underlying dependencies to allow use for the new versions of - `glob` and `has-unicode`. - ([@iarna](https://github.com/iarna)) - -#### WHEN MISSING PATHS ARE OK - -* [`bb638fa`](https://github.com/npm/npm/commit/bb638fa4f48d24d2c9935861d5d751c5621eea49) - [#11212](https://github.com/npm/npm/pull/11212) - When trying to determine if a file was controlled by npm before going to - remove it, we check to see if it is inside any of a list of paths that npm - considers to be under its control. Not all of those paths always exist - (and that's ok!) Previously we were calling it a failure to match if ANY - of them didn't exist. We now only do so if NONE of them exist. If some - do, then we do our usual checks on them. - - This showed up as an error where you would see something like: - ``` - npm warn gentlyRm not removing /path/to/thing as it wasn't installed by /path/to/other/thing - ``` - But it totally was installed by it. - ([@iarna](https://github.com/iarna)) - -#### BETTER NODE PRE-RELEASE SUPPORT - -Historically, if you used a pre-release version of Node.js, you would get -dozens and dozens of warnings when EVERY engine check failed across all of -your modules, because `>= 0.10.0` doesn't match prereleases. - -You might find this stream of redundant warnings undesirable. I do. - -We've moved this into a SINGLE warning you'll get about using a pre-release -version of Node.js and now suppress those other warnings. - -* [`6952f79`](https://github.com/npm/npm/commit/6952f7981e451a2d599a4f513573af208bdfe103) - [#11212](https://github.com/npm/npm/pull/11212) - Engine check warnings are now issued along with any other warnings about - your tree, instead of emitting in the middle of your install (and then - disappearing behind the giant tree of stuff installed). - ([@iarna](https://github.com/iarna)) -* [`ee2ebe9`](https://github.com/npm/npm/commit/ee2ebe96fb3d105787835b72085bbd2eee66a629) - [#11212](https://github.com/npm/npm/pull/11212) - Suppress engine verification warnings about pre-release versions of Node.js. - ([@iarna](https://github.com/iarna)) -* [`135b7e0`](https://github.com/npm/npm/commit/135b7e078311e8b4e2c8e2b662eed9ba6c2e2537) - [#11212](https://github.com/npm/npm/pull/11212) - Explicitly warn, in only one place, if you are using a pre-release version - of Node.js. - ([@iarna](https://github.com/iarna)) - -#### BUG FIXES - -* [`ea331c8`](https://github.com/npm/npm/commit/ea331c82157c65f7643cd4b49fd24031c84bf601) - [#10938](https://github.com/npm/npm/issues/10938) - When removing a package, sometimes the `node_modules/.bin` wouldn't be - cleaned up entirely. This would result in package folders that contained - only a `node_modules/.bin` directory. In turn, this would result in `npm - ls` and other tools complaining about these broken directories. - To fix this, the `unbuild` step now explicitly deletes the - `node_modules/.bin` folder as its final step. - ([@chrisirhc](https://github.com/chrisirhc)) -* [`00720db`](https://github.com/npm/npm/commit/00720db2c326cf8f968c662444a4575ae8c3020a) - [#11158](https://github.com/npm/npm/pull/11158) - On Windows, the `node-gyp` wrapper would fail if your path to `node-gyp` - contained spaces. This fixes that problem by quoting use of that path. - ([@orangemocha](https://github.com/orangemocha)) -* [`69ac933`](https://github.com/npm/npm/commit/69ac9333506752bf2e5af70b3b3e03c6181de3e7) - [#11142](https://github.com/npm/npm/pull/11142) - Fix a race condition when making directories in the cache, which could - lead to `ENOENT` failures. - ([@Jimbly](https://github.com/Jimbly)) -* [`e982858`](https://github.com/npm/npm/commit/e982858d9bed65cede9cbb12df9216a4bb9e6fc9) - [#9696](https://github.com/npm/npm/issues/9696) - When replacing the `package.json` in the cache you sometimes see `EPERM` errors on - Windows that you wouldn't on Unix-like operating systems. This ignores those errors - and allows Windows to continue. Longer term, we'll be adding something to retry - these errors, but ultimately fail if there really is an ongoing permissions issue. - ([@orangemocha](https://github.com/orangemocha)) - -#### DOC CHANGES - -* [`3666081`](https://github.com/npm/npm/commit/3666081abd02184ba97a7cdb6ae238085d640b4b) - [#11188](https://github.com/npm/npm/pull/11188) - Add brief description to publish documentation of what's included in - published tarballs. - ([@beaugunderson](https://github.com/beaugunderson)) -* [`b463e34`](https://github.com/npm/npm/commit/b463e3424b296cfc4bd384fc8bfe0e2329649164) - [#11150](https://github.com/npm/npm/pull/11150) - In npm update docs, advise use of `--depth Infinity` instead of `--depth - 9999`. - ([@halhenke](https://github.com/halhenke)) -* [`382e71a`](https://github.com/npm/npm/commit/382e71a7ee5d1ca3dba55c1e753d529eb8ae6895) - [#11128](https://github.com/npm/npm/pull/11128) - In the `package.json` docs, make the reference to the "Local Paths" section - a link to it as well. - ([@orangejulius](https://github.com/orangejulius)) -* [`5277e7f`](https://github.com/npm/npm/commit/5277e7f236e8cb40d7f4a1054506f2d3d159716e) - [#11090](https://github.com/npm/npm/pull/11090) - Fix the 3.5.4 release date in CHANGELOG.md. - ([@ashleygwilliams](https://github.com/ashleygwilliams)) -* [`e6d238a`](https://github.com/npm/npm/commit/e6d238a3d90beeb0af23fa75a9b5e50671d6e4c5) - [#11130](https://github.com/npm/npm/pull/11130) - Eliminate the "using npm programmatically" section from the README. The - documentation for this was removed a while ago and is unsupported. - ([@ljharb](https://github.com/ljharb)) - -#### DEPENDENCY UPDATES - -* [`b0dde5c`](https://github.com/npm/npm/commit/b0dde5c3407b58d78969d3da01af2629fcba1c73) - `config-chain@1.1.10`: Update tests for most recent version of `ini`. - ([@dominictarr](https://github.com/dominictarr)) -* [`c62f414`](https://github.com/npm/npm/commit/c62f414534971761a48ce3cbc3e25214fb09e494) - `glob@6.0.4`: Eliminated use of `util._extend`. - ([@isaacs](https://github.com/isaacs)) -* [`98a6779`](https://github.com/npm/npm/commit/98a67797978ed7ce534e16b705d3a2a9ca0e6cc1) - `lodash.clonedeep@4.0.1`: Bug fixes, including the non-linear performance - that was biting npm a while back. - ([@jdalton](https://github.com/jdalton)) -* [`0e8c4ce`](https://github.com/npm/npm/commit/0e8c4cebddaefbf5eca0abaad512db266c6722c9) - `lodash.without@4.0.1` - ([@jdalton](https://github.com/jdalton)) -* [`1fd19f5`](https://github.com/npm/npm/commit/1fd19f57a3551d7d30a6b8a9ce967ef50e0ff0ba) - `lodash.uniq@4.0.1` - ([@jdalton](https://github.com/jdalton)) -* [`b7486c5`](https://github.com/npm/npm/commit/b7486c550f3391f733d1e1907652be95fddf4368) - `lodash.union@4.0.1` - ([@jdalton](https://github.com/jdalton)) -* [`54bb591`](https://github.com/npm/npm/commit/54bb5911e18f8fb86eb94159f34b13f0c0aa2e30) - `lodash.keys@4.0.0` - ([@jdalton](https://github.com/jdalton)) -* [`26f7a7a`](https://github.com/npm/npm/commit/26f7a7aaae0575a85deba2241ee69b433dd1ba98) - `lodash.isarray@4.0.0` - ([@jdalton](https://github.com/jdalton)) -* [`ed38bd3`](https://github.com/npm/npm/commit/ed38bd3baf544dfc0630fd321d279f137700bd4d) - `lodash.isarguments@3.0.5` - ([@jdalton](https://github.com/jdalton)) - -### v3.5.4 (2016-01-07): - -I hope you all had fantastic winter holidays, if it's winter where you are -and if there are holidays‼ We went a few weeks without releases because -staff was taking time away from work here and there. A new year has come -and we're back now, and refreshed and ready to dig in! - -This week brings us a bunch of documentation improvements and some module -updates. The core team's focus continues to be on improving tests, -particularly with Windows, so there's not too much to call out here. - -#### DOCUMENTATION IMPROVEMENTS - -* [`6b0031e`](https://github.com/npm/npm/commit/6b0031e28c0b10fb2622fdadde41f5cd294348e8) - [#11044](https://github.com/npm/npm/pull/11044) - Correct documentation regarding the defaults for the `color` config option. - ([@scottaddie](https://github.com/scottaddie)) -* [`c6ce69e`](https://github.com/npm/npm/commit/c6ce69eaed7f17b5f1876ac13ecfae3d14a72f24) - [#10990](https://github.com/npm/npm/pull/10990) - Drop mentions in documentation of `process.installPrefix`, as it hasn't - been a thing since Node.js 0.6 and we don't support that. - ([@jeffmcmahan](https://github.com/jeffmcmahan)) -* [`dee92d1`](https://github.com/npm/npm/commit/dee92d1f78608a10becf57aae86d5d495f2272bd) - [#11037](https://github.com/npm/npm/pull/11037) - Clarify the documentation on the max length of the `name` property in - `package.json` files. - ([@scottaddie](https://github.com/scottaddie)) -* [`4b9d7bb`](https://github.com/npm/npm/commit/4b9d7bb1a4fc3f1edcf563379abfd2273af10881) - [#10787](https://github.com/npm/npm/pull/10787) - Make the formatting in the documentation for `npm dist-tag` more - consistent with other docs. - ([@cvrebert](https://github.com/cvrebert)) -* [`7f77a80`](https://github.com/npm/npm/commit/7f77a80d561ee4b2b8c0aba1226fe89dfe339bcd) - [#10787](https://github.com/npm/npm/pull/10787) - Add documentation to the `npm dist-tag` docs that explains in greater - detail how `latest` is different than other tags. Further, improve the - documentation with better examples. Add a discussion of common practice - for using dist tags to manage alpha's and beta's. - ([@cvrebert](https://github.com/cvrebert)) -* [`6db58dd`](https://github.com/npm/npm/commit/6db58dd0d7719c4675a239d43164edc066842b14) - [`2ee6371`](https://github.com/npm/npm/commit/2ee6371911bd3a4d566c5d7bc8734facc60cb27c) - [#10788](https://github.com/npm/npm/pull/10788) - [#10789](https://github.com/npm/npm/pull/10789) - Improve documentation cross referencing. - ([@cvrebert](https://github.com/cvrebert)) -* [`7ba629a`](https://github.com/npm/npm/commit/7ba629a2ad3eaf736529e053b533cabe3a0d7123) - [#10790](https://github.com/npm/npm/pull/10790) - Document more clearly that `npm install foo` means `npm install - foo@latest`. - ([@cvrebert](https://github.com/cvrebert)) - -#### A FEW MODULE UPDATES - -* [`fc2e8d5`](https://github.com/npm/npm/commit/fc2e8d58a91728cb06936eea686efaa4fdec3f06) - `glob@6.0.3`: Remove deprecated features and fix a bunch of bugs. - ([@isaacs](https://github.com/isaacs)) -* [`5b820c4`](https://github.com/npm/npm/commit/5b820c4e17c907fa8c23771c0cd8e74dd5fdaa51) - `has-unicode@2.0.0`: Change the default on Windows to be false, as - international Windows installs often install to non-unicode codepages and - there's no way to detect this short of a system call or a call to a - command line program. - ([@iarna](https://github.com/iarna)) -* [`238fe84`](https://github.com/npm/npm/commit/238fe84ac61297f1d71701d80368afaa40463305) - `which@1.2.1`: Fixed bugs with uid/gid checks and with quoted Windows PATH - parts. - ([@isaacs](https://github.com/isaacs)) -* [`5e510e1`](https://github.com/npm/npm/commit/5e510e13d022a22d58742b126482d3b38a14cc83) - `rimraf@2.5.0`: Add ability to disable glob support / pass in options. - ([@isaacs](https://github.com/isaacs)) -* [`7558215`](https://github.com/npm/npm/commit/755821569466b7be0883f4b0573eeb83c24109eb) - `readable-stream@2.0.5`: Minor performance improvements. - ([@calvinmetcalf](https://github.com/calvinmetcalf)) -* [`64e8499`](https://github.com/npm/npm/commit/64e84992c812a73d590be443c09a6977d0ae9040) - `fs-write-stream-atomic@1.0.8`: Rewrite to use modern streams even on 0.8 - plus a bunch of tests. - ([@iarna](https://github.com/iarna)) -* [`74d92a0`](https://github.com/npm/npm/commit/74d92a08d72ce3603244de4bb3e3706d2b928cef) - `columnify@1.5.4`: Some bug fixes around large inputs. - ([@timoxley](https://github.com/timoxley)) - -#### FIX NPM'S TESTS ON 0.8 - -This doesn't impact you as a user of npm, and ordinarily that means we -wouldn't call it out here, but if you've ever wanted to contribute, having -that green travis badge makes it a lot easier to do so with confidence! - -* [`b14cdbb`](https://github.com/npm/npm/commit/b14cdbb6002b04bfbefaff70cc45810c20d5a366) - [#10872](https://github.com/npm/npm/pull/10872) - Rewrite tests using nock to use other alternatives. - ([@zkat](https://github.com/zkat)) -* [`59ed01a`](https://github.com/npm/npm/commit/59ed01a8ea7960b1467aed52164fc36a03c77770) - [#10872](https://github.com/npm/npm/pull/10872) - Work around Node.js 0.8 http back-pressure bug. - - 0.8 http streams have a bug, where if they're paused with data in their - buffers when the socket closes, they call `end` before emptying those - buffers, which results in the entire pipeline ending and thus the point - that applied backpressure never being able to trigger a `resume`. - - We work around this by piping into a pass through stream that has - unlimited buffering. The pass through stream is from readable-stream and - is thus a current streams3 implementation that is free of these bugs even - on 0.8. - ([@iarna](https://github.com/iarna)) - -### v3.5.3 (2015-12-10): - -Did you know that Bob Ross reached the rank of master sergeant in the US Air -Force before becoming perhaps the most soothing painter of all time? - -#### TWO HAPPY LITTLE BUG FIXES - -* [`71c9590`](https://github.com/npm/npm/commit/71c9590be61b6a7b7fa8b6dc19baa588cda26a27) - [#10505](https://github.com/npm/npm/issues/10505) `npm ls --json --depth=0` - now respects the depth parameter, when it is zero and when it is not zero. - ([@MarkReeder](https://github.com/MarkReeder)) -* [`954fa67`](https://github.com/npm/npm/commit/954fa67f1ca3739992abd244e217a0aaf8465660) - [#9099](https://github.com/npm/npm/issues/9099) I had always thought you - could run `npm version` from subdirectories in your project, which is great, - because now you can. I guess I was just ahead of my time. - ([@ekmartin](https://github.com/ekmartin)) - -#### NOW PAINT IN SOME NICE DOCS CHANGES - -* [`b88c37c`](https://github.com/npm/npm/commit/b88c37c1cced40e9e41402cc54a5efc3c33cd13e) - [#10546](https://github.com/npm/npm/issues/10546) Goodbye, FAQ! You were - cheeky and fun until you weren't! Don't worry: npm still loves everyone, - especially you! ([@ashleygwilliams](https://github.com/ashleygwilliams)) -* [`2d3afe9`](https://github.com/npm/npm/commit/2d3afe9644ba69681a36721e79c45d27def71939) - [#10570](https://github.com/npm/npm/issues/10570) Update documentation URLs - to be HTTPS everywhere sensible. No HTTP shall be spared! - ([@rsp](https://github.com/rsp)) -* [`6abd0e0`](https://github.com/npm/npm/commit/6abd0e0626d0f642ce0dae0e128ced80433f15a1) - [#10650](https://github.com/npm/npm/issues/10650) Correctly note that there - are two lifecycle scripts run by an install phase in an example, instead of - three. ([@eymengunay](https://github.com/eymengunay)) -* [`a5e8df5`](https://github.com/npm/npm/commit/a5e8df53b8d6d75398cb6a55a44dcf374b0f1661) - [#10687](https://github.com/npm/npm/issues/10687) `npm outdated`'s output can - be a little puzzling sometimes. I've attempted to make it clearer, with some - examples, of what's going on with "wanted" and "latest" in more cases. - ([@othiym23](https://github.com/othiym23)) -* [`8f52833`](https://github.com/npm/npm/commit/8f52833f5d15c4f94467234607d40e75198af1aa) - [#10700](https://github.com/npm/npm/issues/10700) Hey, do you remember when - `search.npmjs.org` was a thing? I think I do? The last time I used it was in - like 2012, and it's gone now, so remove it from the docs. - ([@gagern](https://github.com/gagern)) -* [`b6a53b8`](https://github.com/npm/npm/commit/b6a53b889c948053dcbf6d7aab9ad1cd4226dc32) - [npm/docs#477](https://github.com/npm/docs/issues/477) Continue to airbrush - the CLI API docs out of history. ([@verpixelt](https://github.com/verpixelt)) -* [`b835b72`](https://github.com/npm/npm/commit/b835b72d1dd23b0a17321a85d8d395322d18005d) - `semver@5.1.0`: Include BNF for SemVer expression grammar (which is also now - included in `npm help semver`). ([@isaacs](https://github.com/isaacs)) - -#### LAND YOUR DEPENDENCY UPGRADES IN PAIRS SO EVERYONE HAS A FRIEND - -* [`95e99fa`](https://github.com/npm/npm/commit/95e99faadcdc85a16210dd79c0e7d83add1b9f3e) - `request@2.67.0` ([@simov](https://github.com/simov)) -* [`b49199a`](https://github.com/npm/npm/commit/b49199ac96dfb1afe5719286621a318576dd69ae) - [isaacs/rimraf#89](https://github.com/isaacs/rimraf/pull/89) `rimraf@2.4.4` - ([@zerok](https://github.com/zerok)) -* [`6632418`](https://github.com/npm/npm/commit/66324189a734a1665e1b78a06ba44089d9c3a11c) - [npm/nopt#51](https://github.com/npm/nopt/pull/51) `nopt@3.0.6` - ([@wbecker](https://github.com/wbecker)) -* [`f0a3b3e`](https://github.com/npm/npm/commit/f0a3b3e0dbbdaf11ec55dccd59cc21bfa05f9240) - [isaacs/once#7](https://github.com/isaacs/once/pull/7) `once@1.3.3` - ([@floatdrop](https://github.com/floatdrop)) - -### v3.5.2 (2015-12-03): - -Weeeelcome to another npm release! The short version is that we fixed -some `ENOENT` and some modules that resulted in modules going missing. We -also eliminated the use of MD5 in our code base to help folks using -Node.js in FIPS mode. And we fixed a bad URL in our license file. - -#### FIX URL IN LICENSE - -The license incorrectly identified the registry URL as -`registry.npmjs.com` and this has been corrected to `registry.npmjs.org`. - -* [`cb6d81b`](https://github.com/npm/npm/commit/cb6d81bd611f68c6126a90127a9dfe5604d46c8c) - [#10685](https://github.com/npm/npm/pull/10685) - Fix npm public registry URL in notices. - ([@kemitchell](https://github.com/kemitchell)) - -#### ENOENT? MORE LIKE ENOMOREBUGS - -The headliner this week was uncovered by the fixes to bundled dependency -handling over the past few releases. What had been a frustratingly -intermittent and hard to reproduce bug became something that happened -every time in Travis. This fixes another whole bunch of errors where you -would, while running an install have it crash with an `ENOENT` on -`rename`, or the install would finish but some modules would be -mysteriously missing and you'd have to install a second time. - -What's going on was a bit involved, so bear with me: - -`npm@3` generates a list of actions to take against the tree on disk. -With the exception of lifecycle scripts, it expects these all to be able -to act independently without interfering with each other. - -This means, for instance, that one should be able to upgrade `b` in -`a→b→c` without having npm reinstall `c`. - -That works fine by the way. - -But it also means that the move action should be able to move `b` in -`a→b→c@1.0.1` to `a→d→b→c@1.0.2` without moving or removing `c@1.0.1` and -while leaving `c@1.0.2` in place if it was already installed. - -That is, the `move` action moves an individual node, replacing itself -with an empty spot if it had children. This is not, as it might first -appear, something where you move an entire branch to another location on -the tree. - -When moving `b` we already took care to leave `c@1.0.1` in place so that -other moves (or removes) could handle it, but we were stomping on the -destination and so `c@1.0.2` was being removed. - -* [`f4385d8`](https://github.com/npm/npm/commit/f4385d8e7678349e75c80fae8a1f8f366f197937) - [#10655](https://github.com/npm/npm/pull/10655) - Preserve destination `node_modules` when moving. - ([@iarna](https://github.com/iarna)) - -There was also a bug with `remove` where it was pruning the entire tree -at the remove point, prior to running moves and adds. - -This was fine most of the time, but if we were moving one of the deps out -from inside it, kaboom. - -* [`19c626d`](https://github.com/npm/npm/commit/19c626d69888f0cdc6e960254b3fdf523ec4b52c) - [#10655](https://github.com/npm/npm/pull/10655) - Get rid of the remove commit phase– we could have it prune _just_ the - module being removed, but that isn't gaining us anything. - ([@iarna](https://github.com/iarna)) - -After all that, we shouldn't be upgrading the `add` of a bundled package -to a `move`. Moves save us from having to extract the package, but with a -bundled dependency it's included in another package already so that -doesn't gain us anything. - -* [`641a93b`](https://github.com/npm/npm/commit/641a93bd66a6aa4edf2d6167344b50d1a2afb593) - [#10655](https://github.com/npm/npm/pull/10655) - Don't convert adds to moves with bundled deps. - ([@iarna](https://github.com/iarna)) - -While I was in there, I also took some time to improve diagnostics to -make this sort of thing easier to track down in the future: - -* [`a04ec04`](https://github.com/npm/npm/commit/a04ec04804e562b511cd31afe89c8ba94aa37ff2) - [#10655](https://github.com/npm/ npm/pull/10655) - Wrap rename so errors have stack traces. - ([@iarna](https://github.com/iarna)) -* [`8ea142f`](https://github.com/npm/npm/commit/8ea142f896a2764290ca5472442b27b047ab7a1a) - [#10655](https://github.com/npm/npm/pull/10655) - Add silly logging so function is debuggable - ([@iarna](https://github.com/iarna)) - -#### NO MORE MD5 - -We updated modules that had been using MD5 for non-security purposes. -While this is perfectly safe, if you compile Node in FIPS-compliance mode -it will explode if you try to use MD5. We've replaced MD5 with Murmur, -which conveys our intent better and is faster to boot. - -* [`f068b26`](https://github.com/npm/npm/commit/f068b2661a8d0269c184867e003cd08cb6c56cf2) - [#10629](https://github.com/npm/npm/issues/10629) - `unique-filename@1.1.0` - ([@iarna](https://github.com/iarna)) -* [`dba1b24`](https://github.com/npm/npm/commit/dba1b2402aaa2beceec798d3bd22d00650e01069) - [#10629](https://github.com/npm/npm/issues/10629) - `write-file-atomic@1.1.4` - ([@othiym23](https://github.com/othiym23)) -* [`8347a30`](https://github.com/npm/npm/commit/8347a308ef0d2cf0f58f96bba3635af642ec611f) - [#10629](https://github.com/npm/npm/issues/10629) - `fs-write-stream-atomic@1.0.5` - ([@othiym23](https://github.com/othiym23)) - -#### DEPENDENCY UPDATES - -* [`9e2a2bb`](https://github.com/npm/npm/commit/9e2a2bb5bc71a0ab3b3637e8eec212aa22d5c99f) - [nodejs/node-gyp#831](https://github.com/nodejs/node-gyp/pull/831) - `node-gyp@3.2.1`: - Improved \*BSD support. - ([@bnoordhuis](https://github.com/bnoordhuis)) - -### v3.5.1 (2015-11-25): - -#### THE npm CLI !== THE npm REGISTRY !== npm, INC. - -npm-the-CLI is licensed under the terms of the [Artistic License -2.0](https://github.com/npm/npm/blob/8d79c1a39dae908f27eaa37ff6b23515d505ef29/LICENSE), -which is a liberal open-source license that allows you to take this code and do -pretty much whatever you like with it (that is, of course, not legal language, -and if you're doing anything with npm that leaves you in doubt about your legal -rights, please seek the review of qualified counsel, which is to say, not -members of the CLI team, none of whom have passed the bar, to my knowledge). At -the same time the primary registry the CLI uses when looking up and downloading -packages is a commercial service run by npm, Inc., and it has its own [Terms of -Use](https://www.npmjs.com/policies/terms). - -Aside from clarifying the terms of use (and trying to make sure they're more -widely known), the only recent changes to npm's licenses have been making the -split between the CLI and registry clearer. You are still free to do whatever -you like with the CLI's source, and you are free to view, download, and publish -packages to and from `registry.npmjs.org`, but now the existing terms under -which you can do so are more clearly documented. Aside from the two commits -below, see also [the release notes for -`npm@3.4.1`](https://github.com/npm/npm/releases/tag/v3.4.1), which is where -the split between the CLI's code and the terms of use for the registry was -first made more clear. - -* [`35a5dd5`](https://github.com/npm/npm/commit/35a5dd5abbfeec4f98a2b4534ec4ef5d16760581) - [#10532](https://github.com/npm/npm/issues/10532) Clarify that - `registry.npmjs.org` is the default, but that you're free to use the npm CLI - with whatever registry you wish. ([@kemitchell](https://github.com/kemitchell)) -* [`fa6b013`](https://github.com/npm/npm/commit/fa6b0136a0e4a19d8979b2013622e5ff3f0446f8) - [#10532](https://github.com/npm/npm/issues/10532) Having semi-duplicate - release information in `README.md` was confusing and potentially inaccurate, - so remove it. ([@kemitchell](https://github.com/kemitchell)) - -#### EASE UP ON WINDOWS BASH USERS - -It turns out that a fair number of us use bash on Windows (through MINGW or -bundled with Git, plz – Cygwin is still a bridge too far, for both npm and -Node.js). [@jakub-g](https://github.com/jakub-g) did us all a favor and relaxed -the check for npm completion to support MINGW bash. Thanks, Jakub! - -* [`09498e4`](https://github.com/npm/npm/commit/09498e45c5c9e683f092ab1372670f81db4762b6) - [#10156](https://github.com/npm/npm/issues/10156) completion: enable on - Windows in git bash ([@jakub-g](https://github.com/jakub-g)) - -#### THE ONGOING SAGA OF BUNDLED DEPENDENCIES - -`npm@3.5.0` fixed up a serious issue with how `npm@3.4.1` (and potentially -`npm@3.4.0` and `npm@3.3.12`) handled the case in which dependencies bundled -into a package tarball are handled improperly when one or more of their own -dependencies are older than what's latest on the registry. Unfortunately, in -fixing that (quite severe) regression (see [`npm@3.5.0`'s release notes' for -details](https://github.com/npm/npm/releases/tag/v3.5.0)), we introduced a new -(small, and fortunately cosmetic) issue where npm superfluously warns you about -bundled dependencies being stale. We have now fixed that, and hope that we -haven't introduced any _other_ regressions in the process. :D - -* [`20824a7`](https://github.com/npm/npm/commit/20824a75bf7639fb0951a588e3c017a370ae6ec2) - [#10501](https://github.com/npm/npm/issues/10501) Only warn about replacing - bundled dependencies when actually doing so. ([@iarna](https://github.com/iarna)) - -#### MAKE NODE-GYP A LITTLE BLUER - -* [`1d14d88`](https://github.com/npm/npm/commit/1d14d882c3b5af0a7fee46e8e0e343d07e4c38cb) - `node-gyp@3.2.0`: Support AIX, use `which` to find Python, updated to a newer - version of `gyp`, and more! ([@bnoordhuis](https://github.com/bnoordhuis)) - -#### A BOUNTEOUS THANKSGIVING CORNUCOPIA OF DOC TWEAKS - -These are great! Keep them coming! Sorry for letting them pile up so deep, -everybody. Also, a belated Thanksgiving to our Canadian friends, and a happy -Thanksgiving to all our friends in the USA. - -* [`4659f1c`](https://github.com/npm/npm/commit/4659f1c5ad617c46a5e89b48abf0b1c4e6f04307) - [#10244](https://github.com/npm/npm/issues/10244) In `npm@3`, `npm dedupe` - doesn't take any arguments, so update documentation to reflect that. - ([@bengotow](https://github.com/bengotow)) -* [`625a7ee`](https://github.com/npm/npm/commit/625a7ee6b4391e90cb28a95f20a73fd794e1eebe) - [#10250](https://github.com/npm/npm/issues/10250) Correct order of `org:team` - in `npm team` documentation. ([@louislarry](https://github.com/louislarry)) -* [`bea7f87`](https://github.com/npm/npm/commit/bea7f87399d784e3a6d3393afcca658a61a40d77) - [#10371](https://github.com/npm/npm/issues/10371) Remove broken / duplicate - link to tag. ([@WickyNilliams](https://github.com/WickyNilliams)) -* [`0a25e29`](https://github.com/npm/npm/commit/0a25e2956e9ddd4065d6bd929559321afc512fde) - [#10419](https://github.com/npm/npm/issues/10419) Remove references to - nonexistent `npm-rm(1)` documentation. ([@KenanY](https://github.com/KenanY)) -* [`19b94e1`](https://github.com/npm/npm/commit/19b94e1e6781fe2f98ada0a3f49a1bda25e3e32d) - [#10474](https://github.com/npm/npm/issues/10474) Clarify that install finds - dependencies in `package.json`. ([@sleekweasel](https://github.com/sleekweasel)) -* [`b25efc8`](https://github.com/npm/npm/commit/b25efc88067c843ffdda86ea0f50f95d136a638e) - [#9948](https://github.com/npm/npm/issues/9948) Encourage users to file an - issue, rather than emailing authors. ([@trodrigues](https://github.com/trodrigues)) -* [`24f4ced`](https://github.com/npm/npm/commit/24f4cedc83b10061f26362bf2f005ab935e0cbfe) - [#10497](https://github.com/npm/npm/issues/10497) Clarify what a package is - slightly. ([@aredridel](https://github.com/aredridel)) -* [`e8168d4`](https://github.com/npm/npm/commit/e8168d40caae00b2914ea09dbe4bd1b09ba3dcd5) - [#10539](https://github.com/npm/npm/issues/10539) Remove an extra, spuriously - capitalized letter. ([@alexlukin-softgrad](https://github.com/alexlukin-softgrad)) - -### v3.5.0 (2015-11-19): - -#### TEEN ORCS AT THE GATES - -This week heralds the general release of the primary npm registry's [new -support for private packages for -organizations](http://blog.npmjs.org/post/133542170540/private-packages-for-organizations). -For many potential users, it's the missing piece needed to make it easy for you -to move your organization's private work onto npm. And now it's here! The -functionality to support it has been in place in the CLI for a while now, -thanks to [@zkat](https://github.com/zkat)'s hard work. - -During our final testing before the release, our ace support team member -[@snopeks](https://github.com/snopeks) noticed that there had been some drift -between the CLI team's implementation and what npm was actually preparing to -ship. In the interests of everyone having a smooth experience with this -_extremely useful_ new feature, we quickly made a few changes to square up the -CLI and the web site experiences. - -* [`d7fb92d`](https://github.com/npm/npm/commit/d7fb92d1c53ba5196ad6dd2101a06792a4c0412b) - [#9327](https://github.com/npm/npm/issues/9327) `npm access` no longer has - problems when run in a directory that doesn't contain a `package.json`. - ([@othiym23](https://github.com/othiym23)) -* [`17df3b5`](https://github.com/npm/npm/commit/17df3b5d5dffb2e9c223b9cfa2d5fd78c39492a4) - [npm/npm-registry-client#126](https://github.com/npm/npm-registry-client/issues/126) - `npm-registry-client@7.0.8`: Allow the CLI to grant, revoke, and list - permissions on unscoped (public) packages on the primary registry. - ([@othiym23](https://github.com/othiym23)) - -#### NON-OPTIONAL INSTALLS, DEFINITELY NON-OPTIONAL - -* [`180263b`](https://github.com/npm/npm/commit/180263b) - [#10465](https://github.com/npm/npm/pull/10465) - When a non-optional dep fails, we check to see if it's only required by - ONLY optional dependencies. If it is, we make it fail all the deps in - that chain (and roll them back). If it isn't then we give an error. - - We do this by walking up through all of our ancestors until we either hit an - optional dependency or the top of the tree. If we hit the top, we know to - give the error. - - If you installed a module by hand but didn't `--save` it, your module - won't have the top of the tree as an anscestor and so this code was - failing to abort the install with an error - - This updates the logic so that hitting the top OR a module that was - requested by the user will trigger the error message. - ([@iarna](https://github.com/iarna)) - -* [`b726a0e`](https://github.com/npm/npm/commit/b726a0e) - [#9204](https://github.com/npm/npm/issues/9204) - Ideally we would like warnings about your install to come AFTER the - output from your compile steps or the giant tree of installed modules. - - To that end, we've moved warnings about failed optional deps to the show - after your install completes. - ([@iarna](https://github.com/iarna)) - -#### OVERRIDING BUNDLING - -* [`aed71fb`](https://github.com/npm/npm/commit/aed71fb) - [#10482](https://github.com/npm/npm/issues/10482) - We've been in our bundled modules code a lot lately, and our last go at - this introduced a new bug, where if you had a module `a` that bundled - a module `b`, which in turn required `c`, and the version of `c` that - got bundled wasn't compatible with `b`'s `package.json`, we would then - install a compatible version of `c`, but also erase `b` at the same time. - - This fixes that. It also reworks our bundled module support to be much - closer to being in line with how we handle non-bundled modules and we're - hopeful this will reduce any future errors around them. The new structure - is hopefully much easier to reason about anyway. - ([@iarna](https://github.com/iarna)) - -#### A BRIEF NOTE ON NPM'S BACKWARDS COMPATIBILITY - -We don't often have much to say about the changes we make to our internal -testing and tooling, but I'm going to take this opportunity to reiterate that -npm tries hard to maintain compatibility with a wide variety of Node versions. -As this change shows, we want to ensure that npm works the same across: - -* Node.js 0.8 -* Node.js 0.10 -* Node.js 0.12 -* the latest io.js release -* Node.js 4 LTS -* Node.js 5 - -Contributors who send us pull requests often notice that it's very rare that -our tests pass across all of those versions (ironically, almost entirely due to -the packages we use for testing instead of any issues within npm itself). We're -currently beginning an effort, lasting the rest of 2015, to clean up our test -suite, and not only get it passing on all of the above versions of Node.js, but -working solidly on Windows as well. This is a compounding form of technical -debt that we're finally paying down, and our hope is that cleaning up the tests -will produce a more robust CLI that's a lot easier to write patches for. - -* [`791ec6b`](https://github.com/npm/npm/commit/791ec6b1bac0d1df59f5ebb4ccd16a29a5dc73f0) - [#10233](https://github.com/npm/npm/issues/10233) Update Node.js versions - that Travis uses to test npm. ([@iarna](https://github.com/iarna)) - -#### 0.8 + npm <1.4 COMPATIBLE? SURE WHY NOT - -Hey, you found the feature we added! - -* [`231c58a`](https://github.com/npm/npm/commit/231c58a) - [#10337](https://github.com/npm/npm/pull/10337) - Add two new flags, first `--legacy-bundling` which installs your - dependencies such that if you bundle those dependencies, npm versions - prior to `1.4` can still install them. This eliminates all automatic - deduping. - - Second, `--global-style` which will install modules in your `node_modules` - folder with the same layout as global modules. Only your direct - dependencies will show in `node_modules` and everything they depend on - will be flattened in their `node_modules` folders. This obviously will - eliminate some deduping. - ([@iarna](https://github.com/iarna)) - -#### TYPOS IN THE LICENSE, OH MY - -* [`8d79c1a`](https://github.com/npm/npm/commit/8d79c1a39dae908f27eaa37ff6b23515d505ef29) - [#10478](https://github.com/npm/npm/issues/10478) Correct two typos in npm's - LICENSE. ([@jorrit](https://github.com/jorrit)) - -### v3.4.1 (2015-11-12): - -#### ASK FOR NOTHING, GET LATEST - -When you run `npm install foo`, you probably expect that you'll get the -`latest` version of `foo`, whatever that is. And good news! That's what -this change makes it do. - -We _think_ this is what everyone wants, but if this causes problems for -you, we want to know! If it proves problematic for people we will consider -reverting it (preferably before this becomes `npm@latest`). - -Previously, when you ran `npm install foo` we would act as if you typed -`npm install foo@*`. Now, like any range-type specifier, in addition to -matching the range, it would also have to be `<=` the value of the -`latest` dist-tag. Further, it would exclude prerelease versions from the -list of versions considered for a match. - -This worked as expected most of the time, unless your `latest` was a -prerelease version, in which case that version wouldn't be used, to -everyone's surprise. Worse, if all your versions were prerelease versions -it would just refuse to install anything. (We fixed that in -[`npm@3.2.2`](https://github.com/npm/npm/releases/tag/v3.2.2) with -[`e4a38080`](https://github.com/npm/npm/commit/e4a38080).) - -* [`1e834c2`](https://github.com/npm/npm/commit/1e834c2) - [#10189](https://github.com/npm/npm/issues/10189) - `npm-package-arg@4.1.0` Change the default version from `*` to `latest`. - ([@zkat](https://github.com/zkat)) - -#### BUGS - -* [`bec4a84`](https://github.com/npm/npm/commit/bec4a84) - [#10338](https://github.com/npm/npm/pull/10338) - Failed installs could result in more rollback (removal of just installed - packages) than we intended. This bug was first introduced by - [`83975520`](https://github.com/npm/npm/commit/83975520). - ([@iarna](https://github.com/iarna)) -* [`06c732f`](https://github.com/npm/npm/commit/06c732f) - [#10338](https://github.com/npm/npm/pull/10338) - Updating a module could result in the module stealing some of its - dependencies from the top level, potentially breaking other modules or - resulting in many redundant installations. This bug was first introduced - by [`971fd47a`](https://github.com/npm/npm/commit/971fd47a). - ([@iarna](https://github.com/iarna)) -* [`5653366`](https://github.com/npm/npm/commit/5653366) - [#9980](https://github.com/npm/npm/issues/9980) - npm, when removing a module, would refuse to remove the symlinked - binaries if the module itself was symlinked as well. npm goes to some - effort to ensure that it doesn't remove things that aren't is, and this - code was being too conservative. This code has been rewritten to be - easier to follow and to be unit-testable. - ([@iarna](https://github.com/iarna)) - -#### LICENSE CLARIFICATION - -* [`80acf20`](https://github.com/npm/npm/commit/80acf20) - [#10326](https://github.com/npm/npm/pull/10326) - Update npm's licensing to more completely cover all of the various - things that are npm. - ([@kemitchell](https://github.com/kemitchell)) - -#### CLOSER TO GREEN TRAVIS - -* [`fc12da9`](https://github.com/npm/npm/commit/fc12da9) - [#10232](https://github.com/npm/npm/pull/10232) - `nock@1.9.0` - Downgrade nock to a version that doesn't depend on streams2 in core so - that more of our tests can pass in 0.8. - ([@iarna](https://github.com/iarna)) - -### v3.4.0 (2015-11-05): - -#### A NEW FEATURE - -This was a group effort, with [@isaacs](https://github.com/isaacs) -dropping the implementation in back in August. Then, a few days ago, -[@ashleygwilliams](https://github.com/ashleygwilliams) wrote up docs and -just today [@othiym23](https://github.com/othiym23) wrote a test. - -It's a handy shortcut to update a dependency and then make sure tests -still pass. - -This new command: - -``` -npm install-test x -``` - -is the equivalent of running: - -``` -npm install x && npm test -``` - -* [`1ac3e08`](https://github.com/npm/npm/commit/1ac3e08) - [`bcb04f6`](https://github.com/npm/npm/commit/bcb04f6) - [`b6c17dd`](https://github.com/npm/npm/commit/b6c17dd) - [#9443](https://github.com/npm/npm/pull/9443) - Add `npm install-test` command, alias `npm it`. - ([@isaacs](https://github.com/isaacs), - [@ashleygwilliams](https://github.com/ashleygwilliams), - [@othiym23](https://github.com/othiym23)) - -#### BUG FIXES VIA DEPENDENCY UPDATES - -* [`31c0080`](https://github.com/npm/npm/commit/31c0080) - [#8640](https://github.com/npm/npm/issues/8640) - [npm/normalize-package-data#69](https://github.com/npm/normalize-package-data/pull/69) - `normalize-package-data@2.3.5`: - Fix a bug where if you didn't specify the name of a scoped module's - binary, it would install it such that it was impossible to call it. - ([@iarna](https://github.com/iarna)) -* [`02b37bc`](https://github.com/npm/npm/commit/02b37bc) - [npm/fstream-npm#14](https://github.com/npm/fstream-npm/pull/14) - `fstream-npm@1.0.7`: - Only filter `config.gypi` when it's in the build directory. - ([@mscdex](https://github.com/mscdex)) -* [`accb9d2`](https://github.com/npm/npm/commit/accb9d2) - [npm/fstream-npm#15](https://github.com/npm/fstream-npm/pull/15) - `fstream-npm@1.0.6`: - Stop including directories that happened to have names matching whitelisted - npm files in npm module tarballs. The most common cause was that if you had - a README directory then everything in it would be included if wanted it - or not. - ([@taion](https://github.com/taion)) - -#### DOCUMENTATION FIXES - -* [`7cf6366`](https://github.com/npm/npm/commit/7cf6366) - [#10036](https://github.com/npm/npm/pull/10036) - Fix typo / over-abbreviation. - ([@ifdattic](https://github.com/ifdattic)) -* [`d0ad8f4`](https://github.com/npm/npm/commit/d0ad8f4) - [#10176](https://github.com/npm/npm/pull/10176) - Fix broken link, scopes => scope. - ([@ashleygwilliams](https://github.com/ashleygwilliams)) -* [`d623783`](https://github.com/npm/npm/commit/d623783) - [#9460](https://github.com/npm/npm/issue/9460) - Specifying the default command run by "npm start" and the - fact that you can pass it arguments. - ([@JuanCaicedo](https://github.com/JuanCaicedo)) - -#### DEPENDENCY UPDATES FOR THEIR OWN SAKE - -* [`0a4c29e`](https://github.com/npm/npm/commit/0a4c29e) - [npm/npmlog#19](https://github.com/npm/npmlog/pull/19) - `npmlog@2.0.0`: Make it possible to emit log messages with `error` as the - prefix. - ([@bengl](https://github.com/bengl)) -* [`9463ce9`](https://github.com/npm/npm/commit/9463ce9) - `read-package-json@2.0.2`: - Minor cleanups. - ([@KenanY](https://github.com/KenanY)) - -### v3.3.12 (2015-11-02): - -Hi, a little hot-fix release for a bug introduced in 3.3.11. The ENOENT fix -last week ([`f0e2088`](https://github.com/npm/npm/commit/f0e2088)) broke -upgrades of modules that have bundled dependencies (like `npm`, augh!) - -* [`aedf7cf`](https://github.com/npm/npm/commit/aedf7cf) - [#10192](//github.com/npm/npm/pull/10192) - If a bundled module is going to be replacing a module that's currently on - disk (for instance, when you upgrade a module that includes bundled - dependencies) we want to select the version from the bundle in preference - over the one that was there previously. - ([@iarna](https://github.com/iarna)) - -### v3.3.11 (2015-10-29): - -This is a dependency update week, so that means no PRs from our lovely -users. Look for those next week. As it happens, the dependencies updated -were just devdeps, so nothing for you all to worry about. - -But the bug fixes, oh geez, I tracked down some really long standing stuff -this week!! The headliner is those intermittent `ENOENT` errors that no one -could reproduce consistently? I think they're nailed! But also pretty -important, the bug where `hapi` would install w/ a dep missing? Squashed! - -#### EEEEEEENOENT - -* [`f0e2088`](https://github.com/npm/npm/commit/f0e2088) - [#10026](https://github.com/npm/npm/issues/10026) - Eliminate some, if not many, of the `ENOENT` errors `npm@3` has seen over - the past few months. This was happening when npm would, in its own mind, - correct a bundled dependency, due to a `package.json` specifying an - incompatible version. Then, when npm extracted the bundled version, what - was on disk didn't match its mind and… well, when it tried to act on what - was in its mind, we got an `ENOENT` because it didn't actually exist on - disk. - ([@iarna](https://github.com/iarna)) - -#### PARTIAL SHRINKWRAPS, NO LONGER A BAD DAY - -* [`712fd9c`](https://github.com/npm/npm/commit/712fd9c) - [#10153](https://github.com/npm/npm/pull/10153) - Imagine that you have a module, let's call it `fun-time`, and it depends - on two dependencies, `need-fun@1` and `need-time`. Further, `need-time` - requires `need-fun@2`. So after install the logical tree will look like - this: - - ``` - fun-time - ├── need-fun@1 - └── need-time - └── need-fun@2 - ``` - - Now, the `fun-time` author also distributes a shrinkwrap, but it only includes - the `need-fun@1` in it. - - Resolving dependencies would look something like this: - - 1. Require `need-fun@1`: Use version from shrinkwrap (ignoring version) - 2. Require `need-time`: User version in package.json - 1. Require `need-fun@2`: Use version from shrinkwrap, which oh hey, is - already installed at the top level, so no further action is needed. - - Which results in this tree: - - ``` - fun-time - ├── need-fun@1 - └── need-time - ``` - - We're ignoring the version check on things specified in the shrinkwrap - so that you can override the version that will be installed. This is - because you may want to use a different version than is specified - by your dependencies' dependencies' `package.json` files. - - To fix this, we now only allow overrides of a dependency version when - that dependency is a child (in the tree) of the thing that requires it. - This means that when we're looking for `need-fun@2` we'll see `need-fun@1` - and reject it because, although it's from a shrinkwrap, it's parent is - `fun-time` and the package doing the requiring is `need-time`. - - ([@iarna](https://github.com/iarna)) - -#### STRING `package.bin` AND NON-NPMJS REGISTRIES - -* [`3de1463`](https://github.com/npm/npm/commit/3de1463) - [#9187](https://github.com/npm/npm/issues/9187) - If you were using a module with the `bin` field in your `package.json` set - to a string on a non-npmjs registry then npm would crash, due to the our - expectation that the `bin` field would be an object. We now pass all - `package.json` data through a routine that normalizes the format, - including the `bin` field. (This is the same routine that your - `package.json` is passed through when read off of disk or sent to the - registry for publication.) Doing this also ensures that older modules on - npm's own registry will be treated exactly the same as new ones. (In the - past we weren't always super careful about scrubbing `package.json` data - on publish. And even when we were, those rules have subtly changed over - time.) - ([@iarna](https://github.com/iarna)) - -### v3.3.10 (2015-10-22): - -Hey you all! Welcome to a busy bug fix and PR week. We've got changes -to how `npm install` replaces dependencies during updates, improvements -to shrinkwrap behavior, and all sorts of doc updates. - -In other news, `npm@3` landed in node master in preparation for `node@5` -with [`41923c0`](https://github.com/nodejs/node/commit/41923c0). - -#### UPDATED DEPS NOW MAKE MORE SENSE - -* [`971fd47`](https://github.com/npm/npm/commit/971fd47) - [#9929](https://github.com/npm/npm/pull/9929) - Make the tree more consistent by doing updates in place. This means - that trees after a dependency version update will more often look - the same as after a fresh install. - ([@iarna](https://github.com/iarna)) - -#### SHRINKWRAP + DEV DEPS NOW RESPECTED - -* [`eb28a8c`](https://github.com/npm/npm/commit/eb28a8c) - [#9647](https://github.com/npm/npm/issues/9647) - If a shrinkwrap already has dev deps, don't throw them away when - someone later runs `npm install --save`. - ([@iarna](https://github.com/iarna)) - -#### FANTASTIC DOCUMENTATION UPDATES - -* [`291162c`](https://github.com/npm/npm/commit/291162c) - [#10021](https://github.com/npm/npm/pull/10021) - Improve wording in the FAQ to be more empathetic and less jokey. - ([@TaMe3971](https://github.com/TaMe3971)) -* [`9a28c54`](https://github.com/npm/npm/commit/9a28c54) - [#10020](https://github.com/npm/npm/pull/10020) - Document the command to see the list of config defaults in the section - on config defaults. - ([@lady3bean](https://github.com/lady3bean)) -* [`8770b0a`](https://github.com/npm/npm/commit/8770b0a) - [#7600](https://github.com/npm/npm/issues/7600) - Add shortcuts to all command documentation. - ([@RichardLitt](https://github.com/RichardLitt)) -* [`e9b7d0d`](https://github.com/npm/npm/commit/e9b7d0d) - [#9950](https://github.com/npm/npm/pull/9950) - On errors that can be caused by outdated node & npm, suggest updating - as a part of the error message. - ([@ForbesLindesay](https://github.com/ForbesLindesay)) - -#### NEW STANDARD HAS ALWAYS BEEN STANDARD - -* [`40c1b0f`](https://github.com/npm/npm/commit/40c1b0f) - [#9954](https://github.com/npm/npm/pull/9954) - Update to `standard@5` and reformat the source to work with it. - ([@cbas](https://github.com/cbas)) - -### v3.3.9 (2015-10-15): - -This week sees a few small changes ready to land: - -#### TRAVIS NODE 0.8 BUILDS REJOICE - -* [`25a234b`](https://github.com/npm/npm/commit/25a234b) - [#9668](https://github.com/npm/npm/issues/9668) - Install `npm@3`'s bundled dependencies with `npm@2`, so that the ancient npm - that ships with node 0.8 can install `npm@3` directly. - ([@othiym23](https://github.com/othiym23)) - -#### SMALL ERROR MESSAGE IMPROVEMENT - -* [`a332f61`](https://github.com/npm/npm/commit/a332f61) - [#9927](https://github.com/npm/npm/pull/9927) - Update error messages where we report a list of versions that you could - have installed to show this as a comma separated list instead of as JSON. - ([@iarna](https://github.com/iarna)) - -#### DEPENDENCY UPDATES - -* [`4cd74b0`](https://github.com/npm/npm/commit/4cd74b0) - `nock@2.15.0` - ([@pgte](https://github.com/pgte)) -* [`9360976`](https://github.com/npm/npm/commit/9360976) - `tap@2.1.1` - ([@isaacs](https://github.com/isaacs)) -* [`1ead0a4`](https://github.com/npm/npm/commit/1ead0a4) - `which@1.2.0` - ([@isaacs](https://github.com/isaacs)) -* [`759f88a`](https://github.com/npm/npm/commit/759f88a) - `has-unicode@1.0.1` - ([@iarna](https://github.com/iarna)) - -### v3.3.8 (2015-10-12): - -This is a small update release, we're reverting -[`22a3af0`](https://github.com/npm/npm/commit/22a3af0) from last week's -release, as it is resulting in crashes. We'll revisit this PR during this -week. - -* [`ddde1d5`](https://github.com/npm/npm/commit/ddde1d5) - Revert "lifecycle: Swap out custom logic with add-to-path module" - ([@iarna](https://github.com/iarna)) - -### v3.3.7 (2015-10-08): - -So, as Kat mentioned in last week's 2.x release, we're now swapping weeks -between accepting PRs and doing dependency updates, in an effort to keep -release management work from taking over our lives. This week is a PR week, -so we've got a bunch of goodies for you. - -Relatedly, this week means 3.3.6 is now `latest` and it is WAY faster than -previous 3.x releases. Give it or this a look! - -#### OPTIONAL DEPS, MORE OPTIONAL - -* [`2289234`](https://github.com/npm/npm/commit/2289234) - [#9643](https://github.com/npm/npm/issues/9643) - [#9664](https://github.com/npm/npm/issues/9664) - `npm@3` was triggering `npm@2`'s build mechanics when it was linking bin files - into the tree. This was originally intended to trigger rebuilds of - bundled modules, but `npm@3`'s flat module structure confused it. This - caused two seemingly unrelated issues. First, failing optional - dependencies could under some circumstances (if they were built during - this phase) trigger a full build failure. And second, rebuilds were being - triggered of already installed modules, again, in some circumstances. - Both of these are fixed by disabling the `npm@2` mechanics and adding a - special rebuild phase for the initial installation of bundled modules. - ([@iarna](https://github.com/iarna)) - -#### BAD NAME, NO CRASH - -* [`b78fec9`](https://github.com/npm/npm/commit/b78fec9) - [#9766](https://github.com/npm/npm/issues/9766) - Refactor all attempts to read the module name or package name to go via a - single function, with appropriate guards unusual circumstances where they - aren't where we expect them. This ultimately will ensure we don't see any - more recurrences of the `localeCompare` error and related crashers. - ([@iarna](https://github.com/iarna)) - -#### MISCELLANEOUS BUG FIXES - -* [`22a3af0`](https://github.com/npm/npm/commit/22a3af0) - [#9553](https://github.com/npm/npm/pull/9553) - Factor the lifecycle code to manage paths out into its own module and use that. - ([@kentcdodds](https://github.com/kentcdodds)) -* [`6a29fe3`](https://github.com/npm/npm/commit/6a29fe3) - [#9677](https://github.com/npm/npm/pull/9677) - Start testing our stuff in node 4 on travis - ([@fscherwi](https://github.com/fscherwi)) -* [`508c6a4`](https://github.com/npm/npm/commit/508c6a4) - [#9669](https://github.com/npm/npm/issues/9669) - Make `recalculateMetadata` more resilient to unexpectedly bogus dependency specifiers. - ([@tmct](https://github.com/tmct)) -* [`3c44763`](https://github.com/npm/npm/commit/3c44763) - [#9643](https://github.com/npm/npm/issues/9463) - Update `install --only` to ignore the `NODE_ENV` var and _just_ use the only - value, if specified. - ([@watilde](https://github.com/watilde)) -* [`87336c3`](https://github.com/npm/npm/commit/87336c3) - [#9879](https://github.com/npm/npm/pull/9879) - `npm@3`'s shrinkwrap was refusing to shrinkwrap if an optional dependency - was missing– patch it to allow this. - ([@mantoni](https://github.com/mantoni)) - -#### DOCUMENTATION UPDATES - -* [`82659fd`](https://github.com/npm/npm/commit/82659fd) - [#9208](https://github.com/npm/npm/issues/9208) - Correct the npm style guide around quote usage - ([@aaroncrows](https://github.com/aaroncrows)) -* [`a69c83a`](https://github.com/npm/npm/commit/a69c83a) - [#9645](https://github.com/npm/npm/pull/9645) - Fix spelling error in README - ([@dkoleary88](https://github.com/dkoleary88)) -* [`f2cf054`](https://github.com/npm/npm/commit/f2cf054) - [#9714](https://github.com/npm/npm/pull/9714) - Fix typos in our documentation - ([@reggi](https://github.com/reggi)) -* [`7224bef`](https://github.com/npm/npm/commit/7224bef) - [#9759](https://github.com/npm/npm/pull/9759) - Fix typo in npm-team docs - ([@zkat](https://github.com/zkat)) -* [`7e6e007`](https://github.com/npm/npm/commit/7e6e007) - [#9820](https://github.com/npm/npm/pull/9820) - Correct documentation as to `binding.gyp` - ([@KenanY](https://github.com/KenanY)) - -### v3.3.6 (2015-09-30): - -I have the most exciting news for you this week. YOU HAVE NO IDEA. Well, -ok, maybe you do if you follow my twitter. - -Performance just got 5 bazillion times better (under some circumstances, -ymmv, etc). So– my test scenario is our very own website. In `npm@2`, on my -macbook running `npm ls` takes about 5 seconds. Personally it's more than -I'd like, but it's entire workable. In `npm@3` it has been taking _50_ seconds, -which is appalling. But after doing some work on Monday isolating the performance -issues I've been able to reduce `npm@3`'s run time back down to 5 seconds. - -Other scenarios were even worse, there was one that until now in `npm@3` that -took almost 6 minutes, and has been reduced to 14 seconds. - -* [`7bc0d4c`](https://github.com/npm/npm/commit/7bc0d4c) - [`cf42217`](https://github.com/npm/npm/commit/cf42217) - [#8826](https://github.com/npm/npm/issues/8826) - Stop using deepclone on super big datastructures. Avoid cloning - all-together even when that means mutating things, when possible. - Otherwise use a custom written tree-copying function that understands - the underlying datastructure well enough to only copy what we absolutely - need to. - ([@iarna](https://github.com/iarna)) - -In other news, look for us this Friday and Saturday at the amazing -[Open Source and Feelings](https://osfeels.com) conference, where something like a -third of the company will be attending. - -#### And finally a dependency update - -* [`a6a4437`](https://github.com/npm/npm/commit/a6a4437) - `glob@5.0.15` - ([@isaacs](https://github.com/isaacs)) - -#### And some subdep updates - -* [`cc5e6a0`](https://github.com/npm/npm/commit/cc5e6a0) - `hoek@2.16.3` - ([@nlf](https://github.com/nlf)) -* [`912a516`](https://github.com/npm/npm/commit/912a516) - `boom@2.9.0` - ([@arb](https://github.com/arb)) -* [`63944e9`](https://github.com/npm/npm/commit/63944e9) - `bluebird@2.10.1` - ([@petkaantonov](https://github.com/petkaantonov)) -* [`ef16003`](https://github.com/npm/npm/commit/ef16003) - `mime-types@2.1.7` & `mime-db@1.19.0` - ([@dougwilson](https://github.com/dougwilson)) -* [`2b8c0dd`](https://github.com/npm/npm/commit/2b8c0dd) - `request@2.64.0` - ([@simov](https://github.com/simov)) -* [`8139124`](https://github.com/npm/npm/commit/8139124) - `brace-expansion@1.1.1` - ([@juliangruber](https://github.com/juliangruber)) - -### v3.3.5 (2015-09-24): - -Some of you all may not be aware, but npm is ALSO a company. I tell you this -'cause npm-the-company had an all-staff get together this week, flying in -our remote folks from around the world. That was great, but it also -basically eliminated normal work on Monday and Tuesday. - -Still, we've got a couple of really important bug fixes this week. Plus a -lil bit from the [now LTS 2.x branch](https://github.com/npm/npm/releases/tag/v2.14.6). - -#### ATTENTION WINDOWS USERS - -If you previously updated to npm 3 and you try to update again, you may get -an error messaging telling you that npm won't install npm into itself. Until you -are at 3.3.5 or greater, you can get around this with `npm install -f -g npm`. - -* [`bef06f5`](https://github.com/npm/npm/commit/bef06f5) - [#9741](https://github.com/npm/npm/pull/9741) Uh... so... er... it - seems that since `npm@3.2.0` on Windows with a default configuration, it's - been impossible to update npm. Well, that's not actually true, there's a - work around (see above), but it shouldn't be complaining in the first - place. - ([@iarna](https://github.com/iarna)) - -#### STACK OVERFLOWS ON PUBLISH - -* [`330b496`](https://github.com/npm/npm/commit/330b496) - [#9667](https://github.com/npm/npm/pull/9667) - We were keeping track of metadata about your project while packing the - tree in a way that resulted in this data being written to packed tar files - headers. When this metadata included cycles, it resulted in the the tar - file entering an infinite recursive loop and eventually crashing with a - stack overflow. - - I've patched this by keeping track of your metadata by closing over the - variables in question instead, and I've further restricted gathering and - tracking the metadata to times when it's actually needed. (Which is only - if you need bundled modules.) - ([@iarna](https://github.com/iarna)) - -#### LESS CRASHY ERROR MESSAGES ON BAD PACKAGES - -* [`829921f`](https://github.com/npm/npm/commit/829921f) - [#9741](https://github.com/npm/npm/pull/9741) - Packages with invalid names or versions were crashing the installer. These - are now captured and warned as was originally intended. - ([@iarna](https://github.com/iarna)) - -#### ONE DEPENDENCY UPDATE - -* [`963295c`](https://github.com/npm/npm/commit/963295c) - `npm-install-checks@2.0.1` - ([@iarna](https://github.com/iarna)) - -#### AND ONE SUBDEPENDENCY - -* [`448737d`](https://github.com/npm/npm/commit/448737d) - `request@2.63.0` - ([@simov](https://github.com/simov)) - -### v3.3.4 (2015-09-17): - -This is a relatively quiet release, bringing a few bug fixes and -some module updates, plus via the -[2.14.5 release](https://github.com/npm/npm/releases/tag/v2.14.5) -some forward compatibility fixes with versions of Node that -aren't yet released. - -#### NO BETA NOTICE THIS TIME!! - -But, EXCITING NEWS FRIENDS, this week marks the exit of `npm@3` -from beta. This means that the week of this release, -[v3.3.3](https://github.com/npm/npm/releases/tag/v3.3.3) will -become `latest` and this version (v3.3.4) will become `next`!! - -#### CRUFT FOR THE CRUFT GODS - -What I call "cruft", by which I mean, files sitting around in -your `node_modules` folder, will no longer produce warnings in -`npm ls` nor during `npm install`. This brings `npm@3`'s behavior -in line with `npm@2`. - -* [`a127801`](https://github.com/npm/npm/commit/a127801) - [#9285](https://github.com/npm/npm/pull/9586) - Stop warning about cruft in module directories. - ([@iarna](https://github.com/iarna)) - -#### BETTER ERROR MESSAGE - -* [`95ee92c`](https://github.com/npm/npm/commit/95ee92c) - [#9433](https://github.com/npm/npm/issues/9433) - Give better error messages for invalid URLs in the dependency - list. - ([@jamietre](https://github.com/jamietre)) - -#### MODULE UPDATES - -* [`ebb92ca`](https://github.com/npm/npm/commit/ebb92ca) - `retry@0.8.0` ([@tim-kos](https://github.com/tim-kos)) -* [`55f1285`](https://github.com/npm/npm/commit/55f1285) - `normalize-package-data@2.3.4` ([@zkat](https://github.com/zkat)) -* [`6d4ebff`](https://github.com/npm/npm/commit/6d4ebff) - `sha@2.0.1` ([@ForbesLindesay](https://github.com/ForbesLindesay)) -* [`09a9c7a`](https://github.com/npm/npm/commit/09a9c7a) - `semver@5.0.3` ([@isaacs](https://github.com/isaacs)) -* [`745000f`](https://github.com/npm/npm/commit/745000f) - `node-gyp@3.0.3` ([@rvagg](https://github.com/rvagg)) - -#### SUB DEP MODULE UPDATES - -* [`578ca25`](https://github.com/npm/npm/commit/578ca25) - `request@2.62.0` ([@simov](https://github.com/simov)) -* [`1d8996e`](https://github.com/npm/npm/commit/1d8996e) - `jju@1.2.1` ([@rlidwka](https://github.com/rlidwka)) -* [`6da1ba4`](https://github.com/npm/npm/commit/6da1ba4) - `hoek@2.16.2` ([@nlf](https://github.com/nlf)) - -### v3.3.3 (2015-09-10): - -This short week brought us brings us a few small bug fixes, a -doc change and a whole lotta dependency updates. - -Plus, as usual, this includes a forward port of everything in -[`npm@2.14.4`](https://github.com/npm/npm/releases/tag/v2.14.4). - -#### BETA BUT NOT FOREVER - -**_THIS IS BETA SOFTWARE_**. `npm@3` will remain in beta until -we're confident that it's stable and have assessed the effect of -the breaking changes on the community. During that time we will -still be doing `npm@2` releases, with `npm@2` tagged as `latest` -and `next`. We'll _also_ be publishing new releases of `npm@3` -as `npm@v3.x-next` and `npm@v3.x-latest` alongside those -versions until we're ready to switch everyone over to `npm@3`. -We need your help to find and fix its remaining bugs. It's a -significant rewrite, so we are _sure_ there still significant -bugs remaining. So do us a solid and deploy it in non-critical -CI environments and for day-to-day use, but maybe don't use it -for production maintenance or frontline continuous deployment -just yet. - -#### REMOVE INSTALLED BINARIES ON WINDOWS - -So waaaay back at the start of August, I fixed a bug with -[#9198](https://github.com/npm/npm/pull/9198). That fix made it -so that if you had two modules installed that both installed the -same binary (eg `gulp` & `gulp-cli`), that removing one wouldn't -remove the binary if it was owned by the other. - -It did this by doing some hocus-pocus that, turns out, was -Unix-specific, so on Windows it just threw up its hands and -stopped removing installed binaries at all. Not great. - -So today we're fixing that– it let us maintain the same safety -that we added in #9198, but ALSO works with Windows. - -* [`25fbaed`](https://github.com/npm/npm/commit/25fbaed) - [#9394](https://github.com/npm/npm/issues/9394) - Treat cmd-shims the same way we treat symlinks - ([@iarna](https://github.com/iarna)) - -#### API DOCUMENTATION HAS BEEN SACRIFICED THE API GOD - -The documentation of the internal APIs of npm is going away, -because it would lead people into thinking they should integrate -with npm by using it. Please don't do that! In the future, we'd -like to give you a suite of stand alone modules that provide -better, more stand alone APIs for your applications to build on. -But for now, call the npm binary with `process.exec` or -`process.spawn` instead. - -* [`2fb60bf`](https://github.com/npm/npm/commit/2fb60bf) - Remove misleading API documentation - ([@othiym23](https://github.com/othiym23)) - -#### ALLOW `npm link` ON WINDOWS W/ PRERELEASE VERSIONS OF NODE - -We never meant to have this be a restriction in the first place -and it was only just discovered with the recent node 4.0.0 -release candidate. - -* [`6665e54`](https://github.com/npm/npm/commit/6665e54) - [#9505](https://github.com/npm/npm/pull/9505) - Allow npm link to run on Windows with prerelease versions of - node - ([@jon-hall](https://github.com/jon-hall)) - -#### graceful-fs update - -We're updating all of npm's deps to use the most recent -`graceful-fs`. This turns out to be important for future not yet -released versions of node, because older versions monkey-patch -`fs` in ways that will break in the future. Plus it ALSO makes -use of `process.binding` which is an internal API that npm -definitely shouldn't have been using. We're not done yet, but -this is the bulk of them. - -* [`e7bc98e`](https://github.com/npm/npm/commit/e7bc98e) - `write-file-atomic@1.1.3` - ([@iarna](https://github.com/iarna)) -* [`7417600`](https://github.com/npm/npm/commit/7417600) - `tar@2.2.1` - ([@zkat](https://github.com/zkat)) -* [`e4e9d40`](https://github.com/npm/npm/commit/e4e9d40) - `read-package-json@2.0.1` - ([@zkat](https://github.com/zkat)) -* [`481611d`](https://github.com/npm/npm/commit/481611d) - `read-installed@4.0.3` - ([@zkat](https://github.com/zkat)) -* [`0dabbda`](https://github.com/npm/npm/commit/0dabbda) - `npm-registry-client@7.0.4` - ([@zkat](https://github.com/zkat)) -* [`c075a91`](https://github.com/npm/npm/commit/c075a91) - `fstream@1.0.8` - ([@zkat](https://github.com/zkat)) -* [`2e4341a`](https://github.com/npm/npm/commit/2e4341a) - `fs-write-stream-atomic@1.0.4` - ([@zkat](https://github.com/zkat)) -* [`18ad16e`](https://github.com/npm/npm/commit/18ad16e) - `fs-vacuum@1.2.7` - ([@zkat](https://github.com/zkat)) - -#### DEPENDENCY UPDATES - -* [`9d6666b`](https://github.com/npm/npm/commit/9d6666b) - `node-gyp@3.0.1` - ([@rvagg](https://github.com/rvagg)) -* [`349c4df`](https://github.com/npm/npm/commit/349c4df) - `retry@0.7.0` - ([@tim-kos](https://github.com/tim-kos)) -* [`f507551`](https://github.com/npm/npm/commit/f507551) - `which@1.1.2` - ([@isaacs](https://github.com/isaacs)) -* [`e5b6743`](https://github.com/npm/npm/commit/e5b6743) - `nopt@3.0.4` - ([@zkat](https://github.com/zkat)) - -#### THE DEPENDENCIES OF OUR DEPENDENCIES ARE OUR DEPENDENCIES UPDATES - -* [`316382d`](https://github.com/npm/npm/commit/316382d) - `mime-types@2.1.6` & `mime-db@1.18.0` -* [`64b741e`](https://github.com/npm/npm/commit/64b741e) - `spdx-correct@1.0.1` -* [`fff62ac`](https://github.com/npm/npm/commit/fff62ac) - `process-nextick-args@1.0.3` -* [`9d6488c`](https://github.com/npm/npm/commit/9d6488c) - `cryptiles@2.0.5` -* [`1912012`](https://github.com/npm/npm/commit/1912012) - `bluebird@2.10.0` -* [`4d09402`](https://github.com/npm/npm/commit/4d09402) - `readdir-scoped-modules@1.0.2` - -### v3.3.2 (2015-09-04): - -#### PLEASE HOLD FOR THE NEXT AVAILABLE MAINTAINER - -This is a tiny little maintenance release, both to update dependencies and to -keep `npm@3` up to date with changes made to `npm@2`. -[@othiym23](https://github.com/othiym23) is putting out this release (again) as -his esteemed colleague [@iarna](https://github.com/iarna) finishes relocating -herself, her family, and her sizable anime collection all the way across North -America. It contains [all the goodies in -`npm@2.14.3`](https://github.com/npm/npm/releases/tag/v2.14.3) and one other -dependency update. - -#### BETA WARNINGS FOR FUN AND PROFIT - -**_THIS IS BETA SOFTWARE_**. `npm@3` will remain in beta until we're -confident that it's stable and have assessed the effect of the breaking -changes on the community. During that time we will still be doing `npm@2` -releases, with `npm@2` tagged as `latest` and `next`. We'll _also_ be -publishing new releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` -alongside those versions until we're ready to switch everyone over to -`npm@3`. We need your help to find and fix its remaining bugs. It's a -significant rewrite, so we are _sure_ there still significant bugs -remaining. So do us a solid and deploy it in non-critical CI environments -and for day-to-day use, but maybe don't use it for production maintenance or -frontline continuous deployment just yet. - -That said, it's getting there! It will be leaving beta very soon! - -#### ONE OTHER DEPENDENCY UPDATE - -* [`bb5de34`](https://github.com/npm/npm/commit/bb5de3493531228df0bd3f0742d5493c826be6dd) - `is-my-json-valid@2.12.2`: Upgrade to a new, modernized version of - `json-pointer`. ([@mafintosh](https://github.com/mafintosh)) - -### v3.3.1 (2015-08-27): - -Hi all, this `npm@3` update brings you another round of bug fixes. The -headliner here is that `npm update` works again. We're running down the -clock on blocker 3.x issues! Shortly after that hits zero we'll be -promoting 3.x to latest!! - -And of course, we have changes that were brought forward from 2.x. Check out -the release notes for -[2.14.1](https://github.com/npm/npm/releases/tag/v2.14.1) and -[2.14.2](https://github.com/npm/npm/releases/tag/v2.14.2). - -#### BETA WARNINGS FOR FUN AND PROFIT - -**_THIS IS BETA SOFTWARE_**. `npm@3` will remain in beta until we're -confident that it's stable and have assessed the effect of the breaking -changes on the community. During that time we will still be doing `npm@2` -releases, with `npm@2` tagged as `latest` and `next`. We'll _also_ be -publishing new releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` -alongside those versions until we're ready to switch everyone over to -`npm@3`. We need your help to find and fix its remaining bugs. It's a -significant rewrite, so we are _sure_ there still significant bugs -remaining. So do us a solid and deploy it in non-critical CI environments -and for day-to-day use, but maybe don't use it for production maintenance or -frontline continuous deployment just yet. - -#### NPM UPDATE, NOW AGAIN YOUR FRIEND - -* [`f130a00`](https://github.com/npm/npm/commit/f130a00) - [#9095](https://github.com/npm/npm/issues/9095) - `npm update` once again works! Previously, after selecting packages - to update, it would then pick the wrong location to run the install - from. ([@iarna](https://github.com/iarna)) - -#### MORE VERBOSING FOR YOUR VERBOSE LIFECYCLES - -* [`d088b7d`](https://github.com/npm/npm/commit/d088b7d) - [#9227](https://github.com/npm/npm/pull/9227) - Add some additional logging at the verbose and silly levels - when running lifecycle scripts. Hopefully this will make - debugging issues with them a bit easier! - ([@saper](https://github.com/saper)) - -#### AND SOME OTHER BUG FIXES… - -* [`f4a5784`](https://github.com/npm/npm/commit/f4a5784) - [#9308](https://github.com/npm/npm/issues/9308) - Make fetching metadata for local modules faster! This ALSO means - that doing things like running `npm repo` won't build your - module and maybe run `prepublish`. - ([@iarna](https://github.com/iarna)) - -* [`4468c92`](https://github.com/npm/npm/commit/4468c92) - [#9205](https://github.com/npm/npm/issues/9205) - Fix a bug where local modules would sometimes not resolve relative - links using the correct base path. - ([@iarna](https://github.com/iarna)) - -* [`d395a6b`](https://github.com/npm/npm/commit/d395a6b) - [#8995](https://github.com/npm/npm/issues/8995) - Certain combinations of packages could result in different install orders for their - initial installation than for reinstalls run on the same folder. - ([@iarna](https://github.com/iarna)) - -* [`d119ea6`](https://github.com/npm/npm/commit/d119ea6) - [#9113](https://github.com/npm/npm/issues/9113) - Make extraneous packages _always_ up in `npm ls`. Previously, if an - extraneous package had a dependency that depended back on the original - package this would result in the package not showing up in `ls`. - ([@iarna](https://github.com/iarna)) - -* [`02420dc`](https://github.com/npm/npm/commit/02420dc) - [#9113](https://github.com/npm/npm/issues/9113) - Stop warning about missing top level package.json files. Errors in said - files will still be reported. - ([@iarna](https://github.com/iarna)) - -#### SOME DEP UPDATES - -* [`1ed1364`](https://github.com/npm/npm/commit/1ed1364) `rimraf@2.4.3` - ([@isaacs](https://github.com/isaacs)) Added EPERM to delay/retry loop -* [`e7b8315`](https://github.com/npm/npm/commit/e7b8315) `read@1.0.7` - Smaller distribution package, better metadata - ([@isaacs](https://github.com/isaacs)) - -#### SOME DEPS OF DEPS UPDATES - -* [`b273bcc`](https://github.com/npm/npm/commit/b273bcc) `mime-types@2.1.5` -* [`df6e225`](https://github.com/npm/npm/commit/df6e225) `mime-db@1.17.0` -* [`785f2ad`](https://github.com/npm/npm/commit/785f2ad) `is-my-json-valid@2.12.1` -* [`88170dd`](https://github.com/npm/npm/commit/88170dd) `form-data@1.0.0-rc3` -* [`af5357b`](https://github.com/npm/npm/commit/af5357b) `request@2.61.0` -* [`337f96a`](https://github.com/npm/npm/commit/337f96a) `chalk@1.1.1` -* [`3dfd74d`](https://github.com/npm/npm/commit/3dfd74d) `async@1.4.2` - -### v3.3.0 (2015-08-13): - -This is a pretty EXCITING week. But I may be a little excitable– or -possibly sleep deprived, it's sometimes hard to tell them apart. =D So -[Kat](https://github.com/zkat) really went the extra mile this week and got -the client side support for teams and orgs out in this week's 2.x release. -You can't use that just yet, 'cause we have to turn on some server side -stuff too, but this way it'll be there for you all the moment we do! Check -out the details over in the [2.14.0 release -notes](https://github.com/npm/npm/releases/tag/v2.14.0)! - -But we over here in 3.x ALSO got a new feature this week, check out the new -`--only` and `--also` flags for better control over when dev and production -dependencies are used by various npm commands. - -That, and some important bug fixes round out this week. Enjoy everyone! - -#### NEVER SHALL NOT BETA THE BETA - -**_THIS IS BETA SOFTWARE_**. EXCITING NEW BETA WARNING!!! Ok, I fibbed, -EXACTLY THE SAME BETA WARNINGS: `npm@3` will remain in beta until we're -confident that it's stable and have assessed the effect of the breaking -changes on the community. During that time we will still be doing `npm@2` -releases, with `npm@2` tagged as `latest` and `next`. We'll _also_ be -publishing new releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` -alongside those versions until we're ready to switch everyone over to -`npm@3`. We need your help to find and fix its remaining bugs. It's a -significant rewrite, so we are _sure_ there still significant bugs -remaining. So do us a solid and deploy it in non-critical CI environments -and for day-to-day use, but maybe don't use it for production maintenance or -frontline continuous deployment just yet. - -#### ONLY ALSO DEV - -Hey we've got a SUPER cool new feature for you all, thanks to the fantastic -work of [@davglass](https://github.com/davglass) and -[@bengl](https://github.com/bengl) we have `--only=prod`, -`--only=dev`, `--also=prod` and `--also=dev` options. These apply in -various ways to: `npm install`, `npm ls`, `npm outdated` and `npm update`. - -So for instance: - -``` -npm install --only=dev -``` - -Only installs dev dependencies. By contrast: - -``` -npm install --only=prod -``` - -Will only install prod dependencies and is very similar to `--production` -but differs in that it doesn't set the environment variables that -`--production` does. - -The related new flag, `--also` is most useful with things like: - -``` -npm shrinkwrap --also=dev -``` - -As shrinkwraps don't include dev deps by default. This replaces passing in -`--dev` in that scenario. - -And that leads into the fact that this deprecates `--dev` as its semantics -across commands were inconsistent and confusing. - -* [`3ab1eea`](https://github.com/npm/npm/commit/3ab1eea) - [#9024](https://github.com/npm/npm/pull/9024) - Add support for `--only`, `--also` and deprecate `--dev` - ([@bengl](https://github.com/bengl)) - -#### DON'T TOUCH! THAT'S NOT YOUR BIN - -* [`b31812e`](https://github.com/npm/npm/commit/b31812e) - [#8996](https://github.com/npm/npm/pull/8996) - When removing a module that has bin files, if one that we're going to - remove is a symlink to a DIFFERENT module, leave it alone. This only happens - when you have two modules that try to provide the same bin. - ([@iarna](https://github.com/iarna)) - -#### THERE'S AN END IN SIGHT - -* [`d2178a9`](https://github.com/npm/npm/commit/d2178a9) - [#9223](https://github.com/npm/npm/pull/9223) - Close a bunch of infinite loops that could show up with symlink cycles in your dependencies. - ([@iarna](https://github.com/iarna)) - -#### OOPS DIDN'T MEAN TO FIX THAT - -Well, not _just_ yet. This was scheduled for next week, but it snuck into -2.x this week. - -* [`139dd92`](https://github.com/npm/npm/commit/139dd92) - [#8716](https://github.com/npm/npm/pull/8716) - `npm init` will now only pick up the modules you install, not everything - else that got flattened with them. - ([@iarna](https://github.com/iarna)) - -### v3.2.2 (2015-08-08): - -Lot's of lovely bug fixes for `npm@3`. I'm also suuuuper excited that I -think we have a handle on stack explosions that effect a small portion of -our users. We also have some tantalizing clues as to where some low hanging -fruit may be for performance issues. - -And of course, in addition to the `npm@3` specific bug fixes, there are some -great one's coming in from `npm@2`! [@othiym23](https://github.com/othiym23) -put together that release this week– check out its -[release notes](https://github.com/npm/npm/releases/tag/v2.13.4) for the deets. - -#### AS ALWAYS STILL BETA - -**_THIS IS BETA SOFTWARE_**. Just like the airline safety announcements, -we're not taking this plane off till we finish telling you: `npm@3` will -remain in beta until we're confident that it's stable and have assessed the -effect of the breaking changes on the community. During that time we will -still be doing `npm@2` releases, with `npm@2` tagged as `latest` and `next`. -We'll _also_ be publishing new releases of `npm@3` as `npm@v3.x-next` and -`npm@v3.x-latest` alongside those versions until we're ready to switch -everyone over to `npm@3`. We need your help to find and fix its remaining -bugs. It's a significant rewrite, so we are _sure_ there still significant -bugs remaining. So do us a solid and deploy it in non-critical CI -environments and for day-to-day use, but maybe don't use it for production -maintenance or frontline continuous deployment just yet. - -#### BUG FIXES - -* [`a8c8a13`](https://github.com/npm/npm/commit/a8c8a13) - [#9050](https://github.com/npm/npm/issues/9050) - Resolve peer deps relative to the parent of the requirer - ([@iarna](http://github.com/iarna)) -* [`05f0226`](https://github.com/npm/npm/commit/05f0226) - [#9077](https://github.com/npm/npm/issues/9077) - Fix crash when saving `git+ssh` urls - ([@iarna](http://github.com/iarna)) -* [`e4a3808`](https://github.com/npm/npm/commit/e4a3808) - [#8951](https://github.com/npm/npm/issues/8951) - Extend our patch to allow `*` to match something when a package only has - prerelease versions to everything and not just the cache. - ([@iarna](http://github.com/iarna)) -* [`d135abf`](https://github.com/npm/npm/commit/d135abf) - [#8871](https://github.com/npm/npm/issues/8871) - Don't warn about a missing `package.json` or missing fields in the global - install directory. - ([@iarna](http://github.com/iarna)) - -#### DEP VERSION BUMPS - -* [`990ee4f`](https://github.com/npm/npm/commit/990ee4f) - `path-is-inside@1.0.1` ([@domenic](https://github.com/domenic)) -* [`1f71ec0`](https://github.com/npm/npm/commit/1f71ec0) - `lodash.clonedeep@3.0.2` ([@jdalton](https://github.com/jdalton)) -* [`a091354`](https://github.com/npm/npm/commit/a091354) - `marked@0.3.5` ([@chjj](https://github.com/chjj)) -* [`fc51f28`](https://github.com/npm/npm/commit/fc51f28) - `tap@1.3.2` ([@isaacs](https://github.com/isaacs)) -* [`3569ec0`](https://github.com/npm/npm/commit/3569ec0) - `nock@2.10.0` ([@pgte](https://github.com/pgte)) -* [`ad5f6fd`](https://github.com/npm/npm/commit/ad5f6fd) - `npm-registry-mock@1.0.1` ([@isaacs](https://github.com/isaacs)) - -### v3.2.1 (2015-07-31): - -#### AN EXTRA QUIET RELEASE - -A bunch of stuff got deferred for various reasons, which just means more -branches to land next week! - -Don't forget to check out [Kat's 2.x release](https://github.com/npm/npm/releases/tag/v2.13.4) for other quiet goodies. - -#### AS ALWAYS STILL BETA - -**_THIS IS BETA SOFTWARE_**. Yes, we're still reminding you of this. No, -you can't be excused. `npm@3` will remain in beta until we're confident -that it's stable and have assessed the effect of the breaking changes on the -community. During that time we will still be doing `npm@2` releases, with -`npm@2` tagged as `latest` and `next`. We'll _also_ be publishing new -releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` alongside those -versions until we're ready to switch everyone over to `npm@3`. We need your -help to find and fix its remaining bugs. It's a significant rewrite, so we -are _sure_ there still significant bugs remaining. So do us a solid and -deploy it in non-critical CI environments and for day-to-day use, but maybe -don't use it for production maintenance or frontline continuous deployment -just yet. - - -#### MAKING OUR TESTS TEST THE THING THEY TEST - -* [`6e53c3d`](https://github.com/npm/npm/commit/6e53c3d) - [#8985](https://github.com/npm/npm/pull/8985) - Many thanks to @bengl for noticing that one of our tests wasn't testing - what it claimed it was testing! ([@bengl](https://github.com/bengl)) - -#### MY PACKAGE.JSON WAS ALREADY IN THE RIGHT ORDER - -* [`eb2c7aa`](https://github.com/npm/npm/commit/d00d0f) - [#9068](https://github.com/npm/npm/pull/9079) - Stop sorting keys in the `package.json` that we haven't edited. Many - thanks to [@Qix-](https://github.com/Qix-) for bringing this up and - providing a first pass at a patch for this. - ([@iarna](https://github.com/iarna)) - -#### DEV DEP UPDATE - -* [`555f60c`](https://github.com/npm/npm/commit/555f60c) `marked@0.3.4` - -### v3.2.0 (2015-07-24): - -#### MORE CONFIG, BETTER WINDOWS AND A BUG FIX - -This is a smallish release with a new config option and some bug fixes. And -lots of module updates. - -#### BETA BETAS ON - -**_THIS IS BETA SOFTWARE_**. Yes, we're still reminding you of this. No, -you can't be excused. `npm@3` will remain in beta until we're confident -that it's stable and have assessed the effect of the breaking changes on the -community. During that time we will still be doing `npm@2` releases, with -`npm@2` tagged as `latest` and `next`. We'll _also_ be publishing new -releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` alongside those -versions until we're ready to switch everyone over to `npm@3`. We need your -help to find and fix its remaining bugs. It's a significant rewrite, so we -are _sure_ there still significant bugs remaining. So do us a solid and -deploy it in non-critical CI environments and for day-to-day use, but maybe -don't use it for production maintenance or frontline continuous deployment -just yet. - - -#### NEW CONFIGS, LESS PROGRESS - -* [`423d8f7`](https://github.com/npm/npm/commit/423d8f7) - [#8704](https://github.com/npm/npm/issues/8704) - Add the ability to disable the new progress bar with `--no-progress` - ([@iarna](https://github.com/iarna)) - -#### AND BUG FIXES - -* [`b3ee452`](https://github.com/npm/npm/commit/b3ee452) - [#9038](https://github.com/npm/npm/pull/9038) - We previously disabled the use of the new `fs.access` API on Windows, but - the bug we were seeing is fixed in `io.js@1.5.0` so we now use `fs.access` - if you're using that version or greater. - ([@iarna](https://github.com/iarna)) - -* [`b181fa3`](https://github.com/npm/npm/commit/b181fa3) - [#8921](https://github.com/npm/npm/issues/8921) - [#8637](https://github.com/npm/npm/issues/8637) - Rejigger how we validate modules for install. This allow is to fix - a problem where arch/os checking wasn't being done at all. - It also made it easy to add back in a check that declines to - install a module in itself unless you force it. - ([@iarna](https://github.com/iarna)) - -#### AND A WHOLE BUNCH OF SUBDEP VERSIONS - -These are all development dependencies and semver-compatible subdep -upgrades, so they should not have visible impact on users. - -* [`6b3f6d9`](https://github.com/npm/npm/commit/6b3f6d9) `standard@4.3.3` -* [`f4e22e5`](https://github.com/npm/npm/commit/f4e22e5) `readable-stream@2.0.2` (inside concat-stream) -* [`f130bfc`](https://github.com/npm/npm/commit/f130bfc) `minimatch@2.0.10` (inside node-gyp's copy of glob) -* [`36c6a0d`](https://github.com/npm/npm/commit/36c6a0d) `caseless@0.11.0` -* [`80df59c`](https://github.com/npm/npm/commit/80df59c) `chalk@1.1.0` -* [`ea935d9`](https://github.com/npm/npm/commit/ea935d9) `bluebird@2.9.34` -* [`3588a0c`](https://github.com/npm/npm/commit/3588a0c) `extend@3.0.0` -* [`c6a8450`](https://github.com/npm/npm/commit/c6a8450) `form-data@1.0.0-rc2` -* [`a04925b`](https://github.com/npm/npm/commit/a04925b) `har-validator@1.8.0` -* [`ee7c095`](https://github.com/npm/npm/commit/ee7c095) `has-ansi@2.0.0` -* [`944fc34`](https://github.com/npm/npm/commit/944fc34) `hawk@3.1.0` -* [`783dc7b`](https://github.com/npm/npm/commit/783dc7b) `lodash._basecallback@3.3.1` -* [`acef0fe`](https://github.com/npm/npm/commit/acef0fe) `lodash._baseclone@3.3.0` -* [`dfe959a`](https://github.com/npm/npm/commit/dfe959a) `lodash._basedifference@3.0.3` -* [`a03bc76`](https://github.com/npm/npm/commit/a03bc76) `lodash._baseflatten@3.1.4` -* [`8a07d50`](https://github.com/npm/npm/commit/8a07d50) `lodash._basetostring@3.0.1` -* [`7785e3f`](https://github.com/npm/npm/commit/7785e3f) `lodash._baseuniq@3.0.3` -* [`826fb35`](https://github.com/npm/npm/commit/826fb35) `lodash._createcache@3.1.2` -* [`76030b3`](https://github.com/npm/npm/commit/76030b3) `lodash._createpadding@3.6.1` -* [`1a49ec6`](https://github.com/npm/npm/commit/1a49ec6) `lodash._getnative@3.9.1` -* [`eebe47f`](https://github.com/npm/npm/commit/eebe47f) `lodash.isarguments@3.0.4` -* [`09994d4`](https://github.com/npm/npm/commit/09994d4) `lodash.isarray@3.0.4` -* [`b6f8dbf`](https://github.com/npm/npm/commit/b6f8dbf) `lodash.keys@3.1.2` -* [`c67dd6b`](https://github.com/npm/npm/commit/c67dd6b) `lodash.pad@3.1.1` -* [`4add042`](https://github.com/npm/npm/commit/4add042) `lodash.repeat@3.0.1` -* [`e04993c`](https://github.com/npm/npm/commit/e04993c) `lru-cache@2.6.5` -* [`2ed7da4`](https://github.com/npm/npm/commit/2ed7da4) `mime-db@1.15.0` -* [`ae08244`](https://github.com/npm/npm/commit/ae08244) `mime-types@2.1.3` -* [`e71410e`](https://github.com/npm/npm/commit/e71410e) `os-homedir@1.0.1` -* [`67c13e0`](https://github.com/npm/npm/commit/67c13e0) `process-nextick-args@1.0.2` -* [`12ee041`](https://github.com/npm/npm/commit/12ee041) `qs@4.0.0` -* [`15564a6`](https://github.com/npm/npm/commit/15564a6) `spdx-license-ids@1.0.2` -* [`8733bff`](https://github.com/npm/npm/commit/8733bff) `supports-color@2.0.0` -* [`230943c`](https://github.com/npm/npm/commit/230943c) `tunnel-agent@0.4.1` -* [`26a4653`](https://github.com/npm/npm/commit/26a4653) `ansi-styles@2.1.0` -* [`3d27081`](https://github.com/npm/npm/commit/3d27081) `bl@1.0.0` -* [`9efa110`](https://github.com/npm/npm/commit/9efa110) `async@1.4.0` - -#### MERGED FORWARD - -* As usual, we've ported all the `npm@2` goodies in this week's - [v2.13.3](https://github.com/npm/npm/releases/tag/v2.13.3) - release. - -### v3.1.3 (2015-07-17): - -Rebecca: So Kat, I hear this week's other release uses a dialog between us to -explain what changed? - -Kat: Well, you could say that… - -Rebecca: I would! This week I fixed more `npm@3` bugs! - -Kat: That sounds familiar. - -Rebecca: Eheheheh, well, before we look at those, a word from our sponsor… - -#### BETA IS AS BETA DOES - -**_THIS IS BETA SOFTWARE_**. Yes, we're still reminding you of this. No, -you can't be excused. `npm@3` will remain in beta until we're confident -that it's stable and have assessed the effect of the breaking changes on the -community. During that time we will still be doing `npm@2` releases, with -`npm@2` tagged as `latest` and `next`. We'll _also_ be publishing new -releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` alongside those -versions until we're ready to switch everyone over to `npm@3`. We need your -help to find and fix its remaining bugs. It's a significant rewrite, so we -are _sure_ there still significant bugs remaining. So do us a solid and -deploy it in non-critical CI environments and for day-to-day use, but maybe -don't use it for production maintenance or frontline continuous deployment -just yet. - -Rebecca: Ok, enough of the dialoguing, that's Kat's schtick. But do remember -kids, betas hide in dark hallways waiting to break your stuff, stuff like… - -#### SO MANY LINKS YOU COULD MAKE A CHAIN - -* [`6d69ec9`](https://github.com/npm/npm/6d69ec9) - [#8967](https://github.com/npm/npm/issues/8967) - Removing a module linked into your globals would result in having - all of its subdeps removed. Since the npm release process does - exactly this, it burned me -every- -single- -week-. =D - While we're here, we also removed extraneous warns that used to - spill out when you'd remove a symlink. - ([@iarna](https://github.com/iarna)) - -* [`fdb360f`](https://github.com/npm/npm/fdb360f) - [#8874](https://github.com/npm/npm/issues/8874) - Linking scoped modules was failing outright, but this fixes that - and updates our tests so we don't do it again. - ([@iarna](https://github.com/iarna)) - -#### WE'LL TRY NOT TO CRACK YOUR WINDOWS - -* [`9fafb18`](https://github.com/npm/npm/9fafb18) - [#8701](https://github.com/npm/npm/issues/8701) - `npm@3` introduced permissions checks that run before it actually tries to - do something. This saves you from having an install fail half way - through. We did this using the shiny new `fs.access` function available - in `node 0.12` and `io.js`, with fallback options for older nodes. Unfortunately - the way we implemented the fallback caused racey problems for Windows systems. - This fixes that by ensuring we only ever run any one check on a directory once. - BUT it turns out there are bugs in `fs.access` on Windows. So this ALSO just disables - the use of `fs.access` on Windows entirely until that settles out. - ([@iarna](https://github.com/iarna)) - -#### ZOOM ZOOM, DEP UPDATES - -* [`5656baa`](https://github.com/npm/npm/5656baa) - `gauge@1.2.2`: Better handle terminal resizes while printing the progress bar - ([@iarna](https://github.com/iarna)) - -#### MERGED FORWARD - -* Check out Kat's [super-fresh release notes for v2.13.2](https://github.com/npm/npm/releases/tag/v2.13.2) - and see all the changes we ported from `npm@2`. - -### v3.1.2 - -#### SO VERY BETA RELEASE - -So, `v3.1.1` managed to actually break installing local modules. And then -immediately after I drove to an island for the weekend. 😁 So let's get -this fixed outside the usual release train! - -Fortunately it didn't break installing _global_ modules and so you could -swap it out for another version at least. - -#### DISCLAIMER MEANS WHAT IT SAYS - -**_THIS IS BETA SOFTWARE_**. Yes, we're still reminding you of this. No, -you can't be excused. `npm@3` will remain in beta until we're confident -that it's stable and have assessed the effect of the breaking changes on the -community. During that time we will still be doing `npm@2` releases, with -`npm@2` tagged as `latest` and `next`. We'll _also_ be publishing new -releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` alongside those -versions until we're ready to switch everyone over to `npm@3`. We need your -help to find and fix its remaining bugs. It's a significant rewrite, so we -are _sure_ there still significant bugs remaining. So do us a solid and -deploy it in non-critical CI environments and for day-to-day use, but maybe -don't use it for production maintenance or frontline continuous deployment -just yet. - -#### THIS IS IT, THE REASON - -* [`f5e19df`](https://github.com/npm/npm/commit/f5e19df) - [#8893](https://github.com/npm/npm/issues/8893) - Fix crash when installing local modules introduced by the fix for - [#8608](https://github.com/npm/npm/issues/8608) - ([@iarna](https://github.com/iarna) - -### v3.1.1 - -#### RED EYE RELEASE - -Rebecca's up too late writing tests, so you can have `npm@3` bug fixes! Lots -of great new issues from you all! ❤️️ Keep it up! - -#### YUP STILL BETA, PLEASE PAY ATTENTION - -**_THIS IS BETA SOFTWARE_**. Yes, we're still reminding you of this. No, -you can't be excused. `npm@3` will remain in beta until we're confident -that it's stable and have assessed the effect of the breaking changes on the -community. During that time we will still be doing `npm@2` releases, with -`npm@2` tagged as `latest` and `next`. We'll _also_ be publishing new -releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` alongside those -versions until we're ready to switch everyone over to `npm@3`. We need your -help to find and fix its remaining bugs. It's a significant rewrite, so we -are _sure_ there still significant bugs remaining. So do us a solid and -deploy it in non-critical CI environments and for day-to-day use, but maybe -don't use it for production maintenance or frontline continuous deployment -just yet. - -#### BOOGS - -* [`9badfd6`](https://github.com/npm/npm/commit/9babfd63f19f2d80b2d2624e0963b0bdb0d76ef4) - [#8608](https://github.com/npm/npm/issues/8608) - Make global installs and uninstalls MUCH faster by only reading the directories of - modules referred to by arguments. - ([@iarna](https://github.com/iarna) -* [`075a5f0`](https://github.com/npm/npm/commit/075a5f046ab6837f489b08d44cb601e9fdb369b7) - [#8660](https://github.com/npm/npm/issues/8660) - Failed optional deps would still result in the optional deps own - dependencies being installed. We now find them and fail them out of the - tree. - ([@iarna](https://github.com/iarna) -* [`c9fbbb5`](https://github.com/npm/npm/commit/c9fbbb540083396ea58fd179d81131d959d8e049) - [#8863](https://github.com/npm/npm/issues/8863) - The "no compatible version found" error message was including only the - version requested, not the name of the package we wanted. Ooops! - ([@iarna](https://github.com/iarna) -* [`32e6bbd`](https://github.com/npm/npm/commit/32e6bbd21744dcbe8c0720ab53f60caa7f2a0588) - [#8806](https://github.com/npm/npm/issues/8806) - The "uninstall" lifecycle was being run after all of a module's dependencies has been - removed. This reverses that order-- this means "uninstall" lifecycles can make use - of the package's dependencies. - ([@iarna](https://github.com/iarna) - -#### MERGED FORWARD - -* Check out the [v2.13.1 release notes](https://github.com/npm/npm/releases/tag/v2.13.1) - and see all the changes we ported from `npm@2`. - -### v3.1.0 (2015-07-02): - -This has been a brief week of bug fixes, plus some fun stuff merged forward -from this weeks 2.x release. See the -[2.13.0 release notes](https://github.com/npm/npm/releases/tag/v2.13.0) -for details on that. - -You all have been AWESOME with -[all](https://github.com/npm/npm/milestones/3.x) -[the](https://github.com/npm/npm/milestones/3.2.0) -`npm@3` bug reports! Thank you and keep up the great work! - -#### NEW PLACE, SAME CODE - -Remember how last week we said `npm@3` would go to `3.0-next` and latest -tags? Yeaaah, no, please use `npm@v3.x-next` and `npm@v3.x-latest` going forward. - -I dunno why we said "suuure, we'll never do a feature release till we're out -of beta" when we're still forward porting `npm@2.x` features. `¯\_(ツ)_/¯` - -If you do accidentally use the old tag names, I'll be maintaining them -for a few releases, but they won't be around forever. - -#### YUP STILL BETA, PLEASE PAY ATTENTION - -**_THIS IS BETA SOFTWARE_**. `npm@3` will remain in beta until we're -confident that it's stable and have assessed the effect of the breaking -changes on the community. During that time we will still be doing `npm@2` -releases, with `npm@2` tagged as `latest` and `next`. We'll _also_ be -publishing new releases of `npm@3` as `npm@v3.x-next` and `npm@v3.x-latest` -alongside those versions until we're ready to switch everyone over to -`npm@3`. We need your help to find and fix its remaining bugs. It's a -significant rewrite, so we are _sure_ there still significant bugs -remaining. So do us a solid and deploy it in non-critical CI environments -and for day-to-day use, but maybe don't use it for production maintenance -or frontline continuous deployment just yet. - -#### BUGS ON THE WINDOWS - - * [`0030ade`](https://github.com/npm/npm/commit/0030ade) - [#8685](https://github.com/npm/npm/issues/8685) - Windows would hang when trying to clone git repos - ([@euprogramador](https://github.com/npm/npm/pull/8777)) - * [`b259bcc`](https://github.com/npm/npm/commit/b259bcc) - [#8786](https://github.com/npm/npm/pull/8786) - Windows permissions checks would cause installations to fail under some - circumstances. We're disabling the checks entirely for this release. - I'm hoping to check back with this next week to get a Windows friendly - fix in. - ([@iarna](https://github.com/iarna)) - -#### SO MANY BUGS SQUASHED, JUST CALL US RAID - - * [`0848698`](https://github.com/npm/npm/commit/0848698) - [#8686](https://github.com/npm/npm/pull/8686) - Stop leaving progress bar cruft on the screen during publication - ([@ajcrites](https://github.com/ajcrites)) - * [`57c3cea`](https://github.com/npm/npm/commit/57c3cea) - [#8695](https://github.com/npm/npm/pull/8695) - Remote packages with shrinkwraps made npm cause node + iojs to explode - and catch fire. NO MORE. - ([@iarna](https://github.com/iarna)) - * [`2875ba3`](https://github.com/npm/npm/commit/2875ba3) - [#8723](https://github.com/npm/npm/pull/8723) - I uh, told you that engineStrict checking had gone away last week. - TURNS OUT I LIED. So this is making that actually be true. - ([@iarna](https://github.com/iarna)) - * [`28064e5`](https://github.com/npm/npm/commit/28064e5) - [#3358](https://github.com/npm/npm/issues/3358) - Consistently allow Unicode BOMs at the start of package.json files. - Previously this was allowed some of time, like when you were installing - modules, but not others, like running npm version or installing w/ - `--save`. - ([@iarna](https://github.com/iarna)) - * [`3cb6ad2`](https://github.com/npm/npm/commit/3cb6ad2) - [#8736](https://github.com/npm/npm/issues/8766) - `npm@3` wasn't running the "install" lifecycle in your current (toplevel) - module. This broke modules that relied on C compilation. BOO. - ([@iarna](https://github.com/iarna)) - * [`68da583`](https://github.com/npm/npm/commit/68da583) - [#8766](https://github.com/npm/npm/issues/8766) - To my great shame, `npm link package` wasn't working AT ALL if you - didn't have `package` already installed. - ([@iarna](https://github.com/iarna)) - * [`edd7448`](https://github.com/npm/npm/commit/edd7448) - `read-package-tree@5.0.0`: This update makes read-package-tree not explode - when there's bad data in your node_modules folder. `npm@2` silently - ignores this sort of thing. - ([@iarna](https://github.com/iarna)) - * [`0bb08c8`](https://github.com/npm/npm/commit/0bb08c8) - [#8778](https://github.com/npm/npm/pull/8778) - RELATEDLY, we now show any errors from your node_modules folder after - your installation completes as warnings. We're also reporting these in - `npm ls` now. - ([@iarna](https://github.com/iarna)) - * [`6c248ff`](https://github.com/npm/npm/commit/6c248ff) - [#8779](https://github.com/npm/npm/pull/8779) - Hey, you know how we used to complain if your `package.json` was - missing stuff? Well guess what, we are again. I know, I know, you can - thank me later. - ([@iarna](https://github.com/iarna)) - * [`d6f7c98`](https://github.com/npm/npm/commit/d6f7c98) - So, when we were rolling back after errors we had untested code that - tried to undo moves. Being untested it turns out it was very broken. - I've removed it until we have time to do this right. - ([@iarna](https://github.com/iarna)) - -#### NEW VERSION - -Just the one. Others came in via the 2.x release. Do check out its -changelog, immediately following this message. - - * [`4e602c5`](https://github.com/npm/npm/commit/4e602c5) `lodash@3.2.2` - -### v3.0.0 (2015-06-25): - -Wow, it's finally here! This has been a long time coming. We are all -delighted and proud to be getting this out into the world, and are looking -forward to working with the npm user community to get it production-ready -as quickly as possible. - -`npm@3` constitutes a nearly complete rewrite of npm's installer to be -easier to maintain, and to bring a bunch of valuable new features and -design improvements to you all. - -[@othiym23](https://github.com/othiym23) and -[@isaacs](https://github.com/isaacs) have been -[talking about the changes](http://blog.npmjs.org/post/91303926460/npm-cli-roadmap-a-periodic-update) -in this release for well over a year, and it's been the primary focus of -[@iarna](https://github.com/iarna) since she joined the team. - -Given that this is a near-total rewrite, all changes listed here are -[@iarna](https://github.com/iarna)'s work unless otherwise specified. - -#### NO, REALLY, READ THIS PARAGRAPH. IT'S THE IMPORTANT ONE. - -**_THIS IS BETA SOFTWARE_**. `npm@3` will remain in beta until we're -confident that it's stable and have assessed the effect of the breaking -changes on the community. During that time we will still be doing `npm@2` -releases, with `npm@2` tagged as `latest` and `next`. We'll _also_ be -publishing new releases of `npm@3` as `npm@3.0-next` and `npm@3.0-latest` -alongside those versions until we're ready to switch everyone over to -`npm@3`. We need your help to find and fix its remaining bugs. It's a -significant rewrite, so we are _sure_ there still significant bugs -remaining. So do us a solid and deploy it in non-critical CI environments -and for day-to-day use, but maybe don't use it for production maintenance -or frontline continuous deployment just yet. - -#### BREAKING CHANGES - -##### `peerDependencies` - -`grunt`, `gulp`, and `broccoli` plugin maintainers take note! You will be -affected by this change! - -* [#6930](https://github.com/npm/npm/issues/6930) - ([#6565](https://github.com/npm/npm/issues/6565)) - `peerDependencies` no longer cause _anything_ to be implicitly installed. - Instead, npm will now warn if a packages `peerDependencies` are missing, - but it's up to the consumer of the module (i.e. you) to ensure the peers - get installed / are included in `package.json` as direct `dependencies` - or `devDependencies` of your package. -* [#3803](https://github.com/npm/npm/issues/3803) - npm also no longer checks `peerDependencies` until after it has fully - resolved the tree. - -This shifts the responsibility for fulfilling peer dependencies from library -/ framework / plugin maintainers to application authors, and is intended to -get users out of the dependency hell caused by conflicting `peerDependency` -constraints. npm's job is to keep you _out_ of dependency hell, not put you -in it. - -##### `engineStrict` - -* [#6931](https://github.com/npm/npm/issues/6931) The rarely-used - `package.json` option `engineStrict` has been deprecated for several - months, producing warnings when it was used. Starting with `npm@3`, the - value of the field is ignored, and engine violations will only produce - warnings. If you, as a user, want strict `engines` field enforcement, - just run `npm config set engine-strict true`. - -As with the peer dependencies change, this is about shifting control from -module authors to application authors. It turns out `engineStrict` was very -difficult to understand even harder to use correctly, and more often than -not just made modules using it difficult to deploy. - -##### `npm view` - -* [`77f1aec`](https://github.com/npm/npm/commit/77f1aec) With `npm view` (aka - `npm info`), always return arrays for versions, maintainers, etc. Previously - npm would return a plain value if there was only one, and multiple values if - there were more. ([@KenanY](https://github.com/KenanY)) - -#### KNOWN BUGS - -Again, this is a _**BETA RELEASE**_, so not everything is working just yet. -Here are the issues that we already know about. If you run into something -that isn't on this list, -[let us know](https://github.com/npm/npm/issues/new)! - -* [#8575](https://github.com/npm/npm/issues/8575) - Circular deps will never be removed by the prune-on-uninstall code. -* [#8588](https://github.com/npm/npm/issues/8588) - Local deps where the dep name and the name in the package.json differ - don't result in an error. -* [#8637](https://github.com/npm/npm/issues/8637) - Modules can install themselves as direct dependencies. `npm@2` declined to - do this. -* [#8660](https://github.com/npm/npm/issues/8660) - Dependencies of failed optional dependencies aren't rolled back when the - optional dependency is, and then are reported as extraneous thereafter. - -#### NEW FEATURES - -##### The multi-stage installer! - -* [#5919](https://github.com/npm/npm/issues/5919) - Previously the installer had a set of steps it executed for each package - and it would immediately start executing them as soon as it decided to - act on a package. - - But now it executes each of those steps at the same time for all - packages, waiting for all of one stage to complete before moving on. This - eliminates many race conditions and makes the code easier to reason - about. - -This fixes, for instance: - -* [#6926](https://github.com/npm/npm/issues/6926) - ([#5001](https://github.com/npm/npm/issues/5001), - [#6170](https://github.com/npm/npm/issues/6170)) - `install` and `postinstall` lifecycle scripts now only execute `after` - all the module with the script's dependencies are installed. - -##### Install: it looks different! - -You'll now get a tree much like the one produced by `npm ls` that -highlights in orange the packages that were installed. Similarly, any -removed packages will have their names prefixed by a `-`. - -Also, `npm outdated` used to include the name of the module in the -`Location` field: - -``` -Package Current Wanted Latest Location -deep-equal MISSING 1.0.0 1.0.0 deep-equal -glob 4.5.3 4.5.3 5.0.10 rimraf > glob -``` - -Now it shows the module that required it as the final point in the -`Location` field: - -``` -Package Current Wanted Latest Location -deep-equal MISSING 1.0.0 1.0.0 npm -glob 4.5.3 4.5.3 5.0.10 npm > rimraf -``` - -Previously the `Location` field was telling you where the module was on -disk. Now it tells you what requires the module. When more than one thing -requires the module you'll see it listed once for each thing requiring it. - -##### Install: it works different! - -* [#6928](https://github.com/npm/npm/issues/6928) - ([#2931](https://github.com/npm/npm/issues/2931) - [#2950](https://github.com/npm/npm/issues/2950)) - `npm install` when you have an `npm-shrinkwrap.json` will ensure you have - the modules specified in it are installed in exactly the shape specified - no matter what you had when you started. -* [#6913](https://github.com/npm/npm/issues/6913) - ([#1341](https://github.com/npm/npm/issues/1341) - [#3124](https://github.com/npm/npm/issues/3124) - [#4956](https://github.com/npm/npm/issues/4956) - [#6349](https://github.com/npm/npm/issues/6349) - [#5465](https://github.com/npm/npm/issues/5465)) - `npm install` when some of your dependencies are missing sub-dependencies - will result in those sub-dependencies being installed. That is, `npm - install` now knows how to fix broken installs, most of the time. -* [#5465](https://github.com/npm/npm/issues/5465) - If you directly `npm install` a module that's already a subdep of - something else and your new version is incompatible, it will now install - the previous version nested in the things that need it. -* [`a2b50cf`](https://github.com/npm/npm/commit/a2b50cf) - [#5693](https://github.com/npm/npm/issues/5693) - When installing a new module, if it's mentioned in your - `npm-shrinkwrap.json` or your `package.json` use the version specifier - from there if you didn't specify one yourself. - -##### Flat, flat, flat! - -Your dependencies will now be installed *maximally flat*. Insofar as is -possible, all of your dependencies, and their dependencies, and THEIR -dependencies will be installed in your project's `node_modules` folder with no -nesting. You'll only see modules nested underneath one another when two (or -more) modules have conflicting dependencies. - -* [#3697](https://github.com/npm/npm/issues/3697) - This will hopefully eliminate most cases where Windows users ended up - with paths that were too long for Explorer and other standard tools to - deal with. -* [#6912](https://github.com/npm/npm/issues/6912) - ([#4761](https://github.com/npm/npm/issues/4761) - [#4037](https://github.com/npm/npm/issues/4037)) - This also means that your installs will be deduped from the start. -* [#5827](https://github.com/npm/npm/issues/5827) - This deduping even extends to git deps. -* [#6936](https://github.com/npm/npm/issues/6936) - ([#5698](https://github.com/npm/npm/issues/5698)) - Various commands are dedupe aware now. - -This has some implications for the behavior of other commands: - -* `npm uninstall` removes any dependencies of the module that you specified - that aren't required by any other module. Previously, it would only - remove those that happened to be installed under it, resulting in left - over cruft if you'd ever deduped. -* `npm ls` now shows you your dependency tree organized around what - requires what, rather than where those modules are on disk. -* [#6937](https://github.com/npm/npm/issues/6937) - `npm dedupe` now flattens the tree in addition to deduping. - -And bundling of dependencies when packing or publishing changes too: - -* [#2442](https://github.com/npm/npm/issues/2442) - bundledDependencies no longer requires that you specify deduped sub deps. - npm can now see that a dependency is required by something bundled and - automatically include it. To put that another way, bundledDependencies - should ONLY include things that you included in dependencies, - optionalDependencies or devDependencies. -* [#5437](https://github.com/npm/npm/issues/5437) - When bundling a dependency that's both a `devDependency` and the child of - a regular `dependency`, npm bundles the child dependency. - -As a demonstration of our confidence in our own work, npm's own -dependencies are now flattened, deduped, and bundled in the `npm@3` style. -This means that `npm@3` can't be packed or published by `npm@2`, which is -something to be aware of if you're hacking on npm. - -##### Shrinkwraps: they are a-changin'! - -First of all, they should be idempotent now -([#5779](https://github.com/npm/npm/issues/5779)). No more differences -because the first time you install (without `npm-shrinkwrap.json`) and the -second time (with `npm-shrinkwrap.json`). - -* [#6781](https://github.com/npm/npm/issues/6781) - Second, if you save your changes to `package.json` and you have - `npm-shrinkwrap.json`, then it will be updated as well. This applies to - all of the commands that update your tree: - * `npm install --save` - * `npm update --save` - * `npm dedupe --save` ([#6410](https://github.com/npm/npm/issues/6410)) - * `npm uninstall --save` -* [#4944](https://github.com/npm/npm/issues/4944) - ([#5161](https://github.com/npm/npm/issues/5161) - [#5448](https://github.com/npm/npm/issues/5448)) - Third, because `node_modules` folders are now deduped and flat, - shrinkwrap has to also be smart enough to handle this. - -And finally, enjoy this shrinkwrap bug fix: - -* [#3675](https://github.com/npm/npm/issues/3675) - When shrinkwrapping a dependency that's both a `devDependency` and the - child of a regular `dependency`, npm now correctly includes the child. - -##### The Age of Progress (Bars)! - -* [#6911](https://github.com/npm/npm/issues/6911) - ([#1257](https://github.com/npm/npm/issues/1257) - [#5340](https://github.com/npm/npm/issues/5340) - [#6420](https://github.com/npm/npm/issues/6420)) - The spinner is gone (yay? boo? will you miss it?), and in its place npm - has _progress bars_, so you actually have some sense of how long installs - will take. It's provided in Unicode and non-Unicode variants, and Unicode - support is automatically detected from your environment. - -#### TINY JEWELS - -The bottom is where we usually hide the less interesting bits of each -release, but each of these are small but incredibly useful bits of this -release, and very much worth checking out: - -* [`9ebe312`](https://github.com/npm/npm/commit/9ebe312) - Build system maintainers, rejoice: npm does a better job of cleaning up - after itself in your temporary folder. -* [#6942](https://github.com/npm/npm/issues/6942) - Check for permissions issues prior to actually trying to install - anything. -* Emit warnings at the end of the installation when possible, so that - they'll be on your screen when npm stops. -* [#3505](https://github.com/npm/npm/issues/3505) - `npm --dry-run`: You can now ask that npm only report what it _would have - done_ with the new `--dry-run` flag. This can be passed to any of the - commands that change your `node_modules` folder: `install`, `uninstall`, - `update` and `dedupe`. -* [`81b46fb`](https://github.com/npm/npm/commit/81b46fb) - npm now knows the correct URLs for `npm bugs` and `npm repo` for - repositories hosted on Bitbucket and GitLab, just like it does for GitHub - (and GitHub support now extends to projects hosted as gists as well as - traditional repositories). -* [`5be4008a`](https://github.com/npm/npm/commit/5be4008a09730cfa3891d9f145e4ec7f2accd144) - npm has been cleaned up to pass the [`standard`](http://npm.im/standard) - style checker. Forrest and Rebecca both feel this makes it easier to read - and understand the code, and should also make it easier for new - contributors to put merge-ready patches. - ([@othiym23](https://github.com/othiym23)) - -#### ZARRO BOOGS - -* [`6401643`](https://github.com/npm/npm/commit/6401643) - Make sure the global install directory exists before installing to it. - ([@thefourtheye](https://github.com/thefourtheye)) -* [#6158](https://github.com/npm/npm/issues/6158) - When we remove modules we do so inside-out running unbuild for each one. -* [`960a765`](https://github.com/npm/npm/commit/960a765) - The short usage information for each subcommand has been brought in sync - with the documentation. ([@smikes](https://github.com/smikes)) diff --git a/changelogs/CHANGELOG-4.md b/changelogs/CHANGELOG-4.md deleted file mode 100644 index 2c971bb1c4d9d..0000000000000 --- a/changelogs/CHANGELOG-4.md +++ /dev/null @@ -1,1566 +0,0 @@ -## v4.6.1 (2017-04-21) - -A little release to tide you over while we hammer out the last bits for npm@5. - -### FEATURES - -* [`d13c9b2f2`](https://github.com/npm/npm/commit/d13c9b2f24b6380427f359b6e430b149ac8aaa79) - `init-package-json@1.10.0`: - The `name:` prompt is now `package name:` to make this less ambiguous for new users. - - The default package name is now a valid package name. For example: If your package directory - has mixed case, the default package name will be all lower case. -* [`f08c66323`](https://github.com/npm/npm/commit/f08c663231099f7036eb82b92770806a3a79cdf1) - [#16213](https://github.com/npm/npm/pull/16213) - Add `--allow-same-version` option to `npm version` so that you can use `npm version` to run - your version lifecycles and tag your git repo without actually changing the version number in - your `package.json`. - ([@lucastheisen](https://github.com/lucastheisen)) -* [`f5e8becd0`](https://github.com/npm/npm/commit/f5e8becd05e0426379eb0c999abdbc8e87a7f6f2) - Timing has been added throughout the install implementation. You can see it by running - a command with `--loglevel=timing`. You can also run commands with `--timing` which will write - an `npm-debug.log` even on success and add an entry to `_timing.json` in your cache with - the timing information from that run. - ([@iarna](https://github.com/iarna)) - -### BUG FIXES - -* [`9c860f2ed`](https://github.com/npm/npm/commit/9c860f2ed3bdea1417ed059b019371cd253db2ad) - [#16021](https://github.com/npm/npm/pull/16021) - Fix a crash in `npm doctor` when used with a registry that does not support - the `ping` API endpoint. - ([@watilde](https://github.com/watilde)) -* [`65b9943e9`](https://github.com/npm/npm/commit/65b9943e9424c67547b0029f02b0258e35ba7d26) - [#16364](https://github.com/npm/npm/pull/16364) - Shorten the ELIFECYCLE error message. The shorter error message should make it much - easier to discern the actual cause of the error. - ([@j-f1](https://github.com/j-f1)) -* [`a87a4a835`](https://github.com/npm/npm/commit/a87a4a8359693518ee41dfeb13c5a8929136772a) - `npmlog@4.0.2`: - Fix flashing of the progress bar when your terminal is very narrow. - ([@iarna](https://github.com/iarna)) -* [`41c10974f`](https://github.com/npm/npm/commit/41c10974fe95a2e520e33e37725570c75f6126ea) - `write-file-atomic@1.3.2`: - Wait for `fsync` to complete before considering our file written to disk. - This will improve certain sorts of Windows diagnostic problems. -* [`2afa9240c`](https://github.com/npm/npm/commit/2afa9240ce5b391671ed5416464f2882d18a94bc) - [#16336](https://github.com/npm/npm/pull/16336) - Don't ham-it-up when expecting JSON. - ([@bdukes](https://github.com/bdukes)) - -### DOCUMENTATION FIXES - -* [`566f3eebe`](https://github.com/npm/npm/commit/566f3eebe741f935b7c1e004bebf19b8625a1413) - [#16296](https://github.com/npm/npm/pull/16296) - Use a single convention when referring to the `<command>` you're running. - ([@desfero](https://github.com/desfero)) -* [`ccbb94934`](https://github.com/npm/npm/commit/ccbb94934d4f677f680c3e2284df3d0ae0e65758) - [#16267](https://github.com/npm/npm/pull/16267) - Fix a missing space in the example package.json. - ([@famousgarkin](https://github.com/famousgarkin)) - -### DEPENDENCY UPDATES - -* [`ebde4ea33`](https://github.com/npm/npm/commit/ebde4ea3363dfc154c53bd537189503863c9b3a4) - `hosted-git-info@2.4.2` -* [`c46ad71bb`](https://github.com/npm/npm/commit/c46ad71bbe27aaa9ee10e107d8bcd665d98544d7) - `init-package-json@1.9.6` -* [`d856d570d`](https://github.com/npm/npm/commit/d856d570d2df602767c039cf03439d647bba2e3d) - `npm-registry-client@8.1.1` -* [`4a2e14436`](https://github.com/npm/npm/commit/4a2e1443613a199665e7adbda034d5b9d10391a2) - `readable-stream@2.2.9` -* [`f0399138e`](https://github.com/npm/npm/commit/f0399138e6d6f1cd7f807d523787a3b129996301) - `normalize-package-data@2.3.8` - -### v4.5.0 (2017-03-24) - -Welcome a wrinkle on npm's registry API! - -Codename: Corgi - -![corgi-meme](https://cloud.githubusercontent.com/assets/757502/24126107/64c14268-0d89-11e7-871b-d457e6d0082b.jpg) - -This release has some bug fixes, but it's mostly about bringing support for -MUCH smaller package metadata. How much smaller? Well, for npm itself it -reduces 416K of gzip compressed JSON to 24K. - -As a user, all you have to do is update to get to use the new API. If -you're interested in the details we've [documented the -changes](https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md) -in detail. - -#### CORGUMENTS - -Package metadata: now smaller. This means a smaller cache and less to download. - -* [`86dad0d74`](https://github.com/npm/npm/commit/86dad0d747f288eab467d49c9635644d3d44d6f0) - Add support for filtered package metadata. - ([@iarna](https://github.com/iarna)) -* [`41789cffa`](https://github.com/npm/npm/commit/41789cffac9845603f4bdf3f5b03f412144a0e9f) - `npm-registry-client@8.1.0` - ([@iarna](https://github.com/iarna)) - -#### NO SHRINKWRAP, NO PROBLEM - -Previously we needed to extract every package's tarball to look for an -`npm-shrinkwrap.json` before we could begin working through what its -dependencies were. This was one of the things stopping npm's network -accesses from happening more concurrently. The new filtered package -metadata provides a new key, `_hasShrinkwrap`. When that's set to `false` -then we know we don't have to look for one. - -* [`4f5060eb3`](https://github.com/npm/npm/commit/4f5060eb31b9091013e1d6a34050973613a294a3) - [#15969](https://github.com/npm/npm/pull/15969) - Add support for skipping `npm-shrinkwrap.json` extraction when the - registry can affirm that one doesn't exist. - ([@iarna](https://github.com/iarna)) - -#### INTERRUPTING SCRIPTS - -* [`878aceb25`](https://github.com/npm/npm/commit/878aceb25e6d6052dac15da74639ce274c8e62c5) - [#16129](https://github.com/npm/npm/pull/16129) - Better handle Ctrl-C while running scripts. `npm` will now no longer exit - until the script it is running has exited. If you press Ctrl-C a second - time it kill the script rather than just forwarding the Ctrl-C. - ([@jaridmargolin](https://github.com/jaridmargolin)) - -#### DEPENDENCY UPDATES: - -* [`def75eebf`](https://github.com/npm/npm/commit/def75eebf1ad437bf4fd3f5e103cc2d963bd2a73) - `hosted-git-info@2.4.1`: - Preserve case of the user name part of shortcut specifiers, previously they were lowercased. - ([@iarna](https://github.com/iarna)) -* [`eb3789fd1`](https://github.com/npm/npm/commit/eb3789fd18cfb063de9e6f80c3049e314993d235) - `node-gyp@3.6.0`: Add support for VS2017 and Chakracore improvements. - ([@refack](https://github.com/refack)) - ([@kunalspathak](https://github.com/kunalspathak)) -* [`245e25315`](https://github.com/npm/npm/commit/245e25315524b95c0a71c980223a27719392ba75) - `readable-stream@2.2.6` ([@mcollina](https://github.com/mcollina)) -* [`30357ebc5`](https://github.com/npm/npm/commit/30357ebc5691d7c9e9cdc6e0fe7dc6253220c9c2) - `which@1.2.14` ([@isaacs](https://github.com/isaacs)) - -### v4.4.4 (2017-03-16) - -😩😤😅 Okay! We have another `next` -release for ya today. So, yes! With v4.4.3 we fixed the bug that made -bundled scoped modules uninstallable. But somehow I overlooked the fact -that we: A) were using these and B) that made upgrading to v4.4.3 impossible. 😭 - -So I've renamed those two scoped modules to no longer use scopes and we now -have a shiny new test to ensure that scoped modules don't creep into our -transitive deps and make it impossible to upgrade to `npm`. - -(None of our woes applies to most of you all because most of you all don't -use bundled dependencies. `npm` does because we want the published artifact to be -installable without having to already have `npm`.) - -* [`2a7409fcb`](https://github.com/npm/npm/commit/2a7409fcba6a8fab716c80f56987b255983e048e) - [#16066](https://github.com/npm/npm/pull/16066) - Ensure we aren't using any scoped modules - Because `npm`s prior 4.4.3 can't install dependencies that have bundled scoped - modules. This didn't show up sooner because they ALSO had a bug that caused - bundled scoped modules to not be included in the bundle. - ([@iarna](https://github.com/iarna)) -* [`eb4c70796`](https://github.com/npm/npm/commit/eb4c70796c38f24ee9357f5d4a0116db582cc7a9) - [#16066](https://github.com/npm/npm/pull/16066) - Switch to move-concurrently to remove scoped dependency - ([@iarna](https://github.com/iarna)) - -### v4.4.3 (2017-03-15) - -This is a small patch release, mostly because the published tarball for -v4.4.2 was missing a couple of modules, due to a bug involving scoped -modules, bundled dependencies and legacy tree layouts. - -There are a couple of other things here that happened to be ready to go. So -without further ado… - -#### BUG FIXES - -* [`3d80f8f70`](https://github.com/npm/npm/commit/3d80f8f70679ad2b8ce7227d20e8dbce257a47b9) - [npm/fs-vacuum#6](https://github.com/npm/fs-vacuum/pull/6) - `fs-vacuum@1.2.1`: Make sure we never, ever remove home directories. Previously if your - home directory was entirely empty then we might `rmdir` it. - ([@helio-frota](https://github.com/helio-frota)) -* [`1af85ca9f`](https://github.com/npm/npm/commit/1af85ca9f4d625f948e85961372de7df3f3774e2) - [#16040](https://github.com/npm/npm/pull/16040) - Fix bug where bundled transitive dependencies that happened to be - installed under bundled scoped dependencies wouldn't be included in the - tarball when building a package. - ([@iarna](https://github.com/iarna)) -* [`13c7fdc2e`](https://github.com/npm/npm/commit/13c7fdc2e87456a87b1c9385a3daeae228ed7c95) - [#16040](https://github.com/npm/npm/pull/16040) - Fix a bug where bundled scoped dependencies couldn't be extracted. - ([@iarna](https://github.com/iarna)) -* [`d6cde98c2`](https://github.com/npm/npm/commit/d6cde98c2513fe160eab41e31c3198dfde993207) - [#16040](https://github.com/npm/npm/pull/16040) - Stop printing `ENOENT` errors more than once. - ([@iarna](https://github.com/iarna)) -* [`722fbf0f6`](https://github.com/npm/npm/commit/722fbf0f6cf4413cdc24b610bbd60a7dbaf2adfe) - [#16040](https://github.com/npm/npm/pull/16040) - Rewrite the `extract` action for greater clarity. - Specifically, this involves moving things around structurally to do the same - thing [`d0c6d194`](https://github.com/npm/npm/commit/d0c6d194) did, but in a more comprehensive manner. - This also fixes a long standing bug where errors from the move step would be - eaten during this phase and as a result we would get mysterious crashes in - the finalize phase when finalize tried to act on them. - ([@iarna](https://github.com/iarna)) -* [`6754dabb6`](https://github.com/npm/npm/commit/6754dabb6bd3301504efb3b62f36d3fe70958c19) - [#16040](https://github.com/npm/npm/pull/16040) - Flatten out `@npmcorp/move`'s deps for backwards compatibility reasons. Versions prior to this - one will fail to install any package that bundles a scoped dependency. This was responsible - for `ENOENT` errors during the `finalize` phase. - ([@iarna](https://github.com/iarna)) - -#### DOC UPDATES - -* [`fba51c582`](https://github.com/npm/npm/commit/fba51c582d1d08dd4aa6eb27f9044dddba91bb18) - [#15960](https://github.com/npm/npm/pull/15960) - Update troubleshooting and contribution guide links. - ([@watilde](https://github.com/watilde)) - - -### v4.4.2 (2017-03-09): - -This week, the focus on the release was mainly going through [all of npm's deps -that we manage -ourselves](https://github.com/npm/npm/wiki/npm-maintained-dependencies), and -making sure all their PRs and versions were up to date. That means there's a few -fixes here and there. Nothing too big codewise, though. - -The most exciting part of this release is probably our [shiny new -Contributing](https://github.com/npm/npm/blob/latest/CONTRIBUTING.md) and -[Troubleshooting](https://github.com/npm/npm/blob/latest/TROUBLESHOOTING.md) -docs! [@snopeks](https://github.com/snopeks) did some ✨fantastic✨ work hashing it -out, and we're really hoping this is a nice big step towards making contributing -to npm easier. The troubleshooting doc will also hopefully solve common issues -for people! Do you think something is missing from it? File a PR and we'll add -it! The current document is just a baseline for further editing and additions. - -Also there's maybe a bit of an easter egg in this release. 'Cause those are fun and I'm a huge nerd. 😉 - -#### DOCUMENTATION AHOY - -* [`07e997a`](https://github.com/npm/npm/commit/07e997a7ecedba7b29ad76ffb2ce990d5c0200fc) - [#15756](https://github.com/npm/npm/pull/15756) - Overhaul `CONTRIBUTING.md` and add new `TROUBLESHOOTING.md` files. 🙌🏼 - ([@snopeks](https://github.com/snopeks)) -* [`2f3e4b6`](https://github.com/npm/npm/commit/2f3e4b645cdc268889cf95ba24b2aae572d722ad) - [#15833](https://github.com/npm/npm/pull/15833) - Mention the [24-hour unpublish - policy](http://blog.npmjs.org/post/141905368000/changes-to-npms-unpublish-policy) - on the main registry. - ([@carols10cents](https://github.com/carols10cents)) - -#### NOT REALLY FEATURES, NOT REALLY BUGFIXES. MORE LIKE TWEAKS? 🤔 - -* [`84be534`](https://github.com/npm/npm/commit/84be534aedb78c65cd8012427fc04871ceeccf90) - [#15888](https://github.com/npm/npm/pull/15888) - Stop flattening `ls`-tree output. From now on, deduped deps will be marked as - such in the place where they would've been before getting hoisted by the - installer. - ([@iarna](https://github.com/iarna)) -* [`e9a5dca`](https://github.com/npm/npm/commit/e9a5dca369ead646ab5922326cede1406c62bd3b) - [#15967](https://github.com/npm/npm/pull/15967) - Limit metadata fetches to 10 concurrent requests. - ([@iarna](https://github.com/iarna)) -* [`46aa9bc`](https://github.com/npm/npm/commit/46aa9bcae088740df86234fc199f7aef53b116df) - [#15967](https://github.com/npm/npm/pull/15967) - Limit concurrent installer actions to 10. - ([@iarna](https://github.com/iarna)) - -#### BUGFIXES - -* [`c3b994b`](https://github.com/npm/npm/commit/c3b994b71565eb4f943cce890bb887d810e6e2d4) - [#15901](https://github.com/npm/npm/pull/15901) - Use EXDEV aware move instead of rename. This will allow moving across devices - and moving when filesystems don't support renaming directories full of files. It might make folks using Docker a bit happier. - ([@iarna](https://github.com/iarna)) -* [`0de1a9c`](https://github.com/npm/npm/commit/0de1a9c1db90e6705c65c068df1fe82899e60d68) - [#15735](https://github.com/npm/npm/pull/15735) - Autocomplete support for npm scripts with `:` colons in the name. - ([@beyondcompute](https://github.com/beyondcompute)) -* [`84b0b92`](https://github.com/npm/npm/commit/84b0b92e7f78ec4add42e8161c555325c99b7f98) - [#15874](https://github.com/npm/npm/pull/15874) - Stop using [undocumented](https://github.com/nodejs/node/pull/11355) - `res.writeHeader` alias for `res.writeHead`. - ([@ChALkeR](https://github.com/ChALkeR)) -* [`895ffe4`](https://github.com/npm/npm/commit/895ffe4f3eecd674796395f91c30eda88aca6b36) - [#15824](https://github.com/npm/npm/pull/15824) - Fix empty versions column in `npm search` output. - ([@bcoe](https://github.com/bcoe)) -* [`38c8d7a`](https://github.com/npm/npm/commit/38c8d7adc1f43ab357d1e729ae7cd5d801a26e68) - `init-package-json@1.9.5`: [npm/init-package-json#61](https://github.com/npm/init-package-json/pull/61) Exclude existing `devDependencies` from being added to `dependencies`. Fixes [#12260](https://github.com/npm/npm/issues/12260). - ([@addaleax](https://github.com/addaleax)) - -### v4.4.1 (2017-03-06): - -This is a quick little patch release to forgo the update notification -checker if you're on an unsupported (but not otherwise broken) version of -Node.js. Right now that means 0.10 or 0.12. - -* [`56ac249`](https://github.com/npm/npm/commit/56ac249ef8ede1021f1bc62a0e4fe1e9ba556af2) - [#15864](https://github.com/npm/npm/pull/15864) - Only use `update-notifier` on supported versions. - ([@legodude17](https://github.com/legodude17)) - -### v4.4.0 (2017-02-23): - -Aaaah, [@iarna](https://github.com/iarna) here, it's been a little while -since I did one of these! This is a nice little release, we've got an -update notifier, vastly less verbose error messages, new warnings on package -metadata that will probably give you a bad day, and a sprinkling of bug -fixes. - -#### UPDATE NOTIFICATIONS - -We now have a little nudge to update your `npm`, courtesy of -[update-notifier](https://www.npmjs.com/package/update-notifier). - -* [`148ee66`](https://github.com/npm/npm/commit/148ee663740aa05877c64f16cdf18eba33fbc371) - [#15774](https://github.com/npm/npm/pull/15774) - `npm` will now check at start up to see if a newer version is available. - It will check once a day. If you want to disable this, set `optOut` to `true` in - `~/.config/configstore/update-notifier-npm.json`. - ([@ceejbot](https://github.com/ceejbot)) - -#### LESS VERBOSE ERROR MESSAGES - -`npm` has, for a long time, had very verbose error messages. There was a -lot of info in there, including the cause of the error you were seeing but -without a lot of experience reading them pulling that out was time consuming -and difficult. - -With this change the output is cut down substantially, centering the error -message. So, for example if you try to `npm run sdlkfj` then the entire -error you'll get will be: - -``` -npm ERR! missing script: sldkfj - -npm ERR! A complete log of this run can be found in: -npm ERR! /Users/rebecca/.npm/_logs/2017-02-24T00_41_36_988Z-debug.log -``` - -The CLI team has discussed cutting this down even further and stripping the -`npm ERR!` prefix off those lines too. We'd appreciate your feedback on -this! - -* [`e544124`](https://github.com/npm/npm/commit/e544124592583654f2970ec332003cfd00d04f2b) - [#15716](https://github.com/npm/npm/pull/15716) - Make error output less verbose. - ([@iarna](https://github.com/iarna)) -* [`166bda9`](https://github.com/npm/npm/commit/166bda97410d0518b42ed361020ade1887e684af) - [#15716](https://github.com/npm/npm/pull/15716) - Stop encouraging users to visit the issue tracker unless we know for - certain that it's an npm bug. - ([@iarna](https://github.com/iarna)) - -#### OTHER NEW FEATURES - -* [`53412eb`](https://github.com/npm/npm/commit/53412eb22c1c75d768e30f96d69ed620dfedabde) - [#15772](https://github.com/npm/npm/pull/15772) - We now warn if you have a module listed in both dependencies and - devDependencies. - ([@TedYav](https://github.com/TedYav)) -* [`426b180`](https://github.com/npm/npm/commit/426b1805904a13bdc5c0dd504105ba037270cbee) - [#15757](https://github.com/npm/npm/pull/15757) - Default reporting metrics to default registry. Previously it defaulted to using - `https://registry.npmjs.org`, now it will default to the result of - `npm config get registry`. For most folks this won't actually change anything, but it - means that folks who use a private registry will have metrics routed there by default. - This has the potential to be interesting because it means that in the - future private registry products ([npme](https://npme.npmjs.com/docs/)!) - will be able to report on these metrics. - ([@iarna](https://github.com/iarna)) - -#### BUG FIXES - -* [`8ea0de9`](https://github.com/npm/npm/commit/8ea0de98563648ba0db032acd4d23d27c4a50a66) - [#15716](https://github.com/npm/npm/pull/15716) - Write logs for `cb() never called` errors. -* [`c4e83dc`](https://github.com/npm/npm/commit/c4e83dca830b24305e3cb3201a42452d56d2d864) - Make it so that errors while reading the existing node_modules tree can't - result in installer crashes. - ([@iarna](https://github.com/iarna)) -* [`2690dc2`](https://github.com/npm/npm/commit/2690dc2684a975109ef44953c2cf0746dbe343bb) - Update `npm doctor` to not treat broken symlinks in your global modules as - a permission failure. This is particularly important if you link modules and your text - editor uses the convention of creating symlinks from `.#filename.js` to a - machine name and pid to lock files (eg emacs and compatible things). - ([@iarna](https://github.com/iarna)) -* [`f4c3f48`](https://github.com/npm/npm/commit/f4c3f489aa5787cf0d60e8436be2190e4b0d0ff7) - [#15777](https://github.com/npm/npm/pull/15777) - Not exactly a bug, but change a parameterless `.apply` to `.call`. - ([@notarseniy](https://github.com/notarseniy)) - -#### DEPENDENCY UPDATES - -* [`549dcff`](https://github.com/npm/npm/commit/549dcff58c7aaa1e7ba71abaa14008fdf2697297) - `rimraf@2.6.0`: - Retry EBUSY, ENOTEMPTY and EPERM on non-Windows platforms too. - More reliable `rimraf.sync` on Windows. - ([@isaacs](https://github.com/isaacs)) -* [`052dfb6`](https://github.com/npm/npm/commit/052dfb623da508f2b5f681da0258125552a18a4a) - `validate-npm-package-name@3.0.0`: - Remove ableist language in README. - Stop allowing ~'!()* in package names. - ([@tomdale](https://github.com/tomdale)) - ([@chrisdickinson](https://github.com/chrisdickinson)) -* [`6663ea6`](https://github.com/npm/npm/commit/6663ea6ac0f0ecec5a3f04a3c01a71499632f4dc) - `abbrev@1.1.0` ([@isaacs](https://github.com/isaacs)) -* [`be6de9a`](https://github.com/npm/npm/commit/be6de9aab9e20b6eac70884e8626161eebf8721a) - `opener@1.4.3` ([@dominic](https://github.com/dominic)) -* [`900a5e3`](https://github.com/npm/npm/commit/900a5e3e3411ec221306455f99b24b9ce35757c0) - `readable-stream@2.2.3` ([@RangerMauve](https://github.com/RangerMauve)) ([@mcollina](https://github.com/mcollina)) -* [`c972a8b`](https://github.com/npm/npm/commit/c972a8b0f20a61a79c45b6642f870bea8c55c7e4) - `tacks@1.2.6` - ([@iarna](https://github.com/iarna)) -* [`85a36ef`](https://github.com/npm/npm/commit/85a36efdac0c24501876875cb9ad40292024e0b0) - [`7ac9265`](https://github.com/npm/npm/commit/7ac9265c56b4d9eeaca6fcfb29513f301713e7bb) - `tap@10.2.0` - ([@isaacs](https://github.com/saacs)) - -### v4.3.0 (2017-02-09): - -Yay! Release time! It's a rainy day, and we have another smallish release for -y'all. These things are not necessarily related. Or are they 🌧🤔 - -As far as news go, you may have noticed that the CLI team dropped support for -`node@0.12` when that version went out of maintenance. Still, we've avoided -explicitly breaking it and `node@0.10` so far -- but not much longer. - -Sometime soon, the CLI team plans on switching over to language features only -available as of `node@4 LTS`, and will likely start dropping old versions of node -as they go out of maintenance. The new features are exciting! We're really -looking forward to using them in the core CLI (and its dependencies) as we keep up -with our current feature work. - -And speaking of features, this release is a minor bump due to a small change in -how `npm login` works for the sake of supporting OAuth-based login for npm -Enterprise users. But we won't leave the rest of y'all out -- we're working on a -larger version of this feature. Soon enough, you'll be able to log in to npm -with, say, GitHub -- and use some shiny features that come from the integration. -Or turn on 2FA and other such security features. Keep your eyes peeled for new -on this in the next few releases and our weekly newsletter! - -#### NEW AUTH TYPES - -There's a new command line option: `--auth-type`, which can be used to log in to -a supporting registry with OAuth2 or SAML. The current implementation is mainly -meant to support npmE customers, so if you're one of those: ask us about using -it! If not, just hold off cause we'll have a much more complete version of this -feature out soon. - -* [`ac8595e`](https://github.com/npm/npm/commit/ac8595e3c9b615ff95abc3301fac1262c434792c) [`bcf2dd8`](https://github.com/npm/npm/commit/bcf2dd8a165843255c06515fa044c6e4d3b71ca4) [`9298d20`](https://github.com/npm/npm/commit/9298d20af58b92572515bfa9cf7377bd4221dc7d) [`66b61bc`](https://github.com/npm/npm/commit/66b61bc42e81ee8a1ee00fc63517f62284140688) [`dc85de7`](https://github.com/npm/npm/commit/dc85de7df6bb61f7788611813ee82ae695a18f1f) - [#13389](https://github.com/npm/npm/pull/13389) - Implement single-sign-on support with `--auth-type` option. - ([@zkat](https://github.com/zkat)) - -#### FASTER STARTUP. SOMETIMES! - -`request` is pretty heavy. And it loads a bunch of things. It's actually a -pretty big chunk of npm's load time. This small patch by Rebecca will make it so -npm only loads that module when we're actually intending to make network -requests. Those of you who use npm commands that run offline might see a small -speedup in startup time. - -* [`ac73568`](https://github.com/npm/npm/commit/ac735682e666e8724549d56146821f3b8b018e25) - [#15631](https://github.com/npm/npm/pull/15631) - Lazy load `caching-registry-client`. - ([@iarna](https://github.com/iarna)) - -#### DOCUMENTATION - -* [`4ad9247`](https://github.com/npm/npm/commit/4ad9247aa82f7553c9667ee93c74ec7399d6ceec) - [#15630](https://github.com/npm/npm/pull/15630) - Fix formatting/rendering for root npm README. - ([@ungoldman](https://github.com/ungoldman)) - -#### DEPENDENCY UPDATES - -* [`8cc1112`](https://github.com/npm/npm/commit/8cc1112958638ff88ac2c24c4a065acacb93d64b) - [npm/hosted-git-info#21](https://github.com/npm/hosted-git-info/pull/21) - `hosted-git-info@2.2.0`: - Add support for `.tarball()` URLs. - ([@zkat](https://github.com/zkat)) -* [`6eacc1b`](https://github.com/npm/npm/commit/6eacc1bc1925fe3cc79fc97bdc3194d944fce55e) - `npm-registry-mock@1.1.0` - ([@addaleax](https://github.com/addaleax)) -* [`a9b6d77`](https://github.com/npm/npm/commit/a9b6d775e61cf090df0e13514c624f99bf31d1e7) - `aproba@1.1.1` - ([@iarna](https://github.com/iarna)) - -### v4.2.0 (2017-01-26): - -Hi all! I'm Kat, and I'm currently sitting in a train traveling at ~300km/h -through Spain. So clearly, this release should have *something* to do with -speed. And it does! Heck, with this release, you could say we're really -_blazing_, even. 🌲🔥😏 - -#### IMPROVED CLI SEARCH~ - -You might recall if you've been keeping up that one of the reasons for a -semver-major bump to `npm@4` was an improved CLI search (read: no longer blowing -up Node). The work done for that new search system, while still relying on a -full metadata download and local search, was also meant to act as groundwork for -then-ongoing work on a brand-new, smarter search system for npm. Shortly after -`npm@4` came out, the bulk of the server-side work was done, and with this -release, the npm CLI has integrated use of the new endpoint for high-quality, -fast-turnaround searches. - -No, seriously, it's *fast*. And *relevant*: - -[![GOTTA GO FAST! This is a gif of the new npm search returning results in around a second for `npm search web framework`.](https://cloud.githubusercontent.com/assets/17535/21954136/f007e8be-d9fd-11e6-9231-f899c12790e0.gif)](https://github.com/npm/npm/pull/15481) - -Give it a shot! And remember to check out the new website version of the search, -too, which uses the same backend as the CLI now. 🎉 - -Incidentally, the backend is a public service, so you can write your own search -tools, be they web-based, CLI, or GUI-based. You can read up on the [full -documentation for the search -endpoint](https://github.com/npm/registry/blob/master/docs/REGISTRY-API.md#get-v1search), -and let us know about the cool things you come up with! - -* [`ce3ca51`](https://github.com/npm/npm/commit/ce3ca51ca2d60e15e901c8bf6256338e53e1eca2) - [#15481](https://github.com/npm/npm/pull/15481) - Add an internal `gunzip-maybe` utility for optional gunzipping. - ([@zkat](https://github.com/zkat)) -* [`e322932`](https://github.com/npm/npm/commit/e3229324d507fda10ea9e94fd4de8a4ae5025c75) [`a53055e`](https://github.com/npm/npm/commit/a53055e423f1fe168f05047aa0dfec6d963cb211) [`a1f4365`](https://github.com/npm/npm/commit/a1f436570730c6e4a173ca92d1967a87c29b7f2d) [`c56618c`](https://github.com/npm/npm/commit/c56618c62854ea61f6f716dffe7bcac80b5f4144) - [#15481](https://github.com/npm/npm/pull/15481) - Add support for using the new npm search endpoint for fast, quality search - results. Includes a fallback to "classic" search. - ([@zkat](https://github.com/zkat)) - -#### WHERE DID THE DEBUG LOGS GO - -This is another pretty significant change: Usually, when the npm process -crashed, you would get an `npm-debug.log` in your current working directory. -This debug log would get cleared out as soon as you ran npm again. This was a -bit annoying because 1) you would get a random file in your `git status` that -you might accidentally commit, and 2) if you hit a hard-to-reproduce bug and -instinctually tried again, you would no longer have access to the repro -`npm-debug.log`. - -So now, any time a crash happens, we'll save your debug logs to your cache -folder, under `_logs` (`~/.npm` on *nix, by default -- use `npm config get -cache` to see what your current value is). The cache will now hold a -(configurable) number of `npm-debug.log` files, which you can access in the -future. Hopefully this will help clean stuff up and reduce frustration from -missed repros! In the future, this will also be used by `npm report` to make it -super easy to put up issues about crashes you run into with npm. 💃🕺🏿👯‍♂️ - -* [`04fca22`](https://github.com/npm/npm/commit/04fca223a0f704b69340c5f81b26907238fad878) - [#11439](https://github.com/npm/npm/pull/11439) - Put debug logs in `$(npm get cache)/_logs` and store multiple log files. - ([@KenanY](https://github.com/KenanY)) - ([@othiym23](https://github.com/othiym23)) - ([@isaacs](https://github.com/isaacs)) - ([@iarna](https://github.com/iarna)) - -#### DOCS - -* [`ae8e71c`](https://github.com/npm/npm/commit/ae8e71c2b7d64d782af287a21e146d7cea6e5273) - [#15402](https://github.com/npm/npm/pull/15402) - Add missing backtick in one of the `npm doctor` messages. - ([@watilde](https://github.com/watilde), [@charlotteis](https://github.com/charlotteis)) -* [`821fee6`](https://github.com/npm/npm/commit/821fee6d0b12a324e035c397ae73904db97d07d2) - [#15480](https://github.com/npm/npm/pull/15480) - Clarify that unscoped packages can depend on scoped packages and vice-versa. - ([@chocolateboy](https://github.com/chocolateboy)) -* [`2ee45a8`](https://github.com/npm/npm/commit/2ee45a884137ae0706b7c741c671fef2cb3bac96) - [#15515](https://github.com/npm/npm/pull/15515) - Update minimum supported Node version number in the README to `node@>=4`. - ([@watilde](https://github.com/watilde)) -* [`af06aa9`](https://github.com/npm/npm/commit/af06aa9a357578a8fd58c575f3dbe55bc65fc376) - [#15520](https://github.com/npm/npm/pull/15520) - Add section to `npm-scope` docs to explain that scope owners will own scoped - packages with that scope. That is, user `@alice` is not allowed to publish to - `@bob/my-package` unless explicitly made an owner by user (or org) `@bob`. - ([@hzoo](https://github.com/hzoo)) -* [`bc892e6`](https://github.com/npm/npm/commit/bc892e6d07a4c6646480703641a4d71129c38b6d) - [#15539](https://github.com/npm/npm/pull/15539) - Replace `http` with `https` and fix typos in some docs. - ([@watilde](https://github.com/watilde)) -* [`1dfe875`](https://github.com/npm/npm/commit/1dfe875b9ac61a0ab9f61a2eab02bacf6cce583c) - [#15545](https://github.com/npm/npm/pull/15545) - Update Node.js download link to point to the right place. - ([@watilde](https://github.com/watilde)) - -#### DEPENDENCIES - - * [`b824bfb`](https://github.com/npm/npm/commit/b824bfbeb2d89c92762e9170b026af98b5a3668a) - `ansi-regex@2.1.1` - * [`81ea3e8`](https://github.com/npm/npm/commit/81ea3e8e4ea34cd9c2b418512dcb508abcee1380) - `mississippi@1.3.0` - -#### MISC - -* [`98df212`](https://github.com/npm/npm/commit/98df212a91fd6ff4a02b9cd247f4166f93d3977a) - [#15492](https://github.com/npm/npm/pull/15492) - Update the "master" node version used for AppVeyor to `node@7`. - ([@watilde](https://github.com/watilde)) -* [`d75fc03`](https://github.com/npm/npm/commit/d75fc03eda5364f12ac266fa4f66e31c2e44e864) - [#15413](https://github.com/npm/npm/pull/15413) - `npm run-script` now exits with the child process' exit code on exit. - ([@kapals](https://github.com/kapals)) - -### v4.1.2 (2017-01-12) - -We have a twee little release this week as we come back from the holidays. - -#### 0.12 IS UNSUPPORTED NOW (really) - -After [jumping the gun a -little](https://github.com/npm/npm/releases/tag/v4.0.2), we can now -officially remove 0.12 from our supported versions list. The Node.js -project has now officially ended even maintenance support for 0.12 and thus, -so will we. To reiterate from the last time we did this: - -What this means: - -* Your contributions will no longer block on the tests passing on 0.12. -* We will no longer block dependency upgrades on working with 0.12. -* Bugs filed on the npm CLI that are due to incompatibilities with 0.12 - (and older versions) will be closed with a strong urging to upgrade to a - supported version of Node. -* On the flip side, we'll continue to (happily!) accept patches that - address regressions seen when running the CLI with Node.js 0.12. - -What this doesn't mean: - -* The CLI is going to start depending on ES2015+ features. npm continues - to work, in almost all cases, all the way back to Node.js 0.8, and our - long history of backwards compatibility is a source of pride for the - team. -* We aren't concerned about the problems of users who, for whatever - reason, can't update to newer versions of npm. As mentioned above, we're - happy to take community patches intended to address regressions. - -We're not super interested in taking sides on what version of Node.js -you "should" be running. We're a workflow tool, and we understand that -you all have a diverse set of operational environments you need to be -able to support. At the same time, we _are_ a small team, and we need -to put some limits on what we support. Tracking what's supported by our -runtime's own team seems most practical, so that's what we're doing. - -* [`c7bbba8`](https://github.com/npm/npm/commit/c7bbba8744b62448103a1510c65d9751288abb5d) - Remove 0.12 from our supported versions list. - ([@iarna](https://github.com/iarna)) - -#### WRITING TO SYMLINKED `package.json` (AND OTHER FILES) - -If your `package.json`, `npm-shrinkwrap.json` or `.npmrc` were a symlink and -you used an `npm` command that modified one of these (eg `npm config set` or -`npm install --save`) then previously we would have removed your symlink and -replaced it with an ordinary file. While making these files symlinks is pretty -uncommon, this was still surprising behavior. With this fix we now overwrite -the _destination_ of the symlink and preserve the symlink itself. - -* [`a583983`](https://github.com/npm/npm/commit/a5839833d3de7072be06884b91902c093aff1aed) - [write-file-atomic/#5](https://github.com/npm/write-file-atomic/issues/5) - [#10223](https://github.com/npm/npm/10223) - `write-file-atomic@1.3.1`: - When the target is a symlink, write-file-atomic now overwrites the - _destination_ of the symlink, instead of replacing the symlink itself. This - makes it's behavior match `fs.writeFile`. - - Fixed a bug where it would ALWAYS fs.stat to look up default mode and chown - values even if you'd passed them in. (It still used the values you passed - in, but did a needless stat.) - ([@iarna](https://github.com/iarna)) - -#### DEPENDENCY UPDATES - -* [`521f230`](https://github.com/npm/npm/commit/521f230dd57261e64ac9613b3db62f5312971dca) - `node-gyp@3.5.0`: - Improvements to how Python is located. New `--devdir` flag. - ([@bnoordhuis](https://github.com/bnoordhuis)) - ([@mhart](https://github.com/mhart)) -* [`ccd83e8`](https://github.com/npm/npm/commit/ccd83e8a70d35fb0904f8a9adb2ff7ac8a6b2706) - `JSONStream@1.3.0`: - Add new emitPath option. - ([@nathanwills](https://github.com/nathanwills)) - -#### TEST IMPROVEMENTS - -* [`d76e084`](https://github.com/npm/npm/commit/d76e08463fd65705217624b861a1443811692f34) - Disable metric reporting for test suite even if the user has it enabled. - ([@iarna](https://github.com/iarna)) - -### v4.1.1 (2016-12-16) - -This fixes a bug in the metrics reporting where, if you had enabled it then -installs would create a metrics reporting process, that would create a -metrics reporting process, that would… well, you get the idea. The only -way to actually kill these processes is to turn off your networking, then -on MacOS/Linux kill them with `kill -9`. Alternatively you can just reboot. - -Anyway, this is a quick release to fix that bug: - -* [`51c393f`](https://github.com/npm/npm/commit/51c393feff5f4908c8a9fb02baef505b1f2259be) - [#15237](https://github.com/npm/npm/pull/15237) - Don't launch a metrics sender process if we're running from a metrics - sender process. - ([@iarna](https://github.com/iarna)) - -### v4.1.0 (2016-12-15) - -I'm really excited about `npm@4.1.0`. I know, I know, I'm kinda overexcited -in my changelogs, but this one is GREAT. We've got a WHOLE NEW subcommand, I -mean, when was the last time you saw that? YEARS! And we have the beginnings -of usage metrics reporting. Then there's a fix for a really subtle bug that -resulted in `shasum` errors. And then we also have a few more bug fixes and -other improvements. - -#### ANONYMOUS METRIC REPORTING - -We're adding the ability for you all to help us track the quality of your -experiences using `npm`. Metrics will be sent if you run: - -``` -npm config set send-metrics true -``` - -Then `npm` will report to `registry.npmjs.org` the number of successful and -failed installations you've had. The data contains no identifying -information and npm will not attempt to correlate things like IP address -with the metrics being submitted. - -Currently we only track number of successful and failed installations. In -the future we would like to find additional metrics to help us better -quantify the quality of the `npm` experience. - -* [`190a658`](https://github.com/npm/npm/commit/190a658c4222f6aa904cbc640fc394a5c875e4db) - [#15084](https://github.com/npm/npm/pull/15084) - Add facility for recording and reporting success metrics. - ([@iarna](https://github.com/iarna)) -* [`87afc8b`](https://github.com/npm/npm/commit/87afc8b466f553fb49746c932c259173de48d0a4) - [npm/npm-registry-client#147](https://github.com/npm/npm-registry-client/pull/148) - `npm-registry-client@7.4.5`: - Add support for sending anonymous CLI metrics. - ([@iarna](https://github.com/iarna), - [@sisidovski](https://github.com/sisidovski)) - -### NPM DOCTOR - -<pre> -<u>Check</u> <u>Value</u> <u>Recommendation</u> -npm ping ok -npm -v v4.0.5 -node -v v4.6.1 Use node v6.9.2 -npm config get registry https://registry.npmjs.org/ -which git /Users/rebecca/bin/git -Perms check on cached files ok -Perms check on global node_modules ok -Perms check on local node_modules ok -Checksum cached files ok -</pre> - -It's a rare day that we add a new command to `npm`, so I'm excited to -present to you `npm doctor`. It checks for a number of common problems and -provides some recommended solutions. It was put together through the hard -work of [@watilde](https://github.com/watilde). - -* [`2359505`](https://github.com/npm/npm/commit/23595055669f76c9fe8f5f1cf4a705c2e794f0dc) - [`0209ee5`](https://github.com/npm/npm/commit/0209ee50448441695fbf9699019d34178b69ba73) - [#14582](https://github.com/npm/npm/pull/14582) - Add new `npm doctor` to give your project environment a health check. - ([@watilde](https://github.com/watilde)) - -#### FIX MAJOR SOURCE OF SHASUM ERRORS - -If you've been getting intermittent shasum errors then you'll be pleased to -know that we've tracked down at least one source of them, if not THE source -of them. - -* [`87afc8b`](https://github.com/npm/npm/commit/87afc8b466f553fb49746c932c259173de48d0a4) - [#14626](https://github.com/npm/npm/issues/14626) - [npm/npm-registry-client#148](https://github.com/npm/npm-registry-client/pull/148) - `npm-registry-client@7.4.5`: - Fix a bug where an `ECONNRESET` while fetching a package file would result - in a partial download that would be reported as a "shasum mismatch". It - now throws away the partial download and retries it. - ([@iarna](https://github.com/iarna)) - -#### FILE URLS AND NODE.JS 7 - -When `npm` was formatting `file` URLs we took advantage of `url.format` to -construct them. Node.js 7 changed the behavior in such a way that our use of -`url.format` stopped producing URLs that we could make use of. - -The reasons for this have to do with the `file` URL specification and how -invalid (according to the specification) URLs are handled. How this changed -is most easily explained with a table: - -<table> -<tr><th></th><th>URL</th><th>Node.js <= 6</th><th><tt>npm</tt>'s understanding</th><th>Node.js 7</th><th><tt>npm</tt>'s understanding</th></tr> -<tr><td>VALID</td><td><tt>file:///abc/def</tt></td><td><tt>file:///abc/def</tt></td><td><tt>/abc/def</tt></td><td><tt>file:///abc/def</tt></td><td><tt>/abc/def</tt></td></tr> -<tr><td>invalid</td><td><tt>file:/abc/def</tt></td><td><tt>file:/abc/def</tt></td><td><tt>/abc/def</tt></td><td><tt>file:///abc/def</tt></td><td><tt>/abc/def</tt></td></tr> -<tr><td>invalid</td><td><tt>file:abc/def</tt></td><td><tt>file:abc/def</tt></td><td><tt>$CWD/abc/def</tt></td><td><tt>file://abc/def</tt></td><td><tt>/def</tt> on the <tt>abc</tt> host</td></tr> -<tr><td>invalid</td><td><tt>file:../abc/def</tt></td><td><tt>file:../abc/def</tt></td><td><tt>$CWD/../abc/def</tt></td><td><tt>file://../abc/def</tt></td><td><tt>/abc/def</tt> on the <tt>..</tt> host</td></tr> -</table> - -So the result was that passing a `file` URL that npm had received that used -through Node.js 7's `url.format` changed its meaning as far as `npm` was -concerned. As those kinds of URLs are, per the specification, invalid, how -they should be handled is undefined and so the change in Node.js wasn't a -bug per se. - -Our solution is to stop using `url.format` when constructing this kind of -URL. - -* [`173935b`](https://github.com/npm/npm/commit/173935b4298e09c4fdcb8f3a44b06134d5aff181) - [#15114](https://github.com/npm/npm/issues/15114) - Stop using `url.format` for relative local dep paths. - ([@zkat](https://github.com/zkat)) - -#### EXTRANEOUS LIFECYCLE SCRIPT EXECUTION WHEN REMOVING - -* [`afb1dfd`](https://github.com/npm/npm/commit/afb1dfd944e57add25a05770c0d52d983dc4e96c) - [#15090](https://github.com/npm/npm/pull/15090) - Skip top level lifecycles when uninstalling. - ([@iarna](https://github.com/iarna)) - -#### REFACTORING AND INTERNALS - -* [`c9b279a`](https://github.com/npm/npm/commit/c9b279aca0fcb8d0e483e534c7f9a7250e2a9392) - [#15205](https://github.com/npm/npm/pull/15205) - [#15196](https://github.com/npm/npm/pull/15196) - Only have one function that determines which version of a package to use - given a specifier and a list of versions. - ([@iarna](https://github.com/iarna), - [@zkat](https://github.com/zkat)) - -* [`981ce63`](https://github.com/npm/npm/commit/981ce6395e7892dde2591b44e484e191f8625431) - [#15090](https://github.com/npm/npm/pull/15090) - Rewrite prune to use modern npm plumbing. - ([@iarna](https://github.com/iarna)) - -* [`bc4b739`](https://github.com/npm/npm/commit/bc4b73911f58a11b4a2d28b49e24b4dd7365f95b) - [#15089](https://github.com/npm/npm/pull/15089) - Rename functions and variables in the module that computes what changes to - make to your installation. - ([@iarna](https://github.com/iarna)) - -* [`2449f74`](https://github.com/npm/npm/commit/2449f74a202b3efdb1b2f5a83356a78ea9ecbe35) - [#15089](https://github.com/npm/npm/pull/15089) - When computing changes to make to your installation, use a function to add - new actions to take instead of just pushing on a list. - ([@iarna](https://github.com/iarna)) - -#### IMPROVED LOGGING - -* [`335933a`](https://github.com/npm/npm/commit/335933a05396258eead139d27eea3f7668ccdfab) - [#15089](https://github.com/npm/npm/pull/15089) - Log when we remove obsolete dependencies in the tree. - ([@iarna](https://github.com/iarna)) - -#### DOCUMENTATION - -* [`33ca4e6`](https://github.com/npm/npm/commit/33ca4e6db3c1878cbc40d5e862ab49bb0e82cfb2) - [#15157](https://github.com/npm/npm/pull/15157) - Update `npm cache` docs to use more consistent language - ([@JonahMoses](https://github.com/JonahMoses)) - -#### DEPENDENCY UPDATES - -* [`c2d22fa`](https://github.com/npm/npm/commit/c2d22faf916e8260136a1cc95913ca474421c0d3) - [#15215](https://github.com/npm/npm/pull/15215) - `nopt@4.0.1`: - The breaking change is a small tweak to how empty string values are - handled. See the brand-new - [CHANGELOG.md for nopt](https://github.com/npm/nopt/blob/v4.0.1/CHANGELOG.md) for further - details about what's changed in this release! - ([@adius](https://github.com/adius), - [@samjonester](https://github.com/samjonester), - [@elidoran](https://github.com/elidoran), - [@helio](https://github.com/helio), - [@silkentrance](https://github.com/silkentrance), - [@othiym23](https://github.com/othiym23)) -* [`54d949b`](https://github.com/npm/npm/commit/54d949b05adefffeb7b5b10229c5fe0ccb929ac3) - [npm/lockfile#24](https://github.com/npm/lockfile/pull/24) - `lockfile@1.0.3`: - Handled case where callback was not passed in by the user. - ([@ORESoftware](https://github.com/ORESoftware)) -* [`54acc03`](https://github.com/npm/npm/commit/54acc0389b39850c0725d0868cb5e61317b57503) - `npmlog@4.0.2`: - Documentation update. - ([@helio-frota](https://github.com/helio-frota)) -* [`57f4bc1`](https://github.com/npm/npm/commit/57f4bc1150322294c1ea0a287ad0a8e457c151e6) - `osenv@0.1.4`: - Test changes. - ([@isaacs](https://github.com/isaacs)) -* [`bea1a2d`](https://github.com/npm/npm/commit/bea1a2d0db566560e13ecc1d5f42e55811269c88) - `retry@0.10.1`: - No changes. - ([@tim-kos](https://github.com/tim-kos)) -* [`6749e39`](https://github.com/npm/npm/commit/6749e395f868109afd97f79d36507e6567dd48fb) - [kapouer/marked-man#9](https://github.com/kapouer/marked-man/pull/9) - `marked-man@0.2.0`: - Add table support. - ([@gholk](https://github.com/gholk)) - -### v4.0.5 (2016-12-01) - -It's that time of year! December is upon us, which means y'all are just going to -be doing a lot less, in general, for the next month or so. The "Xmas Chasm", as -we like to call it, has already begun. So for those of you reading it from the -other side: Hi! Welcome back! - -This week's release is a relatively small one, involving just a few bugfixes and -dependency upgrades. The CLI team has been busy recently with scoping out -`npm@5`, and starting to do initial spec work for in-scope stuff. - -#### BUGFIXES - -On to the actual changes! - -* [`9776d8f`](https://github.com/npm/npm/commit/9776d8f70a0ea8d921cbbcab7a54e52c15fc455f) - [#15081](https://github.com/npm/npm/pull/15081) - `bundledDependencies` are intended to be left untouched by the installer, as - much as possible -- if they're bundled, we assume that you want to be - particular about the contents of your bundle. - - The installer used to have a corner case where existing dependencies that had - bundledDependencies would get clobbered by as the installer moved stuff - around, even though the installer already avoided moving deps that were - themselves bundled. This is now fixed, along with the connected crasher, and - your bundledDeps should be left even more intact than before! - ([@iarna](https://github.com/iarna)) -* [`fc61c08`](https://github.com/npm/npm/commit/fc61c082122104031ccfb2a888432c9f809a0e8b) - [#15082](https://github.com/npm/npm/pull/15082) - Initialize nodes from bundled dependencies. This should address - [#14427](https://github.com/npm/npm/issues/14427) and related issues, but it's - turned out to be a tremendously difficult issue to reproduce in a test. We - decided to include it even pending tests, because we found the root cause of - the errors. - ([@iarna](https://github.com/iarna)) -* [`d8471a2`](https://github.com/npm/npm/commit/d8471a294ef848fc893f60e17d6ec6695b975d16) - [#12811](https://github.com/npm/npm/pull/12811) - Consider `devDependencies` when deciding whether to hoist a package. This - should resolve a variety of missing dependency issues some folks were seeing - when `devDependencies` happened to also be dependencies of your - `dependencies`. This often manifested as modules going missing, or only being - installed, after `npm install` was called twice. - ([@schmod](https://github.com/schmod)) - -#### DEPENDENCY UPDATES - -* [`5978703`](https://github.com/npm/npm/commit/5978703da8669adae464789b1b15ee71d7f8d55d) - `graceful-fs@4.1.11`: - `EPERM` errors are Windows are now handled more gracefully. Windows users that - tended to see these errors due to, say, an antivirus-induced race condition, - should see them much more rarely, if at all. - ([@zkatr](https://github.com/zkat)) -* [`85b0174`](https://github.com/npm/npm/commit/85b0174ba9842e8e89f3c33d009e4b4a9e877c7d) - `request@2.79.0` - ([@zkat](https://github.com/zkat)) -* [`9664d36`](https://github.com/npm/npm/commit/9664d36653503247737630440bc2ff657de965c3) - `tap@8.0.1` - ([@zkat](https://github.com/zkat)) - -#### MISCELLANEOUS - -* [`f0f7b0f`](https://github.com/npm/npm/commit/f0f7b0fd025daa2b69994130345e6e8fdaaa0304) - [#15083](https://github.com/npm/npm/pull/15083) - Removed dead code. - ([@iarna](https://github.com/iarna)) * [`bc32afe`](https://github.com/npm/npm/commit/bc32afe4d12e3760fb5a26466dc9c26a5a2981d5) [`c8a22fe`](https://github.com/npm/npm/commit/c8a22fe5320550e09c978abe560b62ce732686f4) [`db2666d`](https://github.com/npm/npm/commit/db2666d8c078fc69d0c02c6a3de9b31be1e995e9) - [#15085](https://github.com/npm/npm/pull/15085) - Change some network tests so they can run offline. - ([@iarna](https://github.com/iarna)) -* [`744a39b`](https://github.com/npm/npm/commit/744a39b836821b388ad8c848bd898c1d006689a9) - [#15085](https://github.com/npm/npm/pull/15085) - Make Node.js tests compatible with Windows. - ([@iarna](https://github.com/iarna)) - -### v4.0.3 (2016-11-17) - -Hey you all, we've got a couple of bug fixes for you, a slew of -documentation improvements and some improvements to our CI environment. I -know we just got v4 out the door, but the CLI team is already busy planning -v5. We'll have more for you in early December. - -#### BUG FIXES - -* [`45d40d9`](https://github.com/npm/npm/commit/45d40d96d2cd145f1e36702d6ade8cd033f7f332) - [`ba2adc2`](https://github.com/npm/npm/commit/ba2adc2e822d5e75021c12f13e3f74ea2edbde32) - [`1dc8908`](https://github.com/npm/npm/commit/1dc890807bd78a1794063688af31287ed25a2f06) - [`2ba19ee`](https://github.com/npm/npm/commit/2ba19ee643d612d103cdd8f288d313b00d05ee87) - [#14403](https://github.com/npm/npm/pull/14403) - Fix a bug where a scoped module could produce crashes when incorrectly - computing the paths related to their location. This patch reorganizes how path information - is passed in to eliminate the possibility of this sort of bug. - ([@iarna](https://github.com/iarna)) - ([@NatalieWolfe](https://github.com/NatalieWolfe)) -* [`1011ec6`](https://github.com/npm/npm/commit/1011ec61230288c827a1c256735c55cf03d6228f) - [npm/npmlog#46](https://github.com/npm/npmlog/pull/46) - `npmlog@4.0.1`: Fix a bug where the progress bar would still display even if - you passed in `--no-progress`. - ([@iarna](https://github.com/iarna)) - -#### DOCUMENTATION UPDATES - -* [`c3ac177`](https://github.com/npm/npm/commit/c3ac177236124c80524c5f252ba8f6670f05dcd8) - [#14406](https://github.com/npm/npm/pull/14406) - Sync up the dispute policy included with the CLI with the [current official text](https://www.npmjs.com/policies/disputes). - ([@mike-engel](https://github.com/mike-engel)) -* [`9c663b2`](https://github.com/npm/npm/commit/9c663b2dd8552f892dc0205330bbc73a484ecd81) - [#14627](https://github.com/npm/npm/pull/14627) - Update build status branch in README. - ([@cameronroe](https://github.com/cameronroe)) -* [`8a8a0a3`](https://github.com/npm/npm/commit/8a8a0a3d490fc767def208f925cdff57e16e565b) - [#14609](https://github.com/npm/npm/pull/14609) - Update examples URLs of GitHub repos where those repos have moved to new URLs. - ([@dougwilson](https://github.com/dougwilson)) -* [`7a6425b`](https://github.com/npm/npm/commit/7a6425bcd4decde5d4b0af8b507e98723a07c680) - [#14472](https://github.com/npm/npm/pull/14472) - Document `sign-git-tag` in - [npm-version(1)](https://github.com/npm/npm/blob/release-next/doc/cli/npm-version.md)'s - configuration section. - ([@strugee](https://github.com/strugee)) -* [`f3087cc`](https://github.com/npm/npm/commit/f3087cc58c903d9a70275be805ebaf0eadbcbe1b) - [#14546](https://github.com/npm/npm/pull/14546) - Add a note about the dangers of configuring npm via uppercase env vars. - ([@tuhoojabotti](https://github.com/tuhoojabotti)) -* [`50e51b0`](https://github.com/npm/npm/commit/50e51b04a143959048cf9e1e4c8fe15094f480b0) - [#14559](https://github.com/npm/npm/pull/14559) - Remove documentation that incorrectly stated that we check `.npmrc` permissions. - ([@iarna](https://github.com/iarna)) - -##### OH UH, HELLO AGAIN NODE.JS 0.12 - -* [`6f0c353`](https://github.com/npm/npm/commit/6f0c353e4e89b0378a4c88c829ccf9a1c5ae829d) - [`f78bde6`](https://github.com/npm/npm/commit/f78bde6983bdca63d5fcb9c220c87e8f75ffb70e) - [#14591](https://github.com/npm/npm/pull/14591) - Reintroduce Node.js 0.12 to our support matrix. We jumped the gun when - removing it. We won't drop support for it till the Node.js project does - so at the end of December 2016. - ([@othiym23](https://github.com/othiym23)) - -#### TEST/CI UPDATES - -* [`aa73d1c`](https://github.com/npm/npm/commit/aa73d1c1cc22608f95382a35b33da252addff38e) - [`c914e80`](https://github.com/npm/npm/commit/c914e80f5abcb16c572fe756c89cf0bcef4ff991) -* [`58fe064`](https://github.com/npm/npm/commit/58fe064dcc80bc08c677647832f2adb4a56b538a) - [#14602](https://github.com/npm/npm/pull/14602) - When running tests with coverage, use nyc's cache. This provides an 8x speedup! - ([@bcoe](https://github.com/bcoe)) -* [`ba091ce`](https://github.com/npm/npm/commit/ba091ce843af5d694f4540e825b095435b3558d8) - [#14435](https://github.com/npm/npm/pull/14435) - Remove an unused zero byte `package.json` found in the test fixtures. - ([@baderbuddy](https://github.com/baderbuddy)) - -#### DEPENDENCY UPDATES - -* [`442e01e`](https://github.com/npm/npm/commit/442e01e42d8a439809f6726032e3b73ac0d2b2f8) - `readable-stream@2.2.2`: - Bring in latest changes from Node.js 7.x. - ([@calvinmetcalf](https://github.com/calvinmetcalf)) -* [`bfc4a1c`](https://github.com/npm/npm/commit/bfc4a1c0c17ef0a00dfaa09beba3389598a46535) - `which@1.2.12`: - Remove unused require. - ([@isaacs](https://github.com/isaacs)) - -#### DEV DEPENDENCY UPDATES - -* [`7075b05`](https://github.com/npm/npm/commit/7075b054d8d2452bb53bee9b170498a48a0dc4e9) - `marked-man@0.1.6` - ([@kapouer](https://github.com/kapouer)) -* [`3e13fea`](https://github.com/npm/npm/commit/3e13fea907ee1141506a6de7d26cbc91c28fdb80) - `tap@8.0.0` - ([@isaacs](https://github.com/isaacs)) - -### v4.0.2 (2016-11-03) - -Hola, amigxs. I know it's been a long time since I rapped at ya, but I -been spending a lotta time quietly reflecting on all the things going on -in my life. I was, like, [in Japan for a while](https://gist.github.com/othiym23/c98bd4ef5d9fb3f496835bd481ef40ae), -and before that my swell colleagues [@zkat](https://github.com/zkat) and -[@iarna](https://github.com/iarna) have been very capably managing the release -process for quite a while. But I returned from Japan somewhat refreshed, very -jetlagged, and filled with a burning urge to get `npm@4` as stable as possible -before we push it out to the user community at large, so I decided to do this -release myself. (Also, huge thanks to Kat and Rebecca for putting out `npm@4` -so capably while I was on vacation! So cool to return to a major release having -gone so well without my involvement!) - -That said... - -#### NEVER TRUST AN X.0.0 RELEASE - -Even though 4.0.1 came out hard on the heels of 4.0.0 with a couple -critical fixes, we've found a couple other major issues that we want to -see fixed before making `npm@4` into `npm@latest`. Some of these are -arguably breaking changes on their own, so now is the time to get them -out if we're going to do so before `npm@5`, and all of them are pretty -significant blockers for a substantial number of users, so now is the -best time to fix them. - -##### PREPUBLISHONLY WHOOPS - -The code running the `publish*` lifecycle events was very confusingly written. -In fact, we didn't really figure out what it was doing until we added the new -`prepublishOnly` event and it was running people's scripts from the wrong -directory. We made it simpler. See the [commit -message](https://github.com/npm/npm/commit/8b32d67aa277fd7e62edbed886387a855f58387f) -for details. - -Because the change is no longer running publish events when publishing prebuilt -artifacts, it's technically a breaking / semver-major change. In the off chance -that the new behavior breaks any of y'all's workflows, let us know, and we can -roll some or all of this change back until `npm@5` (or forever, if that works -better for you). - -* [`8b32d67`](https://github.com/npm/npm/commit/8b32d67aa277fd7e62edbed886387a855f58387f) - [#14502](https://github.com/npm/npm/pull/14502) - Simplify lifecycle invocation and fix `prepublishOnly`. - ([@othiym23](https://github.com/othiym23)) - -##### G'BYE NODE.JS 0.10, 0.12, and 5.X; HI THERE, NODE 7 - -With the advent of the second official Node.js LTS release, Node 6.x -'Boron', the Node.js project has now officially dropped versions 0.10 -and 0.12 out of the maintenance phase of LTS. (Also, Node 5 was never -part of LTS, and will see no further support now that Node 7 has been -released.) As a small team with limited resources, the npm CLI team is -following suit and dropping those versions of Node from its CI test -matrix. - -What this means: - -* Your contributions will no longer block on the tests passing on 0.10 and 0.12. -* We will no longer block dependency upgrades on working with 0.10 and 0.12. -* Bugs filed on the npm CLI that are due to incompatibilities with 0.10 - or 0.12 (and older versions) will be closed with a strong urging to - upgrade to a supported version of Node. -* On the flip side, we'll continue to (happily!) accept patches that - address regressions seen when running the CLI with Node.js 0.10 and - 0.12. - -What this doesn't mean: - -* The CLI is going to start depending on ES2015+ features. npm continues - to work, in almost all cases, all the way back to Node.js 0.8, and our - long history of backwards compatibility is a source of pride for the - team. -* We aren't concerned about the problems of users who, for whatever - reason, can't update to newer versions of npm. As mentioned above, we're - happy to take community patches intended to address regressions. - -We're not super interested in taking sides on what version of Node.js -you "should" be running. We're a workflow tool, and we understand that -you all have a diverse set of operational environments you need to be -able to support. At the same time, we _are_ a small team, and we need -to put some limits on what we support. Tracking what's supported by our -runtime's own team seems most practical, so that's what we're doing. - -* [`ab630c9`](https://github.com/npm/npm/commit/ab630c9a7a1b40cdd4f1244be976c25ab1525907) - [#14503](https://github.com/npm/npm/pull/14503) - Node 6 is LTS; 5.x, 0.10, and 0.12 are unsupported. - ([@othiym23](https://github.com/othiym23)) -* [`731ae52`](https://github.com/npm/npm/commit/731ae526fb6e9951c43d82a26ccd357b63cc56c2) - [#14503](https://github.com/npm/npm/pull/14503) - Update supported version expression. - ([@othiym23](https://github.com/othiym23)) - -##### DISENTANGLING SCOPE - -The new `Npm-Scope` header was previously reusing the `scope` -configuration option to pass the current scope back to your current -registry (which, as [described -previously](https://github.com/npm/npm/blob/release-next/CHANGELOG.md#send-extra-headers-to-registry), is meant to set up some upcoming -registry features). It turns out that had some [seriously weird -consequences](https://github.com/npm/npm/issues/14412) in the case where -you were already configuring `scope` in your own environment. The CLI -now uses separate configuration for this. - -* [`39358f7`](https://github.com/npm/npm/commit/39358f732ded4aa46d86d593393a0d6bca5dc12a) - [#14477](https://github.com/npm/npm/pull/14477) - Differentiate registry scope from project scope in configuration. - ([@zkat](https://github.com/zkat)) - -#### SMALLER CHANGES - -* [`7f41295`](https://github.com/npm/npm/commit/7f41295775f28b958a926f9cb371cb37b05771dd) - [#14519](https://github.com/npm/npm/pull/14519) - Document that as of `npm@4.0.1`, `npm shrinkwrap` now includes `devDependencies` unless - instructed otherwise. - ([@iarna](https://github.com/iarna)) -* [`bdc2f9e`](https://github.com/npm/npm/commit/bdc2f9e255ddf1a47fd13ec8749d17ed41638b2c) - [#14501](https://github.com/npm/npm/pull/14501) - The `ENOSELF` error message is tricky to word. It's also an error that - normally bites new users. Clean it up in an effort to make it easier - to understand what's going on. - ([@snopeks](https://github.com/snopeks), [@zkat](https://github.com/zkat)) - -#### DEPENDENCY UPGRADES - -* [`a52d0f0`](https://github.com/npm/npm/commit/a52d0f0c9cf2de5caef77e12eabd7dca9e89b49c) - `glob@7.1.1`: - - Handle files without associated perms on Windows. - - Fix failing case with `absolute` option. - ([@isaacs](https://github.com/isaacs), [@phated](https://github.com/phated)) -* [`afda66d`](https://github.com/npm/npm/commit/afda66d9afcdcbae1d148f589287583c4182d124) - [isaacs/node-graceful-fs#97](https://github.com/isaacs/node-graceful-fs/pull/97) - `graceful-fs@4.1.10`: Better backoff for EPERM on Windows. - ([@sam-github](https://github.com/sam-github)) -* [`e0023c0`](https://github.com/npm/npm/commit/e0023c089ded9161fbcbe544f12b07e12e3e5729) - [npm/inflight#3](https://github.com/npm/inflight/pull/3) - `inflight@1.0.6`: Clean up even if / when a callback throws. - ([@phated](https://github.com/phated)) -* [`1d91594`](https://github.com/npm/npm/commit/1d9159440364d2fe21e8bc15e08e284aaa118347) - `request@2.78.0` - ([@othiym23](https://github.com/othiym23)) - -### v4.0.1 (2016-10-24) - -Ayyyy~ 🌊 - -So thanks to folks who were running on `npm@next`, we managed to find a few -issues of notes in that preview version, and we're rolling out a small patch -change to fix them. Most notably, anyone who was using a symlinked `node` binary -(for example, if they installed Node.js through `homebrew`), was getting a very -loud warning every time they ran scripts. Y'all should get warnings in a more -useful way, now that we're resolving those path symlinks. - -Another fairly big change that we decided to slap into this version, since -`npm@4.0.0` is never going to be `latest`, is to make it so `devDependencies` -are included in `npm-shrinkwrap.json` by default -- if you do not want this, use -`--production` with `npm shrinkwrap`. - -#### BIG FIXES/CHANGES - -* [`eff46dd`](https://github.com/npm/npm/commit/eff46dd498ed007bfa77ab7782040a3a828b852d) - [#14374](https://github.com/npm/npm/pull/14374) - Fully resolve the path for `node` executables in both `$PATH` and - `process.execPath` to avoid issues with symlinked `node`. - ([@addaleax](https://github.com/addaleax)) -* [`964f2d3`](https://github.com/npm/npm/commit/964f2d3a0675584267e6ece95b0115a53c6ca6a9) - [#14375](https://github.com/npm/npm/pull/14375) - Make including `devDependencies` in `npm-shrinkwrap.json` the default. This - should help make the transition to `npm@5` smoother in the future. - ([@iarna](https://github.com/iarna)) - -#### BUGFIXES - -* [`a5b0a8d`](https://github.com/npm/npm/commit/a5b0a8db561916086fc7dbd6eb2836c952a42a7e) - [#14400](https://github.com/npm/npm/pull/14400) - Recently, we've had some consistent timeout failures while running the test - suite under Travis. This tweak to tests should take care of those issues and - Travis should go back to being reliably green. - ([@iarna](https://github.com/iarna)) - -#### DOC PATCHES - -* [`c5907b2`](https://github.com/npm/npm/commit/c5907b2fc1a82ec919afe3b370ecd34d8895c7a2) - [#14251](https://github.com/npm/npm/pull/14251) - Update links to Node.js downloads. They previously pointed to 404 pages.😬 - ([@ArtskydJ](https://github.com/ArtskydJ)) -* [`0c122f2`](https://github.com/npm/npm/commit/0c122f24ff1d4d400975edda2b7262aaaf6f7d69) - [#14380](https://github.com/npm/npm/pull/14380) - Add note and clarification on when `prepare` script is run. Make it more - consistent with surrounding descriptions. - ([@SimenB](https://github.com/SimenB)) -* [`51a62ab`](https://github.com/npm/npm/commit/51a62abd88324ba3dad18e18ca5e741f1d60883c) - [#14359](https://github.com/npm/npm/pull/14359) - Fixes typo in `npm@4` changelog. - ([@kimroen](https://github.com/kimroen)) - -### v4.0.0 (2016-10-20) - -Welcome to `npm@4`, friends! - -This is our first semver major release since the release of `npm@3` just over a -year ago. Back then, `@3` turned out to be a bit of a ground-shaking release, -with a brand-new installer with significant structural changes to how npm set up -your tree. This is the end of an era, in a way. `npm@4` also marks the release -when we move *both* `npm@2` and `npm@3` into maintenance: We will no longer be -updating those release branches with anything except critical bugfixes and -security patches. - -While its predecessor had some pretty serious impaact, `npm@4` is expected to -have a much smaller effect on your day-to-day use of npm. Over the past year, -we've collected a handful of breaking changes that we wanted to get in which are -only breaking under a strict semver interpretation (which we follow). Some of -these are simple usability improvements, while others fix crashes and serious -issues that required a major release to include. - -We hope this release sees you well, and you can look forward to an accelerated -release pace now that the CLI team is done focusing on sustaining work -- our -Windows fixing and big bugs pushes -- and we can start focusing again on -usability, features, and performance. Keep an eye out for `npm@5` in Q1 2017, -too: We're planning a major overhaul of `shrinkwrap` as well as various speed -and usability fixes for that release. It's gonna be a fun ride. I promise. 😘 - -#### BRIEF OVERVIEW OF **BREAKING** CHANGES - -The following breaking changes are included in this release: - -* `npm search` rewritten to stream results, and no longer supports sorting. -* `npm scripts` no longer prepend the path of the node executable used to run - npm before running scripts. A `--scripts-prepend-node-path` option has been - added to configure this behavior. -* `npat` has been removed. -* `prepublish` has been deprecated, replaced by `prepare`. A `prepublishOnly` - script has been temporarily added, which will *only* run on `npm publish`. -* `npm outdated` exits with exit code `1` if it finds any outdated packages. -* `npm tag` has been removed after a deprecation cycle. Use `npm dist-tag`. -* Partial shrinkwraps are no longer supported. `npm-shrinkwrap.json` is - considered a complete installation manifest except for `devDependencies`. -* npm's default git branch is no longer `master`. We'll be using `latest` from - now on. - -#### SEARCH REWRITE (**BREAKING**) - -Let's face it -- `npm search` simply doesn't work anymore. Apart from the fact -that it grew slower over the years, it's reached a point where we can no longer -fit the entire registry metadata in memory, and anyone who tries to use the -command now sees a really awful memory overflow crash from node. - -It's still going to be some time before the CLI, registry, and web team are able -to overhaul `npm search` altogether, but until then, we've rewritten the -previous `npm search` implementation to *stream* results on the fly, from both -the search endpoint and a local cache. In absolute terms, you won't see a -performance increase and this patch *does* come at the cost of sorting -capabilities, but what it does do is start outputting results as it finds them. -This should make the experience much better, overall, and we believe this is an -acceptable band-aid until we have that search endpoint in place. - -Incidentally, if you want a really nice search experience, we recommend checking -out [npms.io](http://npms.io), which includes a handy-dandy -[`npms-cli`](https://npm.im/npms-cli) for command-line usage -- it's an npm -search site that returns high-quality results quickly and is operated by members -of the npm community. - -* [`cfd43b4`](https://github.com/npm/npm/commit/cfd43b49aed36d0e8ea6c35b07ed8b303b69be61) [`2b8057b`](https://github.com/npm/npm/commit/2b8057be2e1b51e97b1f8f38d7f58edf3ce2c145) - [#13746](https://github.com/npm/npm/pull/13746) - Stream search process end-to-end. - ([@zkat](https://github.com/zkat) and [@aredridel](https://github.com/aredridel)) -* [`50f4ec8`](https://github.com/npm/npm/commit/50f4ec8e8ce642aa6a58cb046b2b770ccf0029db) [`70b4bc2`](https://github.com/npm/npm/commit/70b4bc22ec8e81cd33b9448f5b45afd1a50d50ba) [`8fb470f`](https://github.com/npm/npm/commit/8fb470fe755c4ad3295cb75d7b4266f8e67f8d38) [`ac3a6e0`](https://github.com/npm/npm/commit/ac3a6e0eba61fb40099b1370c74ad1598777def4) [`bad54dd`](https://github.com/npm/npm/commit/bad54dd9f1119fe900a8d065f8537c6f1968b589) [`87d504e`](https://github.com/npm/npm/commit/87d504e0a61bccf09f5e975007d018de3a1c5f50) - [#13746](https://github.com/npm/npm/pull/13746) - Updated search-related tests. - ([@zkat](https://github.com/zkat)) -* [`3596de8`](https://github.com/npm/npm/commit/3596de88598c69eb5bae108703c8e74ca198b20c) - [#13746](https://github.com/npm/npm/pull/13746) - `JSONStream@1.2.1` - ([@zkat](https://github.com/zkat)) -* [`4b09209`](https://github.com/npm/npm/commit/4b09209bb605f547243065032a8b37772669745f) - [#13746](https://github.com/npm/npm/pull/13746) - `mississippi@1.2.0` - ([@zkat](https://github.com/zkat)) -* [`b650b39`](https://github.com/npm/npm/commit/b650b39d42654abb9eed1c7cd463b1c595ca2ef9) - [#13746](https://github.com/npm/npm/pull/13746) - `sorted-union-stream@2.1.3` - ([@zkat](https://github.com/zkat)) - -#### SCRIPT NODE PATH (**BREAKING**) - -Thanks to some great work by [@addaleax](https://github.com/addaleax), we've -addressed a fairly tricky issue involving the node process used by `npm -scripts`. - -Previously, npm would prefix the path of the node executable to the script's -`PATH`. This had the benefit of making sure that the node process would be the -same for both npm and `scripts` unless you had something like -[`node-bin`](https://npm.im/node-bin) in your `node_modules`. And it turns out -lots of people relied on this behavior being this way! - -It turns out that this had some unintended consequences: it broke systems like -[`nyc`](https://npm.im/nyc), but also completely broke/defeated things like -[`rvm`](https://rvm.io/) and -[`virtualenv`](https://virtualenv.pypa.io/en/stable/) by often causing things -that relied on them to fall back to the global system versions of ruby and -python. - -In the face of two perfectly valid, and used alternatives, we decided that the -second case was much more surprising for users, and that we should err on the -side of doing what those users expect. Anna put some hard work in and managed to -put together a patch that changes npm's behavior such that we no longer prepend -the node executable's path *by default*, and adds a new option, -`--scripts-prepend-node-path`, to allow users who rely on this behavior to have -it add the node path for them. - -This patch also makes it so this feature is discoverable by people who might run -into the first case above, by warning if the node executable is either missing -or shadowed by another one in `PATH`. This warning can also be disabled with the -`--scripts-prepend-node-path` option as needed. - -* [`3fb1eb3`](https://github.com/npm/npm/commit/3fb1eb3e00b5daf37f14e437d2818e9b65a43392) [`6a7d375`](https://github.com/npm/npm/commit/6a7d375d779ba5416fd5df154c6da673dd745d9d) [`378ae08`](https://github.com/npm/npm/commit/378ae08851882d6d2bc9b631b16b8c875d0b9704) - [#13409](https://github.com/npm/npm/pull/13409) - Add a `--scripts-prepend-node-path` option to configure whether npm prepends - the current node executable's path to `PATH`. - ([@addaleax](https://github.com/addaleax)) -* [`70b352c`](https://github.com/npm/npm/commit/70b352c6db41533b9a4bfaa9d91f7a2a1178f74e) - [#13409](https://github.com/npm/npm/pull/13409) - Change the default behaviour of npm to never prepending the current node - executable’s directory to `PATH` but printing a warning in the cases in which - it previously did. - ([@addaleax](https://github.com/addaleax)) - -#### REMOVE `npat` (**BREAKING**) - -Let's be real here -- almost no one knows this feature ever existed, and it's a -vestigial feature of the days when the ideal for npm was to distribute full -packages that could be directly developed on, even from the registry. - -It turns out the npm community decided to go a different way: primarily -publishing packages in a production-ready format, with no tests, build tools, -etc. And so, we say goodbye to `npat`. - -* [`e16c14a`](https://github.com/npm/npm/commit/e16c14afb6f52cb8b7adf60b2b26427f76773f2e) - [#14329](https://github.com/npm/npm/pull/14329) - Remove the npat feature. - ([@iarna](https://github.com/iarna)) - -#### NEW `prepare` SCRIPT. `prepublish` DEPRECATED (**BREAKING**) - -If there's anything that really seemed to confuse users, it's that the -`prepublish` script ran when invoking `npm install` without any arguments. - -Turns out many, many people really expected that it would only run on `npm -publish`, even if it actually did what most people expected: prepare the package -for publishing on the registry. - -And so, we've added a `prepare` command that runs in the exact same cases where -`prepublish` ran, and we've begun a deprecation cycle for `prepublish` itself -**only when run by `npm install`**, which will now include a warning any time -you use it that way. - -We've also added a `prepublishOnly` script which will execute **only** when `npm -publish` is invoked. Eventually, `prepublish` will stop executing on `npm -install`, and `prepublishOnly` will be removed, leaving `prepare` and -`prepublish` as two distinct lifecycles. - -* [`9b4a227`](https://github.com/npm/npm/commit/9b4a2278cee0a410a107c8ea4d11614731e0a943) [`bc32078`](https://github.com/npm/npm/commit/bc32078fa798acef0e036414cb448645f135b570) - [#14290](https://github.com/npm/npm/pull/14290) - Add `prepare` and `prepublishOnly` lifecycle events. - ([@othiym23](https://github.com/othiym23)) -* [`52fdefd`](https://github.com/npm/npm/commit/52fdefddb48f0c39c6e8eb4c118eb306c9436117) - [#14290](https://github.com/npm/npm/pull/14290) - Warn when running `prepublish` on `npm pack`. - ([@othiym23](https://github.com/othiym23)) -* [`4c2a948`](https://github.com/npm/npm/commit/4c2a9481b564cae3df3f4643766db4b987018a7b) [`a55bd65`](https://github.com/npm/npm/commit/a55bd651284552b93f7d972a2e944f65c1aa6c35) - [#14290](https://github.com/npm/npm/pull/14290) - Added `prepublish` warnings to `npm install`. - ([@zkat](https://github.com/zkat)) -* [`c27412b`](https://github.com/npm/npm/commit/c27412bb9fc7b09f7707c7d9ad23128959ae1abc) - [#14290](https://github.com/npm/npm/pull/14290) - Replace `prepublish` with `prepare` in `npm help package.json` documentation. - ([@zkat](https://github.com/zkat)) - -#### NO MORE PARTIAL SHRINKWRAPS (**BREAKING**) - -That's right. No more partial shrinkwraps. That means that if you have an -`npm-shrinkwrap.json` in your project, npm will no longer install anything that -isn't explicitly listed there, unless it's a `devDependency`. This will open -doors to some nice optimizations and make use of `npm shrinkwrap` just generally -smoother by removing some awful corner cases. We will also skip `devDependency` -installation from `package.json` if you added `devDependencies` to your -shrinkwrap by using `npm shrinkwrap --dev`. - -* [`b7dfae8`](https://github.com/npm/npm/commit/b7dfae8fd4dc0456605f7a921d20a829afd50864) - [#14327](https://github.com/npm/npm/pull/14327) - Use `readShrinkwrap` to read top level shrinkwrap. There's no reason for npm - to be doing its own bespoke heirloom-grade artisanal thing here. - ([@iarna](https://github.com/iarna)) -* [`0ae1f4b`](https://github.com/npm/npm/commit/0ae1f4b9d83af2d093974beb33f26d77fcc95bb9) [`4a54997`](https://github.com/npm/npm/commit/4a549970dc818d78b6de97728af08a1edb5ae7f0) [`f22a1ae`](https://github.com/npm/npm/commit/f22a1ae54b5d47f1a056a6e70868013ebaf66b79) [`3f61189`](https://github.com/npm/npm/commit/3f61189cb3843fee9f54288fefa95ade9cace066) - [#14327](https://github.com/npm/npm/pull/14327) - Treat shrinkwrap as canonical. That is, don't try to fill in for partial - shrinkwraps. Partial shrinkwraps should produce partial installs. If your - shrinkwrap contains NO `devDependencies` then we'll still try to install them - from your `package.json` instead of assuming you NEVER want `devDependencies`. - ([@iarna](https://github.com/iarna)) - -#### `npm tag` REMOVED (**BREAKING**) - -* [`94255da`](https://github.com/npm/npm/commit/94255da8ffc2d9ed6a0434001a643c1ad82fa483) - [#14328](https://github.com/npm/npm/pull/14328) - Remove deprecated tag command. Folks must use the `dist-tag` command from now - on. - ([@iarna](https://github.com/iarna)) - -#### NON-ZERO EXIT CODE ON OUTDATED DEPENDENCIES (**BREAKING**) - -* [`40a04d8`](https://github.com/npm/npm/commit/40a04d888d10a5952d5ca4080f2f5d2339d2038a) [`e2fa18d`](https://github.com/npm/npm/commit/e2fa18d9f7904eb048db7280b40787cb2cdf87b3) [`3ee3948`](https://github.com/npm/npm/commit/3ee39488b74c7d35fbb5c14295e33b5a77578104) [`3fa25d0`](https://github.com/npm/npm/commit/3fa25d02a8ff07c42c595f84ae4821bc9ee908df) - [#14013](https://github.com/npm/npm/pull/14013) - Do `exit 1` if any outdated dependencies are found by `npm outdated`. - ([@watilde](https://github.com/watilde)) -* [`c81838a`](https://github.com/npm/npm/commit/c81838ae96b253f4b1ac66af619317a3a9da418e) - [#14013](https://github.com/npm/npm/pull/14013) - Log non-zero exit codes at `verbose` level -- this isn't something command - line tools tend to do. It's generally the shell's job to display, if at all. - ([@zkat](https://github.com/zkat)) - -#### SEND EXTRA HEADERS TO REGISTRY - -For the purposes of supporting shiny new registry features, we've started -sending `Npm-Scope` and `Npm-In-CI` headers in outgoing requests. - -* [`846f61c`](https://github.com/npm/npm/commit/846f61c1dd4a033f77aa736ab01c27ae6724fe1c) - [npm/npm-registry-client#145](https://github.com/npm/npm-registry-client/pull/145) - [npm/npm-registry-client#147](https://github.com/npm/npm-registry-client/pull/147) - `npm-registry-client@7.3.0`: - * Allow npm to add headers to outgoing requests. - * Add `Npm-In-CI` header that reports whether we're running in CI. - ([@iarna](https://github.com/iarna)) -* [`6b6bb08`](https://github.com/npm/npm/commit/6b6bb08af661221224a81df8adb0b72019ca3e11) - [#14129](https://github.com/npm/npm/pull/14129) - Send `Npm-Scope` header along with requests to registry. `Npm-Scope` is set to - the `@scope` of the current top level project. This will allow registries to - implement user/scope-aware features and services. - ([@iarna](https://github.com/iarna)) -* [`506de80`](https://github.com/npm/npm/commit/506de80dc0a0576ec2aab0ed8dc3eef3c1dabc23) - [#14129](https://github.com/npm/npm/pull/14129) - Add test to ensure `Npm-In-CI` header is being sent when CI is set in env. - ([@iarna](https://github.com/iarna)) - -#### BUGFIXES - -* [`bc84012`](https://github.com/npm/npm/commit/bc84012c2c615024b08868acbd8df53a7ca8d146) - [#14117](https://github.com/npm/npm/pull/14117) - Fixes a bug where installing a shrinkwrapped package would fail if the - platform failed to install an optional dependency included in the shrinkwrap. - ([@watilde](https://github.com/watilde)) -* [`a40b32d`](https://github.com/npm/npm/commit/a40b32dc7fe18f007a672219a12d6fecef800f9d) - [#13519](https://github.com/npm/npm/pull/13519) - If a package has malformed metadata, `node.requiredBy` is sometimes missing. - Stop crashing when that happens. - ([@creationix](https://github.com/creationix)) - -#### OTHER PATCHES - -* [`643dae2`](https://github.com/npm/npm/commit/643dae2197c56f1c725ecc6539786bf82962d0fe) - [#14244](https://github.com/npm/npm/pull/14244) - Remove some ancient aliases that we'd rather not have around. - ([@zkat](https://github.com/zkat)) -* [`bdeac3e`](https://github.com/npm/npm/commit/bdeac3e0fb226e4777d4be5cd3c3bec8231c8044) - [#14230](https://github.com/npm/npm/pull/14230) - Detect unsupported Node.js versions and warn about it. Also error on really - old versions where we know we can't work. - ([@iarna](https://github.com/iarna)) - -#### DOC UPDATES - -* [`9ca18ad`](https://github.com/npm/npm/commit/9ca18ada7cc1c10b2d32bbb59d5a99dd1c743109) - [#13746](https://github.com/npm/npm/pull/13746) - Updated docs for `npm search` options. - ([@zkat](https://github.com/zkat)) -* [`e02a47f`](https://github.com/npm/npm/commit/e02a47f9698ff082488dc2b1738afabb0912793e) - Move the `npm@3` changelog into the archived changelogs directory. - ([@zkat](https://github.com/zkat)) -* [`c12bbf8`](https://github.com/npm/npm/commit/c12bbf8c5a5dff24a191b66ac638f552bfb76601) - [#14290](https://github.com/npm/npm/pull/14290) - Document prepublish-on-install deprecation. - ([@othiym23](https://github.com/othiym23)) -* [`c246a75`](https://github.com/npm/npm/commit/c246a75ac8697f4ca11d316b7e7db5f24af7972b) - [#14129](https://github.com/npm/npm/pull/14129) - Document headers added by npm to outgoing registry requests. - ([@iarna](https://github.com/iarna)) - -#### DEPENDENCIES - -* [`cb20c73`](https://github.com/npm/npm/commit/cb20c7373a32daaccba2c1ad32d0b7e1fc01a681) - [#13953](https://github.com/npm/npm/pull/13953) - `signal-exit@3.0.1` - ([@benjamincoe](https://github.com/benjamincoe)) diff --git a/changelogs/CHANGELOG-5.md b/changelogs/CHANGELOG-5.md deleted file mode 100644 index ea8331b1b76f3..0000000000000 --- a/changelogs/CHANGELOG-5.md +++ /dev/null @@ -1,2360 +0,0 @@ -## v5.10.0 (2018-05-10): - -### AUDIT SHOULDN'T WAIT FOREVER - -This will likely be reduced further with the goal that the audit process -shouldn't noticibly slow down your builds regardless of your network -situation. - -* [`3dcc240db`](https://github.com/npm/npm/commit/3dcc240dba5258532990534f1bd8a25d1698b0bf) - Timeout audit requests eventually. - ([@iarna](https://github.com/iarna)) - - -## v5.10.0-next.1 (2018-05-07): - -### EXTENDED `npm init` SCAFFOLDING - -Thanks to the wonderful efforts of [@jdalton](https://github.com/jdalton) of -lodash fame, `npm init` can now be used to invoke custom scaffolding tools! - -You can now do things like `npm init react-app` or `npm init esm` to scaffold an -npm package by running `create-react-app` and `create-esm`, respectively. This -also adds an `npm create` alias, to correspond to Yarn's `yarn create` feature, -which inspired this. - -* [`adc009ed4`](https://github.com/npm/npm/commit/adc009ed4114ed1e692f8ef15123af6040615cee) - [`f363edd04`](https://github.com/npm/npm/commit/f363edd04f474fa64e4d97228c0b2a7858f21e7c) - [`f03b45fb2`](https://github.com/npm/npm/commit/f03b45fb217df066c3cb7715f9c0469d84e5aa8e) - [`13adcbb52`](https://github.com/npm/npm/commit/13adcbb527fb8214e5f2233706c6b72ce072f3fa) - [#20303](https://github.com/npm/npm/pull/20303) - [#20372](https://github.com/npm/npm/pull/20372) - Add an `npm init` feature that calls out to `npx` when invoked with positional - arguments. ([@jdalton](https://github.com/jdalton)) - -### DEPENDENCY AUDITING - -This version of npm adds a new command, `npm audit`, which will run a security -audit of your project's dependency tree and notify you about any actions you may -need to take. - -The registry-side services required for this command to work will be available -on the main npm registry in the coming weeks. Until then, you won't get much out -of trying to use this on the CLI. - -As part of this change, the npm CLI now sends scrubbed and cryptographically -anonymized metadata about your dependency tree to your configured registry, to -allow notifying you about the existence of critical security flaws. For details -about how the CLI protects your privacy when it shares this metadata, see `npm -help audit`, or [read the docs for `npm audit` -online](https://github.com/npm/npm/blob/release-next/doc/cli/npm-audit.md). You -can disable this altogether by doing `npm config set audit false`, but will no -longer benefit from the service. - -* [`c81dfb91b`](https://github.com/npm/npm/commit/c81dfb91bc031f1f979fc200bb66718a7e8e1551) - `npm-registry-fetch@1.1.1` - ([@iarna](https://github.com/iarna)) -* [`b096f44a9`](https://github.com/npm/npm/commit/b096f44a96d185c45305b9b6a5f26d3ccbbf759d) - `npm-audit-report@1.0.9` - ([@iarna](https://github.com/iarna)) -* [`43b20b204`](https://github.com/npm/npm/commit/43b20b204ff9a86319350988d6774397b7da4593) - [#20389](https://github.com/npm/npm/pull/20389) - Add new `npm audit` command. - ([@iarna](https://github.com/iarna)) -* [`49ddb3f56`](https://github.com/npm/npm/commit/49ddb3f5669e90785217a639f936f4e38390eea2) - [#20389](https://github.com/npm/npm/pull/20389) - Temporarily suppress git metadata till there's an opt-in. - ([@iarna](https://github.com/iarna)) -* [`5f1129c4b`](https://github.com/npm/npm/commit/5f1129c4b072172c72cf9cff501885e2c11998ea) - [#20389](https://github.com/npm/npm/pull/20389) - Document the new command. - ([@iarna](https://github.com/iarna)) -* [`9a07b379d`](https://github.com/npm/npm/commit/9a07b379d24d089687867ca34df6e1e6189c72f1) - [#20389](https://github.com/npm/npm/pull/20389) - Default audit to off when running the npm test suite itself. - ([@iarna](https://github.com/iarna)) -* [`a6e2f1284`](https://github.com/npm/npm/commit/a6e2f12849b84709d89b3dc4f096e8c6f7db7ebb) - Make sure we hide stream errors on background audit submissions. Previously some classes - of error could end up being displayed (harmlessly) during installs. - ([@iarna](https://github.com/iarna)) -* [`aadbf3f46`](https://github.com/npm/npm/commit/aadbf3f4695e75b236ee502cbe41e51aec318dc3) - Include session and scope in requests (as we do in other requests to the registry). - ([@iarna](https://github.com/iarna)) -* [`7d43ddf63`](https://github.com/npm/npm/commit/7d43ddf6366d3bfc18ea9ccef8c7b8e43d3b79f5) - Exit with non-zero status when vulnerabilities are found. So you can have `npm audit` as a test or prepublish step! - ([@iarna](https://github.com/iarna)) -* [`bc3fc55fa`](https://github.com/npm/npm/commit/bc3fc55fae648da8efaf1be5b86078f0f736282e) - Verify lockfile integrity before running. You'd get an error either way, but this way it's - faster and can give you more concrete instructions on how to fix it. - ([@iarna](https://github.com/iarna)) -* [`2ac8edd42`](https://github.com/npm/npm/commit/2ac8edd4248f2393b35896f0300b530e7666bb0e) - Refuse to run in global mode. Audits require a lockfile and globals don't have one. Yet. - ([@iarna](https://github.com/iarna)) - -### CTRL-C OUT DURING PACKAGE EXTRACTION AS MUCH AS YOU WANT! - -* [`663d8b5e5`](https://github.com/npm/npm/commit/663d8b5e5427c2243149d2dd6968faa117e9db3f) - [npm/lockfile#29](https://github.com/npm/lockfile/pull/29) - `lockfile@1.0.4`: - Switches to `signal-exit` to detect abnormal exits and remove locks. - ([@Redsandro](https://github.com/Redsandro)) - -### SHRONKWRAPS AND LACKFILES - -If a published modules had legacy `npm-shrinkwrap.json` we were saving -ordinary registry dependencies (`name@version`) to your `package-lock.json` -as `https://` URLs instead of versions. - -* [`36f998411`](https://github.com/npm/npm/commit/36f9984113e39d7b190010a2d0694ee025924dcb) - When saving the lock-file compute how the dependency is being required instead of using - `_resolved` in the `package.json`. This fixes the bug that was converting - registry dependencies into `https://` dependencies. - ([@iarna](https://github.com/iarna)) -* [`113e1a3af`](https://github.com/npm/npm/commit/113e1a3af2f487c753b8871d51924682283c89fc) - When encountering a `https://` URL in our lockfiles that point at our default registry, extract - the version and use them as registry dependencies. This lets us heal - `package-lock.json` files produced by 6.0.0 - ([@iarna](https://github.com/iarna)) - -### MORE `package-lock.json` FORMAT CHANGES?! - -* [`074502916`](https://github.com/npm/npm/commit/0745029168dfdfee0d1823137550e6ebccf741a5) - [#20384](https://github.com/npm/npm/pull/20384) - Add `from` field back into package-lock for git dependencies. This will give - npm the information it needs to figure out whether git deps are valid, - specially when running with legacy install metadata or in - `--package-lock-only` mode when there's no `node_modules`. This should help - remove a significant amount of git-related churn on the lock-file. - ([@zkat](https://github.com/zkat)) - -### DOCUMENTATION IMPROVEMENTS - -* [`e0235ebb6`](https://github.com/npm/npm/commit/e0235ebb6e560f0114b8babedb6949385ab9bd57) - [#20384](https://github.com/npm/npm/pull/20384) - Update the lock-file spec doc to mention that we now generate the from field for `git`-type dependencies. - ([@watilde](https://github.com/watilde)) -* [`35de04676`](https://github.com/npm/npm/commit/35de04676a567ef11e1dd031d566231021d8aff2) - [#20408](https://github.com/npm/npm/pull/20408) - Describe what the colors in outdated mean. - ([@teameh](https://github.com/teameh)) - -### BUGFIXES - -* [`1b535cb9d`](https://github.com/npm/npm/commit/1b535cb9d4a556840aeab2682cc8973495c9919a) - [#20358](https://github.com/npm/npm/pull/20358) - `npm install-test` (aka `npm it`) will no longer generate `package-lock.json` - when running with `--no-package-lock` or `package-lock=false`. - ([@raymondfeng](https://github.com/raymondfeng)) -* [`268f7ac50`](https://github.com/npm/npm/commit/268f7ac508cda352d61df63a2ae7148c54bdff7c) - [`5f84ebdb6`](https://github.com/npm/npm/commit/5f84ebdb66e35486d1dec1ca29e9ba0e4c5b6d5f) - [`c12e61431`](https://github.com/npm/npm/commit/c12e61431ecf4f77e56dc8aa55c41d5d7eeaacad) - [#20390](https://github.com/npm/npm/pull/20390) - Fix a scenario where a git dependency had a comittish associated with it - that was not a complete commitid. `npm` would never consider that entry - in the `package.json` as matching the entry in the `package-lock.json` and - this resulted in inappropriate pruning or reinstallation of git - dependencies. This has been addressed in two ways, first, the addition of the - `from` field as described in [#20384](https://github.com/npm/npm/pull/20384) means - we can exactly match the `package.json`. Second, when that's missing (when working with - older `package-lock.json` files), we assume that the match is ok. (If - it's not, we'll fix it up when a real installation is done.) - ([@iarna](https://github.com/iarna)) - -### DOCS - -* [`7b13bf5e3`](https://github.com/npm/npm/commit/7b13bf5e373e2ae2466ecaa3fd6dcba67a97f462) - [#20331](https://github.com/npm/npm/pull/20331) - Fix broken link to 'private-modules' page. The redirect went away when the new - npm website went up, but the new URL is better anyway. - ([@vipranarayan14](https://github.com/vipranarayan14)) -* [`1c4ffddce`](https://github.com/npm/npm/commit/1c4ffddce05c25ef51e254dfc6a9a97e03c711ce) - [#20279](https://github.com/npm/npm/pull/20279) - Document the `--if-present` option for `npm run-script`. - ([@aleclarson](https://github.com/aleclarson)) - -### DEPENDENCY UPDATES - -* [`815d91ce0`](https://github.com/npm/npm/commit/815d91ce0e8044775e884c1dab93052da57f6650) - `libnpx@10.2.0` - ([@zkat](https://github.com/zkat)) -* [`02715f19f`](https://github.com/npm/npm/commit/02715f19fbcdecec8990b92fc60b1a022c59613b) - `update-notifier@2.5.0` - ([@alexccl](https://github.com/alexccl)) -* [`08c4ddd9e`](https://github.com/npm/npm/commit/08c4ddd9eb560aa6408a1bb1c1d2d9aa6ba46ba0) - `tar@4.4.2` - ([@isaacs](https://github.com/isaacs)) -* [`53718cb12`](https://github.com/npm/npm/commit/53718cb126956851850839b4d7d3041d4e9a80d0) - `tap@11.1.4` - ([@isaacs](https://github.com/isaacs)) -* [`0a20cf546`](https://github.com/npm/npm/commit/0a20cf546a246ac12b5fe2b6235ffb8649336ec4) - `safe-buffer@5.1.2` - ([@feross](https://github.com/feross)) -* [`e8c8e844c`](https://github.com/npm/npm/commit/e8c8e844c194351fe2d65cf3af79ef318bbc8bec) - `retry@0.12.0` - ([@tim-kos](https://github.com/tim-kos)) -* [`76c7f21bd`](https://github.com/npm/npm/commit/76c7f21bd04407d529edc4a76deaa85a2d6b6e6f) - `read-package-tree@5.2.1` - ([@zkat](https://github.com/zkat)) -* [`c8b0aa07b`](https://github.com/npm/npm/commit/c8b0aa07b34a0b0f8bc85154da75d9fb458eb504) - `query-string@6.1.0` - ([@sindresorhus](https://github.com/sindresorhus)) -* [`abfd366b4`](https://github.com/npm/npm/commit/abfd366b4709325f954f2b1ee5bd475330aab828) - `npm-package-arg@6.1.0` - ([@zkat](https://github.com/zkat)) -* [`bd29baf83`](https://github.com/npm/npm/commit/bd29baf834c3e16a9b3d7b60cdb4f462889800bf) - `lock-verify@2.0.2` - ([@iarna](https://github.com/iarna)) - -## v5.10.0-next.0 (2018-04-12): - -### NEW FEATURES - -* [`32ec2f54b`](https://github.com/npm/npm/commit/32ec2f54b2ad7370f2fd17e6e2fbbb2487c81266) - [#20257](https://github.com/npm/npm/pull/20257) - Add shasum and integrity to the new `npm view` output. - ([@zkat](https://github.com/zkat)) -* [`a22153be2`](https://github.com/npm/npm/commit/a22153be239dfd99d87a1a1c7d2c3700db0bebf3) - [#20126](https://github.com/npm/npm/pull/20126) - Add `npm cit` command that's equivalent of `npm ci && npm t` that's equivalent of `npm it`. - ([@SimenB](https://github.com/SimenB)) - -### BUG FIXES - -* [`089aeaf44`](https://github.com/npm/npm/commit/089aeaf4479f286b1ce62716c6442382ff0f2150) - Fix a bug where OTPs passed in via the commandline would have leading - zeros deleted resulted in authentication failures. - ([@iarna](https://github.com/iarna)) -* [`6eaa860ea`](https://github.com/npm/npm/commit/6eaa860ead3222a6dbd6d370b4271e7bf242b30b) - Eliminate direct use of `new Buffer` in `npm`. While the use of it in `npm` was safe, there - are two other reasons for this change: - - 1. Node 10 emits warnings about its use. - 2. Users who require npm as a library (which they definitely should not do) - can call the functions that call `new Buffer` in unsafe ways, if they try - really hard. - - ([@iarna](https://github.com/iarna)) - -* [`85900a294`](https://github.com/npm/npm/commit/85900a2944fed14bc8f59c48856fb797faaafedc) - Starting with 5.8.0 the `requires` section of the lock-file saved version ranges instead of - specific versions. Due to a bug, further actions on the same lock-file would result in the - range being switched back to a version. This corrects that, keeping ranges when they appear. - ([@iarna](https://github.com/iarna)) -* [`0dffa9c2a`](https://github.com/npm/npm/commit/0dffa9c2ae20b669f65c8e596dafd63e52248250) - [`609d6f6e1`](https://github.com/npm/npm/commit/609d6f6e1b39330b64ca4677a531819f2143a283) - [`08f81aa94`](https://github.com/npm/npm/commit/08f81aa94171987a8e1b71a87034e7b028bb9fc7) - [`f8b76e076`](https://github.com/npm/npm/commit/f8b76e0764b606e2c129cbaa66e48ac6a3ebdf8a) - [`6d609822d`](https://github.com/npm/npm/commit/6d609822d00da7ab8bd05c24ec4925094ecaef53) - [`59d080a22`](https://github.com/npm/npm/commit/59d080a22f7314a8e4df6e4f85c84777c1e4be42) - Restore the ability to bundle dependencies that are uninstallable from the - registry. This also eliminates needless registry lookups for bundled - dependencies. - - Fixed a bug where attempting to install a dependency that is bundled - inside another module without reinstalling that module would result in - ENOENT errors. - ([@iarna](https://github.com/iarna)) -* [`db846c2d5`](https://github.com/npm/npm/commit/db846c2d57399f277829036f9d96cd767088097e) - [#20029](https://github.com/npm/npm/pull/20029) - Allow packages with non-registry specifiers to follow the fast path that - the we use with the lock-file for registry specifiers. This will improve install time - especially when operating only on the package-lock (`--package-lock-only`). - - ([@zkat](https://github.com/zkat)) - - Fix the a bug where `npm i --only=prod` could remove development - dependencies from lock-file. - ([@iarna](https://github.com/iarna)) -* [`3e12d2407`](https://github.com/npm/npm/commit/3e12d2407446661d3dd226b03a2b6055b7932140) - [#20122](https://github.com/npm/npm/pull/20122) - Improve the update-notifier messaging (borrowing ideas from pnpm) and - eliminate false positives. - ([@zkat](https://github.com/zkat)) -* [`f18be9b39`](https://github.com/npm/npm/commit/f18be9b39888d05c7f98946c53214f40914f6284) - [#20154](https://github.com/npm/npm/pull/20154) - Let version succeed when `package-lock.json` is gitignored. - ([@nwoltman](https://github.com/nwoltman)) -* [`ced29253d`](https://github.com/npm/npm/commit/ced29253df6c6d67e4bf47ca83e042db4fb19034) - [#20212](https://github.com/npm/npm/pull/20212) - Ensure that we only create an `etc` directory if we are actually going to write files to it. - ([@buddydvd](https://github.com/buddydvd)) -* [`8e21b19a8`](https://github.com/npm/npm/commit/8e21b19a8c5e7d71cb51f3cc6a8bfaf7749ac2c5) - [#20140](https://github.com/npm/npm/pull/20140) - Note in documentation that `package-lock.json` version gets touched by `npm version`. - ([@srl295](https://github.com/srl295)) -* [`5d17c87d8`](https://github.com/npm/npm/commit/5d17c87d8d27caeac71f291fbd62628f2765fda2) - [#20032](https://github.com/npm/npm/pull/20032) - Fix bug where unauthenticated errors would get reported as both 404s and - 401s, i.e. `npm ERR! 404 Registry returned 401`. In these cases the error - message will now be much more informative. - ([@iarna](https://github.com/iarna)) -* [`05ff6c9b1`](https://github.com/npm/npm/commit/05ff6c9b14cb095988b768830e51789d6b6b8e6e) - [#20082](https://github.com/npm/npm/pull/20082) - Allow optional @ prefix on scope with `npm team` commands for parity with other commands. - ([@bcoe](https://github.com/bcoe)) -* [`6bef53891`](https://github.com/npm/npm/commit/6bef538919825b8cd2e738333bdd7b6ca2e2e0e3) - [#19580](https://github.com/npm/npm/pull/19580) - Improve messaging when two-factor authentication is required while publishing. - ([@jdeniau](https://github.com/jdeniau)) -* [`155dab2bd`](https://github.com/npm/npm/commit/155dab2bd7b06724eca190abadd89c9f03f85446) - Fix a bug where optional status of a dependency was not being saved to - the package-lock on the initial install. - ([@iarna](https://github.com/iarna)) -* [`8d6a4cafc`](https://github.com/npm/npm/commit/8d6a4cafc2e6963d9ec7c828e1af6f2abc12e7f3) - [`a0937e9af`](https://github.com/npm/npm/commit/a0937e9afe126dce7a746c1a6270b1ac69f2a9b3) - Ensure that `--no-optional` does not remove optional dependencies from the lock-file. - ([@iarna](https://github.com/iarna)) - -### DEPENDENCY UPDATES - -* [`8baa37551`](https://github.com/npm/npm/commit/8baa37551945bc329a6faf793ec5e3e2feff489b) - [zkat/cipm#46](https://github.com/zkat/cipm/pull/46) - `libcipm@1.6.2`: - Detect binding.gyp for default install lifecycle. Let's `npm ci` work on projects that - have their own C code. - ([@caleblloyd](https://github.com/caleblloyd)) -* [`323f74242`](https://github.com/npm/npm/commit/323f74242066c989f7faf94fb848ff8f3b677619) - [zkat/json-parse-better-errors#1](https://github.com/zkat/json-parse-better-errors/pull/1) - `json-parse-better-errors@1.0.2` - ([@Hoishin](https://github.com/Hoishin)) -* [`d0cf1f11e`](https://github.com/npm/npm/commit/d0cf1f11e5947446f74881a3d15d6a504baea619) - `readable-stream@2.3.6` - ([@mcollina](https://github.com/mcollina)) -* [`9e9fdba5e`](https://github.com/npm/npm/commit/9e9fdba5e7b7f3a1dd73530dadb96d9e3445c48d) - `update-notifier@2.4.0` - ([@sindersorhus](https://github.com/sindersorhus)) -* [`57fa33870`](https://github.com/npm/npm/commit/57fa338706ab122ab7e13d2206016289c5bdacf3) - `marked@0.3.1` - ([@joshbruce](https://github.com/joshbruce)) -* [`d2b20d34b`](https://github.com/npm/npm/commit/d2b20d34b60f35eecf0d51cd1f05de79b0e15096) - [#20276](https://github.com/npm/npm/pull/20276) - `node-gyp@3.6.2` -* [`2b5700679`](https://github.com/npm/npm/commit/2b5700679fce9ee0c24c4509618709a4a35a3d27) - [zkat/npx#172](https://github.com/zkat/npx/pull/172) - `libnpx@10.1.1` - ([@jdalton](https://github.com/jdalton)) - -## v5.9.0 (2018-03-23): - -Coming to you this week are a fancy new package view, pack/publish previews -and a handful of bug fixes! Let's get right in! - -### NEW PACKAGE VIEW - -There's a new `npm view` in town. You might it as `npm info` or `npm show`. -The new output gives you a nicely summarized view that for most packages -fits on one screen. If you ask it for `--json` you'll still get the same -results, so your scripts should still work fine. - -* [`143cdbf13`](https://github.com/npm/npm/commit/143cdbf1327f7d92ccae405bc05d95d28939a837) - [#19910](https://github.com/npm/npm/pull/19910) - Add humanized default view. - ([@zkat](https://github.com/zkat)) -* [`ca84be91c`](https://github.com/npm/npm/commit/ca84be91c434fb7fa472ee4c0b7341414acf52b5) - [#19910](https://github.com/npm/npm/pull/19910) - `tiny-relative-date@1.3.0` - ([@zkat](https://github.com/zkat)) -* [`9a5807c4f`](https://github.com/npm/npm/commit/9a5807c4f813c49b854170b6111c099b3054faa2) - [#19910](https://github.com/npm/npm/pull/19910) - `cli-columns@3.1.2` - ([@zkat](https://github.com/zkat)) -* [`23b4a4fac`](https://github.com/npm/npm/commit/23b4a4fac0fbfe8e03e2f65d9f674f163643d15d) - [#19910](https://github.com/npm/npm/pull/19910) - `byte-size@4.0.2` - -### PACK AND PUBLISH PREVIEWS - -The `npm pack` and `npm publish` commands print out a summary of the files -included in the package. They also both now take the `--dry-run` flag, so -you can double check your `.npmignore` settings before doing a publish. - -* [`116e9d827`](https://github.com/npm/npm/commit/116e9d8271d04536522a7f02de1dde6f91ca5e6e) - [#19908](https://github.com/npm/npm/pull/19908) - Add package previews to pack and publish. Also add --dry-run and --json - flags. - ([@zkat](https://github.com/zkat)) - -### MERGE CONFLICT, SMERGE CONFLICT - -If you resolve a `package-lock.json` merge conflict with `npm install` we -now suggest you setup a merge driver to handle these automatically for you. -If you're reading this and you'd like to set it up now, run: - -```console -npx npm-merge-driver install -g -``` - -* [`5ebe99719`](https://github.com/npm/npm/commit/5ebe99719d11fedeeec7a55f1b389dcf556f32f3) - [#20071](https://github.com/npm/npm/pull/20071) - suggest installing the merge driver - ([@zkat](https://github.com/zkat)) - -### MISC BITS - -* [`a05e27b71`](https://github.com/npm/npm/commit/a05e27b7104f9a79f5941e7458c4658872e5e0cd) - Going forward, record requested ranges not versions in the package-lock. - ([@iarna](https://github.com/iarna)) -* [`f721eec59`](https://github.com/npm/npm/commit/f721eec599df4bdf046d248e0f50822d436654b4) - Add 10 to Node.js supported version list. It's not out yet, but soon my pretties... - ([@iarna](https://github.com/iarna)) - -### DEPENDENCY UPDATES - -* [`40aabb94e`](https://github.com/npm/npm/commit/40aabb94e3f24a9feabb9c490403e10ec9dc254f) - `libcipm@1.6.1`: - Fix bugs on docker and with some `prepare` scripts and `npm ci`. - Fix a bug where script hooks wouldn't be called with `npm ci`. - Fix a bug where `npm ci` and `--prefix` weren't compatible. - ([@isaacseymour](https://github.com/isaacseymour)) - ([@umarov](https://github.com/umarov)) - ([@mikeshirov](https://github.com/mikeshirov)) - ([@billjanitsch](https://github.com/billjanitsch)) -* [`a85372e67`](https://github.com/npm/npm/commit/a85372e671eab46e62caa46631baa30900e32114) - `tar@4.4.1`: - Switch to safe-buffer and Buffer.from. - ([@isaacs](https://github.com/isaacs)) - ([@ChALkeR](https://github.com/ChALkeR)) -* [`588eabd23`](https://github.com/npm/npm/commit/588eabd23fa04420269b9326cab26d974d9c151f) - `lru-cache@4.1.2`: -* [`07f27ee89`](https://github.com/npm/npm/commit/07f27ee898f3c3199e75427017f2b6a189b1a85b) - `qrcode-terminal@0.12.0`: -* [`01e4e29bc`](https://github.com/npm/npm/commit/01e4e29bc879bdaa0e92f0b58e3725a41377d21c) - `request@2.85.0` -* [`344ba8819`](https://github.com/npm/npm/commit/344ba8819f485c72e1c7ac3e656d7e9210ccf607) - `worker-farm@1.6.0` -* [`dc6df1bc4`](https://github.com/npm/npm/commit/dc6df1bc4677164b9ba638e87c1185b857744720) - `validate-npm-package-license@3.0.3` -* [`97a976696`](https://github.com/npm/npm/commit/97a9766962ab5125af3b2a1f7b4ef550a2e3599b) - `ssri@5.3.0` -* [`9b629d0c6`](https://github.com/npm/npm/commit/9b629d0c69599635ee066cb71fcc1b0155317f19) - `query-string@5.1.1` - -## v5.8.0 (2018-03-08): - -Hey again, everyone! While last release was focused largely around PRs from the -CLI team, this release is mostly pulling in community PRs in npm itself and its -dependencies! We've got a good chunk of wonderful contributions for y'all, and -even new features and performance improvements! 🎉 - -We're hoping to continue our biweekly (as in every-other-week biweekly) release -schedule from now on, so you should be seeing more steady npm releases from here -on out. And that's good, 'cause we've got a _ton_ of new stuff on our roadmap -for this year. Keep an eye out for exciting news. 👀 - -### FEATURES - -* [`2f513fe1c`](https://github.com/npm/npm/commit/2f513fe1ce6db055b04a63fe4360212a83f77b34) - [#19904](https://github.com/npm/npm/pull/19904) - Make a best-attempt at preserving line ending style when saving - `package.json`/`package-lock.json`/`npm-shrinkwrap.json`. This goes - hand-in-hand with a previous patch to preserve detected indentation style. - ([@tuananh](https://github.com/tuananh)) -* [`d3cfd41a2`](https://github.com/npm/npm/commit/d3cfd41a28253db5a18260f68642513cbbc93e3b) - `pacote@7.6.1` ([@zkat](https://github.com/zkat)) - * Enable `file:`-based `resolved` URIs in `package-lock.json`. - * Retry git-based operations on certain types of failure. -* [`ecfbb16dc`](https://github.com/npm/npm/commit/ecfbb16dc705f28aa61b3223bdbf9e47230a0fa4) - [#19929](https://github.com/npm/npm/pull/19929) - Add support for the [`NO_COLOR` standard](http://no-color.org). This gives a - cross-application, consistent way of disabling ANSI color code output. Note - that npm already supported this through `--no-color` or - `npm_config_color='false'` configurations, so this is just another way to do - it. - ([@chneukirchen](https://github.com/chneukirchen)) -* [`fc8761daf`](https://github.com/npm/npm/commit/fc8761daf1e8749481457973890fa516eb96a195) - [#19629](https://github.com/npm/npm/pull/19629) - Give more detailed, contextual information when npm fails to parse - `package-lock.json` and `npm-shrinkwrap.json`, instead of saying `JSON parse - error` and leaving you out in the cold. - ([@JoshuaKGoldberg](https://github.com/JoshuaKGoldberg)) -* [`1d368e1e6`](https://github.com/npm/npm/commit/1d368e1e63229f236b9dbabf628989fa3aa98bdb) - [#19157](https://github.com/npm/npm/pull/19157) - Add `--no-proxy` config option. Previously, you needed to use the `NO_PROXY` - environment variable to use this feature -- now it's an actual npm option. - ([@Saturate](https://github.com/Saturate)) -* [`f0e998daa`](https://github.com/npm/npm/commit/f0e998daa049810d5f928615132250021e46451d) - [#18426](https://github.com/npm/npm/pull/18426) - Do environment variable replacement in config files even for config keys or - fragments of keys. - ([@misak113](https://github.com/misak113)) -* [`9847c82a8`](https://github.com/npm/npm/commit/9847c82a8528cfdf5968e9bb00abd8ed47903b5c) - [#18384](https://github.com/npm/npm/pull/18384) - Better error messaging and suggestions when users get `EPERM`/`EACCES` errors. - ([@chrisjpatty](https://github.com/chrisjpatty)) -* [`b9d0c0c01`](https://github.com/npm/npm/commit/b9d0c0c0173542a8d741a9a17b9fb34fbaf5068e) - [#19448](https://github.com/npm/npm/pull/19448) - Holiday celebrations now include all JavaScripters, not just Node developers. - ([@isaacs](https://github.com/isaacs)) - -### NPM CI - -I hope y'all have been having fun with `npm ci` so far! Since this is the first -release since that went out, we've had a few fixes and improvements now that -folks have actually gotten their hands on it! Benchmarks have been super -promising so far, and I've gotten messages from a lot of you saying you've sped -up your CI work by **2-5x** in some cases! Have a good example? Tell us on -Twitter! - -`npm ci` is, right now, [the fastest -installer](http://blog.npmjs.org/post/171556855892/introducing-npm-ci-for-faster-more-reliable) -you can use in CI situations, so go check it out if you haven't already! We'll -continue doing performance improvements on it, and a lot of those will help make -`npm install` fast as well. 🏎😎 - -* [`0d7f203d9`](https://github.com/npm/npm/commit/0d7f203d9e86cc6c8d69107689ea60fc7cbab424) - `libcipm@1.6.0` - ([@zkat](https://github.com/zkat)) - -This `libcipm` release includes a number of improvements: - -* **PERFORMANCE** Reduce calls to `read-package-json` and separate JSON update phase from man/bin linking phase. `npm ci` should be noticeably faster. -* **FEATURE** Progress bar now fills up as packages are installed, instead of sitting there doing nothing. -* **BUGFIX** Add support for `--only` and `--also` options. -* **BUFGIX** Linking binaries and running scripts in parallel was causing packages to sometimes clobber each other when hoisted, as well as potentially running too many run-scripts in parallel. This is now a serial operation, and it turns out to have had relatively little actual performance impact. -* **BUGFIX** Stop adding `_from` to directory deps (aka `file:packages/my-dep`). - -### BUGFIXES - -* [`58d2aa58d`](https://github.com/npm/npm/commit/58d2aa58d5f9c4db49f57a5f33952b3106778669) - [#20027](https://github.com/npm/npm/pull/20027) - Use a specific mtime when packing tarballs instead of the beginning of epoch - time. This should allow `npm pack` to generate tarballs with identical hashes - for identical contents, while fixing issues with some `zip` implementations - that do not support pre-1980 timestamps. - ([@isaacs](https://github.com/isaacs)) -* [`4f319de1d`](https://github.com/npm/npm/commit/4f319de1d6e8aca5fb68f78023425233da4f07f6) - Don't fall back to couch adduser if we didn't try couch login. - ([@iarna](https://github.com/iarna)) -* [`c8230c9bb`](https://github.com/npm/npm/commit/c8230c9bbd596156a4a8cfe62f2370f81d22bd9f) - [#19608](https://github.com/npm/npm/pull/19608) - Fix issue where using the npm-bundled `npx` on Windows was invoking `npx - prefix` (and downloading that package). - ([@laggingreflex](https://github.com/laggingreflex)) -* [`d70c01970`](https://github.com/npm/npm/commit/d70c01970311f4e84b35eef8559c114136a9ebc7) - [#18953](https://github.com/npm/npm/pull/18953) - Avoid using code that depends on `node@>=4` in the `unsupported` check, so npm - can report the issue normally instead of syntax-crashing. - ([@deployable](https://github.com/deployable)) - -### DOCUMENTATION - -* [`4477ca2d9`](https://github.com/npm/npm/commit/4477ca2d993088ac40ef5cf39d1f9c68be3d6252) - `marked@0.3.17`: Fixes issue preventing correct rendering of backticked - strings. man pages should be rendering correctly now instead of having empty - spaces wherever backticks were used. - ([@joshbruce](https://github.com/joshbruce)) -* [`71076ebda`](https://github.com/npm/npm/commit/71076ebdaddd04f2bf330fe668f15750bcff00ea) - [#19950](https://github.com/npm/npm/pull/19950) - Add a note to install --production. - ([@kyranet](https://github.com/kyranet)) -* [`3a33400b8`](https://github.com/npm/npm/commit/3a33400b89a8dd00fa9a49fcb57a8add36f79fa6) - [#19957](https://github.com/npm/npm/pull/19957) - nudge around some details in ci docs - ([@zkat](https://github.com/zkat)) -* [`06038246a`](https://github.com/npm/npm/commit/06038246a3fa58d6f42bb4ab897aa534ff6ed282) - [#19893](https://github.com/npm/npm/pull/19893) - Add a common open reason to the issue template. - ([@MrStonedOne](https://github.com/MrStonedOne)) -* [`7376dd8af`](https://github.com/npm/npm/commit/7376dd8afb654929adade126b4925461aa52da12) - [#19870](https://github.com/npm/npm/pull/19870) - Fix typo in `npm-config.md` - ([@joebowbeer](https://github.com/joebowbeer)) -* [`5390ed4fa`](https://github.com/npm/npm/commit/5390ed4fa2b480f7c58fff6ee670120149ec2d45) - [#19858](https://github.com/npm/npm/pull/19858) - Fix documented default value for config save option. It was still documented - as `false`, even though `npm@5.0.0` set it to `true` by default. - ([@nalinbhardwaj](https://github.com/nalinbhardwaj)) -* [`dc36d850a`](https://github.com/npm/npm/commit/dc36d850a1d763f71a98c99db05ca875dab124ed) - [#19552](https://github.com/npm/npm/pull/19552) - Rework `npm update` docs now that `--save` is on by default. - ([@selbekk](https://github.com/selbekk)) -* [`5ec5dffc8`](https://github.com/npm/npm/commit/5ec5dffc80527d9330388ff82926dd890f4945af) - [#19726](https://github.com/npm/npm/pull/19726) - Clarify that `name` and `version` fields are optional if your package is not - supposed to be installable as a dependency. - ([@ngarnier](https://github.com/ngarnier)) -* [`046500994`](https://github.com/npm/npm/commit/0465009942d6423f878c1359e91972fa5990f996) - [#19676](https://github.com/npm/npm/pull/19676) - Fix documented cache location on Windows. - ([@VladRassokhin](https://github.com/VladRassokhin)) -* [`ffa84cd0f`](https://github.com/npm/npm/commit/ffa84cd0f43c07858506764b4151ba6af11ea120) - [#19475](https://github.com/npm/npm/pull/19475) - Added example for `homepage` field from `package.json`. - ([@cg-cnu](https://github.com/cg-cnu)) -* [`de72d9a18`](https://github.com/npm/npm/commit/de72d9a18ae650ebaee0fdd6694fc89b1cbe8e95) - [#19307](https://github.com/npm/npm/pull/19307) - Document the `requires` field in `npm help package-lock.json`. - ([@jcrben](https://github.com/jcrben)) -* [`35c4abded`](https://github.com/npm/npm/commit/35c4abdedfa622f27e8ee47aa6e293f435323623) - [#18976](https://github.com/npm/npm/pull/18976) - Typo fix in coding style documentation. - ([@rinfan](https://github.com/rinfan)) -* [`0616fd22a`](https://github.com/npm/npm/commit/0616fd22a4e4f2b2998bb70d86d269756aab64be) - [#19216](https://github.com/npm/npm/pull/19216) - Add `edit` section to description in `npm-team.md`. - ([@WispProxy](https://github.com/WispProxy)) -* [`c2bbaaa58`](https://github.com/npm/npm/commit/c2bbaaa582d024cc48b410757efbb81d95837d43) - [#19194](https://github.com/npm/npm/pull/19194) - Tiny style fix in `npm.md`. - ([@WispProxy](https://github.com/WispProxy)) -* [`dcdfdcbb0`](https://github.com/npm/npm/commit/dcdfdcbb0035ef3290bd0912f562e26f6fc4ea94) - [#19192](https://github.com/npm/npm/pull/19192) - Document `--development` flag in `npm-ls.md`. - ([@WispProxy](https://github.com/WispProxy)) -* [`d7ff07135`](https://github.com/npm/npm/commit/d7ff07135a685dd89c15e29d6a28fca33cf448b0) - [#18514](https://github.com/npm/npm/pull/18514) - Make it so `javascript` -> `JavaScript`. This is important. - ([@masonpawsey](https://github.com/masonpawsey)) -* [`7a8705113`](https://github.com/npm/npm/commit/7a870511327d31e8921d6afa845ec8065c60064b) - [#18407](https://github.com/npm/npm/pull/18407) - Clarify the mechanics of the `file` field in `package.json` a bit. - ([@bmacnaughton](https://github.com/bmacnaughton)) -* [`b2a1cf084`](https://github.com/npm/npm/commit/b2a1cf0844ceaeb51ed04f3ae81678527ec9ae68) - [#18382](https://github.com/npm/npm/pull/18382) - Document the [`browser` - field](https://github.com/defunctzombie/package-browser-field-spec) in - `package.json`. - ([@mxstbr](https://github.com/mxstbr)) - -### MISC - -* [`b8a48a959`](https://github.com/npm/npm/commit/b8a48a9595b379cfc2a2c576f61062120ea0caf7) - [#19907](https://github.com/npm/npm/pull/19907) - Consolidate code for stringifying `package.json` and package locks. Also adds - tests have been added to test that `package[-lock].json` files are written to - disk with their original line endings. - ([@nwoltman](https://github.com/nwoltman)) -* [`b4f707d9f`](https://github.com/npm/npm/commit/b4f707d9f543f0995ed5811827a892fc8b2192b5) - [#19879](https://github.com/npm/npm/pull/19879) - Remove unused devDependency `nock` from `.gitignore`. - ([@watilde](https://github.com/watilde)) -* [`8150dd5f7`](https://github.com/npm/npm/commit/8150dd5f72520eb143f75e44787a5775bd8b8ebc) - [#16540](https://github.com/npm/npm/pull/16540) - Stop doing an `uninstall` when using `make clean`. - ([@metux](https://github.com/metux)) - -### OTHER DEPENDENCY BUMPS - -* [`ab237a2a5`](https://github.com/npm/npm/commit/ab237a2a5dcf70ee490e2f0322dfedb1560251d4) - `init-package-json@1.10.3` - ([@zkat](https://github.com/zkat)) -* [`f6d668941`](https://github.com/npm/npm/commit/f6d6689414f00a67a1f34afc6791bdc7d7be4d9b) - `npm-lifecycle@2.0.1` - ([@zkat](https://github.com/zkat)) -* [`882bfbdfa`](https://github.com/npm/npm/commit/882bfbdfaa3eb09b35875e648545cb6967f72562) - `npm-registry-client@8.5.1` - ([@zkat](https://github.com/zkat)) -* [`6ae38055b`](https://github.com/npm/npm/commit/6ae38055ba69db5785ee6c394372de0333763822) - `read-package-json@2.0.1`: Support git packed refs `--all` mode. - ([@zkat](https://github.com/zkat)) -* [`89db703ae`](https://github.com/npm/npm/commit/89db703ae4e25b9fb6c9d7c5119520107a23a752) - `readable-stream@2.3.5` - ([@mcollina](https://github.com/mcollina)) -* [`634dfa5f4`](https://github.com/npm/npm/commit/634dfa5f476b7954b136105a8f9489f5631085a3) - `worker-farm@1.5.4` - ([@rvagg](https://github.com/rvagg)) -* [`92ad34439`](https://github.com/npm/npm/commit/92ad344399f7a23e308d0f3f02547656a47ae6c5) - `hosted-git-info@2.6.0` - ([@zkat](https://github.com/zkat)) -* [`75279c488`](https://github.com/npm/npm/commit/75279c4884d02bd7d451b66616e320eb8cb03bcb) - `tar@4.4.0` - ([@isaacs](https://github.com/isaacs)) -* [`228aba276`](https://github.com/npm/npm/commit/228aba276b19c987cd5989f9bb9ffbe25edb4030) - `write-file-atomic@2.3.0` - ([@iarna](https://github.com/iarna)) -* [`006e9d272`](https://github.com/npm/npm/commit/006e9d272914fc3ba016f110b1411dd20f8a937d) - `libnpx@10.0.1` - ([@zkat](https://github.com/zkat)) -* [`9985561e6`](https://github.com/npm/npm/commit/9985561e666473deeb352c1d4252adf17c2fa01d) - `mississippi@3.0.0` - ([@bcomnes](https://github.com/bcomnes)) -* [`1dc6b3b52`](https://github.com/npm/npm/commit/1dc6b3b525967bc8526aa4765e987136cb570e8e) - `tap@11.1.2` - ([@isaacs](https://github.com/isaacs)) - -## v5.7.1 (2018-02-22): - -This release reverts a patch that could cause some ownership changes on system -files when running from some directories when also using `sudo`. 😲 - -Thankfully, it only affected users running `npm@next`, which is part of our -staggered release system, which we use to prevent issues like this from going -out into the wider world before we can catch them. Users on `latest` would have -never seen this! - -The original patch was added to increase consistency and reliability of methods -npm uses to avoid writing files as `root` in places it shouldn't, but the change -was applied in places that should have used regular `mkdirp`. This release -reverts that patch. - -* [`74e149da6`](https://github.com/npm/npm/commit/74e149da6efe6ed89477faa81fef08eee7999ad0) - [`#19883`](https://github.com/npm/npm/issue/19883) - Revert "*: Switch from mkdirp to correctMkdir to preserve perms and owners" - This reverts commit [`94227e15`](https://github.com/npm/npm/commit/94227e15eeced836b3d7b3d2b5e5cc41d4959cff). - ([@zkat](https://github.com/zkat)) - -## v5.7.0 (2018-02-20): - -Hey y'all, it's been a while. Expect our release rate to increase back to -normal here, as we've got a lot in the pipeline. Right now we've got a -bunch of things from folks at npm. In the next release we'll be focusing on -user contributions and there are a lot of them queued up! - -This release brings a bunch of exciting new features and bug fixes. - -### PACKAGE-LOCK GIT MERGE CONFLICT RESOLUTION - -Allow `npm install` to fix `package-lock.json` and `npm-shrinkwrap.json` -files that have merge conflicts in them without your having to edit them. -It works in conjunction with -[`npm-merge-driver`](https://www.npmjs.com/package/npm-merge-driver) to -entirely eliminate package-lock merge conflicts. - -* [`e27674c22`](https://github.com/npm/npm/commit/e27674c221dc17473f23bffa50123e49a021ae34) - Automatically resolve merge conflicts in lock-files. - ([@zkat](https://github.com/zkat)) - -### NPM CI - -The new `npm ci` command installs from your lock-file ONLY. If your -`package.json` and your lock-file are out of sync then it will report an error. - -It works by throwing away your `node_modules` and recreating it from scratch. - -Beyond guaranteeing you that you'll only get what is in your lock-file it's -also much faster (2x-10x!) than `npm install` when you don't start with a -`node_modules`. - -As you may take from the name, we expect it to be a big boon to continuous -integration environments. We also expect that folks who do production -deploys from git tags will see major gains. - -* [`5e4de9c99`](https://github.com/npm/npm/commit/5e4de9c99c934e25ef7b9c788244cc3c993da559) - Add new `npm ci` installer. - ([@zkat](https://github.com/zkat)) - -### OTHER NEW FEATURES - -* [`4d418c21b`](https://github.com/npm/npm/commit/4d418c21b051f23a3b6fb085449fdf4bf4f826f5) - [#19817](https://github.com/npm/npm/pull/19817) - Include contributor count in installation summary. - ([@kemitchell](https://github.com/kemitchell)) -* [`17079c2a8`](https://github.com/npm/npm/commit/17079c2a880d3a6f8a67c8f17eedc7eb51b8f0f8) - Require password to change email through `npm profile`. - ([@iarna](https://github.com/iarna)) -* [`e7c5d226a`](https://github.com/npm/npm/commit/e7c5d226ac0ad3da0e38f16721c710909d0a9847) - [`4f5327c05`](https://github.com/npm/npm/commit/4f5327c0556764aa1bbc9b58b1a8c8a84136c56a) - [#19780](https://github.com/npm/npm/pull/19780) - Add support for web-based logins. This is not yet available on the registry, however. - ([@isaacs](https://github.com/isaacs)) - -### BIG FIXES TO PRUNING - -* [`827951590`](https://github.com/npm/npm/commit/8279515903cfa3026cf7096189485cdf29f74a8f) - Handle running `npm install package-name` with a `node_modules` containing - packages without sufficient metadata to verify their origin. The only way - to get install packages like this is to use a non-`npm` package manager. - Previously `npm` removed any packages that it couldn't verify. Now it - will leave them untouched as long as you're not asking for a full install. - On a full install they will be reinstalled (but the same versions will be - maintained). - - This will fix problems for folks who are using a third party package - manager to install packages that have `postinstall` scripts that run - `npm install`. - ([@iarna](https://github.com/iarna)) -* [`3b305ee71`](https://github.com/npm/npm/commit/3b305ee71e2bf852ff3037366a1774b8c5fcc0a5) - Only auto-prune on installs that will create a lock-file. This restores - `npm@4` compatible behavior when the lock-file is disabled. When using a - lock-file `npm` will continue to remove anything in your `node_modules` - that's not in your lock-file. ([@iarna](https://github.com/iarna)) -* [`cec5be542`](https://github.com/npm/npm/commit/cec5be5427f7f5106a905de8630e1243e9b36ef4) - Fix bug where `npm prune --production` would remove dev deps from the lock - file. It will now only remove them from `node_modules` not from your lock - file. - ([@iarna](https://github.com/iarna)) -* [`857dab03f`](https://github.com/npm/npm/commit/857dab03f2d58586b45d41d3e5af0fb2d4e824d0) - Fix bug where git dependencies would be removed or reinstalled when - installing other dependencies. - ([@iarna](https://github.com/iarna)) - -### BUG FIXES TO TOKENS AND PROFILES - -* [`a66e0cd03`](https://github.com/npm/npm/commit/a66e0cd0314893b745e6b9f6ca1708019b1d7aa3) - For CIDR filtered tokens, allow comma separated CIDR ranges, as documented. Previously - you could only pass in multiple cidr ranges with multiple `--cidr` command line options. - ([@iarna](https://github.com/iarna)) -* [`d259ab014`](https://github.com/npm/npm/commit/d259ab014748634a89cad5b20eb7a40f3223c0d5) - Fix token revocation when an OTP is required. Previously you had to pass - it in via `--otp`. Now it will prompt you for an OTP like other - `npm token` commands. - ([@iarna](https://github.com/iarna)) -* [`f8b1f6aec`](https://github.com/npm/npm/commit/f8b1f6aecadd3b9953c2b8b05d15f3a9cff67cfd) - Update token and profile commands to support legacy (username/password) authentication. - (The npm registry uses tokens, not username/password pairs, to authenticate commands.) - ([@iarna](https://github.com/iarna)) - -### OTHER BUG FIXES - -* [`6954dfc19`](https://github.com/npm/npm/commit/6954dfc192f88ac263f1fcc66cf820a21f4379f1) - Fix a bug where packages would get pushed deeper into the tree when upgrading without - an existing copy on disk. Having packages deeper in the tree ordinarily is harmless but - is not when peerDependencies are in play. - ([@iarna](https://github.com/iarna)) -* [`1ca916a1e`](https://github.com/npm/npm/commit/1ca916a1e9cf94691d1ff2e5e9d0204cfaba39e1) - Fix bug where when switching from a linked module to a non-linked module, the dependencies - of the module wouldn't be installed on the first run of `npm install`. - ([@iarna](https://github.com/iarna)) -* [`8c120ebb2`](https://github.com/npm/npm/commit/8c120ebb28e87bc6fe08a3fad1bb87b50026a33a) - Fix integrity matching to eliminate spurious EINTEGRITY errors. - ([@zkat](https://github.com/zkat)) -* [`94227e15e`](https://github.com/npm/npm/commit/94227e15eeced836b3d7b3d2b5e5cc41d4959cff) - More consistently make directories using perm and ownership preserving features. - ([@iarna](https://github.com/iarna)) - -### DEPENDENCY UPDATES - -* [`364b23c7f`](https://github.com/npm/npm/commit/364b23c7f8a231c0df3866d6a8bde4d3f37bbc00) - [`f2049f9e7`](https://github.com/npm/npm/commit/f2049f9e7992e6edcfce8619b59746789367150f) - `cacache@10.0.4` - ([@zkat](https://github.com/zkat)) -* [`d183d7675`](https://github.com/npm/npm/commit/d183d76757e8a29d63a999d7fb4edcc1486c25c1) - `find-npm-prefix@1.0.2`: - ([@iarna](https://github.com/iarna)) -* [`ffd6ea62c`](https://github.com/npm/npm/commit/ffd6ea62ce583baff38cf4901cf599639bc193c8) - `fs-minipass@1.2.5` -* [`ee63b8a31`](https://github.com/npm/npm/commit/ee63b8a311ac53b0cf2efa79babe61a2c4083ef6) - `ini@1.3.5` - ([@isaacs](https://github.com/isaacs)) -* [`6f73f5509`](https://github.com/npm/npm/commit/6f73f5509e9e8d606526565c7ceb71c62642466e) - `JSONStream@1.3.2` - ([@dominictarr](https://github.com/dominictarr)) -* [`26cd64869`](https://github.com/npm/npm/commit/26cd648697c1324979289e381fe837f9837f3874) - [`9bc6230cf`](https://github.com/npm/npm/commit/9bc6230cf34a09b7e4358145ff0ac3c69c23c3f6) - `libcipm@1.3.3` - ([@zkat](https://github.com/zkat)) -* [`21a39be42`](https://github.com/npm/npm/commit/21a39be4241a60a898d11a5967f3fc9868ef70c9) - `marked@0.3.1`:5 - ([@joshbruce](https://github.com/joshbruce)) -* [`dabdf57b2`](https://github.com/npm/npm/commit/dabdf57b2d60d665728894b4c1397b35aa9d41c0) - `mississippi@2.0.0` -* [`2594c5867`](https://github.com/npm/npm/commit/2594c586723023edb1db172779afb2cbf8b30c08) - `npm-registry-couchapp@2.7.1` - ([@iarna](https://github.com/iarna)) -* [`8abb3f230`](https://github.com/npm/npm/commit/8abb3f230f119fe054353e70cb26248fc05db0b9) - `osenv@0.1.5` - ([@isaacs](https://github.com/isaacs)) -* [`11a0b00bd`](https://github.com/npm/npm/commit/11a0b00bd3c18625075dcdf4a5cb6500b33c6265) - `pacote@7.3.3` - ([@zkat](https://github.com/zkat)) -* [`9b6bdb2c7`](https://github.com/npm/npm/commit/9b6bdb2c77e49f6d473e70de4cd83c58d7147965) - `query-string@5.1.0` - ([@sindresorhus](https://github.com/sindresorhus)) -* [`d6d17d6b5`](https://github.com/npm/npm/commit/d6d17d6b532cf4c3461b1cf2e0404f7c62c47ec4) - `readable-stream@2.3.4` - ([@mcollina](https://github.com/mcollina)) -* [`51370aad5`](https://github.com/npm/npm/commit/51370aad561b368ccc95c1c935c67c8cd2844d40) - `semver@5.5.0` - ([@isaacs](https://github.com/isaacs)) -* [`0db14bac7`](https://github.com/npm/npm/commit/0db14bac762dd59c3fe17c20ee96d2426257cdd5) - [`81da938ab`](https://github.com/npm/npm/commit/81da938ab6efb881123cdcb44f7f84551924c988) - [`9999e83f8`](https://github.com/npm/npm/commit/9999e83f87c957113a12a6bf014a2099d720d716) - `ssri@5.2.4` - ([@zkat](https://github.com/zkat)) -* [`f526992ab`](https://github.com/npm/npm/commit/f526992ab6f7322a0b3a8d460dc48a2aa4a59a33) - `tap@11.1.1` - ([@isaacs](https://github.com/isaacs)) -* [`be096b409`](https://github.com/npm/npm/commit/be096b4090e2a33ae057912d28fadc5a53bd3391) - [`dc3059522`](https://github.com/npm/npm/commit/dc3059522758470adc225f0651be72c274bd29ef) - `tar@4.3.3` -* [`6b552daac`](https://github.com/npm/npm/commit/6b552daac952f413ed0e2df762024ad219a8dc0a) - `uuid@3.2.1` - ([@broofa](https://github.com/broofa)) -* [`8c9011b72`](https://github.com/npm/npm/commit/8c9011b724ad96060e7e82d9470e9cc3bb64e9c6) - `worker-farm@1.5.2` - ([@rvagg](https://github.com/rvagg)) - - -## v5.6.0 (2017-11-27): - -### Features! - -You may have noticed this is a semver-minor bump. Wondering why? This is why! - -* [`bc263c3fd`](https://github.com/npm/npm/commit/bc263c3fde6ff4b04deee132d0a9d89379e28c27) - [#19054](https://github.com/npm/npm/pull/19054) - **Fully cross-platform `package-lock.json`**. Installing a failing optional - dependency on one platform no longer removes it from the dependency tree, - meaning that `package-lock.json` should now be generated consistently across - platforms! 🎉 - ([@iarna](https://github.com/iarna)) -* [`f94fcbc50`](https://github.com/npm/npm/commit/f94fcbc50d8aec7350164df898d1e12a1e3da77f) - [#19160](https://github.com/npm/npm/pull/19160) - Add `--package-lock-only` config option. This makes it so you can generate a - target `package-lock.json` without performing a full install of - `node_modules`. - ([@alopezsanchez](https://github.com/alopezsanchez)) -* [`66d18280c`](https://github.com/npm/npm/commit/66d18280ca320f880f4377cf80a8052491bbccbe) - [#19104](https://github.com/npm/npm/pull/19104) - Add new `--node-options` config to pass through a custom `NODE_OPTIONS` for - lifecycle scripts. - ([@bmeck](https://github.com/bmeck)) -* [`114d518c7`](https://github.com/npm/npm/commit/114d518c75732c42acbef3acab36ba1d0fd724e2) - Ignore mtime when packing tarballs: This means that doing `npm pack` on the - same repository should yield two tarballs with the same checksum. This will - also help prevent cache bloat when using git dependencies. In the future, this - will allow npm to explicitly cache git dependencies. - ([@isaacs](https://github.com/isaacs)) - -### Node 9 - -Previously, it turns out npm broke on the latest Node, `node@9`. We went ahead -and fixed it up so y'all should be able to use the latest npm again! - -* [`4ca695819`](https://github.com/npm/npm/commit/4ca6958196ae41cef179473e3f7dbed9df9a32f1) - `minizlib@1.0.4`: `Fix node@9` incompatibility. - ([@isaacs](https://github.com/isaacs)) -* [`c851bb503`](https://github.com/npm/npm/commit/c851bb503a756b7cd48d12ef0e12f39e6f30c577) - `tar@4.0.2`: Fix `node@9` incompatibility. - ([@isaacs](https://github.com/isaacs)) -* [`6caf23096`](https://github.com/npm/npm/commit/6caf2309613d14ce77923ad3d1275cb89c6cf223) - Remove "unsupported" warning for Node 9 now that things are fixed. - ([@iarna](https://github.com/iarna)) -* [`1930b0f8c`](https://github.com/npm/npm/commit/1930b0f8c44373301edc9fb6ccdf7efcb350fa42) - Update test matrix with `node@8` LTS and `node@9`. - ([@iarna](https://github.com/iarna)) - -### Bug Fixes - -* [`b70321733`](https://github.com/npm/npm/commit/b7032173361665a12c9e4200bdc3f0eb4dee682f) - [#18881](https://github.com/npm/npm/pull/18881) - When dealing with a `node_modules` that was created with older versions of npm - (and thus older versions of npa) we need to gracefully handle older spec - entries. Failing to do so results in us treating those packages as if they - were http remote deps, which results in invalid lock files with `version` set - to tarball URLs. This should now be fixed. - ([@iarna](https://github.com/iarna)) -* [`2f9c5dd00`](https://github.com/npm/npm/commit/2f9c5dd0046a53ece3482e92a412413f5aed6955) - [#18880](https://github.com/npm/npm/pull/18880) - Stop overwriting version in package data on disk. This is another safeguard - against the version overwriting that's plagued some folks upgrading from older - package-locks. - ([@iarna](https://github.com/iarna)) - ([@joshclow](https://github.com/joshclow)) -* [`a93e0a51d`](https://github.com/npm/npm/commit/a93e0a51d3dafc31c809ca28cd7dfa71b2836f86) - [#18846](https://github.com/npm/npm/pull/18846) - Correctly save transitive dependencies when using `npm update` in - `package-lock.json`. - ([@iarna](https://github.com/iarna)) -* [`fdde7b649`](https://github.com/npm/npm/commit/fdde7b649987b2acd9a37ef203f1e263fdf6fece) - [#18825](https://github.com/npm/npm/pull/18825) - Fix typo and concatenation in error handling. - ([@alulsh](https://github.com/alulsh)) -* [`be67de7b9`](https://github.com/npm/npm/commit/be67de7b90790cef0a9f63f91c2f1a00942205ee) - [#18711](https://github.com/npm/npm/pull/18711) - Upgrade to bearer tokens from legacy auth when enabling 2FA. - ([@iarna](https://github.com/iarna)) -* [`bfdf0fd39`](https://github.com/npm/npm/commit/bfdf0fd39646b03db8e543e2bec7092da7880596) - [#19033](https://github.com/npm/npm/pull/19033) - Fix issue where files with `@` signs in their names would not get included - when packing tarballs. - ([@zkat](https://github.com/zkat)) -* [`b65b89bde`](https://github.com/npm/npm/commit/b65b89bdeaa65516f3e13afdb6e9aeb22d8508f4) - [#19048](https://github.com/npm/npm/pull/19048) - Fix problem where `npm login` was ignoring various networking-related options, - such as custom certs. - ([@wejendorp](https://github.com/wejendorp)) -* [`8c194b86e`](https://github.com/npm/npm/commit/8c194b86ec9617e2bcc31f30ee4772469a0bb440) - `npm-packlist@1.1.10`: Include `node_modules/` directories not in the root. - ([@isaacs](https://github.com/isaacs)) -* [`d7ef6a20b`](https://github.com/npm/npm/commit/d7ef6a20b44e968cb92babab1beb51f99110781d) - `libnpx@9.7.1`: Fix some *nix binary path escaping issues. - ([@zkat](https://github.com/zkat)) -* [`981828466`](https://github.com/npm/npm/commit/981828466a5936c70abcccea319b227c443e812b) - `cacache@10.0.1`: Fix fallback to `copy-concurrently` when file move fails. - This might fix permissions and such issues on platforms that were getting - weird filesystem errors during install. - ([@karolba](https://github.com/karolba)) -* [`a0be6bafb`](https://github.com/npm/npm/commit/a0be6bafb6dd7acb3e7b717c27c8575a2215bfff) - `pacote@7.0.2`: Includes a bunch of fixes, specially for issues around git - dependencies. Shasum-related errors should be way less common now, too. - ([@zkat](https://github.com/zkat)) -* [`b80d650de`](https://github.com/npm/npm/commit/b80d650def417645d2525863e9f17af57a917b42) - [#19163](https://github.com/npm/npm/pull/19163) - Fix a number of git and tarball specs and checksum errors. - ([@zkat](https://github.com/zkat)) -* [`cac225025`](https://github.com/npm/npm/commit/cac225025fa06cd055286e75541138cd95f52def) - [#19054](https://github.com/npm/npm/pull/19054) - Don't count failed optionals when summarizing installed packages. - ([@iarna](https://github.com/iarna)) - -### UX - -* [`b1ec2885c`](https://github.com/npm/npm/commit/b1ec2885c43f8038c4e05b83253041992fdfe382) - [#18326](https://github.com/npm/npm/pull/18326) - Stop truncating output of `npm view`. This means, for example, that you no - longer need to use `--json` when a package has a lot of versions, to see the - whole list. - ([@SimenB](https://github.com/SimenB)) -* [`55a124e0a`](https://github.com/npm/npm/commit/55a124e0aa6097cb46f1484f666444b2a445ba57) - [#18884](https://github.com/npm/npm/pull/18884) - Profile UX improvements: better messaging on unexpected responses, and stop - claiming we set passwords to null when resetting them. - ([@iarna](https://github.com/iarna)) -* [`635481c61`](https://github.com/npm/npm/commit/635481c6143bbe10a6f89747795bf4b83f75a7e9) - [#18844](https://github.com/npm/npm/pull/18844) - Improve error messaging for OTP/2FA. - ([@iarna](https://github.com/iarna)) -* [`52b142ed5`](https://github.com/npm/npm/commit/52b142ed5e0f13f23c99209932e8de3f7649fd47) - [#19054](https://github.com/npm/npm/pull/19054) - Stop running the same rollback multiple times. This should address issues - where Windows users saw strange failures when `fsevents` failed to install. - ([@iarna](https://github.com/iarna)) -* [`798428b0b`](https://github.com/npm/npm/commit/798428b0b7b6cfd6ce98041c45fc0a36396e170c) - [#19172](https://github.com/npm/npm/pull/19172) - `bin-links@1.1.0`: Log the fact line endings are being changed upon install. - ([@marcosscriven](https://github.com/marcosscriven)) - -### Refactors - -Usually, we don't include internal refactor stuff in our release notes, but it's -worth calling out some of them because they're part of a larger effort the CLI -team and associates are undertaking to modularize npm itself so other package -managers and associated tools can reuse all that code! - -* [`9d22c96b7`](https://github.com/npm/npm/commit/9d22c96b7160729c8126a38dcf554611b9e3ba87) - [#18500](https://github.com/npm/npm/pull/18500) - Extract bin-links and gentle-fs to a separate library. This will allow - external tools to do bin linking and certain fs operations in an - npm-compatible way! - ([@mikesherov](https://github.com/mikesherov)) -* [`015a7803b`](https://github.com/npm/npm/commit/015a7803b7b63bc8543882196d987b92b461932d) - [#18883](https://github.com/npm/npm/pull/18883) - Capture logging from log events on the process global. This allows npm to use - npmlog to report logging from external libraries like `npm-profile`. - ([@iarna](https://github.com/iarna)) -* [`c930e98ad`](https://github.com/npm/npm/commit/c930e98adc03cef357ae5716269a04d74744a852) - `npm-lifecycle@2.0.0`: Use our own `node-gyp`. This means npm no longer needs - to pull some maneuvers to make sure `node-gyp` is in the right place, and that - external packages using `npm-lifecycle` will get working native builds without - having to do their own `node-gyp` maneuvers. - ([@zkochan](https://github.com/zkochan)) -* [`876f0c8f3`](https://github.com/npm/npm/commit/876f0c8f341f8915e338b409f4b8616bb5263500) [`829893d61`](https://github.com/npm/npm/commit/829893d617bf81bba0d1ce4ea303f76ea37a2b2d) - [#19099](https://github.com/npm/npm/pull/19099) - `find-npm-prefix@1.0.1`: npm's prefix-finding logic is now a standalone - module. That is, the logic that figures out where the root of your project is - if you've `cd`'d into a subdirectory. Did you know you can run `npm install` - from these subdirectories, and it'll only affect the root? It works like git! - ([@iarna](https://github.com/iarna)) - -### Docs - -* [`7ae12b21c`](https://github.com/npm/npm/commit/7ae12b21cc841f76417d3bb13b74f177319d4deb) - [#18823](https://github.com/npm/npm/pull/18823) - Fix spelling of the word authenticator. Because English is hard. - ([@tmcw](https://github.com/tmcw)) -* [`5dfc3ab7b`](https://github.com/npm/npm/commit/5dfc3ab7bc2cb0fa7d9a8c00aa95fecdd14d7ae1) - [#18742](https://github.com/npm/npm/pull/18742) - Explicitly state 'github:foo/bar' as a valid shorthand for hosted git specs. - ([@felicio](https://github.com/felicio)) -* [`a9dc098a6`](https://github.com/npm/npm/commit/a9dc098a6eb7a87895f52a101ac0d41492da698e) - [#18679](https://github.com/npm/npm/pull/18679) - Add some documentation about the `script-shell` config. - ([@gszabo](https://github.com/gszabo)) -* [`24d7734d1`](https://github.com/npm/npm/commit/24d7734d1a1e906c83c53b6d1853af8dc758a998) - [#18571](https://github.com/npm/npm/pull/18571) - Change `verboten` to `forbidden`. - ([@devmount](https://github.com/devmount)) -* [`a8a45668f`](https://github.com/npm/npm/commit/a8a45668fb9b8eb84234fe89234bdcdf644ead58) - [#18568](https://github.com/npm/npm/pull/18568) - Improve wording for the docs for the "engines" section of package.json files. - ([@apitman](https://github.com/apitman)) -* [`dbc7e5b60`](https://github.com/npm/npm/commit/dbc7e5b602870330a8cdaf63bd303cd9050f792f) - [#19118](https://github.com/npm/npm/pull/19118) - Use valid JSON in example for bundledDependencies. - ([@charmander](https://github.com/charmander)) -* [`779339485`](https://github.com/npm/npm/commit/779339485bab5137d0fdc68d1ed6fa987aa8965a) - [#19162](https://github.com/npm/npm/pull/19162) - Remove trailing white space from `npm access` docs. - ([@WispProxy](https://github.com/WispProxy)) - -### Dependency Bumps - -* [`0e7cac941`](https://github.com/npm/npm/commit/0e7cac9413ff1104cf242cc3006f42aa1c2ab63f) - `bluebird@3.5.1` - ([@petkaantonov](https://github.com/petkaantonov)) -* [`c4d5887d9`](https://github.com/npm/npm/commit/c4d5887d978849ddbe2673630de657f141ae5bcf) - `update-notifier@2.3.0` - ([@sindresorhus](https://github.com/sindresorhus)) -* [`eb19a9691`](https://github.com/npm/npm/commit/eb19a9691cf76fbc9c5b66aa7aadb5d905af467a) - `npm-package-arg@6.0.0` - ([@zkat](https://github.com/zkat)) -* [`91d5dca96`](https://github.com/npm/npm/commit/91d5dca96772bc5c45511ddcbeeb2685c7ea68e8) - `npm-profile@2.0.5` - ([@iarna](https://github.com/iarna)) -* [`8de66c46e`](https://github.com/npm/npm/commit/8de66c46e57e4b449c9540c8ecafbc4fd58faff5) - `ssri@5.0.0` - ([@zkat](https://github.com/zkat)) -* [`cfbc3ea69`](https://github.com/npm/npm/commit/cfbc3ea69a8c62dc8e8543193c3ac472631dcef9) - `worker-farm@1.5.1` - ([@rvagg](https://github.com/rvagg)) -* [`60c228160`](https://github.com/npm/npm/commit/60c228160f22d41c2b36745166c9e8c2d84fee58) - `query-string@5.0.1` - ([@sindresorhus](https://github.com/sindresorhus)) -* [`72cad8c66`](https://github.com/npm/npm/commit/72cad8c664efd8eb1bec9a418bccd6c6ca9290de) - `copy-concurrently@1.0.5` - ([@iarna](https://github.com/iarna)) - -## v5.5.1 (2017-10-04): - -A very quick, record time, patch release, of a bug fix to a (sigh) last minute bug fix. - -* [`e628e058b`](https://github.com/npm/npm/commit/e628e058b) - Fix login to properly recognize OTP request and store bearer tokens. - ([@iarna](https://github.com/iarna)) - -## v5.5.0 (2017-10-04): - -Hey y'all, this is a big new feature release! We've got some security -related goodies plus a some quality-of-life improvements for anyone who uses -the public registry (so, virtually everyone). - -The changes largely came together in one piece, so I'm just gonna leave the commit line here: - -* [`f6ebf5e8b`](https://github.com/npm/npm/commit/f6ebf5e8bd6a212c7661e248c62c423f2b54d978) - [`f97ad6a38`](https://github.com/npm/npm/commit/f97ad6a38412581d059108ea29be470acb4fa510) - [`f644018e6`](https://github.com/npm/npm/commit/f644018e6ef1ff7523c6ec60ae55a24e87a9d9ae) - [`8af91528c`](https://github.com/npm/npm/commit/8af91528ce6277cd3a8c7ca8c8102671baf10d2f) - [`346a34260`](https://github.com/npm/npm/commit/346a34260b5fba7de62717135f3e083cc4820853) - Two factor authentication, profile editing and token management. - ([@iarna](https://github.com/iarna)) - -### TWO FACTOR AUTHENTICATION - -You can now enable two-factor authentication for your npm account. You can -even do it from the CLI. In fact, you have to, for the time being: - -``` -npm profile enable-tfa -``` - -With the default two-factor authentication mode you'll be prompted to enter -a one-time password when logging in, when publishing and when modifying access rights to -your modules. - -### TOKEN MANAGEMENT - -You can now create, list and delete authentication tokens from the comfort -of the command line. Authentication tokens created this way can have NEW -restrictions placed on them. For instance, you can create a `read-only` -token to give to your CI. It will be able to download your private modules -but it won't be able to publish or modify modules. You can also create -tokens that can only be used from certain network addresses. This way you -can lock down access to your corporate VPN or other trusted machines. - -Deleting tokens isn't new, you could [do it via the -website](https://www.npmjs.com/settings/tokens) but now you can do it via -the CLI as well. - -### CHANGE YOUR PASSWORD, SET YOUR EMAIL - -You can finally change your password from the CLI with `npm profile set -password`! You can also update your email address with `npm profile set -email <address>`. If you change your email address we'll send you a new -verification email so you verify that its yours. - -### AND EVERYTHING ELSE ON YOUR PROFILE - -You can also update all of the other attributes of your profile that -previously you could only update via the website: `fullname`, `homepage`, -`freenode`, `twitter` and `github`. - -### AVAILABLE STAND ALONE - -All of these features were implemented in a stand alone library, so if you -have use for them in your own project you can find them in -[npm-profile](https://www.npmjs.com/package/npm-profile) on the registry. -There's also a little mini-cli written just for it at -[npm-profile-cli](https://www.npmjs.com/package/npm-profile-cli). You might -also be interested in the [API -documentation](https://github.com/npm/registry/tree/master/docs) for these -new features: [user profile editing](https://github.com/npm/registry/blob/master/docs/user/profile.md) and -[authentication](https://github.com/npm/registry/blob/master/docs/user/authentication.md). - -### BUG FIXES - -* [`5ee55dc71`](https://github.com/npm/npm/commit/5ee55dc71b8b74b8418c3d5ec17483a07b3b6777) - install.sh: Drop support for upgrading from npm@1 as npm@5 can't run on - any Node.js version that ships npm@1. This fixes an issue some folks were seeing when trying - to upgrade using `curl | http://npmjs.com/install.sh`. - ([@iarna](https://github.com/iarna)) -* [`5cad1699a`](https://github.com/npm/npm/commit/5cad1699a7a0fc85ac7f77a95087a9647f75e344) - `npm-lifecycle@1.0.3` Fix a bug where when more than one lifecycle script - got queued to run, npm would crash. - ([@zkat](https://github.com/zkat)) -* [`cd256cbb2`](https://github.com/npm/npm/commit/cd256cbb2f97fcbcb82237e94b66eac80e493626) - `npm-packlist@1.1.9` Fix a bug where test directories would always be - excluded from published modules. - ([@isaacs](https://github.com/isaacs)) -* [`2a11f0215`](https://github.com/npm/npm/commit/2a11f021561acb1eb1ad4ad45ad955793b1eb4af) - Fix formatting of unsupported version warning - ([@iarna](https://github.com/iarna)) - -### DEPENDENCY UPDATES - -* [`6d2a285a5`](https://github.com/npm/npm/commit/6d2a285a58655f10834f64d38449eb1f3c8b6c47) - `npm-registry-client@8.5.0` -* [`69e64e27b`](https://github.com/npm/npm/commit/69e64e27bf58efd0b76b3cf6e8182c77f8cc452f) - `request@2.83.0` -* [`34e0f4209`](https://github.com/npm/npm/commit/34e0f42090f6153eb5462f742e402813e4da56c8) - `abbrev@1.1.1` -* [`10d31739d`](https://github.com/npm/npm/commit/10d31739d39765f1f0249f688bd934ffad92f872) - `aproba@1.2.0` -* [`2b02e86c0`](https://github.com/npm/npm/commit/2b02e86c06cf2a5fe7146404f5bfd27f190ee4f4) - `meant@1.0.1` -* [`b81fff808`](https://github.com/npm/npm/commit/b81fff808ee269361d3dcf38c1b6019f1708ae02) - `rimraf@2.6.2`: - Fixes a long standing bug in rimraf's attempts to work around Windows limitations - where it owns a file and can change its perms but can't remove it without - first changing its perms. This _may_ be an improvement for Windows users of npm under - some circumstances. - ([@isaacs](https://github.com/isaacs)) - -## v5.4.2 (2017-09-14): - -This is a small bug fix release wrapping up most of the issues introduced with 5.4.0. - -### Bugs - -* [`0b28ac72d`](https://github.com/npm/npm/commit/0b28ac72d29132e9b761717aba20506854465865) - [#18458](https://github.com/npm/npm/pull/18458) - Fix a bug on Windows where rolling back of failed optional dependencies would fail. - ([@marcins](https://github.com/marcins)) -* [`3a1b29991`](https://github.com/npm/npm/commit/3a1b299913ce94fdf25ed3ae5c88fe6699b04e24) - `write-file-atomic@2.1.0` Revert update of `write-file-atomic`. There were changes made to it - that were resulting in EACCES errors for many users. - ([@iarna](https://github.com/iarna)) -* [`cd8687e12`](https://github.com/npm/npm/commit/cd8687e1257f59a253436d69e8d79a29c85d00c8) - Fix a bug where if npm decided it needed to move a module during an upgrade it would strip - out much of the `package.json`. This would result in broken trees after package updates. -* [`5bd0244ee`](https://github.com/npm/npm/commit/5bd0244eec347ce435e88ff12148c35da7c69efe) - [#18385](https://github.com/npm/npm/pull/18385) - Fix `npm outdated` when run on non-registry dependencies. - ([@joshclow](https://github.com/joshclow)) - ([@iarna](https://github.com/iarna)) - -### Ux - -* [`339f17b1e`](https://github.com/npm/npm/commit/339f17b1e6816eccff7df97875db33917eccdd13) - Report unsupported node versions with greater granularity. - ([@iarna](https://github.com/iarna)) - -### Docs - -* [`b2ab6f43b`](https://github.com/npm/npm/commit/b2ab6f43b8ae645134238acd8dd3083e5ba8846e) - [#18397](https://github.com/npm/npm/pull/18397) - Document that the default loglevel with `npm@5` is `notice`. - ([@KenanY](https://github.com/KenanY)) -* [`e5aedcd82`](https://github.com/npm/npm/commit/e5aedcd82af81fa9e222f9210f6f890c72a18dd3) - [#18372](https://github.com/npm/npm/pull/18372) - In npm-config documentation, note that env vars use \_ in place of -. - ([@jakubholynet](https://github.com/jakubholynet)) - -## v5.4.1 (2017-09-06): - -This is a very small bug fix release to fix a problem where permissions on -installed binaries were being set incorrectly. - -* [`767ff6eee`](https://github.com/npm/npm/commit/767ff6eee7fa3a0f42ad677dedc0ec1f0dc15e7c) - [zkat/pacote#117](https://github.com/zkat/pacote/pull/117) - [#18324](https://github.com/npm/npm/issues/18324) - `pacote@6.0.2` - ([@zkat](https://github.com/zkat)) - -## v5.4.0 (2017-08-22): - -Here's another ~~small~~ big release, with a ~~handful~~ bunch of fixes and -a couple of ~~small~~ new features! This release has been incubating rather -longer than usual and it's grown quite a bit in that time. I'm also excited -to say that it has contributions from **27** different folks, which is a new -record for us. Our previous record was 5.1.0 at 21. Before that the record -had been held by 1.3.16 since _December of 2013_. - -![chart of contributor counts by version, showing an increasing rate over time and spikes mid in the 1.x series and later at 5.x](https://pbs.twimg.com/media/DH38rbZUwAAf9hS.jpg) - -If you can't get enough of the bleeding edge, I encourage you to check out -our canary release of npm. Get it with `npm install -g npmc`. It's going to -be seeing some exciting stuff in the next couple of weeks, starting with a -rewritten `npm dedupe`, but moving on to… well, you'll just have to wait and -find out. - -### PERFORMANCE - -* [`d080379f6`](https://github.com/npm/npm/commit/d080379f620c716afa2c1d2e2ffc0a1ac3459194) - `pacote@6.0.1` Updates extract to use tar@4, which is much faster than the - older tar@2. It reduces install times by as much as 10%. - ([@zkat](https://github.com/zkat)) -* [`4cd6a1774`](https://github.com/npm/npm/commit/4cd6a1774f774506323cae5685c9ca9a10deab63) - [`0195c0a8c`](https://github.com/npm/npm/commit/0195c0a8cdf816834c2f737372194ddc576c451d) - [#16804](https://github.com/npm/npm/pull/16804) - `tar@4.0.1` Update publish to use tar@4. tar@4 brings many advantages - over tar@2: It's faster, better tested and easier to work with. It also - produces exactly the same byte-for-byte output when producing tarballs - from the same set of files. This will have some nice carry on effects for - things like caching builds from git. And finally, last but certainly not - least, upgrading to it also let's us finally eliminate `fstream`—if - you know what that is you'll know why we're so relieved. - ([@isaacs](https://github.com/isaacs)) - -### FEATURES - -* [`1ac470dd2`](https://github.com/npm/npm/commit/1ac470dd283cc7758dc37721dd6331d5b316dc99) - [#10382](https://github.com/npm/npm/pull/10382) - If you make a typo when writing a command now, npm will print a brief "did you - mean..." message with some possible alternatives to what you meant. - ([@watilde](https://github.com/watilde)) -* [`20c46228d`](https://github.com/npm/npm/commit/20c46228d8f9243910f8c343f4830d52455d754e) - [#12356](https://github.com/npm/npm/pull/12356) - When running lifecycle scripts, `INIT_CWD` will now contain the original - working directory that npm was executed from. Remember that you can use `npm - run-script` even if you're not inside your package root directory! - ([@MichaelQQ](https://github.com/MichaelQQ)) -* [`be91e1726`](https://github.com/npm/npm/commit/be91e1726e9c21c4532723e4f413b73a93dd53d1) - [`4e7c41f4a`](https://github.com/npm/npm/commit/4e7c41f4a29744a9976cc22c77eee9d44172f21e) - `libnpx@9.6.0`: Fixes a number of issues on Windows and adds support for - several more languages: Korean, Norwegian (bokmål and nynorsk), Ukrainian, - Serbian, Bahasa Indonesia, Polish, Dutch and Arabic. - ([@zkat](https://github.com/zkat)) -* [`2dec601c6`](https://github.com/npm/npm/commit/2dec601c6d5a576751d50efbcf76eaef4deff31e) - [#17142](https://github.com/npm/npm/pull/17142) - Add the new `commit-hooks` option to `npm version` so that you can disable commit - hooks when committing the version bump. - ([@faazshift](https://github.com/faazshift)) -* [`bde151902`](https://github.com/npm/npm/commit/bde15190230b5c62dbd98095311eab71f6b52321) - [#14461](https://github.com/npm/npm/pull/14461) - Make output from `npm ping` clear as to its success or failure. - ([@legodude17](https://github.com/legodude17)) - -### BUGFIXES - -* [`b6d5549d2`](https://github.com/npm/npm/commit/b6d5549d2c2d38dd0e4319c56b69ad137f0d50cd) - [#17844](https://github.com/npm/npm/pull/17844) - Make package-lock.json sorting locale-agnostic. Previously, sorting would vary - by locale, due to using `localeCompare` for key sorting. This'll give you - a little package-lock.json churn as it reshuffles things, sorry! - ([@LotharSee](https://github.com/LotharSee)) -* [`44b98b9dd`](https://github.com/npm/npm/commit/44b98b9ddcfcccf68967fdf106fca52bf0c3da4b) - [#17919](https://github.com/npm/npm/pull/17919) - Fix a crash where `npm prune --production` would fail while removing `.bin`. - ([@fasterthanlime](https://github.com/fasterthanlime)) -* [`c3d1d3ba8`](https://github.com/npm/npm/commit/c3d1d3ba82aa41dfb2bd135e6cdc59f8d33cd9fb) - [#17816](https://github.com/npm/npm/pull/17816) - Fail more smoothly when attempting to install an invalid package name. - ([@SamuelMarks](https://github.com/SamuelMarks)) -* [`55ac2fca8`](https://github.com/npm/npm/commit/55ac2fca81bf08338302dc7dc2070494e71add5c) - [#12784](https://github.com/npm/npm/pull/12784) - Guard against stack overflows when marking packages as failed. - ([@vtravieso](https://github.com/vtravieso)) -* [`597cc0e4b`](https://github.com/npm/npm/commit/597cc0e4b5e6ee719014e3171d4e966df42a275c) - [#15087](https://github.com/npm/npm/pull/15087) - Stop outputting progressbars or using color on dumb terminals. - ([@iarna](https://github.com/iarna)) -* [`7a7710ba7`](https://github.com/npm/npm/commit/7a7710ba72e6f82414653c2e7e91fea9a1aba7e2) - [#15088](https://github.com/npm/npm/pull/15088) - Don't exclude modules that are both dev & prod when using `npm ls --production`. - ([@iarna](https://github.com/iarna)) -* [`867df2b02`](https://github.com/npm/npm/commit/867df2b0214689822b87b51578e347f353be97e8) - [#18164](https://github.com/npm/npm/pull/18164) - Only do multiple procs on OSX for now. We've seen a handful of issues - relating to this in Docker and in on Windows with antivirus. - ([@zkat](https://github.com/zkat)) -* [`23540af7b`](https://github.com/npm/npm/commit/23540af7b0ec5f12bbdc1558745c8c4f0861042b) - [#18117](https://github.com/npm/npm/pull/18117) - Some package managers would write spaces to the \_from field in package.json's in the - form of `name @spec`. This was causing npm to fail to interpret them. We now handle that - correctly and doubly make sure we don't do that ourselves. - ([@IgorNadj](https://github.com/IgorNadj)) -* [`0ef320cb4`](https://github.com/npm/npm/commit/0ef320cb40222693b7367b97c60ddffabc2d58c5) - [#16634](https://github.com/npm/npm/pull/16634) - Convert any bin script with a shbang a the start to Unix line-endings. (These sorts of scripts - are not compatible with Windows line-endings even on Windows.) - ([@ScottFreeCode](https://github.com/ScottFreeCode)) -* [`71191ca22`](https://github.com/npm/npm/commit/71191ca2227694355c49dfb187104f68df5126bd) - [#16476](https://github.com/npm/npm/pull/16476) - `npm-lifecycle@1.0.2` Running an install with `--ignore-scripts` was resulting in the - the package object being mutated to have the lifecycle scripts removed from it and that - in turn was being written out to disk, causing further problems. This fixes that: - No more mutation, no more unexpected changes. - ([@addaleax](https://github.com/addaleax)) -* [`459fa9d51`](https://github.com/npm/npm/commit/459fa9d51600904ee75ed6267b159367a1209793) - [npm/read-package-json#74](https://github.com/npm/read-package-json/pull/74) - [#17802](https://github.com/npm/npm/pull/17802) - `read-package-json@2.0.1` Use unix-style slashes for generated bin - entries, which lets them be cross platform even when produced on Windows. - ([@iarna](https://github.com/iarna)) -* [`5ec72ab5b`](https://github.com/npm/npm/commit/5ec72ab5b27c5c83cee9ff568cf75a9479d4b83a) - [#18229](https://github.com/npm/npm/pull/18229) - Make install.sh find nodejs on debian. - ([@cebe](https://github.com/cebe)) - -### DOCUMENTATION - -* [`b019680db`](https://github.com/npm/npm/commit/b019680db78ae0a6dff2289dbfe9f61fccbbe824) - [#10846](https://github.com/npm/npm/pull/10846) - Remind users that they have to install missing `peerDependencies` manually. - ([@ryanflorence](https://github.com/ryanflorence)) -* [`3aee5986a`](https://github.com/npm/npm/commit/3aee5986a65add2f815b24541b9f4b69d7fb445f) - [#17898](https://github.com/npm/npm/pull/17898) - Minor punctuation fixes to the README. - ([@AndersDJohnson](https://github.com/AndersDJohnson)) -* [`e0d0a7e1d`](https://github.com/npm/npm/commit/e0d0a7e1dda2c43822b17eb71f4d51900575cc61) - [#17832](https://github.com/npm/npm/pull/17832) - Fix grammar, format, and spelling in documentation for `run-script`. - ([@simonua](https://github.com/simonua)) -* [`3fd6a5f2f`](https://github.com/npm/npm/commit/3fd6a5f2f8802a9768dba2ec32c593b5db5a878d) - [#17897](https://github.com/npm/npm/pull/17897) - Add more info about using `files` with `npm pack`/`npm publish`. - ([@davidjgoss](https://github.com/davidjgoss)) -* [`f00cdc6eb`](https://github.com/npm/npm/commit/f00cdc6eb90a0735bc3c516720de0b1428c79c31) - [#17785](https://github.com/npm/npm/pull/17785) - Add a note about filenames for certificates on Windows, which use a different - extension and file type. - ([@lgp1985](https://github.com/lgp1985)) -* [`0cea6f974`](https://github.com/npm/npm/commit/0cea6f9741243b1937abfa300c2a111d9ed79143) - [#18022](https://github.com/npm/npm/pull/18022) - Clarify usage for the `files` field in `package.json`. - ([@xcambar](https://github.com/xcambar)) -* [`a0fdd1571`](https://github.com/npm/npm/commit/a0fdd15710971234cbc57086cd1a4dc037a39471) - [#15234](https://github.com/npm/npm/pull/15234) - Clarify the behavior of the `files` array in the package-json docs. - ([@jbcpollak](https://github.com/jbcpollak)) -* [`cecd6aa5d`](https://github.com/npm/npm/commit/cecd6aa5d4dd04af765b26b749c1cd032f7eb913) - [#18137](https://github.com/npm/npm/pull/18137) - Clarify interaction between npmignore and files in package.json. - ([@supertong](https://github.com/supertong)) -* [`6b8972039`](https://github.com/npm/npm/commit/6b89720396767961001e727fc985671ce88b901b) - [#18044](https://github.com/npm/npm/pull/18044) - Corrected the typo in package-locks docs. - ([@vikramnr](https://github.com/vikramnr)) -* [`6e012924f`](https://github.com/npm/npm/commit/6e012924f99c475bc3637c86ab6a113875405fc7) - [#17667](https://github.com/npm/npm/pull/17667) - Fix description of package.json in npm-scripts docs. - ([@tripu](https://github.com/tripu)) - -### POSSIBLY INTERESTING DEPENDENCY UPDATES - -* [`48d84171a`](https://github.com/npm/npm/commit/48d84171a302fde2510b3f31e4a004c5a4d39c73) - [`f60b05d63`](https://github.com/npm/npm/commit/f60b05d6307a7c46160ce98d6f3ccba89411c4ba) - `semver@5.4.1` Perf improvements. - ([@zkat](https://github.com/zkat)) -* [`f4650b5d4`](https://github.com/npm/npm/commit/f4650b5d4b2be2c04c229cc53aa930e260af9b4e) - `write-file-atomic@2.3.0`: - Serialize writes to the same file so that results are deterministic. - Cleanup tempfiles when process is interrupted or killed. - ([@ferm10n](https://github.com/ferm10n)) - ([@iarna](https://github.com/iarna)) - -### CHORES - -* [`96d78df98`](https://github.com/npm/npm/commit/96d78df9843187bc53be2c93913e8567003ccb73) - [`80e2f4960`](https://github.com/npm/npm/commit/80e2f4960691bc5dbd8320002e4d9143784b9ce9) - [`4f49f687b`](https://github.com/npm/npm/commit/4f49f687bbd54b6a0e406936ae35593d8e971e1e) - [`07d2296b1`](https://github.com/npm/npm/commit/07d2296b10e3d8d6f079eba3a61f0258501d7161) - [`a267ab430`](https://github.com/npm/npm/commit/a267ab4309883012a9d55934533c5915e9842277) - [#18176](https://github.com/npm/npm/pull/18176) - [#18025](https://github.com/npm/npm/pull/18025) - Move the lifecycle code out of npm into a separate library, - [`npm-lifecycle`](https://github.com/npm/lifecycle). Shh, I didn't tell you this, but this - portends to some pretty cool stuff to come very soon now. - ([@mikesherov](https://github.com/mikesherov)) -* [`0933c7eaf`](https://github.com/npm/npm/commit/0933c7eaf9cfcdf56471fe4e71c403e2016973da) - [#18025](https://github.com/npm/npm/pull/18025) - Force Travis to use Precise instead of Trusty. We have issues with our - couchdb setup and Trusty. =/ - ([@mikesherov](https://github.com/mikesherov)) -* [`afb086230`](https://github.com/npm/npm/commit/afb086230223f3c4fcddee4e958d18fce5db0ff9) - [#18138](https://github.com/npm/npm/pull/18138) - Fix typos in files-and-ignores test. - ([@supertong](https://github.com/supertong)) -* [`3e6d11cde`](https://github.com/npm/npm/commit/3e6d11cde096b4ee7b07e7569b37186aa2115b1a) - [#18175](https://github.com/npm/npm/pull/18175) - Update dependencies to eliminate transitive dependencies with the WTFPL license, which - some more serious corporate lawyery types aren't super comfortable with. - ([@zkat](https://github.com/zkat)) -* [`ee4c9bd8a`](https://github.com/npm/npm/commit/ee4c9bd8ae574a0d6b24725ba6c7b718d8aaad8d) - [#16474](https://github.com/npm/npm/pull/16474) - The tests in `test/tap/lifecycle-signal.js`, as well as the features - they are testing, are partially broken. This moves them from - being skipped in CI to being disabled only for certain platforms. - In particular, because `npm` spawns its lifecycle scripts in a - shell, signals are not necessarily forwarded by the shell and - won’t cause scripts to exit; also, shells may report the signal - they receive using their exit status, rather than terminating - themselves with a signal. - ([@addaleax](https://github.com/addaleax)) -* [`9462e5d9c`](https://github.com/npm/npm/commit/9462e5d9cfbaa50218de6d0a630d6552e72ad0a8) - [#16547](https://github.com/npm/npm/pull/16547) - Remove unused file: bin/read-package-json.js - ([@metux](https://github.com/metux)) -* [`0756d687d`](https://github.com/npm/npm/commit/0756d687d4ccfcd4a7fd83db0065eceb9261befb) - [#16550](https://github.com/npm/npm/pull/16550) - The build tools for the documentation need to be built/installed - before the documents, even with parallel builds. - Make has a simple mechanism which was made exactly for that: - target dependencies. - ([@metux](https://github.com/metux)) - -## v5.3.0 (2017-07-12): - -As mentioned before, we're continuing to do relatively rapid, smaller releases -as we keep working on stomping out `npm@5` issues! We've made a lot of progress -since 5.0 already, and this release is no exception. - -### FEATURES - -* [`1e3a46944`](https://github.com/npm/npm/commit/1e3a469448b5db8376e6f64022c4c0c78cdb1686) - [#17616](https://github.com/npm/npm/pull/17616) - Add `--link` filter option to `npm ls`. - ([@richardsimko](https://github.com/richardsimko)) -* [`33df0aaa`](https://github.com/npm/npm/commit/33df0aaaa7271dac982b86f2701d10152c4177c8) - `libnpx@9.2.0`: - * 4 new languages - Czech, Italian, Turkish, and Chinese (Traditional)! This means npx is available in 14 different languages! - * New --node-arg option lets you pass CLI arguments directly to node when the target binary is found to be a Node.js script. - ([@zkat](https://github.com/zkat)) - -### BUGFIXES - -* [`33df0aaa`](https://github.com/npm/npm/commit/33df0aaaa7271dac982b86f2701d10152c4177c8) - `libnpx@9.2.0`: - * npx should now work on (most) Windows installs. A couple of issues remain. - * Prevent auto-fallback from going into an infinite loop when npx disappears. - * `npx npx npx npx npx npx npx npx` works again. - * `update-notifier` will no longer run for the npx bundled with npm. - * `npx <cmd>` in a subdirectory of your project should be able to find your `node_modules/.bin` now. Oops - ([@zkat](https://github.com/zkat)) -* [`8e979bf80`](https://github.com/npm/npm/commit/8e979bf80fb93233f19db003f08443e26cfc5e64) - Revert change where npm stopped flattening modules that required peerDeps. - This caused problems because folks were using peer deps to indicate that the - target of the peer dep needed to be able to require the dependency and had - been relying on the fact that peer deps didn't change the shape of the tree - (as of npm@3). - The fix that will actually work for people is for a peer dep to insist on - never being installed deeper than the the thing it relies on. At the moment - this is tricky because the thing the peer dep relies on may not yet have - been added to the tree, so we don't know where it is. - ([@iarna](https://github.com/iarna)) -* [`7f28a77f3`](https://github.com/npm/npm/commit/7f28a77f33ef501065f22e8d5e8cffee3195dccd) - [#17733](https://github.com/npm/npm/pull/17733) - Split remove and unbuild actions into two to get uninstall lifecycles and the - removal of transitive symlinks during uninstallation to run in the right - order. - ([@iarna](https://github.com/iarna)) -* [`637f2548f`](https://github.com/npm/npm/commit/637f2548facae011eebf5e5c38bfe56a6c2db9fa) - [#17748](https://github.com/npm/npm/pull/17748) - When rolling back use symlink project-relative path, fixing some issues with - `fs-vacuum` getting confused while removing symlinked things. - ([@iarna](https://github.com/iarna)) -* [`f153b5b22`](https://github.com/npm/npm/commit/f153b5b22f647d4d403f5b8cecd2ce63ac75b07c) - [#17706](https://github.com/npm/npm/pull/17706) - Use semver to compare node versions in npm doctor instead of plain `>` - comparison. - ([@leo-shopify](https://github.com/leo-shopify)) -* [`542f7561`](https://github.com/npm/npm/commit/542f7561d173eca40eb8d838a16a0ed582fef989) - [#17742](https://github.com/npm/npm/pull/17742) - Fix issue where `npm version` would sometimes not commit package-locks. - ([@markpeterfejes](https://github.com/markpeterfejes)) -* [`51a9e63d`](https://github.com/npm/npm/commit/51a9e63d31cb5ac52259dcf1c364004286072426) - [#17777](https://github.com/npm/npm/pull/17777) - Fix bug exposed by other bugfixes where the wrong package would be removed. - ([@iarna](https://github.com/iarna)) - -### DOCUMENTATION - -Have we mentioned we really like documentation patches? Keep sending them in! -Small patches are just fine, and they're a great way to get started contributing -to npm! - -* [`fb42d55a9`](https://github.com/npm/npm/commit/fb42d55a9a97afa5ab7db38b3b99088cf68684ea) - [#17728](https://github.com/npm/npm/pull/17728) - Document semver git urls in package.json docs. - ([@sankethkatta](https://github.com/sankethkatta)) -* [`f398c700f`](https://github.com/npm/npm/commit/f398c700fb0f2f3665ebf45995a910ad16cd8d05) - [#17684](https://github.com/npm/npm/pull/17684) - Tweak heading hierarchy in package.json docs. - ([@sonicdoe](https://github.com/sonicdoe)) -* [`d5ad65e50`](https://github.com/npm/npm/commit/d5ad65e50a573cdf9df4155225e869cd6c88ca5e) - [#17691](https://github.com/npm/npm/pull/17691) - Explicitly document `--no-save` flag for uninstall. - ([@timneedham](https://github.com/timneedham)) - -## v5.2.0 (2017-07-05): - -It's only been a couple of days but we've got some bug fixes we wanted to -get out to you all. We also believe that -[`npx`](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) is ready to be bundled -with npm, which we're really excited about! - -### npx!!! - -npx is a tool intended to help round out the experience of using packages -from the npm registry — the same way npm makes it super easy to install and -manage dependencies hosted on the registry, npx is meant to make it easy to -use CLI tools and other executables hosted on the registry. It greatly -simplifies a number of things that, until now, required a bit of ceremony to -do with plain npm. - -![](https://cdn-images-1.medium.com/max/1600/1*OlIRsvVO5aK7ja9HmwXz_Q.gif) - -[@zkat](https://github.com/zkat) has a [great introduction post to npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) -that I highly recommend you give a read - -* [`fb040bee0`](https://github.com/npm/npm/commit/fb040bee0710759c60e45bf8fa2a3b8ddcf4212a) - [#17685](https://github.com/npm/npm/pull/17685) - Bundle npx with npm itself. - ([@zkat](https://github.com/zkat)) - -### BUG FIXES - -* [`9fe905c39`](https://github.com/npm/npm/commit/9fe905c399d07a3c00c7b22035ddb6b7762731e6) - [#17652](https://github.com/npm/npm/pull/17652) - Fix max callstack exceeded loops with trees with circular links. - ([@iarna](https://github.com/iarna)) -* [`c0a289b1b`](https://github.com/npm/npm/commit/c0a289b1ba6b99652c43a955b23acbf1de0b56ae) - [#17606](https://github.com/npm/npm/pull/17606) - Make sure that when write package.json and package-lock.json we always use unix path separators. - ([@Standard8](https://github.com/Standard8)) -* [`1658b79ca`](https://github.com/npm/npm/commit/1658b79cad89ccece5ae5ce3c2f691d44b933116) - [#17654](https://github.com/npm/npm/pull/17654) - Make `npm outdated` show results for globals again. Previously it never thought they were out of date. - ([@iarna](https://github.com/iarna)) -* [`06c154fd6`](https://github.com/npm/npm/commit/06c154fd653d18725d2e760ba825d43cdd807420) - [#17678](https://github.com/npm/npm/pull/17678) - Stop flattening modules that have peer dependencies. We're making this - change to support scenarios where the module requiring a peer dependency - is flattened but the peer dependency itself is not, due to conflicts. In - those cases the module requiring the peer dep can't be flattened past the - location its peer dep was placed in. This initial fix is naive, never - flattening peer deps, and we can look into doing something more - sophisticated later on. - ([@iarna](https://github.com/iarna)) -* [`88aafee8b`](https://github.com/npm/npm/commit/88aafee8b5b232b7eeb5690279a098d056575791) - [#17677](https://github.com/npm/npm/pull/17677) - There was an issue where updating a flattened dependency would sometimes - unflatten it. This only happened when the dependency had dependencies - that in turn required the original dependency. - ([@iarna](https://github.com/iarna)) -* [`b58ec8eab`](https://github.com/npm/npm/commit/b58ec8eab3b4141e7f1b8b42d8cc24f716a804d8) - [#17626](https://github.com/npm/npm/pull/17626) - Integrators who were building their own copies of npm ran into issues because - `make install` and https://npmjs.com/install.sh weren't aware that - `npm install` creates links now when given a directory to work on. This does not impact folks - installing npm with `npm install -g npm`. - ([@iarna](https://github.com/iarna)) - -### DOC FIXES - -* [`10bef735e`](https://github.com/npm/npm/commit/10bef735e825acc8278827d34df415dfcd8c67d4) - [#17645](https://github.com/npm/npm/pull/17645) - Fix some github issue links in the 5.1.0 changelog - ([@schmod](https://github.com/schmod)) -* [`85fa9dcb2`](https://github.com/npm/npm/commit/85fa9dcb2f0b4f51b515358e0184ec82a5845227) - [#17634](https://github.com/npm/npm/pull/17634) - Fix typo in package-lock docs. - ([@sonicdoe](https://github.com/sonicdoe)) -* [`688699bef`](https://github.com/npm/npm/commit/688699befc2d147288c69a9405fb8354ecaebe36) - [#17628](https://github.com/npm/npm/pull/17628) - Recommend that folks looking for support join us on https://package.community/ or message - [@npm_support](https://twitter.com/npm_support) on Twitter. - ([@strugee](https://github.com/strugee)) - - -## v5.1.0 (2017-07-05): - -Hey y'all~ - -We've got some goodies for you here, including `npm@5`'s first semver-minor -release! This version includes a huge number of fixes, particularly for some of -the critical bugs users were running into after upgrading npm. You should -overall see a much more stable experience, and we're going to continue hacking -on fixes for the time being. Semver-major releases, specially for tools like -npm, are bound to cause some instability, and getting `npm@5` stable is the CLI -team's top priority for now! - -Not that bugfixes are the only things that landed, either: between improvements -that fell out of the bugfixes, and some really cool work by community members -like [@mikesherov](https://github.com/mikesherov), `npm@5.1.0` is **_twice as -fast_** as `npm@5.0.0` in some benchmarks. We're not stopping there, either: you -can expect a steady stream of speed improvements over the course of the year. -It's not _top_ priority, but we'll keep doing what we can to make sure npm saves -its users as much time as possible. - -Hang on to your seats. At **100 commits**, this release is a bit of a doozy. 😎 - -### FEATURES - -Semver-minor releases, of course, mean that there's a new feature somewhere, -right? Here's what's bumping that number for us this time: - -* [`a09c1a69d`](https://github.com/npm/npm/commit/a09c1a69df05b753464cc1272cdccc6af0f4da5a) - [#16687](https://github.com/npm/npm/pull/16687) - Allow customizing the shell used to execute `run-script`s. - ([@mmkal](https://github.com/mmkal)) -* [`4f45ba222`](https://github.com/npm/npm/commit/4f45ba222e2ac6dbe6d696cb7a8e678bbda7c839) [`a48958598`](https://github.com/npm/npm/commit/a489585985540deed4edc03418636c9e97aa9e40) [`901bef0e1`](https://github.com/npm/npm/commit/901bef0e1ea806fc08d8d58744a9f813b6c020ab) - [#17508](https://github.com/npm/npm/pull/17508) - Add a new `requires` field to `package-lock.json` with information about the - _logical_ dependency tree. This includes references to the specific version - each package is intended to see, and can be used for many things, such as - [converting `package-lock.json` to other lockfile - formats](https://twitter.com/maybekatz/status/880578566907248640), various - optimizations, and verifying correctness of a package tree. - ([@iarna](https://github.com/iarna)) -* [`47e8fc8eb`](https://github.com/npm/npm/commit/47e8fc8eb9b5faccef9e03ab991cf37458c16249) - [#17508](https://github.com/npm/npm/pull/17508) - Make `npm ls` take package locks (and shrinkwraps) into account. This means - `npm ls` can now be used to see [which dependencies are - missing](https://twitter.com/maybekatz/status/880446509547794437), so long as - a package lock has been previously generated with it in. - ([@iarna](https://github.com/iarna)) -* [`f0075e7ca`](https://github.com/npm/npm/commit/f0075e7caa3e151424a254d7809ae4489ed8df90) - [#17508](https://github.com/npm/npm/pull/17508) - Take `package.json` changes into account when running installs -- if you - remove or add a dependency to `package.json` manually, npm will now pick that - up and update your tree and package lock accordingly. - ([@iarna](https://github.com/iarna)) -* [`83a5455aa`](https://github.com/npm/npm/commit/83a5455aac3c5cc2511ab504923b652b13bd66a0) - [#17205](https://github.com/npm/npm/pull/17205) - Add `npm udpate` as an alias for `npm update`, for symmetry with - `install`/`isntall`. - ([@gdassori](https://github.com/gdassori)) -* [`57225d394`](https://github.com/npm/npm/commit/57225d394b6174eb0be48393d8e18da0991f67b6) - [#17120](https://github.com/npm/npm/pull/17120) - npm will no longer warn about `preferGlobal`, and the option is now - deprecated. - ([@zkat](https://github.com/zkat)) -* [`82df7bb16`](https://github.com/npm/npm/commit/82df7bb16fc29c47a024db4a8c393e55f883744b) - [#17351](https://github.com/npm/npm/pull/17351) - As some of you may already know `npm build` doesn't do what a lot of people - expect: It's mainly an npm plumbing command, and is part of the more familiar - `npm rebuild` command. That said, a lot of users assume that this is the way - to run an npm `run-script` named `build`, which is an incredibly common script - name to use. To clarify things for users, and encourage them to use `npm run - build` instead, npm will now warn if `npm build` is run without any arguments. - ([@lennym](https://github.com/lennym)) - -### PERFORMANCE - -* [`59f86ef90`](https://github.com/npm/npm/commit/59f86ef90a58d8dc925c9613f1c96e68bee5ec7b) [`43be9d222`](https://github.com/npm/npm/commit/43be9d2222b23ebb0a427ed91824ae217e6d077a) [`e906cdd98`](https://github.com/npm/npm/commit/e906cdd980b4722e66618ce295c682b9a8ffaf8f) - [#16633](https://github.com/npm/npm/pull/16633) - npm now parallelizes tarball extraction across multiple child process workers. - This can significantly speed up installations, specially when installing from - cache, and will improve with number of processors. - ([@zkat](https://github.com/zkat)) -* [`e0849878d`](https://github.com/npm/npm/commit/e0849878dd248de8988c2ef3fc941054625712ca) - [#17441](https://github.com/npm/npm/pull/17441) - Avoid building environment for empty lifecycle scripts. This change alone - accounted for as much as a 15% speed boost for npm installations by outright - skipping entire steps of the installer when not needed. - ([@mikesherov](https://github.com/mikesherov)) -* [`265c2544c`](https://github.com/npm/npm/commit/265c2544c8ded10854909243482e6437ed03c261) - [npm/hosted-git-info#24](https://github.com/npm/hosted-git-info/pull/24) - `hosted-git-info@2.5.0`: Add caching to `fromURL`, which gets called many, - many times by the installer. This improved installation performance by around - 10% on realistic application repositories. - ([@mikesherov](https://github.com/mikesherov)) -* [`901d26cb`](https://github.com/npm/npm/commit/901d26cb656e7e773d9a38ef4eac9263b95e07c8) - [npm/read-package-json#20](https://github.com/npm/read-package-json/pull/70) - `read-package-json@2.0.9`: Speed up installs by as much as 20% by - reintroducing a previously-removed cache and making it actually be correct - this time around. - ([@mikesherov](https://github.com/mikesherov)) -* [`44e37045d`](https://github.com/npm/npm/commit/44e37045d77bc40adf339b423d42bf5e9b4d4d91) - Eliminate `Bluebird.promisifyAll` from our codebase. - ([@iarna](https://github.com/iarna)) -* [`3b4681b53`](https://github.com/npm/npm/commit/3b4681b53db7757985223932072875d099694677) - [#17508](https://github.com/npm/npm/pull/17508) - Stop calling `addBundle` on locked deps, speeding up the - `package-lock.json`-based fast path. - ([@iarna](https://github.com/iarna)) - -### BUGFIXES - -* [#17508](https://github.com/npm/npm/pull/17508) - This is a big PR that fixes a variety of issues when installing from package - locks. If you were previously having issues with missing dependencies or - unwanted removals, this might have fixed it: - * It introduces a new `package-lock.json` field, called `requires`, which tracks which modules a given module requires. - * It fixes [#16839](https://github.com/npm/npm/issues/16839) which was caused by not having this information available, particularly when git dependencies were involved. - * It fixes [#16866](https://github.com/npm/npm/issues/16866), allowing the `package.json` to trump the `package-lock.json`. - * `npm ls` now loads the shrinkwrap, which opens the door to showing a full tree of dependencies even when nothing is yet installed. (It doesn't do that yet though.) - ([@iarna](https://github.com/iarna)) -* [`656544c31`](https://github.com/npm/npm/commit/656544c31cdef3cef64fc10c24f03a8ae2685e35) [`d21ab57c3`](https://github.com/npm/npm/commit/d21ab57c3ef4f01d41fb6c2103debe884a17dc22) - [#16637](https://github.com/npm/npm/pull/16637) - Fix some cases where `npm prune` was leaving some dependencies unpruned if - to-be-pruned dependencies depended on them. - ([@exogen](https://github.com/exogen)) -* [`394436b09`](https://github.com/npm/npm/commit/394436b098dcca2d252061f95c4eeb92c4a7027c) - [#17552](https://github.com/npm/npm/pull/17552) - Make `refresh-package-json` re-verify the package platform. This fixes an - issue most notably experienced by Windows users using `create-react-app` where - `fsevents` would not short-circuit and cause a crash during its - otherwise-skipped native build phase. - ([@zkat](https://github.com/zkat)) -* [`9e5a94354`](https://github.com/npm/npm/commit/9e5a943547b29c8d022192afd9398b3a136a7e5a) - [#17590](https://github.com/npm/npm/pull/17590) - Fix an issue where `npm@5` would crash when trying to remove packages - installed with `npm@<5`. - ([@iarna](https://github.com/iarna)) -* [`c3b586aaf`](https://github.com/npm/npm/commit/c3b586aafa9eabac572eb6e2b8a7266536dbc65b) - [#17141](https://github.com/npm/npm/issues/17141) - Don't update the package.json when modifying packages that don't go there. - This was previously causing `package.json` to get a `"false": {}` field added. - ([@iarna](https://github.com/iarna)) -* [`d04a23de2`](https://github.com/npm/npm/commit/d04a23de21dd9991b32029d839b71e10e07b400d) [`4a5b360d5`](https://github.com/npm/npm/commit/4a5b360d561f565703024085da0927ccafe8793e) [`d9e53db48`](https://github.com/npm/npm/commit/d9e53db48ca227b21bb67df48c9b3580cb390e9e) - `pacote@2.7.38`: - * [zkat/pacote#102](https://github.com/zkat/pacote/pull/102) Fix issue with tar extraction and special characters. - * Enable loose semver parsing in some missing corner cases. - ([@colinrotherham](https://github.com/colinrotherham), [@zkat](https://github.com/zkat), [@mcibique](https://github.com/mcibique)) -* [`e2f815f87`](https://github.com/npm/npm/commit/e2f815f87676b7c50b896e939cee15a01aa976e4) - [#17104](https://github.com/npm/npm/pull/17104) - Write an empty str and wait for flush to exit to reduce issues with npm - exiting before all output is complete when it's a child process. - ([@zkat](https://github.com/zkat)) -* [`835fcec60`](https://github.com/npm/npm/commit/835fcec601204971083aa3a281c3a9da6061a7c2) - [#17060](https://github.com/npm/npm/pull/17060) - Make git repos with prepare scripts always install with both dev and prod - flags. - ([@intellix](https://github.com/intellix)) -* [`f1dc8a175`](https://github.com/npm/npm/commit/f1dc8a175eed56f1ed23bd5773e5e10beaf6cb31) - [#16879](https://github.com/npm/npm/pull/16879) - Fix support for `always-auth` and `_auth`. They are now both available in both - unscoped and registry-scoped configurations. - ([@jozemlakar](https://github.com/jozemlakar)) -* [`ddd8a1ca2`](https://github.com/npm/npm/commit/ddd8a1ca2fa3377199af74ede9d0c1a406d19793) - Serialize package specs to prevent `[object Object]` showing up in logs during - extraction. - ([@zkat](https://github.com/zkat)) -* [`99ef3b52c`](https://github.com/npm/npm/commit/99ef3b52caa7507e87a4257e622f8964b1c1f5f3) - [#17505](https://github.com/npm/npm/pull/17505) - Stop trying to commit updated `npm-shrinkwrap.json` and `package-lock.json` if - they're `.gitignore`d. - ([@zkat](https://github.com/zkat)) -* [`58be2ec59`](https://github.com/npm/npm/commit/58be2ec596dfb0353ad2570e6750e408339f1478) - Make sure uid and gid are getting correctly set even when they're `0`. This - should fix some Docker-related issues with bad permissions/broken ownership. - ([@rgrove](https://github.com/rgrove)) - ([@zkat](https://github.com/zkat)) -* [`9d1e3b6fa`](https://github.com/npm/npm/commit/9d1e3b6fa01bb563d76018ee153259d9507658cf) - [#17506](https://github.com/npm/npm/pull/17506) - Skip writing package.json and locks if on-disk version is identical to the new - one. - ([@zkat](https://github.com/zkat)) -* [`3fc6477a8`](https://github.com/npm/npm/commit/3fc6477a89773786e6c43ef43a23e5cdc662ff8e) - [#17592](https://github.com/npm/npm/pull/17592) - Fix an issue where `npm install -g .` on a package with no `name` field would - cause the entire global `node_modules` directory to be replaced with a symlink - to `$CWD`. lol. - ([@iarna](https://github.com/iarna)) -* [`06ba0a14a`](https://github.com/npm/npm/commit/06ba0a14a6c1c8cdcc8c062b68c8c63041b0cec0) - [#17591](https://github.com/npm/npm/pull/17591) - Fix spurious removal reporting: if you tried to remove something that didn't - actually exist, npm would tell you it removed 1 package even though there was - nothing to do. - ([@iarna](https://github.com/iarna)) -* [`20ff05f8`](https://github.com/npm/npm/commit/20ff05f8fe0ad8c36e1323d30b63b4d2ff7e11ef) - [#17629](https://github.com/npm/npm/pull/17629) - When removing a link, keep dependencies installed inside of it instead of - removing them, if the link is outside the scope of the current project. This - fixes an issue where removing globally-linked packages would remove all their - dependencies in the source directory, as well as some ergonomic issues when - using links in other situations. - ([@iarna](https://github.com/iarna)) - -### DOCS - -* [`fd5fab595`](https://github.com/npm/npm/commit/fd5fab5955a20a9bb8c0e77092ada1435f73a8d2) - [#16441](https://github.com/npm/npm/pull/16441) - Add spec for `npm-shrinkwrap.json` and `package-lock.json` from RFC. - ([@iarna](https://github.com/iarna)) -* [`9589c1ccb`](https://github.com/npm/npm/commit/9589c1ccb3f794abaaa48c2a647ada311dd881ef) - [#17451](https://github.com/npm/npm/pull/17451) - Fix typo in changelog. - ([@watilde](https://github.com/watilde)) -* [`f8e76d856`](https://github.com/npm/npm/commit/f8e76d8566ae1965e57d348df74edad0643b66a6) - [#17370](https://github.com/npm/npm/pull/17370) - Correct the default prefix config path for Windows operating systems in the - documentation for npm folders. - ([@kierendixon](https://github.com/kierendixon)) -* [`d0f3b5a12`](https://github.com/npm/npm/commit/d0f3b5a127718b0347c6622a2b9c28341c530d36) - [#17369](https://github.com/npm/npm/pull/17369) - Fix `npm-config` reference to `userconfig` & `globalconfig` environment - variables. - ([@racztiborzoltan](https://github.com/racztiborzoltan)) -* [`87629880a`](https://github.com/npm/npm/commit/87629880a71baec352c1b5345bc29268d6212467) - [#17336](https://github.com/npm/npm/pull/17336) - Remove note in docs about `prepublish` being entirely removed. - ([@Hirse](https://github.com/Hirse)) -* [`a1058afd9`](https://github.com/npm/npm/commit/a1058afd9a7a569bd0ac65b86eadd4fe077a7221) - [#17169](https://github.com/npm/npm/pull/17169) - Document `--no-package-lock` flag. - ([@leggsimon](https://github.com/leggsimon)) -* [`32fc6e41a`](https://github.com/npm/npm/commit/32fc6e41a2ce4dbcd5ce1e5f291e2e2efc779d48) - [#17250](https://github.com/npm/npm/pull/17250) - Fix a typo in the shrinkwrap docs. - ([@Zarel](https://github.com/Zarel)) -* [`f19bd3c8c`](https://github.com/npm/npm/commit/f19bd3c8cbd37c8a99487d6b5035282580ac3e9d) - [#17249](https://github.com/npm/npm/pull/17249) - Fix a package-lock.json cross-reference link. - ([@not-an-aardvark](https://github.com/not-an-aardvark)) -* [`153245edc`](https://github.com/npm/npm/commit/153245edc4845db670ada5e95ef384561706a751) - [#17075](https://github.com/npm/npm/pull/17075/files) - Fix a typo in `npm-config` docs. - ([@KennethKinLum](https://github.com/KennethKinLum)) -* [`c9b534a14`](https://github.com/npm/npm/commit/c9b534a148818d1a97787c0dfdba5f64ce3618a6) - [#17074](https://github.com/npm/npm/pull/17074) - Clarify config documentation with multiple boolean flags. - ([@KennethKinLum](https://github.com/KennethKinLum)) -* [`e111b0a40`](https://github.com/npm/npm/commit/e111b0a40c4bc6691d7b8d67ddce5419e67bfd27) - [#16768](https://github.com/npm/npm/pull/16768) - Document the `-l` option to `npm config list`. - ([@happylynx](https://github.com/happylynx)) -* [`5a803ebad`](https://github.com/npm/npm/commit/5a803ebadd61229bca3d64fb3ef1981729b2548e) - [#16548](https://github.com/npm/npm/pull/16548) - Fix permissions for documentation files. Some of them had `+x` set. (???) - ([@metux](https://github.com/metux)) -* [`d57d4f48c`](https://github.com/npm/npm/commit/d57d4f48c6cd00fdf1e694eb49e9358071d8e105) - [#17319](https://github.com/npm/npm/pull/17319) - Document that the `--silent` option for `npm run-script` can be used to - suppress `npm ERR!` output on errors. - ([@styfle](https://github.com/styfle)) - -### MISC - -Not all contributions need to be visible features, docs, or bugfixes! It's super -helpful when community members go over our code and help clean it up, too! - -* [`9e5b76140`](https://github.com/npm/npm/commit/9e5b76140ffdb7dcd12aa402793644213fb8c5d7) - [#17411](https://github.com/npm/npm/pull/17411) - Convert all callback-style `move` usage to use Promises. - ([@vramana](https://github.com/vramana)) -* [`0711c08f7`](https://github.com/npm/npm/commit/0711c08f779ac641ec42ecc96f604c8861008b28) - [#17394](https://github.com/npm/npm/pull/17394) - Remove unused argument in `deepSortObject`. - ([@vramana](https://github.com/vramana)) -* [`7d650048c`](https://github.com/npm/npm/commit/7d650048c8ed5faa0486492f1eeb698e7383e32f) - [#17563](https://github.com/npm/npm/pull/17563) - Refactor some code to use `Object.assign`. - ([@vramana](https://github.com/vramana)) -* [`993f673f0`](https://github.com/npm/npm/commit/993f673f056aea5f602ea04b1e697b027c267a2d) - [#17600](https://github.com/npm/npm/pull/17600) - Remove an old comment. - ([@vramana](https://github.com/vramana)) - -## v5.0.4 (2017-06-13): - -Hey y'all. This is another minor patch release with a variety of little fixes -we've been accumulating~ - -* [`f0a37ace9`](https://github.com/npm/npm/commit/f0a37ace9ab7879cab20f2b0fcd7840bfc305feb) - Fix `npm doctor` when hitting registries without `ping`. - ([@zkat](https://github.com/zkat)) -* [`64f0105e8`](https://github.com/npm/npm/commit/64f0105e81352b42b72900d83b437b90afc6d9ce) - Fix invalid format error when setting cache-related headers. - ([@zkat](https://github.com/zkat)) -* [`d2969c80e`](https://github.com/npm/npm/commit/d2969c80e4178faebf0f7c4cab6eb610dd953cc6) - Fix spurious `EINTEGRITY` issue. - ([@zkat](https://github.com/zkat)) -* [`800cb2b4e`](https://github.com/npm/npm/commit/800cb2b4e2d0bd00b5c9082a896f2110e907eb0b) - [#17076](https://github.com/npm/npm/pull/17076) - Use legacy `from` field to improve upgrade experience from legacy shrinkwraps - and installs. - ([@zkat](https://github.com/zkat)) -* [`4100d47ea`](https://github.com/npm/npm/commit/4100d47ea58b4966c02604f71350b5316108df6a) - [#17007](https://github.com/npm/npm/pull/17007) - Restore loose semver parsing to match older npm behavior when running into - invalid semver ranges in dependencies. - ([@zkat](https://github.com/zkat)) -* [`35316cce2`](https://github.com/npm/npm/commit/35316cce2ca2d8eb94161ec7fe7e8f7bec7b3aa7) - [#17005](https://github.com/npm/npm/pull/17005) - Emulate npm@4's behavior of simply marking the peerDep as invalid, instead of - crashing. - ([@zkat](https://github.com/zkat)) -* [`e7e8ee5c5`](https://github.com/npm/npm/commit/e7e8ee5c57c7238655677e118a8809b652019f53) - [#16937](https://github.com/npm/npm/pull/16937) - Workaround for separate bug where `requested` was somehow null. - ([@forivall](https://github.com/forivall)) -* [`2d9629bb2`](https://github.com/npm/npm/commit/2d9629bb2043cff47eaad2654a64d2cef5725356) - Better logging output for git errors. - ([@zkat](https://github.com/zkat)) -* [`2235aea73`](https://github.com/npm/npm/commit/2235aea73569fb9711a06fa6344ef31247177dcd) - More scp-url fixes: parsing only worked correctly when a committish was - present. - ([@zkat](https://github.com/zkat)) -* [`80c33cf5e`](https://github.com/npm/npm/commit/80c33cf5e6ef207450949764de41ea96538c636e) - Standardize package permissions on tarball extraction, instead of using perms - from the tarball. This matches previous npm behavior and fixes a number of - incompatibilities in the wild. - ([@zkat](https://github.com/zkat)) -* [`2b1e40efb`](https://github.com/npm/npm/commit/2b1e40efba0b3d1004259efa4275cf42144e3ce3) - Limit shallow cloning to hosts which are known to support it. - ([@zkat](https://github.com/zkat)) - -## v5.0.3 (2017-06-05) - -Happy Monday, y'all! We've got another npm release for you with the fruits of -our ongoing bugsquashing efforts. You can expect at least one more this week, -but probably more -- and as we announced last week, we'll be merging fixes more -rapidly into the `npmc` canary so you can get everything as soon as possible! - -Hope y'all are enjoying npm5 in the meantime, and don't hesitate to file issues -for anything you find! The goal is to get this release rock-solid as soon as we -can. 💚 - -* [`6e12a5cc0`](https://github.com/npm/npm/commit/6e12a5cc022cb5a157a37df7283b6d7b3d49bdab) - Bump several dependencies to get improvements and bugfixes: - * `cacache`: content files (the tarballs) are now read-only. - * `pacote`: fix failing clones with bad heads, send extra TLS-related opts to proxy, enable global auth configurations and `_auth`-based auth. - * `ssri`: stop crashing with `can't call method find of undefined` when running into a weird `opts.integrity`/`opts.algorithms` conflict during verification. - ([@zkat](https://github.com/zkat)) -* [`89cc8e3e1`](https://github.com/npm/npm/commit/89cc8e3e12dad67fd9844accf4d41deb4c180c5c) - [#16917](https://github.com/npm/npm/pull/16917) - Send `ca`, `cert` and `key` config through to network layer. - ([@colinrotherham](https://github.com/colinrotherham)) -* [`6a9b51c67`](https://github.com/npm/npm/commit/6a9b51c67ba3df0372991631992748329b84f2e7) - [#16929](https://github.com/npm/npm/pull/16929) - Send `npm-session` header value with registry requests again. - ([@zarenner](https://github.com/zarenner)) -* [`662a15ab7`](https://github.com/npm/npm/commit/662a15ab7e790e87f5e5a35252f05d5a4a0724a1) - Fix `npm doctor` so it stop complaining about read-only content files in the - cache. - ([@zkat](https://github.com/zkat)) -* [`191d10a66`](https://github.com/npm/npm/commit/191d10a6616d72e26d89fd00f5a4f6158bfbc526) - [#16918](https://github.com/npm/npm/pull/16918) - Clarify prepublish deprecation message. - ([@Hirse](https://github.com/Hirse)) - -## v5.0.2 (2017-06-02) - -Here's another patch release, soon after the other! - -This particular release includes a slew of fixes to npm's git support, which was -causing some issues for a chunk of people, specially those who were using -self-hosted/Enterprise repos. All of those should be back in working condition -now. - -There's another shiny thing you might wanna know about: npm has a Canary release -now! The `npm5` experiment we did during our beta proved to be incredibly -successful: users were able to have a tight feedback loop between reports and -getting the bugfixes they needed, and the CLI team was able to roll out -experimental patches and have the community try them out right away. So we want -to keep doing that. - -From now on, you'll be able to install the 'npm canary' with `npm i -g npmc`. -This release will be a separate binary (`npmc`. Because canary. Get it?), which -will update independently of the main CLI. Most of the time, this will track -`release-next` or something close to it. We might occasionally toss experimental -branches in there to see if our more adventurous users run into anything -interesting with it. For example, the current canary (`npmc@5.0.1-canary.6`) -includes an [experimental multiproc -branch](https://github.com/npm/npm/pull/16633) that parallelizes tarball -extraction across multiple processes. - -If you find any issues while running the canary version, please report them and -let us know it came from `npmc`! It would be tremendously helpful, and finding -things early is a huge reason to have it there. Happy hacking! - -### A NOTE ABOUT THE ISSUE TRACKER - -Just a heads up: We're preparing to do a massive cleanup of the issue tracker. -It's been a long time since it was something we could really keep up with, and -we didn't have a process for dealing with it that could actually be sustainable. - -We're still sussing the details out, and we'll talk about it more when we're -about to do it, but the plan is essentially to close old, abandoned issues and -start over. We will also [add some automation](https://github.com/probot) around -issue management so that things that we can't keep up with don't just stay -around forever. - -Stay tuned! - -### GIT YOLO - -* [`1f26e9567`](https://github.com/npm/npm/commit/1f26e9567a6d14088704e121ebe787c38b6849a4) - `pacote@2.7.27`: Fixes installing committishes that look like semver, even - though they're not using the required `#semver:` syntax. - ([@zkat](https://github.com/zkat)) -* [`85ea1e0b9`](https://github.com/npm/npm/commit/85ea1e0b9478551265d03d545e7dc750b9edf547) - `npm-package-arg@5.1.1`: This includes the npa git-parsing patch to make it so - non-hosted SCP-style identifiers are correctly handled. Previously, npa would - mangle them (even though hosted-git-info is doing the right thing for them). - ([@zkat](https://github.com/zkat)) - -### COOL NEW OUTPUT - -The new summary output has been really well received! One downside that reared -its head as more people used it, though, is that it doesn't really tell you -anything about the toplevel versions it installed. So, if you did `npm i -g -foo`, it would just say "added 1 package". This patch by -[@rmg](https://github.com/rmg) keeps things concise while still telling you -what you got! So now, you'll see something like this: - -``` -$ npm i -g foo bar -+ foo@1.2.3 -+ bar@3.2.1 -added 234 packages in .005ms -``` - -* [`362f9fd5b`](https://github.com/npm/npm/commit/362f9fd5bec65301082416b4292b8fe3eb7f824a) - [#16899](https://github.com/npm/npm/pull/16899) - For every package that is given as an argument to install, print the name and - version that was actually installed. - ([@rmg](https://github.com/rmg)) - -### OTHER BUGFIXES - -* [`a47593a98`](https://github.com/npm/npm/commit/a47593a98a402143081d7077d2ac677d13083010) - [#16835](https://github.com/npm/npm/pull/16835) - Fix a crash while installing with `--no-shrinkwrap`. - ([@jacknagel](https://github.com/jacknagel)) - -### DOC UPDATES - -* [`89e0cb816`](https://github.com/npm/npm/commit/89e0cb8165dd9c3c7ac74d531617f367099608f4) - [#16818](https://github.com/npm/npm/pull/16818) - Fixes a spelling error in the docs. Because the CLI team has trouble spelling - "package", I guess. - ([@ankon](https://github.com/ankon)) -* [`c01fbc46e`](https://github.com/npm/npm/commit/c01fbc46e151bcfb359fd68dd7faa392789b4f55) - [#16895](https://github.com/npm/npm/pull/16895) - Remove `--save` from `npm init` instructions, since it's now the default. - ([@jhwohlgemuth](https://github.com/jhwohlgemuth)) -* [`80c42d218`](https://github.com/npm/npm/commit/80c42d2181dd4d1b79fcee4e9233df268dfb30b7) - Guard against cycles when inflating bundles, as symlinks are bundles now. - ([@iarna](https://github.com/iarna)) -* [`7fe7f8665`](https://github.com/npm/npm/commit/7fe7f86658798db6667df89afc75588c0e43bc94) - [#16674](https://github.com/npm/npm/issues/16674) - Write the builtin config for `npmc`, not just `npm`. This is hardcoded for npm - self-installations and is needed for Canary to work right. - ([@zkat](https://github.com/zkat)) - -### DEP UPDATES - -* [`63df4fcdd`](https://github.com/npm/npm/commit/63df4fcddc7445efb50cc7d8e09cdd45146d3e39) - [#16894](https://github.com/npm/npm/pull/16894) - [`node-gyp@3.6.2`](https://github.com/nodejs/node-gyp/blob/master/CHANGELOG.md#v362-2017-06-01): - Fixes an issue parsing SDK versions on Windows, among other things. - ([@refack](https://github.com/refack)) -* [`5bb15c3c4`](https://github.com/npm/npm/commit/5bb15c3c4f0d7d77c73fd6dafa38ac36549b6e00) - `read-package-tree@5.1.6`: Fixes some racyness while reading the tree. - ([@iarna](https://github.com/iarna)) -* [`a6f7a52e7`](https://github.com/npm/npm/commit/a6f7a52e7) - `aproba@1.1.2`: Remove nested function declaration for speed up - ([@mikesherov](https://github.com/mikesherov)) - -## v5.0.1 (2017-05-31): - -Hey y'all! Hope you're enjoying the new npm! - -As you all know, fresh software that's gone through major overhauls tends to -miss a lot of spots the old one used to handle well enough, and `npm@5` is no -exception. The CLI team will be doing faster release cycles that go directly to -the `latest` tag for a couple of weeks while 5 stabilizes a bit and we're -confident the common low-hanging fruit people are running into are all taken -care of. - -With that said: this is our first patch release! The biggest focus is fixing up -a number of git-related issues that folks ran into right out the door. It also -fixes other things, like some proxy/auth-related issues, and even has a neat -speed boost! (You can expect more speed bumps in the coming releases as pending -work starts landing, too!) - -Thanks everyone who's been reporting issues and submitting patches! - -### BUGFIXES - -* [`e61e68dac`](https://github.com/npm/npm/commit/e61e68dac4fa51c0540a064204a75b19f8052e58) - [#16762](https://github.com/npm/npm/pull/16762) - Make `npm publish` obey the `--tag` flag again. - ([@zkat](https://github.com/zkat)) -* [`923fd58d3`](https://github.com/npm/npm/commit/923fd58d312f40f8c17b232ad1dfc8e2ff622dbd) - [#16749](https://github.com/npm/npm/pull/16749) - Speed up installations by nearly 20% by... removing one line of code. (hah) - ([@mikesherov](https://github.com/mikesherov)) -* [`9aac984cb`](https://github.com/npm/npm/commit/9aac984cbbfef22182ee42b51a193c0b47146ad6) - Guard against a particular failure mode for a bug still being hunted down. - ([@iarna](https://github.com/iarna)) -* [`80ab521f1`](https://github.com/npm/npm/commit/80ab521f18d34df109de0c5dc9eb1cde5ff6d7e8) - Pull in dependency updates for various core deps: - * New `pacote` fixes several git-related bugs. - * `ssri` update fixes crash on early node@4 versions. - * `make-fetch-happen` update fixes proxy authentication issue. - * `npm-user-validate` adds regex for blocking usernames with illegal chars. - ([@zkat](https://github.com/zkat)) -* [`7e5ce87b8`](https://github.com/npm/npm/commit/7e5ce87b84880c7433ee4c07d2dd6ce8806df436) - `pacote@2.7.26`: - Fixes various other git issues related to commit hashes. - ([@zkat](https://github.com/zkat)) -* [`acbe85bfc`](https://github.com/npm/npm/commit/acbe85bfc1a68d19ca339a3fb71da0cffbf58926) - [#16791](https://github.com/npm/npm/pull/16791) - `npm view` was calling `cb` prematurely and giving partial output when called - in a child process. - ([@zkat](https://github.com/zkat)) -* [`ebafe48af`](https://github.com/npm/npm/commit/ebafe48af91f702ccefc8c619d52fed3b8dfd3c7) - [#16750](https://github.com/npm/npm/pull/16750) - Hamilpatch the Musical: Talk less, complete more. - ([@aredridel](https://github.com/aredridel)) - -### DOCUMENTATION - -* [`dc2823a6c`](https://github.com/npm/npm/commit/dc2823a6c5fc098041e61515c643570819d059d2) - [#16799](https://github.com/npm/npm/pull/16799) - Document that `package-lock.json` is never allowed in tarballs. - ([@sonicdoe](https://github.com/sonicdoe)) -* [`f3cb84b44`](https://github.com/npm/npm/commit/f3cb84b446c51d628ee0033cdf13752c15b31a29) - [#16771](https://github.com/npm/npm/pull/16771) - Fix `npm -l` usage information for the `test` command. - ([@grawlinson](https://github.com/grawlinson)) - -### OTHER CHANGES - -* [`661262309`](https://github.com/npm/npm/commit/66126230912ab5ab35287b40a9908e036fa73994) - [#16756](https://github.com/npm/npm/pull/16756) - remove unused argument - ([@Aladdin-ADD](https://github.com/Aladdin-ADD)) -* [`c3e0b4287`](https://github.com/npm/npm/commit/c3e0b4287ea69735cc367aa7bb7e7aa9a6d9804b) - [#16296](https://github.com/npm/npm/pull/16296) - preserve same name convention for command - ([@desfero](https://github.com/desfero)) -* [`9f814831d`](https://github.com/npm/npm/commit/9f814831d330dde7702973186aea06caaa77ff31) - [#16757](https://github.com/npm/npm/pull/16757) - remove unused argument - ([@Aladdin-ADD](https://github.com/Aladdin-ADD)) -* [`3cb843239`](https://github.com/npm/npm/commit/3cb8432397b3666d88c31131dbb4599016a983ff) - minor linter fix - ([@zkat](https://github.com/zkat)) - -## v5.0.0 (2017-05-25) - -Wowowowowow npm@5! - -This release marks months of hard work for the young, scrappy, and hungry CLI -team, and includes some changes we've been hoping to do for literally years. -npm@5 takes npm a pretty big step forward, significantly improving its -performance in almost all common situations, fixing a bunch of old errors due to -the architecture, and just generally making it more robust and fault-tolerant. -It comes with changes to make life easier for people doing monorepos, for users -who want consistency/security guarantees, and brings semver support to git -dependencies. See below for all the deets! - -### Breaking Changes - -* Existing npm caches will no longer be used: you will have to redownload any cached packages. There is no tool or intention to reuse old caches. ([#15666](https://github.com/npm/npm/pull/15666)) - -* `npm install ./packages/subdir` will now create a symlink instead of a regular installation. `file://path/to/tarball.tgz` will not change -- only directories are symlinked. ([#15900](https://github.com/npm/npm/pull/15900)) - -* npm will now scold you if you capitalize its name. seriously it will fight you. - -* [npm will `--save` by default now](https://twitter.com/maybekatz/status/859229741676625920). Additionally, `package-lock.json` will be automatically created unless an `npm-shrinkwrap.json` exists. ([#15666](https://github.com/npm/npm/pull/15666)) - -* Git dependencies support semver through `user/repo#semver:^1.2.3` ([#15308](https://github.com/npm/npm/pull/15308)) ([#15666](https://github.com/npm/npm/pull/15666)) ([@sankethkatta](https://github.com/sankethkatta)) - -* Git dependencies with `prepare` scripts will have their `devDependencies` installed, and `npm install` run in their directory before being packed. - -* `npm cache` commands have been rewritten and don't really work anything like they did before. ([#15666](https://github.com/npm/npm/pull/15666)) - -* `--cache-min` and `--cache-max` have been deprecated. ([#15666](https://github.com/npm/npm/pull/15666)) - -* Running npm while offline will no longer insist on retrying network requests. npm will now immediately fall back to cache if possible, or fail. ([#15666](https://github.com/npm/npm/pull/15666)) - -* package locks no longer exclude `optionalDependencies` that failed to build. This means package-lock.json and npm-shrinkwrap.json should now be cross-platform. ([#15900](https://github.com/npm/npm/pull/15900)) - -* If you generated your package lock against registry A, and you switch to registry B, npm will now try to [install the packages from registry B, instead of A](https://twitter.com/maybekatz/status/862834964932435969). If you want to use different registries for different packages, use scope-specific registries (`npm config set @myscope:registry=https://myownregist.ry/packages/`). Different registries for different unscoped packages are not supported anymore. - -* Shrinkwrap and package-lock no longer warn and exit without saving the lockfile. - -* Local tarballs can now only be installed if they have a file extensions `.tar`, `.tar.gz`, or `.tgz`. - -* A new loglevel, `notice`, has been added and set as default. - -* One binary to rule them all: `./cli.js` has been removed in favor of `./bin/npm-cli.js`. In case you were doing something with `./cli.js` itself. ([#12096](https://github.com/npm/npm/pull/12096)) ([@watilde](https://github.com/watilde)) - -* Stub file removed ([#16204](https://github.com/npm/npm/pull/16204)) ([@watilde](https://github.com/watilde)) - -* The "extremely legacy" `_token` couchToken has been removed. ([#12986](https://github.com/npm/npm/pull/12986)) - -### Feature Summary - -#### Installer changes - -* A new, standardised lockfile feature meant for cross-package-manager compatibility (`package-lock.json`), and a new format and semantics for shrinkwrap. ([#16441](https://github.com/npm/npm/pull/16441)) - -* `--save` is no longer necessary. All installs will be saved by default. You can prevent saving with `--no-save`. Installing optional and dev deps is unchanged: use `-D/--save-dev` and `-O/--save-optional` if you want them saved into those fields instead. Note that since npm@3, npm will automatically update npm-shrinkwrap.json when you save: this will also be true for `package-lock.json`. ([#15666](https://github.com/npm/npm/pull/15666)) - -* Installing a package directory now ends up creating a symlink and does the Right Thing™ as far as saving to and installing from the package lock goes. If you have a monorepo, this might make things much easier to work with, and probably a lot faster too. 😁 ([#15900](https://github.com/npm/npm/pull/15900)) - -* Project-level (toplevel) `preinstall` scripts now run before anything else, and can modify `node_modules` before the CLI reads it. - -* Two new scripts have been added, `prepack` and `postpack`, which will run on both `npm pack` and `npm publish`, but NOT on `npm install` (without arguments). Combined with the fact that `prepublishOnly` is run before the tarball is generated, this should round out the general story as far as putzing around with your code before publication. - -* Git dependencies with `prepare` scripts will now [have their devDependencies installed, and their prepare script executed](https://twitter.com/maybekatz/status/860363896443371520) as if under `npm pack`. - -* Git dependencies now support semver-based matching: `npm install git://github.com/npm/npm#semver:^5` (#15308, #15666) - -* `node-gyp` now supports `node-gyp.cmd` on Windows ([#14568](https://github.com/npm/npm/pull/14568)) - -* npm no longer blasts your screen with the whole installed tree. Instead, you'll see a summary report of the install that is much kinder on your shell real-estate. Specially for large projects. ([#15914](https://github.com/npm/npm/pull/15914)): -``` -$ npm install -npm added 125, removed 32, updated 148 and moved 5 packages in 5.032s. -$ -``` - -* `--parseable` and `--json` now work more consistently across various commands, particularly `install` and `ls`. - -* Indentation is now [detected and preserved](https://twitter.com/maybekatz/status/860690502932340737) for `package.json`, `package-lock.json`, and `npm-shrinkwrap.json`. If the package lock is missing, it will default to `package.json`'s current indentation. - -#### Publishing - -* New [publishes will now include *both* `sha512`](https://twitter.com/maybekatz/status/863201943082065920) and `sha1` checksums. Versions of npm from 5 onwards will use the strongest algorithm available to verify downloads. [npm/npm-registry-client#157](https://github.com/npm/npm-registry-client/pull/157) - -#### Cache Rewrite! - -We've been talking about rewriting the cache for a loooong time. So here it is. -Lots of exciting stuff ahead. The rewrite will also enable some exciting future -features, but we'll talk about those when they're actually in the works. #15666 -is the main PR for all these changes. Additional PRs/commits are linked inline. - -* Package metadata, package download, and caching infrastructure replaced. - -* It's a bit faster. [Hopefully it will be noticeable](https://twitter.com/maybekatz/status/865393382260056064). 🤔 - -* With the shrinkwrap and package-lock changes, tarballs will be looked up in the cache by content address (and verified with it). - -* Corrupted cache entries will [automatically be removed and re-fetched](https://twitter.com/maybekatz/status/854933138182557696) on integrity check failure. - -* npm CLI now supports tarball hashes with any hash function supported by Node.js. That is, it will [use `sha512` for tarballs from registries that send a `sha512` checksum as the tarball hash](https://twitter.com/maybekatz/status/858137093624573953). Publishing with `sha512` is added by [npm/npm-registry-client#157](https://github.com/npm/npm-registry-client/pull/157) and may be backfilled by the registry for older entries. - -* Remote tarball requests are now cached. This means that even if you're missing the `integrity` field in your shrinkwrap or package-lock, npm will be able to install from the cache. - -* Downloads for large packages are streamed in and out of disk. npm is now able to install packages of """any""" size without running out of memory. Support for publishing them is pending (due to registry limitations). - -* [Automatic fallback-to-offline mode](https://twitter.com/maybekatz/status/854176565587984384). npm will seamlessly use your cache if you are offline, or if you lose access to a particular registry (for example, if you can no longer access a private npm repo, or if your git host is unavailable). - -* A new `--prefer-offline` option will make npm skip any conditional requests (304 checks) for stale cache data, and *only* hit the network if something is missing from the cache. - -* A new `--prefer-online` option that will force npm to revalidate cached data (with 304 checks), ignoring any staleness checks, and refreshing the cache with revalidated, fresh data. - -* A new `--offline` option will force npm to use the cache or exit. It will error with an `ENOTCACHED` code if anything it tries to install isn't already in the cache. - -* A new `npm cache verify` command that will garbage collect your cache, reducing disk usage for things you don't need (-handwave-), and will do full integrity verification on both the index and the content. This is also hooked into `npm doctor` as part of its larger suite of checking tools. - -* The new cache is *very* fault tolerant and supports concurrent access. - * Multiple npm processes will not corrupt a shared cache. - * Corrupted data will not be installed. Data is checked on both insertion and extraction, and treated as if it were missing if found to be corrupted. I will literally bake you a cookie if you manage to corrupt the cache in such a way that you end up with the wrong data in your installation (installer bugs notwithstanding). - * `npm cache clear` is no longer useful for anything except clearing up disk space. - -* Package metadata is cached separately per registry and package type: you can't have package name conflicts between locally-installed packages, private repo packages, and public repo packages. Identical tarball data will still be shared/deduplicated as long as their hashes match. - -* HTTP cache-related headers and features are "fully" (lol) supported for both metadata and tarball requests -- if you have your own registry, you can define your own cache settings the CLI will obey! - -* `prepublishOnly` now runs *before* the tarball to publish is created, after `prepare` has run. diff --git a/changelogs/CHANGELOG-6.md b/changelogs/CHANGELOG-6.md deleted file mode 100644 index 0f07a687af988..0000000000000 --- a/changelogs/CHANGELOG-6.md +++ /dev/null @@ -1,2910 +0,0 @@ -## 6.14.8 (2020-08-17) - -### BUG FIXES -* [`9262e8c88`](https://github.com/npm/cli/commit/9262e8c88f2f828206423928b8e21eea67f4801a) - [#1575](https://github.com/npm/cli/pull/1575) - npm install --dev deprecation message - ([@sandratatarevicova](https://github.com/sandratatarevicova)) -* [`765cfe0bc`](https://github.com/npm/cli/commit/765cfe0bc05a10b72026291ff0ca7c9ca5cb3f57) - [#1658](https://github.com/npm/cli/issues/1658) - remove unused broken require - ([@aduh95](https://github.com/aduh95)) -* [`4e28de79a`](https://github.com/npm/cli/commit/4e28de79a3a0aacc7603010a592beb448ceb6f5f) - [#1663](https://github.com/npm/cli/pull/1663) - Do not send user secret in the referer header - ([@assapir](https://github.com/assapir)) - -### DOCUMENTATION -* [`8abdf30c9`](https://github.com/npm/cli/commit/8abdf30c95ec90331456f3f2ed78e2703939bb74) - [#1572](https://github.com/npm/cli/pull/1572) - docs: add missing metadata in semver page - ([@tripu](https://github.com/tripu)) -* [`8cedcca46`](https://github.com/npm/cli/commit/8cedcca464ced5aab58be83dd5049c3df13384de) - [#1614](https://github.com/npm/cli/pull/1614) - Node-gyp supports both Python and legacy Python - ([@cclauss](https://github.com/cclauss)) - -### DEPENDENCIES -* [`a303b75fd`](https://github.com/npm/cli/commit/a303b75fd7c4b2644da02ad2ad46d80dfceec3c5) - `update-notifier@2.5.0` -* [`c48600832`](https://github.com/npm/cli/commit/c48600832aff4cc349f59997e08dc4bbde15bd49) - `npm-registry-fetch@4.0.7` -* [`a6e9fc4df`](https://github.com/npm/cli/commit/a6e9fc4df7092ba3eb5394193638b33c24855c36) - `meant@1.0.2`: - -## 6.14.7 (2020-07-21) - -### BUG FIXES -* [`de5108836`](https://github.com/npm/cli/commit/de5108836189bddf28d4d3542f9bd5869cc5c2e9) [#784](https://github.com/npm/cli/pull/784) npm explore spawn shell correctly ([@jasisk](https://github.com/jasisk)) -* [`36e6c01d3`](https://github.com/npm/cli/commit/36e6c01d334c4db75018bc6a4a0bef726fd41ce4) git tag handling regression on shrinkwrap ([@claudiahdz](https://github.com/claudiahdz)) -* [`1961c9369`](https://github.com/npm/cli/commit/1961c9369c92bf8fe530cecba9834ca3c7f5567c) [#288](https://github.com/npm/cli/pull/288) Fix package id in shrinkwrap lifecycle step output ([@bz2](https://github.com/bz2)) -* [`87888892a`](https://github.com/npm/cli/commit/87888892a1282cc3edae968c3ae4ec279189271c) [#1009](https://github.com/npm/cli/pull/1009) gracefully handle error during npm install ([@danielleadams](https://github.com/danielleadams)) -* [`6fe2bdc25`](https://github.com/npm/cli/commit/6fe2bdc25e7961956e5c0067fa4db54ff1bd0dbd) [#1547](https://github.com/npm/cli/pull/1547) npm ls --parseable --long output ([@ruyadorno](https://github.com/ruyadorno)) - -### DEPENDENCIES -* [`2d78481c7`](https://github.com/npm/cli/commit/2d78481c7ec178e628ce23df940f73a05d5c6367) update mkdirp on tacks ([@claudiahdz](https://github.com/claudiahdz)) -* [`4e129d105`](https://github.com/npm/cli/commit/4e129d105eba3b12d474caa6e5ca216a98deb75a) uninstall npm-registry-couchapp ([@claudiahdz](https://github.com/claudiahdz)) -* [`8e1869e27`](https://github.com/npm/cli/commit/8e1869e278d1dd37ddefd6b4e961d1bb17fc9d09) update marked dev dep ([@claudiahdz](https://github.com/claudiahdz)) -* [`6a6151f37`](https://github.com/npm/cli/commit/6a6151f377063c6aca852c859c01910edd235ec6) `libnpx@10.2.4` ([@claudiahdz](https://github.com/claudiahdz)) -* [`dc21422eb`](https://github.com/npm/cli/commit/dc21422eb1ca1a4a19f160fad0e924566e08c496) `bin-links@1.1.8` ([@claudiahdz](https://github.com/claudiahdz)) -* [`d341f88ce`](https://github.com/npm/cli/commit/d341f88ce6feb3df1dcb37f34910fcc6c1db85f2) `gentle-fs@2.3.1` ([@claudiahdz](https://github.com/claudiahdz)) -* [`3e168d49b`](https://github.com/npm/cli/commit/3e168d49b41574809cae2ad013776a00d3f20ff4) `libcipm@4.0.8` ([@claudiahdz](https://github.com/claudiahdz)) -* [`6ae942a51`](https://github.com/npm/cli/commit/6ae942a510520b7dff11b5b78eebeff1706e38af) `npm-audit-report@1.3.3` ([@claudiahdz](https://github.com/claudiahdz)) -* [`6a35e3dee`](https://github.com/npm/cli/commit/6a35e3deec275bf2ae76603acd424a0640458047) `npm-lifecycle@3.1.5` ([@claudiahdz](https://github.com/claudiahdz)) - -## 6.14.6 (2020-07-07) - -### BUG FIXES -* [`a9857b8f6`](https://github.com/npm/cli/commit/a9857b8f6869451ff058789c4631fadfde5bbcbc) chore: remove auth info from logs ([@claudiahdz](https://github.com/claudiahdz)) -* [`b7ad77598`](https://github.com/npm/cli/commit/b7ad77598112908d60195d0fbc472b3c84275fd5) [#1416](https://github.com/npm/cli/pull/1416) fix: wrong `npm doctor` command result ([@vanishcode](https://github.com/vanishcode)) - -### DEPENDENCIES -* [`94eca6377`](https://github.com/npm/cli/commit/94eca637756376b949edfb697e179a1fdcc231ee) `npm-registry-fetch@4.0.5` ([@claudiahdz](https://github.com/claudiahdz)) -* [`c49b6ae28`](https://github.com/npm/cli/commit/c49b6ae28791ff7184288be16654f97168aa9705) [#1418](https://github.com/npm/cli/pull/1418) `spdx-license-ids@3.0.5` ([@kemitchell](https://github.com/kemitchell)) - -### DOCUMENTATION -* [`2e052984b`](https://github.com/npm/cli/commit/2e052984b08c09115ed75387fb2c961631d85d77) - [#1459](https://github.com/npm/cli/pull/1459) - chore(docs): fixed links to cli commands ([@claudiahdz](https://github.com/claudiahdz)) -* [`0ca3509ca`](https://github.com/npm/cli/commit/0ca3509ca940865392daeeabb39192f7d5af9f5e) - [#1283](https://github.com/npm/cli/pull/1283) Update npm-link.md ([@peterfich](https://github.com/peterfich)) -* [`3dd429e9a`](https://github.com/npm/cli/commit/3dd429e9aad760ce2ff9e522b34ebfebd85b460c) - [#1377](https://github.com/npm/cli/pull/1377) - Add note about dropped `*` filenames ([@maxwellgerber](https://github.com/maxwellgerber)) -* [`9a2e2e797`](https://github.com/npm/cli/commit/9a2e2e797e5c91e7f4f261583a1906e2c440cc2f) - [#1429](https://github.com/npm/cli/pull/1429) Fix typo ([@seanpoulter](https://github.com/seanpoulter)) - -## 6.14.5 (2020-05-01) - -### BUG FIXES - -* [`33ec41f18`](https://github.com/npm/cli/commit/33ec41f18f557146607cb14a7a38c707fce6d42c) [#758](https://github.com/npm/cli/pull/758) fix: relativize file links when inflating shrinkwrap ([@jsnajdr](https://github.com/jsnajdr)) -* [`94ed456df`](https://github.com/npm/cli/commit/94ed456dfb0b122fd4192429024f034d06c3c454) [#1162](https://github.com/npm/cli/pull/1162) fix: npm init help output ([@mum-never-proud](https://github.com/mum-never-proud)) - -### DEPENDENCIES - -* [`5587ac01f`](https://github.com/npm/cli/commit/5587ac01ffd0d2ea830a6bbb67bb34a611ffc409) `npm-registry-fetch@4.0.4` - * [`fc5d94c39`](https://github.com/npm/npm-registry-fetch/commit/fc5d94c39ca218d78df77249ab3a6bf1d9ed9db1) fix: removed default timeout -* [`07a4d8884`](https://github.com/npm/cli/commit/07a4d8884448359bac485a49c05fd2d23d06834b) `graceful-fs@4.2.4` -* [`8228d1f2e`](https://github.com/npm/cli/commit/8228d1f2e427ad9adee617266108acd1ee39b4a5) `mkdirp@0.5.5` -* [`e6d208317`](https://github.com/npm/cli/commit/e6d20831740a84aea766da2a2913cf82a4d56ada) `nopt@4.0.3` - -## 6.14.4 (2020-03-24) - -### DEPENDENCIES - -* Bump `minimist@1.2.5` transitive dep to resolve security issue - * [`9c554fd8c`](https://github.com/npm/cli/commit/9c554fd8cd1e9aeb8eb122ccfa3c78d12af4097a) `update-notifier@2.5.0` - * bump `deep-extend@1.2.5` - * bump `deep-extend@0.6.0` - * bump `is-ci@1.2.1` - * bump `is-retry-allowed@1.2.0` - * bump `rc@1.2.8` - * bump `registry-auth-token@3.4.0` - * bump `widest-line@2.0.1` -* [`136832dca`](https://github.com/npm/cli/commit/136832dcae13cb5518b1fe17bd63ea9b2a195f92) `mkdirp@0.5.4` -* [`8bf99b2b5`](https://github.com/npm/cli/commit/8bf99b2b58c14d45dc6739fce77de051ebc8ffb7) [#1053](https://github.com/npm/cli/pull/1053) deps: updates term-size to use signed binary - * [`d2f08a1bdb`](https://github.com/nodejs/node/commit/d2f08a1bdb78655c4a3fc49825986c148d14117e) ([@rvagg](https://github.com/rvagg)) - -## 6.14.3 (2020-03-19) - -### DOCUMENTATION - -* [`4ad221487`](https://github.com/npm/cli/commit4ad2214873cddfd4a0eff1bd188516b08fae9f9e) [#1020](https://github.com/npm/cli/pull/1020) docs(teams): updated team docs to reflect MFA workflow ([@blkdm0n](https://github.com/blkdm0n)) -* [`4a31a4ba2`](https://github.com/npm/cli/commit/4a31a4ba2db0a5db2d1d0890ee934ba1babb73a6) [#1034](https://github.com/npm/cli/pull/1034) docs: cleanup ([@ruyadorno](https://github.com/ruyadorno)) -* [`0eac801cd`](https://github.com/npm/cli/commit/0eac801cdef344e9fbda6270145e062211255b0e) [#1013](https://github.com/npm/cli/pull/1013) docs: fix links to cli commands ([@alenros](https://github.com/alenros)) -* [`7d8e5b99c`](https://github.com/npm/cli/commit/7d8e5b99c4ef8c394cffa7fc845f54a25ff37e3a) [#755](https://github.com/npm/cli/pull/755) docs: correction to `npm update -g` behaviour ([@johnkennedy9147](https://github.com/johnkennedy9147)) - -### DEPENDENCIES - -* [`e11167646`](https://github.com/npm/cli/commit/e111676467f090f73802b97e8da7ece481b18f99) `mkdirp@0.5.3` - * [`c5b97d17d`](https://github.com/isaacs/node-mkdirp/commit/c5b97d17d45a22bcf4c815645cbb989dab57ddd8) fix: bump `minimist` dep to resolve security issue ([@isaacs](https://github.com/isaacs)) -* [`c50d679c6`](https://github.com/npm/cli/commit/c50d679c68b39dd03ad127d34f540ddcb1b1e804) `rimraf@2.7.1` -* [`a2de99ff9`](https://github.com/npm/cli/commit/a2de99ff9e02425a3ccc25280f390178be755a36) `npm-registry-mock@1.3.1` -* [`217debeb9`](https://github.com/npm/cli/commit/217debeb9812e037a6686cbf6ec67a0cd47fa68a) `npm-registry-couchapp@2.7.4` - -## 6.14.2 (2020-03-03) - -### DOCUMENTATION -* [`f9248c0be`](https://github.com/npm/cli/commit/f9248c0be63fba37a30098dc9215c752474380e3) [#730](https://github.com/npm/cli/pull/730) chore(docs): update unpublish docs & policy reference ([@nomadtechie](https://github.com/nomadtechie), [@mikemimik](https://github.com/mikemimik)) - -### DEPENDENCIES - -* [`909cc3918`](https://github.com/npm/cli/commit/909cc39180a352f206898481add5772206c8b65f) `hosted-git-info@2.8.8` ([@darcyclarke](https://github.com/darcyclarke)) - * [`5038b1891`](https://github.com/npm/hosted-git-info/commit/5038b1891a61ca3cd7453acbf85d7011fe0086bb) fix: regression in old node versions w/ respect to url.URL implmentation -* [`9204ffa58`](https://github.com/npm/cli/commit/9204ffa584c140c5e22b1ee37f6df2c98f5dc70b) `npm-profile@4.0.4` ([@isaacs](https://github.com/isaacs)) - * [`6bcf0860a`](https://github.com/npm/npm-profile/commit/6bcf0860a3841865099d0115dbcbde8b78109bd9) fix: treat non-http/https login urls as invalid -* [`0365d39bd`](https://github.com/npm/cli/commit/0365d39bdc74960a18caac674f51d0e2a98b31e6) `glob@7.1.6` ([@isaacs](https://github.com/isaacs)) -* [`dab030536`](https://github.com/nodejs/node-gyp/commit/dab030536b6a70ecae37debc74c581db9e5280fd) `node-gyp@5.1.0` ([@rvagg](https://github.com/rvagg)) - -## 6.14.1 (2020-02-26) - -* [`303e5c11e`](https://github.com/npm/cli/commit/303e5c11e7db34cf014107aecd2e81c821bfde8d) - `hosted-git-info@2.8.7` - Fixes a regression where scp-style git urls are passed to the WhatWG URL - parser, which does not handle them properly. - ([@isaacs](https://github.com/isaacs)) - -## 6.14.0 (2020-02-25) - -### FEATURES -* [`30f170877`](https://github.com/npm/cli/commit/30f170877954acd036cb234a581e4eb155049b82) [#731](https://github.com/npm/cli/pull/731) add support for multiple funding sources ([@ljharb](https://github.com/ljharb) & [@ruyadorno](hhttps://github.com/ruyadorno/)) - -### BUG FIXES -* [`55916b130`](https://github.com/npm/cli/commit/55916b130ef52984584678f2cc17c15c1f031cb5) [#508](https://github.com/npm/cli/pull/508) fix: check `npm.config` before accessing its members ([@kaiyoma](https://github.com/kaiyoma)) -* [`7d0cd65b2`](https://github.com/npm/cli/commit/7d0cd65b23c0986b631b9b54d87bbe74902cc023) [#733](https://github.com/npm/cli/pull/733) fix: access grant with unscoped packages ([@netanelgilad](https://github.com/netanelgilad)) -* [`28c3d40d6`](https://github.com/npm/cli/commit/28c3d40d65eef63f9d6ccb60b99ac57f5057a46e), [`0769c5b20`](https://github.com/npm/cli/commit/30f170877954acd036cb234a581e4eb155049b82) [#945](https://github.com/npm/cli/pull/945), [#697](https://github.com/npm/cli/pull/697) fix: allow new major versions of node to be automatically considered "supported" ([@isaacs](https://github.com/isaacs), [@ljharb](https://github.com/ljharb)) - -### DEPENDENCIES -* [`6f39e93`](https://github.com/npm/hosted-git-info/commit/6f39e93bae9162663af6f15a9d10bce675dd5de3) `hosted-git-info@2.8.6` ([@darcyclarke](https://github.com/darcyclarke)) - * fix: passwords & usernames are escaped properly in git deps ([@stevenhilder](https://github.com/stevenhilder)) -* [`f14b594ee`](https://github.com/npm/cli/commit/f14b594ee9dbfc98ed0b65c65d904782db4f31ad) `chownr@1.1.4` ([@isaacs](https://github.com/isaacs)) -* [`77044150b`](https://github.com/npm/cli/commit/77044150b763d67d997f9ff108219132ea922678) `npm-packlist@1.4.8` ([@isaacs](https://github.com/isaacs)) -* [`1d112461a`](https://github.com/npm/cli/commit/1d112461ad8dc99e5ff7fabb5177e8c2f89a9755) `npm-registry-fetch@4.0.3` ([@isaacs](https://github.com/isaacs)) - * [`ba8b4fe`](https://github.com/npm/npm-registry-fetch/commit/ba8b4fe60eb6cdf9b39012560aec596eda8ce924) fix: always bypass cache when ?write=true -* [`a47fed760`](https://github.com/npm/cli/commit/a47fed7603a6ed31dcc314c0c573805f05a96830) `readable-stream@3.6.0` - * [`3bbf2d6`](https://github.com/nodejs/readable-stream/commit/3bbf2d6feb45b03f4e46a2ae8251601ad2262121) fix: babel's "loose mode" class transform enbrittles BufferList ([@ljharb](https://github.com/ljharb)) - -### DOCUMENTATION -* [`284c1c055`](https://github.com/npm/cli/commit/284c1c055a28c4b334496101799acefe3c54ceb3), [`fbb5f0e50`](https://github.com/npm/cli/commit/fbb5f0e50e54425119fa3f03c5de93e4cb6bfda7) [#729](https://github.com/npm/cli/pull/729) update lifecycle hooks docs - ([@seanhealy](https://github.com/seanhealy), [@mikemimik](https://github.com/mikemimik)) -* [`1c272832d`](https://github.com/npm/cli/commit/1c272832d048300e409882313305c416dc6f21a2) [#787](https://github.com/npm/cli/pull/787) fix: trademarks typo ([@dnicolson](https://github.com/dnicolson)) -* [`f6ff41776`](https://github.com/npm/cli/commit/f6ff417767d52418cc8c9e7b9731ede2c3916d2e) [#936](https://github.com/npm/cli/pull/936) fix: postinstall example ([@ajaymathur](https://github.com/ajaymathur)) -* [`373224b16`](https://github.com/npm/cli/commit/373224b16e019b7b63d8f0b4c5d4adb7e5cb80dd) [#939](https://github.com/npm/cli/pull/939) fix: bad links in publish docs ([@vit100](https://github.com/vit100)) - -### MISCELLANEOUS -* [`85c79636d`](https://github.com/npm/cli/commit/85c79636df31bac586c0e380c4852ee155a7723c) [#736](https://github.com/npm/cli/pull/736) add script to update dist-tags ([@mikemimik](https://github.com/mikemimik)) - -## 6.13.7 (2020-01-28) - -### BUG FIXES -* [`7dbb91438`](https://github.com/npm/cli/commit/7dbb914382ecd2074fffb7eba81d93262e2d23c6) - [#655](https://github.com/npm/cli/pull/655) - Update CI detection cases - ([@isaacs](https://github.com/isaacs)) - -### DEPENDENCIES -* [`0fb1296c7`](https://github.com/npm/cli/commit/0fb1296c7d6d4bb9e78c96978c433cd65e55c0ea) - `libnpx@10.2.2` - ([@mikemimik](https://github.com/mikemimik)) -* [`c9b69d569`](https://github.com/npm/cli/commit/c9b69d569fec7944375a746e9c08a6fa9bec96ff) - `node-gyp@5.0.7` - ([@mikemimik](https://github.com/mikemimik)) -* [`e8dbaf452`](https://github.com/npm/cli/commit/e8dbaf452a1f6c5350bb0c37059b89a7448e7986) - `bin-links@1.1.7` - ([@mikemimik](https://github.com/mikemimik)) - * [#613](https://github.com/npm/cli/issues/613) Fixes bin entry for package - -## 6.13.6 (2020-01-09) - -### DEPENDENCIES - -* [`6dba897a1`](https://github.com/npm/cli/commit/6dba897a1e2d56388fb6df0c814b0bb85af366b4) - `pacote@9.5.12`: - * [`d2f4176`](https://github.com/npm/pacote/commit/d2f4176b6af393d7e29de27e9b638dbcbab9a0c7) - fix(git): Do not drop uid/gid when executing in root-owned directory - ([@isaacs](https://github.com/isaacs)) - -## 6.13.5 (2020-01-09) - -### BUG FIXES - -* [`fd0a802ec`](https://github.com/npm/cli/commit/fd0a802ec468ec7b98d6c15934c355fef0e7ff60) [#550](https://github.com/npm/cli/pull/550) Fix cache location for `npm ci` ([@zhenyavinogradov](https://github.com/zhenyavinogradov)) -* [`4b30f3cca`](https://github.com/npm/cli/commit/4b30f3ccaebf50d6ab3bad130ff94827c017cc16) [#648](https://github.com/npm/cli/pull/648) fix(version): using 'allow-same-version', git commit --allow-empty and git tag -f ([@rhengles](https://github.com/rhengles)) - -### TESTING - -* [`e16f68d30`](https://github.com/npm/cli/commit/e16f68d30d59ce1ddde9fe62f7681b2c07fce84d) test(ci): add failing cache config test ([@ruyadorno](https://github.com/ruyadorno)) -* [`3f009fbf2`](https://github.com/npm/cli/commit/3f009fbf2c42f68c5127efecc6e22db105a74fe0) [#659](https://github.com/npm/cli/pull/659) test: fix bin-overwriting test on Windows ([@isaacs](https://github.com/isaacs)) -* [`43ae0791f`](https://github.com/npm/cli/commit/43ae0791f74f68e02850201a64a6af693657b241) [#601](https://github.com/npm/cli/pull/601) ci: Allow builds to run even if one fails ([@XhmikosR](https://github.com/XhmikosR)) -* [`4a669bee4`](https://github.com/npm/cli/commit/4a669bee4ac54c70adc6979d45cd0605b6dc33fd) [#603](https://github.com/npm/cli/pull/603) Remove the unused appveyor.yml ([@XhmikosR](https://github.com/XhmikosR)) -* [`9295046ac`](https://github.com/npm/cli/commit/9295046ac92bbe82f4d84e1ec90cc81d3b80bfc7) [#600](https://github.com/npm/cli/pull/600) ci: switch to `actions/checkout@v2` ([@XhmikosR](https://github.com/XhmikosR)) - -### DOCUMENTATION - -* [`f2d770ac7`](https://github.com/npm/cli/commit/f2d770ac768ea84867772b90a3c9acbdd0c1cb6a) [#569](https://github.com/npm/cli/pull/569) fix netlify publish path config ([@claudiahdz](https://github.com/claudiahdz)) -* [`462cf0983`](https://github.com/npm/cli/commit/462cf0983dbc18a3d93f77212ca69f878060b2ec) [#627](https://github.com/npm/cli/pull/627) update gatsby dependencies ([@felixonmars](https://github.com/felixonmars)) -* [`6fb5dbb72`](https://github.com/npm/cli/commit/6fb5dbb7213c4c050c9a47a7d5131447b8b7dcc8) - [#532](https://github.com/npm/cli/pull/532) docs: clarify usage of global prefix ([@jgehrcke](https://github.com/jgehrcke)) - -## 6.13.4 (2019-12-11) - -## BUGFIXES - -* [`320ac9aee`](https://github.com/npm/cli/commit/320ac9aeeafd11bb693c53b31148b8d10c4165e8) - [npm/bin-links#12](https://github.com/npm/bin-links/pull/12) - [npm/gentle-fs#7](https://github.com/npm/gentle-fs/pull/7) - Do not remove global bin/man links inappropriately - ([@isaacs](https://github.com/isaacs)) - -## DEPENDENCIES - -* [`52fd21061`](https://github.com/npm/cli/commit/52fd21061ff8b1a73429294620ffe5ebaaa60d3e) - `gentle-fs@2.3.0` - ([@isaacs](https://github.com/isaacs)) -* [`d06f5c0b0`](https://github.com/npm/cli/commit/d06f5c0b0611c43b6e70ded92af24fa5d83a0f48) - `bin-links@1.1.6` - ([@isaacs](https://github.com/isaacs)) - -## 6.13.3 (2019-12-09) - -### DEPENDENCIES - -* [`19ce061a2`](https://github.com/npm/cli/commit/19ce061a2ee165d8de862c8f0f733c222846b9e1) - `bin-links@1.1.5` Properly normalize, sanitize, and verify `bin` entries - in `package.json`. -* [`59c836aae`](https://github.com/npm/cli/commit/59c836aae8d0104a767e80c540b963c91774012a) - `npm-packlist@1.4.7` -* [`fb4ecd7d2`](https://github.com/npm/cli/commit/fb4ecd7d2810b0b4897daaf081a5e2f3f483b310) - `pacote@9.5.11` - * [`5f33040`](https://github.com/npm/pacote/commit/5f3304028b6985fd380fc77c4840ff12a4898301) - [#476](https://github.com/npm/cli/issues/476) - [npm/pacote#22](https://github.com/npm/pacote/issues/22) - [npm/pacote#14](https://github.com/npm/pacote/issues/14) fix: Do not - drop perms in git when not root ([isaacs](https://github.com/isaacs), - [@darcyclarke](https://github.com/darcyclarke)) - * [`6f229f7`](https://github.com/npm/pacote/6f229f78d9911b4734f0a19c6afdc5454034c759) - sanitize and normalize package bin field - ([isaacs](https://github.com/isaacs)) -* [`1743cb339`](https://github.com/npm/cli/commit/1743cb339767e86431dcd565c7bdb0aed67b293d) - `read-package-json@2.1.1` - - -## 6.13.2 (2019-12-03) - -### BUG FIXES - -* [`4429645b3`](https://github.com/npm/cli/commit/4429645b3538e1cda54d8d1b7ecb3da7a88fdd3c) - [#546](https://github.com/npm/cli/pull/546) - fix docs target typo - ([@richardlau](https://github.com/richardlau)) -* [`867642942`](https://github.com/npm/cli/commit/867642942bec69bb9ab71cff1914fb6a9fe67de8) - [#142](https://github.com/npm/cli/pull/142) - fix(packageRelativePath): fix 'where' for file deps - ([@larsgw](https://github.com/larsgw)) -* [`d480f2c17`](https://github.com/npm/cli/commit/d480f2c176e6976b3cca3565e4c108b599b0379b) - [#527](https://github.com/npm/cli/pull/527) - Revert "windows: Add preliminary WSL support for npm and npx" - ([@craigloewen-msft](https://github.com/craigloewen-msft)) -* [`e4b97962e`](https://github.com/npm/cli/commit/e4b97962e5fce0d49beb541ce5a0f96aee0525de) - [#504](https://github.com/npm/cli/pull/504) - remove unnecessary package.json read when reading shrinkwrap - ([@Lighting-Jack](https://github.com/Lighting-Jack)) -* [`1c65d26ac`](https://github.com/npm/cli/commit/1c65d26ac9f10ac0037094c207d216fbf0e969bf) - [#501](https://github.com/npm/cli/pull/501) - fix(fund): open url for string shorthand - ([@ruyadorno](https://github.com/ruyadorno)) -* [`ae7afe565`](https://github.com/npm/cli/commit/ae7afe56504dbffabf9f73d55b6dac1e3e9fed4a) - [#263](https://github.com/npm/cli/pull/263) - Don't log error message if git tagging is disabled - ([@woppa684](https://github.com/woppa684)) -* [`4c1b16f6a`](https://github.com/npm/cli/commit/4c1b16f6aecaf78956b9335734cfde2ac076ee11) - [#182](https://github.com/npm/cli/pull/182) - Warn the user that it is uninstalling npm-install - ([@Hoidberg](https://github.com/Hoidberg)) - -## 6.13.1 (2019-11-18) - -### BUG FIXES - -* [`938d6124d`](https://github.com/npm/cli/commit/938d6124d6d15d96b5a69d0ae32ef59fceb8ceab) - [#472](https://github.com/npm/cli/pull/472) - fix(fund): support funding string shorthand - ([@ruyadorno](https://github.com/ruyadorno)) -* [`b49c5535b`](https://github.com/npm/cli/commit/b49c5535b7c41729a8d167b035924c3c66b36de0) - [#471](https://github.com/npm/cli/pull/471) - should not publish tap-snapshot folder - ([@ruyadorno](https://github.com/ruyadorno)) -* [`3471d5200`](https://github.com/npm/cli/commit/3471d5200217bfa612b1a262e36c9c043a52eb09) - [#253](https://github.com/npm/cli/pull/253) - Add preliminary WSL support for npm and npx - ([@infinnie](https://github.com/infinnie)) -* [`3ef295f23`](https://github.com/npm/cli/commit/3ef295f23ee1b2300abf13ec19e935c47a455179) - [#486](https://github.com/npm/cli/pull/486) - print quick audit report for human output - ([@isaacs](https://github.com/isaacs)) - -### TESTING - -* [`dbbf977ac`](https://github.com/npm/cli/commit/dbbf977acd1e74bcdec859c562ea4a2bc0536442) - [#278](https://github.com/npm/cli/pull/278) - added workflow to trigger and run benchmarks - ([@mikemimik](https://github.com/mikemimik)) -* [`b4f5e3825`](https://github.com/npm/cli/commit/b4f5e3825535256aaada09c5e8f104570a3d96a4) - [#457](https://github.com/npm/cli/pull/457) - feat(docs): adding tests and updating docs to reflect changes in registry teams API. - ([@nomadtechie](https://github.com/nomadtechie)) -* [`454c7dd60`](https://github.com/npm/cli/commit/454c7dd60c78371bf606f11a17ed0299025bc37c) - [#456](https://github.com/npm/cli/pull/456) - fix git configs for git 2.23 and above - ([@isaacs](https://github.com/isaacs)) - -### DOCUMENTATION - -* [`b8c1576a4`](https://github.com/npm/cli/commit/b8c1576a448566397c721655b95fc90bf202b35a) [`30b013ae8`](https://github.com/npm/cli/commit/30b013ae8eacd04b1b8a41ce2ed0dd50c8ebae25) [`26c1b2ef6`](https://github.com/npm/cli/commit/26c1b2ef6be1595d28d935d35faa8ec72daae544) [`9f943a765`](https://github.com/npm/cli/commit/9f943a765faf6ebb8a442e862b808dbb630e018d) [`c0346b158`](https://github.com/npm/cli/commit/c0346b158fc25ab6ca9954d4dd78d9e62f573a41) [`8e09d5ad6`](https://github.com/npm/cli/commit/8e09d5ad67d4f142241193cecbce61c659389be3) [`4a2f551ee`](https://github.com/npm/cli/commit/4a2f551eeb3285f6f200534da33644789715a41a) [`87d67258c`](https://github.com/npm/cli/commit/87d67258c213d9ea9a49ce1804294a718f08ff13) [`5c3b32722`](https://github.com/npm/cli/commit/5c3b3272234764c8b4d2d798b69af077b5a529c7) [`b150eaeff`](https://github.com/npm/cli/commit/b150eaeff428180bfa03be53fd741d5625897758) [`7555a743c`](https://github.com/npm/cli/commit/7555a743ce4c3146d6245dd63f91503c7f439a6c) [`b89423e2f`](https://github.com/npm/cli/commit/b89423e2f6a09b290b15254e7ff7e8033b434d83) - [#463](https://github.com/npm/cli/pull/463) - [#285](https://github.com/npm/cli/pull/285) - [#268](https://github.com/npm/cli/pull/268) - [#232](https://github.com/npm/cli/pull/232) - [#485](https://github.com/npm/cli/pull/485) - [#453](https://github.com/npm/cli/pull/453) - docs cleanup: typos, styling and content - ([@claudiahdz](https://github.com/claudiahdz)) - ([@XhmikosR](https://github.com/XhmikosR)) - ([@mugli](https://github.com/mugli)) - ([@brettz9](https://github.com/brettz9)) - ([@mkotsollaris](https://github.com/mkotsollaris)) - -### DEPENDENCIES - -* [`661d86cd2`](https://github.com/npm/cli/commit/661d86cd229b14ddf687b7f25a66941a79d233e7) - `make-fetch-happen@5.0.2` - ([@claudiahdz](https://github.com/claudiahdz)) - -## 6.13.0 (2019-11-05) - -### NEW FEATURES - -* [`4414b06d9`](https://github.com/npm/cli/commit/4414b06d944c56bee05ccfb85260055a767ee334) - [#273](https://github.com/npm/cli/pull/273) - add fund command - ([@ruyadorno](https://github.com/ruyadorno)) - -### DOCUMENTATION - -* [`ae4c74d04`](https://github.com/npm/cli/commit/ae4c74d04f820a0255a92bdfe77ecf97af134fae) - [#274](https://github.com/npm/cli/pull/274) - migrate existing docs to gatsby - ([@claudiahdz](https://github.com/claudiahdz)) -* [`4ff1bb180`](https://github.com/npm/cli/commit/4ff1bb180b1db8c72e51b3d57bd4e268b738e049) - [#277](https://github.com/npm/cli/pull/277) - updated documentation copy - ([@oletizi](https://github.com/oletizi)) - -### BUG FIXES - -* [`e4455409f`](https://github.com/npm/cli/commit/e4455409fe6fe9c198b250b488129171f0b4624a) - [#281](https://github.com/npm/cli/pull/281) - delete ps1 files on package removal - ([@NoDocCat](https://github.com/NoDocCat)) -* [`cd14d4701`](https://github.com/npm/cli/commit/cd14d47014e8c96ffd6a18791e8752028b19d637) - [#279](https://github.com/npm/cli/pull/279) - update supported node list to remove v6.0, v6.1, v9.0 - v9.2 - ([@ljharb](https://github.com/ljharb)) - -### DEPENDENCIES - -* [`a37296b20`](https://github.com/npm/cli/commit/a37296b20ca3e19c2bbfa78fedcfe695e03fda69) - `pacote@9.5.9` -* [`d3cb3abe8`](https://github.com/npm/cli/commit/d3cb3abe8cee54bd2624acdcf8043932ef0d660a) - `read-cmd-shim@1.0.5` - -### TESTING - -* [`688cd97be`](https://github.com/npm/cli/commit/688cd97be94ca949719424ff69ff515a68c5caba) - [#272](https://github.com/npm/cli/pull/272) - use github actions for CI - ([@JasonEtco](https://github.com/JasonEtco)) -* [`9a2d8af84`](https://github.com/npm/cli/commit/9a2d8af84f7328f13d8f578cf4b150b9d5f09517) - [#240](https://github.com/npm/cli/pull/240) - Clean up some flakiness and inconsistency - ([@isaacs](https://github.com/isaacs)) - -## 6.12.1 (2019-10-29) - -### BUG FIXES - -* [`6508e833d`](https://github.com/npm/cli/commit/6508e833df35a3caeb2b496f120ce67feff306b6) - [#269](https://github.com/npm/cli/pull/269) - add node v13 as a supported version - ([@ljharb](https://github.com/ljharb)) -* [`b6588a8f7`](https://github.com/npm/cli/commit/b6588a8f74fb8b1ad103060b73c4fd5174b1d1f6) - [#265](https://github.com/npm/cli/pull/265) - Fix regression in lockfile repair for sub-deps - ([@feelepxyz](https://github.com/feelepxyz)) -* [`d5dfe57a1`](https://github.com/npm/cli/commit/d5dfe57a1d810fe7fd64edefc976633ee3a4da53) - [#266](https://github.com/npm/cli/pull/266) - resolve circular dependency in pack.js - ([@addaleax](https://github.com/addaleax)) - -### DEPENDENCIES - -* [`73678bb59`](https://github.com/npm/cli/commit/73678bb590a8633c3bdbf72e08f1279f9e17fd28) - `chownr@1.1.3` -* [`4b76926e2`](https://github.com/npm/cli/commit/4b76926e2058ef30ab1d5e2541bb96d847653417) - `graceful-fs@4.2.3` -* [`c691f36a9`](https://github.com/npm/cli/commit/c691f36a9c108b6267859fe61e4a38228b190c17) - `libcipm@4.0.7` -* [`5e1a14975`](https://github.com/npm/cli/commit/5e1a14975311bfdc43df8e1eb317ae5690ee580c) - `npm-packlist@1.4.6` -* [`c194482d6`](https://github.com/npm/cli/commit/c194482d65ee81a5a0a6281c7a9f984462286c56) - `npm-registry-fetch@4.0.2` -* [`bc6a8e0ec`](https://github.com/npm/cli/commit/bc6a8e0ec966281e49b1dc66f9c641ea661ab7a6) - `tar@4.4.1` -* [`4dcca3cbb`](https://github.com/npm/cli/commit/4dcca3cbb161da1f261095d9cdd26e1fbb536a8d) - `uuid@3.3.3` - -## 6.12.0 (2019-10-08): - -Now `npm ci` runs prepare scripts for git dependencies, and respects the -`--no-optional` argument. Warnings for `engine` mismatches are printed -again. Various other fixes and cleanups. - -### BUG FIXES - -* [`890b245dc`](https://github.com/npm/cli/commit/890b245dc1f609590d8ab993fac7cf5a37ed46a5) - [#252](https://github.com/npm/cli/pull/252) ci: add dirPacker to options - ([@claudiahdz](https://github.com/claudiahdz)) -* [`f3299acd0`](https://github.com/npm/cli/commit/f3299acd0b4249500e940776aca77cc6c0977263) - [#257](https://github.com/npm/cli/pull/257) - [npm.community#4792](https://npm.community/t/engines-and-engines-strict-ignored/4792) - warn message on engine mismatch - ([@ruyadorno](https://github.com/ruyadorno)) -* [`bbc92fb8f`](https://github.com/npm/cli/commit/bbc92fb8f3478ff67071ebaff551f01c1ea42ced) - [#259](https://github.com/npm/cli/pull/259) - [npm.community#10288](https://npm.community/t/npm-token-err-figgypudding-options-cannot-be-modified-use-concat-instead/10288) - Fix figgyPudding error in `npm token` - ([@benblank](https://github.com/benblank)) -* [`70f54dcb5`](https://github.com/npm/cli/commit/70f54dcb5693b301c6b357922b7e8d16b57d8b00) - [#241](https://github.com/npm/cli/pull/241) doctor: Make OK more - consistent ([@gemal](https://github.com/gemal)) - -### FEATURES - -* [`ed993a29c`](https://github.com/npm/cli/commit/ed993a29ccf923425317c433844d55dbea2f23ee) - [#249](https://github.com/npm/cli/pull/249) Add CI environment variables - to user-agent ([@isaacs](https://github.com/isaacs)) -* [`f6b0459a4`](https://github.com/npm/cli/commit/f6b0459a466a2c663dbd549cdc331e7732552dca) - [#248](https://github.com/npm/cli/pull/248) Add option to save - package-lock without formatting Adds a new config - `--format-package-lock`, which defaults to true. - ([@bl00mber](https://github.com/bl00mber)) - -### DEPENDENCIES - -* [`0ca063c5d`](https://github.com/npm/cli/commit/0ca063c5dc961c4aa17373f4b33fb54c51c8c8d6) - `npm-lifecycle@3.1.4`: - - fix: filter functions and undefined out of makeEnv - ([@isaacs](https://github.com/isaacs)) -* [`5df6b0ea2`](https://github.com/npm/cli/commit/5df6b0ea2e3106ba65bba649cc8d7f02f4738236) - `libcipm@4.0.4`: - - fix: pack git directories properly - ([@claudiahdz](https://github.com/claudiahdz)) - - respect no-optional argument - ([@cruzdanilo](https://github.com/cruzdanilo)) -* [`7e04f728c`](https://github.com/npm/cli/commit/7e04f728cc4cd4853a8fc99e2df0a12988897589) - `tar@4.4.12` -* [`5c380e5a3`](https://github.com/npm/cli/commit/5c380e5a33d760bb66a4285b032ae5f50af27199) - `stringify-package@1.0.1` ([@isaacs](https://github.com/isaacs)) -* [`62f2ca692`](https://github.com/npm/cli/commit/62f2ca692ac0c0467ef4cf74f91777a5175258c4) - `node-gyp@5.0.5` ([@isaacs](https://github.com/isaacs)) -* [`0ff0ea47a`](https://github.com/npm/cli/commit/0ff0ea47a8840dd7d952bde7f7983a5016cda8ea) - `npm-install-checks@3.0.2` ([@isaacs](https://github.com/isaacs)) -* [`f46edae94`](https://github.com/npm/cli/commit/f46edae9450b707650a0efab09aa1e9295a18070) - `hosted-git-info@2.8.5` ([@isaacs](https://github.com/isaacs)) - -### TESTING - -* [`44a2b036b`](https://github.com/npm/cli/commit/44a2b036b34324ec85943908264b2e36de5a9435) - [#262](https://github.com/npm/cli/pull/262) fix root-ownership race - conditions in meta-test ([@isaacs](https://github.com/isaacs)) - -## 6.11.3 (2019-09-03): - -Fix npm ci regressions and npm outdated depth. - -### BUG FIXES - -* [`235ed1d28`](https://github.com/npm/cli/commit/235ed1d2838ef302bb995e183980209d16c51b9b) - [#239](https://github.com/npm/cli/pull/239) - Don't override user specified depth in outdated - Restores ability to update packages using `--depth` as suggested by `npm audit`. - ([@G-Rath](https://github.com/G-Rath)) -* [`1fafb5151`](https://github.com/npm/cli/commit/1fafb51513466cd793866b576dfea9a8963a3335) - [#242](https://github.com/npm/cli/pull/242) - [npm.community#9586](https://npm.community/t/6-11-1-some-dependencies-are-no-longer-being-installed/9586/4) - Revert "install: do not descend into directory deps' child modules" - ([@isaacs](https://github.com/isaacs)) -* [`cebf542e6`](https://github.com/npm/cli/commit/cebf542e61dcabdd2bd3b876272bf8eebf7d01cc) - [#243](https://github.com/npm/cli/pull/243) - [npm.community#9720](https://npm.community/t/6-11-2-npm-ci-installs-package-with-wrong-permissions/9720) - ci: pass appropriate configs for file/dir modes - ([@isaacs](https://github.com/isaacs)) - -### DEPENDENCIES - -* [`e5fbb7ed1`](https://github.com/npm/cli/commit/e5fbb7ed1fc7ef5c6ca4790e2d0dc441e0ac1596) - `read-cmd-shim@1.0.4` - ([@claudiahdz](https://github.com/claudiahdz)) -* [`23ce65616`](https://github.com/npm/cli/commit/23ce65616c550647c586f7babc3c2f60115af2aa) - `npm-pick-manifest@3.0.2` - ([@claudiahdz](https://github.com/claudiahdz)) - -## 6.11.2 (2019-08-22): - -Fix a recent Windows regression, and two long-standing Windows bugs. Also, -get CI running on Windows, so these things are less likely in the future. - -### DEPENDENCIES - -* [`9778a1b87`](https://github.com/npm/cli/commit/9778a1b878aaa817af6e99385e7683c2a389570d) - `cmd-shim@3.0.3`: Fix regression where shims fail to preserve exit code - ([@isaacs](https://github.com/isaacs)) -* [`bf93e91d8`](https://github.com/npm/cli/commit/bf93e91d879c816a055d5913e6e4210d7299f299) - `npm-package-arg@6.1.1`: Properly handle git+file: urls on Windows when a - drive letter is included. ([@isaacs](https://github.com/isaacs)) - -### BUGFIXES - -* [`6cc4cc66f`](https://github.com/npm/cli/commit/6cc4cc66f1fb050dc4113e35cab59197fd48e04a) - escape args properly on Windows Bash Despite being bash, Node.js running - on windows git mingw bash still executes child processes using cmd.exe. - As a result, arguments in this environment need to be escaped in the - style of cmd.exe, not bash. ([@isaacs](https://github.com/isaacs)) - -### TESTS - -* [`291aba7b8`](https://github.com/npm/cli/commit/291aba7b821e247b96240b1ec037310ead69a594) - make tests pass on Windows ([@isaacs](https://github.com/isaacs)) -* [`fea3a023a`](https://github.com/npm/cli/commit/fea3a023a80863f32a5f97f5132401b1a16161b8) - travis: run tests on Windows as well - ([@isaacs](https://github.com/isaacs)) - -## 6.11.1 (2019-08-20): - -Fix a regression for windows command shim syntax. - -* [`37db29647`](https://github.com/npm/cli/commit/37db2964710c80003604b7e3c1527d17be7ed3d0) - `cmd-shim@3.0.2` ([@isaacs](https://github.com/isaacs)) - -## v6.11.0 (2019-08-20): - -A few meaty bugfixes, and introducing `peerDependenciesMeta`. - -### FEATURES - -* [`a12341088`](https://github.com/npm/cli/commit/a12341088820c0e7ef6c1c0db3c657f0c2b3943e) - [#224](https://github.com/npm/cli/pull/224) Implements - peerDependenciesMeta ([@arcanis](https://github.com/arcanis)) -* [`2f3b79bba`](https://github.com/npm/cli/commit/2f3b79bbad820fd4a398aa494b19f79b7fd520a1) - [#234](https://github.com/npm/cli/pull/234) add new forbidden 403 error - code ([@claudiahdz](https://github.com/claudiahdz)) - -### BUGFIXES - -* [`24acc9fc8`](https://github.com/npm/cli/commit/24acc9fc89d99d87cc66206c6c6f7cdc82fbf763) - and - [`45772af0d`](https://github.com/npm/cli/commit/45772af0ddca54b658cb2ba2182eec26d0a4729d) - [#217](https://github.com/npm/cli/pull/217) - [npm.community#8863](https://npm.community/t/installing-the-same-module-under-multiple-relative-paths-fails-on-linux/8863) - [npm.community#9327](https://npm.community/t/reinstall-breaks-after-npm-update-to-6-10-2/9327,) - do not descend into directory deps' child modules, fix shrinkwrap files - that inappropriately list child nodes of symlink packages - ([@isaacs](https://github.com/isaacs) and - [@salomvary](https://github.com/salomvary)) -* [`50cfe113d`](https://github.com/npm/cli/commit/50cfe113da5fcc59c1d99b0dcf1050ace45803c7) - [#229](https://github.com/npm/cli/pull/229) fixed typo in semver doc - ([@gall0ws](https://github.com/gall0ws)) -* [`e8fb2a1bd`](https://github.com/npm/cli/commit/e8fb2a1bd9785e0092e9926f4fd65ad431e38452) - [#231](https://github.com/npm/cli/pull/231) Fix spelling mistakes in - CHANGELOG-3.md ([@XhmikosR](https://github.com/XhmikosR)) -* [`769d2e057`](https://github.com/npm/cli/commit/769d2e057daf5a2cbfe0ce86f02550e59825a691) - [npm/uid-number#7](https://github.com/npm/uid-number/issues/7) Better - error on invalid `--user`/`--group` configs. This addresses the issue - when people fail to install binary packages on Docker and other - environments where there is no 'nobody' user. - ([@isaacs](https://github.com/isaacs)) -* [`8b43c9624`](https://github.com/npm/cli/commit/8b43c962498c8e2707527e4fca442d7a4fa51595) - [nodejs/node#28987](https://github.com/nodejs/node/issues/28987) - [npm.community#6032](https://npm.community/t/npm-ci-doesnt-respect-npmrc-variables/6032) - [npm.community#6658](https://npm.community/t/npm-ci-doesnt-fill-anymore-the-process-env-npm-config-cache-variable-on-post-install-scripts/6658) - [npm.community#6069](https://npm.community/t/npm-ci-does-not-compile-native-dependencies-according-to-npmrc-configuration/6069) - [npm.community#9323](https://npm.community/t/npm-6-9-x-not-passing-environment-to-node-gyp-regression-from-6-4-x/9323/2) - Fix the regression where random config values in a .npmrc file are not - passed to lifecycle scripts, breaking build processes which rely on them. - ([@isaacs](https://github.com/isaacs)) -* [`8b85eaa47`](https://github.com/npm/cli/commit/8b85eaa47da3abaacc90fe23162a68cc6e1f0404) - save files with inferred ownership rather than relying on `SUDO_UID` and - `SUDO_GID`. ([@isaacs](https://github.com/isaacs)) -* [`b7f6e5f02`](https://github.com/npm/cli/commit/b7f6e5f0285515087b4614d81db17206524c0fdb) - Infer ownership of shrinkwrap files - ([@isaacs](https://github.com/isaacs)) -* [`54b095d77`](https://github.com/npm/cli/commit/54b095d77b3b131622b3cf4cb5c689aa2dd10b6b) - [#235](https://github.com/npm/cli/pull/235) Add spec to dist-tag remove - function ([@theberbie](https://github.com/theberbie)) - -### DEPENDENCIES - -* [`dc8f9e52f`](https://github.com/npm/cli/commit/dc8f9e52f0bb107c0a6b20cc0c97cbc3b056c1b3) - `pacote@9.5.7`: Infer the ownership of all unpacked files in - `node_modules`, so that we never have user-owned files in root-owned - folders, or root-owned files in user-owned folders. - ([@isaacs](https://github.com/isaacs)) -* [`bb33940c3`](https://github.com/npm/cli/commit/bb33940c32aad61704084e61ebd1bd8e7cacccc8) - `cmd-shim@3.0.0`: - * [`9c93ac3`](https://github.com/npm/cmd-shim/commit/9c93ac39e95b0d6ae852e842e4c5dba5e19687c2) - [#2](https://github.com/npm/cmd-shim/pull/2) - [npm#3380](https://github.com/npm/npm/issues/3380) Handle environment - variables properly ([@basbossink](https://github.com/basbossink)) - * [`2d277f8`](https://github.com/npm/cmd-shim/commit/2d277f8e84d45401747b0b9470058f168b974ad5) - [#25](https://github.com/npm/cmd-shim/pull/25) - [#36](https://github.com/npm/cmd-shim/pull/36) - [#35](https://github.com/npm/cmd-shim/pull/35) Fix 'no shebang' case by - always providing `$basedir` in shell script - ([@igorklopov](https://github.com/igorklopov)) - * [`adaf20b`](https://github.com/npm/cmd-shim/commit/adaf20b7fa2c09c2111a2506c6a3e53ed0831f88) - [#26](https://github.com/npm/cmd-shim/pull/26) Fix `$*` causing an - error when arguments contain parentheses - ([@satazor](https://github.com/satazor)) - * [`49f0c13`](https://github.com/npm/cmd-shim/commit/49f0c1318fd384e0031c3fd43801f0e22e1e555f) - [#30](https://github.com/npm/cmd-shim/pull/30) Fix paths for MSYS/MINGW - bash ([@dscho](https://github.com/dscho)) - * [`51a8af3`](https://github.com/npm/cmd-shim/commit/51a8af30990cb072cb30d67fc1b564b14746bba9) - [#34](https://github.com/npm/cmd-shim/pull/34) Add proper support for - PowerShell ([@ExE-Boss](https://github.com/ExE-Boss)) - * [`4c37e04`](https://github.com/npm/cmd-shim/commit/4c37e048dee672237e8962fdffca28e20e9f976d) - [#10](https://github.com/npm/cmd-shim/issues/10) Work around quoted - batch file names ([@isaacs](https://github.com/isaacs)) -* [`a4e279544`](https://github.com/npm/cli/commit/a4e279544f7983e0adff1e475e3760f1ea85825a) - `npm-lifecycle@3.1.3` ([@isaacs](https://github.com/isaacs)): - * fail properly if `uid-number` raises an error -* [`7086a1809`](https://github.com/npm/cli/commit/7086a1809bbfda9be81344b3949c7d3ac687ffc4) - `libcipm@4.0.3` ([@isaacs](https://github.com/isaacs)) -* [`8845141f9`](https://github.com/npm/cli/commit/8845141f9d7827dae572c8cf26f2c775db905bd3) - `read-package-json@2.1.0` ([@isaacs](https://github.com/isaacs)) -* [`51c028215`](https://github.com/npm/cli/commit/51c02821575d80035ebe853492d110db11a7d1b9) - `bin-links@1.1.3` ([@isaacs](https://github.com/isaacs)) -* [`534a5548c`](https://github.com/npm/cli/commit/534a5548c9ebd59f0dd90e9ccca148ed8946efa6) - `read-cmd-shim@1.0.3` ([@isaacs](https://github.com/isaacs)) -* [`3038f2fd5`](https://github.com/npm/cli/commit/3038f2fd5b1d7dd886ee72798241d8943690f508) - `gentle-fs@2.2.1` ([@isaacs](https://github.com/isaacs)) -* [`a609a1648`](https://github.com/npm/cli/commit/a609a16489f76791697d270b499fd4949ab1f8c3) - `graceful-fs@4.2.2` ([@isaacs](https://github.com/isaacs)) -* [`f0346f754`](https://github.com/npm/cli/commit/f0346f75490619a81b310bfc18646ae5ae2e0ea4) - `cacache@12.0.3` ([@isaacs](https://github.com/isaacs)) -* [`ca9c615c8`](https://github.com/npm/cli/commit/ca9c615c8cff5c7db125735eb09f84d912d18694) - `npm-pick-manifest@3.0.0` ([@isaacs](https://github.com/isaacs)) -* [`b417affbf`](https://github.com/npm/cli/commit/b417affbf7133dc7687fd809e4956a43eae3438a) - `pacote@9.5.8` ([@isaacs](https://github.com/isaacs)) - -### TESTS - -* [`b6df0913c`](https://github.com/npm/cli/commit/b6df0913ca73246f1fa6cfa0e81e34ba5f2b6204) - [#228](https://github.com/npm/cli/pull/228) Proper handing of - /usr/bin/node lifecycle-path test - ([@olivr70](https://github.com/olivr70)) -* [`aaf98e88c`](https://github.com/npm/cli/commit/aaf98e88c78fd6c850d0a3d3ee2f61c02f63bc8c) - `npm-registry-mock@1.3.0` ([@isaacs](https://github.com/isaacs)) - -## v6.10.3 (2019-08-06): - -### BUGFIXES - -* [`27cccfbda`](https://github.com/npm/cli/commit/27cccfbdac8526cc807b07f416355949b1372a9b) - [#223](https://github.com/npm/cli/pull/223) vulns → vulnerabilities in - npm audit output ([@sapegin](https://github.com/sapegin)) -* [`d5e865eb7`](https://github.com/npm/cli/commit/d5e865eb79329665a927cc2767b4395c03045dbb) - [#222](https://github.com/npm/cli/pull/222) - [#226](https://github.com/npm/cli/pull/226) install, doctor: don't crash - if registry unset ([@dmitrydvorkin](https://github.com/dmitrydvorkin), - [@isaacs](https://github.com/isaacs)) -* [`5b3890226`](https://github.com/npm/cli/commit/5b389022652abeb0e1c278a152550eb95bc6c452) - [#227](https://github.com/npm/cli/pull/227) - [npm.community#9167](https://npm.community/t/npm-err-cb-never-called-permission-denied/9167/5) - Handle unhandledRejections, tell user what to do when encountering an - `EACCES` error in the cache. ([@isaacs](https://github.com/isaacs)) - -### DEPENDENCIES - -* [`77516df6e`](https://github.com/npm/cli/commit/77516df6eac94a6d7acb5e9ca06feaa0868d779b) - `licensee@7.0.3` ([@isaacs](https://github.com/isaacs)) -* [`ceb993590`](https://github.com/npm/cli/commit/ceb993590e4e376a9a78264ce7bb4327fbbb37fe) - `query-string@6.8.2` ([@isaacs](https://github.com/isaacs)) -* [`4050b9189`](https://github.com/npm/cli/commit/4050b91898c60e9b22998cf82b70b9b822de592a) - `hosted-git-info@2.8.2` - * [#46](https://github.com/npm/hosted-git-info/issues/46) - [#43](https://github.com/npm/hosted-git-info/issues/43) - [#47](https://github.com/npm/hosted-git-info/pull/47) - [#44](https://github.com/npm/hosted-git-info/pull/44) Add support for - GitLab subgroups ([@mterrel](https://github.com/mterrel), - [@isaacs](https://github.com/isaacs), - [@ybiquitous](https://github.com/ybiquitous)) - * [`3b1d629`](https://github.com/npm/hosted-git-info/commit/3b1d629) - [#48](https://github.com/npm/hosted-git-info/issues/48) fix http - protocol using sshurl by default - ([@fengmk2](https://github.com/fengmk2)) - * [`5d4a8d7`](https://github.com/npm/hosted-git-info/commit/5d4a8d7) - ignore noCommittish on tarball url generation - ([@isaacs](https://github.com/isaacs)) - * [`1692435`](https://github.com/npm/hosted-git-info/commit/1692435) - use gist tarball url that works for anonymous gists - ([@isaacs](https://github.com/isaacs)) - * [`d5cf830`](https://github.com/npm/hosted-git-info/commit/d5cf8309be7af884032616c63ea302ce49dd321c) - Do not allow invalid gist urls ([@isaacs](https://github.com/isaacs)) - * [`e518222`](https://github.com/npm/hosted-git-info/commit/e5182224351183ce619dd5ef00019ae700ed37b7) - Use LRU cache to prevent unbounded memory consumption - ([@iarna](https://github.com/iarna)) - -## v6.10.2 (2019-07-23): - -tl;dr - Fixes several issues with the cache when npm is run as `sudo` on -Unix systems. - -### TESTING - -* [`2a78b96f8`](https://github.com/npm/cli/commit/2a78b96f830bbd834720ccc9eacccc54915ae6f7) - check test cache for root-owned files - ([@isaacs](https://github.com/isaacs)) -* [`108646ebc`](https://github.com/npm/cli/commit/108646ebc12f3eeebaa0a45884c45991a45e57e4) - run sudo tests on Travis-CI ([@isaacs](https://github.com/isaacs)) -* [`cf984e946`](https://github.com/npm/cli/commit/cf984e946f453cbea2fcc7a59608de3f24ab74c3) - set --no-esm tap flag ([@isaacs](https://github.com/isaacs)) -* [`8e0a3100d`](https://github.com/npm/cli/commit/8e0a3100dffb3965bb3dc4240e82980dfadf2f3c) - add script to run tests and leave fixtures for inspection and debugging - ([@isaacs](https://github.com/isaacs)) - -### BUGFIXES - -* [`25f4f73f6`](https://github.com/npm/cli/commit/25f4f73f6dc9744757787c82351120cd1baee5f8) - add a util for writing arbitrary files to cache This prevents metrics - timing and debug logs from becoming root-owned. - ([@isaacs](https://github.com/isaacs)) -* [`2c61ce65d`](https://github.com/npm/cli/commit/2c61ce65d6b67100fdf3fcb9729055b669cb1a1d) - infer cache owner from parent dir in `correct-mkdir` util - ([@isaacs](https://github.com/isaacs)) -* [`235e5d6df`](https://github.com/npm/cli/commit/235e5d6df6f427585ec58425f1f3339d08f39d8a) - ensure correct owner on cached all-packages metadata - ([@isaacs](https://github.com/isaacs)) -* [`e2d377bb6`](https://github.com/npm/cli/commit/e2d377bb6419d8a3c1d80a73dba46062b4dad336) - [npm.community#8540](https://npm.community/t/npm-audit-fails-with-child-requires-fails-because-requires-must-be-an-object/8540) - audit: report server error on failure - ([@isaacs](https://github.com/isaacs)) -* [`52576a39e`](https://github.com/npm/cli/commit/52576a39ed75d94c46bb2c482fd38d2c6ea61c56) - [#216](https://github.com/npm/cli/pull/216) - [npm.community#5385](https://npm.community/t/6-8-0-npm-ci-fails-with-local-dependency/5385) - [npm.community#6076](https://npm.community/t/npm-ci-fail-to-local-packages/6076) - Fix `npm ci` with `file:` dependencies. Partially reverts - [#40](https://github.com/npm/cli/pull/40)/[#86](https://github.com/npm/cli/pull/86), - recording dependencies of linked deps in order for `npm ci` to work. - ([@jfirebaugh](https://github.com/jfirebaugh)) - -### DEPENDENCIES - -* [`0fefdee13`](https://github.com/npm/cli/commit/0fefdee130fd7d0dbb240fb9ecb50a793fbf3d29) - `cacache@12.0.2` ([@isaacs](https://github.com/isaacs)) - * infer uid/gid instead of accepting as options, preventing the - overwhelming majority of cases where root-owned files end up in the - cache folder. - ([ac84d14](https://github.com/npm/cacache/commit/ac84d14)) - ([@isaacs](https://github.com/isaacs)) - ([#1](https://github.com/npm/cacache/pull/1)) - * **i18n:** add another error message - ([676cb32](https://github.com/npm/cacache/commit/676cb32)) - ([@zkat](https://github.com/zkat)) -* [`e1d87a392`](https://github.com/npm/cli/commit/e1d87a392371a070b0788ab7bfc62be18b21e9ad) - `pacote@9.5.4` ([@isaacs](https://github.com/isaacs)) - * git: ensure stream failures are reported - ([7f07b5d](https://github.com/npm/pacote/commit/7f07b5d)) - [#1](https://github.com/npm/pacote/issues/1) - ([@lddubeau](https://github.com/lddubeau)) -* [`3f035bf09`](https://github.com/npm/cli/commit/3f035bf098e2feea76574cec18b04812659aa16d) - `infer-owner@1.0.4` ([@isaacs](https://github.com/isaacs)) -* [`ba3283112`](https://github.com/npm/cli/commit/ba32831126591d2f6f48e31a4a2329b533b1ff19) - `npm-registry-fetch@4.0.0` ([@isaacs](https://github.com/isaacs)) -* [`ee90c334d`](https://github.com/npm/cli/commit/ee90c334d271383d0325af42f20f80f34cb61f07) - `libnpm@3.0.1` ([@isaacs](https://github.com/isaacs)) -* [`1e480c384`](https://github.com/npm/cli/commit/1e480c38416982ae28b5cdd48c698ca59d3c0395) - `libnpmaccess@3.0.2` ([@isaacs](https://github.com/isaacs)) -* [`7662ee850`](https://github.com/npm/cli/commit/7662ee850220c71ecaec639adbc7715286f0d28b) - `libnpmhook@5.0.3` ([@isaacs](https://github.com/isaacs)) -* [`1357fadc6`](https://github.com/npm/cli/commit/1357fadc613d0bfeb40f9a8f3ecace2face2fe2c) - `libnpmorg@1.0.1` ([@isaacs](https://github.com/isaacs)) -* [`a621b5cb6`](https://github.com/npm/cli/commit/a621b5cb6c881f95a11af86a8051754a67ae017c) - `libnpmsearch@2.0.2` ([@isaacs](https://github.com/isaacs)) -* [`560cd31dd`](https://github.com/npm/cli/commit/560cd31dd51b6aa2e396ccdd7289fab0a50b5608) - `libnpmteam@1.0.2` ([@isaacs](https://github.com/isaacs)) -* [`de7ae0867`](https://github.com/npm/cli/commit/de7ae0867d4c0180edc283457ce0b4e8e5eee554) - `npm-profile@4.0.2` ([@isaacs](https://github.com/isaacs)) -* [`e95da463c`](https://github.com/npm/cli/commit/e95da463cb7a325457ef411a569d7ef4bf76901d) - `libnpm@3.0.1` ([@isaacs](https://github.com/isaacs)) -* [`554b641d4`](https://github.com/npm/cli/commit/554b641d49d135ae8d137e83aa288897c32dacc6) - `npm-registry-fetch@4.0.0` ([@isaacs](https://github.com/isaacs)) -* [`06772f34a`](https://github.com/npm/cli/commit/06772f34ab851440dcd78574736936c674a84aed) - `node-gyp@5.0.3` ([@isaacs](https://github.com/isaacs)) -* [`85358db80`](https://github.com/npm/cli/commit/85358db80d6ccb5f7bc9a0b4d558ac6dd2468394) - `npm-lifecycle@3.1.2` ([@isaacs](https://github.com/isaacs)) - * [`051cf20`](https://github.com/npm/npm-lifecycle/commit/051cf20072a01839c17920d2e841756251c4f924) - [#26](https://github.com/npm/npm-lifecycle/pull/26) fix switches for - alternative shells on Windows - ([@gucong3000](https://github.com/gucong3000)) - * [`3aaf954`](https://github.com/npm/npm-lifecycle/commit/3aaf95435965e8f7acfd955582cf85237afd2c9b) - [#25](https://github.com/npm/npm-lifecycle/pull/25) set only one PATH - env variable for child process on Windows - ([@zkochan](https://github.com/zkochan)) - * [`ea18ed2`](https://github.com/npm/npm-lifecycle/commit/ea18ed2b754ca7f11998cad70d88e9004c5bef4a) - [#36](https://github.com/npm/npm-lifecycle/pull/36) - [#11](https://github.com/npm/npm-lifecycle/issue/11) - [#18](https://github.com/npm/npm-lifecycle/issue/18) remove - procInterrupt listener on SIGINT in procError - ([@mattshin](https://github.com/mattshin)) - * [`5523951`](https://github.com/npm/npm-lifecycle/commit/55239519c57b82521605622e6c71640a31ed4586) - [#29](https://github.com/npm/npm-lifecycle/issue/29) - [#30](https://github.com/npm/npm-lifecycle/pull/30) Use platform - specific path casing if present - ([@mattezell](https://github.com/mattezell)) - -## v6.10.1 (2019-07-11): - -### BUGFIXES - -* [`3cbd57712`](https://github.com/npm/cli/commit/3cbd577120a9da6e51bb8b13534d1bf71ea5712c) - fix(git): strip GIT environs when running git - ([@isaacs](https://github.com/isaacs)) -* [`a81a8c4c4`](https://github.com/npm/cli/commit/a81a8c4c466f510215a51cef1bb08544d11844fe) - [#206](https://github.com/npm/cli/pull/206) improve isOnly(Dev,Optional) - ([@larsgw](https://github.com/larsgw)) -* [`172f9aca6`](https://github.com/npm/cli/commit/172f9aca67a66ee303c17f90a994cd52fc66552a) - [#179](https://github.com/npm/cli/pull/179) fix-xmas-underline - ([@raywu0123](https://github.com/raywu0123)) -* [`f52673fc7`](https://github.com/npm/cli/commit/f52673fc7284e58af8c04533e82b76bf7add72cf) - [#212](https://github.com/npm/cli/pull/212) build: use `/usr/bin/env` to - load bash ([@rsmarples](https://github.com/rsmarples)) - -### DEPENDENCIES - -* [`ef4445ad3`](https://github.com/npm/cli/commit/ef4445ad34a53b5639499c8e3c9752f62ee6f37c) - [#208](https://github.com/npm/cli/pull/208) `node-gyp@5.0.2` - ([@irega](https://github.com/irega)) -* [`c0d611356`](https://github.com/npm/cli/commit/c0d611356f7b23077e97574b01c8886e544db425) - `npm-lifecycle@3.0.0` ([@isaacs](https://github.com/isaacs)) -* [`7716ba972`](https://github.com/npm/cli/commit/7716ba9720270d5b780755a5bb1ce79702067f1f) - `libcipm@4.0.0` ([@isaacs](https://github.com/isaacs)) -* [`42d22e837`](https://github.com/npm/cli/commit/42d22e8374c7d303d94e405d7385d94dd2558814) - `libnpm@3.0.0` ([@isaacs](https://github.com/isaacs)) -* [`a2ea7f9ff`](https://github.com/npm/cli/commit/a2ea7f9ff64ae743d05fdbf7d46fb9afafa8aa6f) - `semver@5.7.0` ([@isaacs](https://github.com/isaacs)) -* [`429226a5e`](https://github.com/npm/cli/commit/429226a5e992cd907d4f19bd738037007cf78c1f) - `lru-cache@5.1.1` ([@isaacs](https://github.com/isaacs)) -* [`175670ea6`](https://github.com/npm/cli/commit/175670ea65cca03f8b2e957df3dd4b8b0efd0e1f) - `npm-registry-fetch@3.9.1`: ([@isaacs](https://github.com/isaacs)) -* [`0d0517f7f`](https://github.com/npm/cli/commit/0d0517f7f8c902b5064ac18fb4015b31750ad2b2) - `call-limit@1.1.1` ([@isaacs](https://github.com/isaacs)) -* [`741400429`](https://github.com/npm/cli/commit/74140042917ea241062a812ceb65c5423c2bafa9) - `glob@7.1.4` ([@isaacs](https://github.com/isaacs)) -* [`bddd60e30`](https://github.com/npm/cli/commit/bddd60e302283a4a70d35f8f742e42bd13f4dabf) - `inherits@2.0.4` ([@isaacs](https://github.com/isaacs)) -* [`4acf03fd1`](https://github.com/npm/cli/commit/4acf03fd140ed3ddb2dcf3fdc9756bc3f5a8bcbb) - `libnpmsearch@2.0.1` ([@isaacs](https://github.com/isaacs)) -* [`c2bd17291`](https://github.com/npm/cli/commit/c2bd17291a86bea7ced2fbd07d66d013bd7a7560) - `marked@0.6.3` ([@isaacs](https://github.com/isaacs)) -* [`7f0221bb1`](https://github.com/npm/cli/commit/7f0221bb1bb41ffc933c785940e227feae38c80c) - `marked-man@0.6.0` ([@isaacs](https://github.com/isaacs)) -* [`f458fe7dd`](https://github.com/npm/cli/commit/f458fe7dd3bebddf603aaae183a424ea8aaa018f) - `npm-lifecycle@2.1.1` ([@isaacs](https://github.com/isaacs)) -* [`009752978`](https://github.com/npm/cli/commit/0097529780269c28444f1efa0d7c131d47a933eb) - `node-gyp@4.0.0` ([@isaacs](https://github.com/isaacs)) -* [`0fa2bb438`](https://github.com/npm/cli/commit/0fa2bb4386379d6e9d8c95db08662ec0529964f9) - `query-string@6.8.1` ([@isaacs](https://github.com/isaacs)) -* [`b86450929`](https://github.com/npm/cli/commit/b86450929796950a1fe4b1f9b02b1634c812f3bb) - `tar-stream@2.1.0` ([@isaacs](https://github.com/isaacs)) -* [`25db00fe9`](https://github.com/npm/cli/commit/25db00fe953453198adb9e1bd71d1bc2a9f04aaa) - `worker-farm@1.7.0` ([@isaacs](https://github.com/isaacs)) -* [`8dfbe8610`](https://github.com/npm/cli/commit/8dfbe861085dfa8fa56bb504b4a00fba04c34f9d) - `readable-stream@3.4.0` ([@isaacs](https://github.com/isaacs)) -* [`f6164d5dd`](https://github.com/npm/cli/commit/f6164d5ddd072eabdf2237f1694a31efd746eb1d) - [isaacs/chownr#21](https://github.com/isaacs/chownr/pull/21) - [isaacs/chownr#20](https://github.com/isaacs/chownr/issues/20) - [npm.community#7901](https://npm.community/t/7901/) - [npm.community#8203](https://npm.community/t/8203) `chownr@1.1.2` This - fixes an EISDIR error from cacache on Darwin in Node versions prior to - 10.6. ([@isaacs](https://github.com/isaacs)) - -## v6.10.0 (2019-07-03): - -### FEATURES - -* [`87fef4e35`](https://github.com/npm/cli/commit/87fef4e35) - [#176](https://github.com/npm/cli/pull/176) fix: Always return JSON for - outdated --json ([@sreeramjayan](https://github.com/sreeramjayan)) -* [`f101d44fc`](https://github.com/npm/cli/commit/f101d44fc) - [#203](https://github.com/npm/cli/pull/203) fix(unpublish): add space - after hyphen ([@ffflorian](https://github.com/ffflorian)) -* [`a4475de4c`](https://github.com/npm/cli/commit/a4475de4c) - [#202](https://github.com/npm/cli/pull/202) enable production flag for - npm audit ([@CalebCourier](https://github.com/CalebCourier)) -* [`d192904d0`](https://github.com/npm/cli/commit/d192904d0) - [#178](https://github.com/npm/cli/pull/178) fix: Return a value for - `view` when in silent mode - ([@stayradiated](https://github.com/stayradiated)) -* [`39d473adf`](https://github.com/npm/cli/commit/39d473adf) - [#185](https://github.com/npm/cli/pull/185) Allow git to follow global - tagsign config ([@junderw](https://github.com/junderw)) - -### BUGFIXES - -* [`d9238af0b`](https://github.com/npm/cli/commit/d9238af0b) - [#201](https://github.com/npm/cli/pull/163) - [npm/npm#17858](https://github.com/npm/npm/issues/17858) - [npm/npm#18042](https://github.com/npm/npm/issues/18042) - [npm.community#644](https://npm.community/t/644) do not crash when - removing nameless packages - ([@SteveVanOpstal](https://github.com/SteveVanOpstal) and - [@isaacs](https://github.com/isaacs)) -* [`4bec4f111`](https://github.com/npm/cli/commit/4bec4f111) - [#200](https://github.com/npm/cli/pull/200) Check for `node` (as well as - `node.exe`) in npm's local dir on Windows - ([@rgoulais](https://github.com/rgoulais)) -* [`ce93dab2d`](https://github.com/npm/cli/commit/ce93dab2db423ef23b3e08a0612dafbeb2d25789) - [#180](https://github.com/npm/cli/pull/180) - [npm.community#6187](https://npm.community/t/6187) Fix handling of - `remote` deps in `npm outdated` ([@larsgw](https://github.com/larsgw)) - -### TESTING - -* [`a823f3084`](https://github.com/npm/cli/commit/a823f3084) travis: Update - to include new v12 LTS ([@isaacs](https://github.com/isaacs)) -* [`33e2d1dac`](https://github.com/npm/cli/commit/33e2d1dac) fix flaky - debug-logs test ([@isaacs](https://github.com/isaacs)) -* [`e9411c6cd`](https://github.com/npm/cli/commit/e9411c6cd) Don't time out - waiting for gpg user input ([@isaacs](https://github.com/isaacs)) -* [`d2d301704`](https://github.com/npm/cli/commit/d2d301704) - [#195](https://github.com/npm/cli/pull/195) Add the arm64 check for - legacy-platform-all.js test case. - ([@ossdev07](https://github.com/ossdev07)) -* [`a4dc34243`](https://github.com/npm/cli/commit/a4dc34243) parallel tests - ([@isaacs](https://github.com/isaacs)) - -### DOCUMENTATION - -* [`f5857e263`](https://github.com/npm/cli/commit/f5857e263) - [#192](https://github.com/npm/cli/pull/192) Clarify usage of - bundledDependencies - ([@john-osullivan](https://github.com/john-osullivan)) -* [`747fdaf66`](https://github.com/npm/cli/commit/747fdaf66) - [#159](https://github.com/npm/cli/pull/159) doc: add --audit-level param - ([@ngraef](https://github.com/ngraef)) - -### DEPENDENCIES - -* [`e36b3c320`](https://github.com/npm/cli/commit/e36b3c320) - graceful-fs@4.2.0 ([@isaacs](https://github.com/isaacs)) -* [`6bb935c09`](https://github.com/npm/cli/commit/6bb935c09) - read-package-tree@5.3.1 ([@isaacs](https://github.com/isaacs)) - * [`e9cd536`](https://github.com/npm/read-package-tree/commit/e9cd536) - Use custom caching `realpath` implementation, dramatically reducing - `lstat` calls when reading the package tree - ([@isaacs](https://github.com/isaacs)) -* [`39538b460`](https://github.com/npm/cli/commit/39538b460) - write-file-atomic@2.4.3 ([@isaacs](https://github.com/isaacs)) - * [`f8b1552`](https://github.com/npm/write-file-atomic/commit/f8b1552) - [#38](https://github.com/npm/write-file-atomic/pull/38) Ignore errors - raised by `fs.closeSync` ([@lukeapage](https://github.com/lukeapage)) -* [`042193069`](https://github.com/npm/cli/commit/042193069) pacote@9.5.1 - ([@isaacs](https://github.com/isaacs)) - * [`8bbd051`](https://github.com/npm/pacote/commit/8bbd051) - [#172](https://github.com/zkat/pacote/pull/172) limit git retry - times, avoid unlimited retries ([小秦](https://github.com/xqin)) - * [`92f5e4c`](https://github.com/npm/pacote/commit/92f5e4c) - [#170](https://github.com/zkat/pacote/pull/170) fix(errors): Fix - "TypeError: err.code.match is not a function" error - ([@jviotti](https://github.com/jviotti)) -* [`8bd8e909f`](https://github.com/npm/cli/commit/8bd8e909f) cacache@11.3.3 - ([@isaacs](https://github.com/isaacs)) - * [`47de8f5`](https://github.com/npm/cacache/commit/47de8f5) - [#146](https://github.com/zkat/cacache/pull/146) - [npm.community#2395](https://npm.community/t/2395) fix(config): Add - ssri config 'error' option ([@larsgw](https://github.com/larsgw)) - * [`5156561`](https://github.com/npm/cacache/commit/5156561) - fix(write): avoid a `cb never called` situation - ([@zkat](https://github.com/zkat)) - * [`90f40f0`](https://github.com/npm/cacache/commit/90f40f0) - [#166](https://github.com/zkat/cacache/pull/166) - [#165](https://github.com/zkat/cacache/issues/165) docs: Fix docs for - `path` property in get.info - ([@hdgarrood](https://github.com/hdgarrood)) -* [`bf61c45c6`](https://github.com/npm/cli/commit/bf61c45c6) bluebird@3.5.5 - ([@isaacs](https://github.com/isaacs)) -* [`f75d46a9d`](https://github.com/npm/cli/commit/f75d46a9d) tar@4.4.10 - ([@isaacs](https://github.com/isaacs)) - * [`c80341a`](https://github.com/npm/node-tar/commit/c80341a) - [#215](https://github.com/npm/node-tar/pull/215) Fix - encoding/decoding of base-256 numbers - ([@justfalter](https://github.com/justfalter)) - * [`77522f0`](https://github.com/npm/node-tar/commit/77522f0) - [#204](https://github.com/npm/node-tar/issues/204) - [#214](https://github.com/npm/node-tar/issues/214) Use `stat` instead - of `lstat` when checking CWD ([@stkb](https://github.com/stkb)) -* [`ec6236210`](https://github.com/npm/cli/commit/ec6236210) - npm-packlist@1.4.4 ([@isaacs](https://github.com/isaacs)) - * [`63d1e3e`](https://github.com/npm/npm-packlist/commit/63d1e3e) - [#30](https://github.com/npm/npm-packlist/issues/30) Sort package - tarball entries by file type for compression benefits - ([@isaacs](https://github.com/isaacs)) - * [`7fcd045`](https://github.com/npm/npm-packlist/commit/7fcd045) - Ignore `.DS_Store` files as well as folders - ([@isaacs](https://github.com/isaacs)) - * [`68b7c96`](https://github.com/npm/npm-packlist/commit/68b7c96) Never - include .git folders in package root. (Note: this prevents the issue - that broke the v6.9.1 release.) - ([@isaacs](https://github.com/isaacs)) -* [`57bef61bc`](https://github.com/npm/cli/commit/57bef61bc) update fstream - in node-gyp ([@isaacs](https://github.com/isaacs)) - * Addresses [security advisory - #886](https://www.npmjs.com/advisories/886) -* [`acbbf7eee`](https://github.com/npm/cli/commit/acbbf7eee) - [#183](https://github.com/npm/cli/pull/183) licensee@7.0.2 - ([@kemitchell](https://github.com/kemitchell)) -* [`011ae67f0`](https://github.com/npm/cli/commit/011ae67f0) - readable-stream@3.3.0 ([@isaacs](https://github.com/isaacs)) -* [`f5e884909`](https://github.com/npm/cli/commit/f5e884909) - npm-registry-mock@1.2.1 ([@isaacs](https://github.com/isaacs)) -* [`b57d07e35`](https://github.com/npm/cli/commit/b57d07e35) - npm-registry-couchapp@2.7.2 ([@isaacs](https://github.com/isaacs)) - -## v6.9.2 (2019-06-27): - -This release is identical to v6.9.1, but we had to publish a new version -due to [a .git directory in the release](https://npm.community/t/8454). - -## v6.9.1 (2019-06-26): - -### BUGFIXES - -* [`6b1a9da0e`](https://github.com/npm/cli/commit/6b1a9da0e0f5c295cdaf4dea4b73bd221d778611) - [#165](https://github.com/npm/cli/pull/165) - Update `knownBroken` version. - ([@ljharb](https://github.com/ljharb)) -* [`d07547154`](https://github.com/npm/cli/commit/d07547154eb8a88aa4fde8a37e128e1e3272adc1) - [npm.community#5929](https://npm.community/t/npm-outdated-throw-an-error-cannot-read-property-length-of-undefined/5929) - Fix `outdated` rendering for global dependencies. - ([@zkat](https://github.com/zkat)) -* [`e4a1f1745`](https://github.com/npm/cli/commit/e4a1f174514a57580fd5e0fa33eee0f42bba77fc) - [npm.community#6259](https://npm.community/t/npm-token-create-doesnt-work-in-6-6-0-6-9-0/6259) - Fix OTP for token create and remove. - ([@zkat](https://github.com/zkat)) - -### DEPENDENCIES - -* [`a163a9c35`](https://github.com/npm/cli/commit/a163a9c35f6f341de343562368056258bba5d7dc) - `sha@3.0.0` - ([@aeschright](https://github.com/aeschright)) -* [`47b08b3b9`](https://github.com/npm/cli/commit/47b08b3b9860438b416efb438e975a628ec2eed5) - `query-string@6.4.0` - ([@aeschright](https://github.com/aeschright)) -* [`d6a956cff`](https://github.com/npm/cli/commit/d6a956cff6357e6de431848e578c391768685a64) - `readable-stream@3.2.0` - ([@aeschright](https://github.com/aeschright)) -* [`10b8bed2b`](https://github.com/npm/cli/commit/10b8bed2bb0afac5451164e87f25924cc1ac6f2e) - `tacks@1.3.0` - ([@aeschright](https://github.com/aeschright)) -* [`e7483704d`](https://github.com/npm/cli/commit/e7483704dda1acffc8c6b8c165c14c8a7512f3c8) - `tap@12.6.0` - ([@aeschright](https://github.com/aeschright)) -* [`3242fe698`](https://github.com/npm/cli/commit/3242fe698ead46a9cda94e1a4d489cd84a85d7e3) - `tar-stream@2.0.1` - ([@aeschright](https://github.com/aeschright)) - -## v6.9.0 (2019-02-20): - -### FEATURES - -* [`2ba3a0f67`](https://github.com/npm/cli/commit/2ba3a0f6721f6d5a16775aebce6012965634fc7c) - [#90](https://github.com/npm/cli/pull/90) - Time traveling installs using the `--before` flag. - ([@zkat](https://github.com/zkat)) -* [`b7b54f2d1`](https://github.com/npm/cli/commit/b7b54f2d18e2d8d65ec67c850b21ae9f01c60e7e) - [#3](https://github.com/npm/cli/pull/3) - Add support for package aliases. This allows packages to be installed under a - different directory than the package name listed in `package.json`, and adds a - new dependency type to allow this to be done for registry dependencies. - ([@zkat](https://github.com/zkat)) -* [`684bccf06`](https://github.com/npm/cli/commit/684bccf061dfc97bb759121bc0ad635e01c65868) - [#146](https://github.com/npm/cli/pull/146) - Always save `package-lock.json` when using `--package-lock-only`. - ([@aeschright](https://github.com/aeschright)) -* [`b8b8afd40`](https://github.com/npm/cli/commit/b8b8afd4048b4ba1181e00ba2ac49ced43936ce0) - [#139](https://github.com/npm/cli/pull/139) - Make empty-string run-scripts run successfully as a no-op. - ([@vlasy](https://github.com/vlasy)) -* [`8047b19b1`](https://github.com/npm/cli/commit/8047b19b1b994fd4b4e7b5c91d7cc4e0384bd5e4) - [npm.community#3784](https://npm.community/t/3784) - Match git semver ranges when flattening the tree. - ([@larsgw](https://github.com/larsgw)) -* [`e135c2bb3`](https://github.com/npm/cli/commit/e135c2bb360dcf00ecee34a95985afec21ba3655) - [npm.community#1725](https://npm.community/t/1725?u=larsgw) - Re-enable updating local packages. - ([@larsgw](https://github.com/larsgw)) - -### BUGFIXES - -* [`cf09fbaed`](https://github.com/npm/cli/commit/cf09fbaed489d908e9b551382cc5f61bdabe99a9) - [#153](https://github.com/npm/cli/pull/153) - Set modified to undefined in `npm view` when `time` is not available. This - fixes a bug where `npm view` would crash on certain third-party registries. - ([@simonua](https://github.com/simonua)) -* [`774fc26ee`](https://github.com/npm/cli/commit/774fc26eeb01345c11bd8c97e2c4f328d419d9b5) - [#154](https://github.com/npm/cli/pull/154) - Print out tar version in `install.sh` only when the flag is supported not all - the tar implementations support --version flag. This allows the install script - to work in OpenBSD, for example. - ([@agudulin](https://github.com/agudulin)) -* [`863baff11`](https://github.com/npm/cli/commit/863baff11d8c870f1a0d9619bb5133c67d71e407) - [#158](https://github.com/npm/cli/pull/158) - Fix typo in error message for `npm stars`. - ([@phihag](https://github.com/phihag)) -* [`a805a95ad`](https://github.com/npm/cli/commit/a805a95ad8832ef5008671f4bd4c11b83e32e0f2) - [npm.community#4227](https://npm.community/t/4227) - Strip version info from pkg on E404. This improves the error messaging format. - ([@larsgw](https://github.com/larsgw)) - -### DOCS - -* [`5d7633833`](https://github.com/npm/cli/commit/5d76338338621fd0b3d4f7914a51726d27569ee1) - [#160](https://github.com/npm/cli/pull/160) - Add `npm add` as alias to npm install in docs. - ([@ahasall](https://github.com/ahasall)) -* [`489c2211c`](https://github.com/npm/cli/commit/489c2211c96a01d65df50fd57346c785bcc3efe6) - [#162](https://github.com/npm/cli/pull/162) - Fix link to RFC #10 in the changelog. - ([@mansona](https://github.com/mansona)) -* [`433020ead`](https://github.com/npm/cli/commit/433020ead5251b562bc3b0f5f55341a5b8cc9023) - [#135](https://github.com/npm/cli/pull/135) - Describe exit codes in npm-audit docs. - ([@emilis-tm](https://github.com/emilis-tm)) - -### DEPENDENCIES - -* [`ee6b6746b`](https://github.com/npm/cli/commit/ee6b6746b04f145dfe489af2d26667ac32ba0cef) - [zkat/make-fetch-happen#29](https://github.com/zkat/make-fetch-happen/issues/29) - `agent-base@4.2.1` - ([@TooTallNate](https://github.com/TooTallNate)) -* [`2ce23baf5`](https://github.com/npm/cli/commit/2ce23baf53b1ce7d11b8efb80c598ddaf9cef9e7) - `lock-verify@2.1.0`: - Adds support for package aliases - ([@zkat](https://github.com/zkat)) -* [`baaedbc6e`](https://github.com/npm/cli/commit/baaedbc6e2fc370d73b35e7721794719115507cc) - `pacote@9.5.0`: - Adds opts.before support - ([@zkat](https://github.com/zkat)) -* [`57e771a03`](https://github.com/npm/cli/commit/57e771a032165d1e31e71d0ff7530442139c21a6) - [#164](https://github.com/npm/cli/pull/164) - `licensee@6.1.0` - ([@kemitchell](https://github.com/kemitchell)) -* [`2b78288d4`](https://github.com/npm/cli/commit/2b78288d4accd10c1b7cc6c36bc28045f5634d91) - add core to default inclusion tests in pack - ([@Kat Marchán](https://github.com/Kat Marchán)) -* [`9b8b6513f`](https://github.com/npm/cli/commit/9b8b6513fbce92764b32a067322984985ff683fe) - [npm.community#5382](https://npm.community/t/npm-pack-leaving-out-files-6-8-0-only/5382) - `npm-packlist@1.4.1`: Fixes bug where `core/` directories were being suddenly excluded. - ([@zkat](https://github.com/zkat)) - -## v6.8.0 (2019-02-07): - -This release includes an implementation of [RFC #10](https://github.com/npm/rfcs/blob/latest/implemented/0010-monorepo-subdirectory-declaration.md), documenting an optional field that can be used to specify -the directory path for a package within a monorepo. - -### NEW FEATURES - -* [`3663cdef2`](https://github.com/npm/cli/commit/3663cdef205fa9ba2c2830e5ef7ceeb31c30298c) - [#140](https://github.com/npm/cli/pull/140) - Update package.json docs to include repository.directory details. - ([@greysteil](https://github.com/greysteil)) - -### BUGFIXES - -* [`550bf703a`](https://github.com/npm/cli/commit/550bf703ae3e31ba6a300658ae95b6937f67b68f) - Add @types to ignore list to fix git clean -fd. - ([@zkat](https://github.com/zkat)) -* [`cdb059293`](https://github.com/npm/cli/commit/cdb0592939d6256c80f7ec5a2b6251131a512a2a) - [#144](https://github.com/npm/cli/pull/144) - Fix common.npm callback arguments. - ([@larsgw](https://github.com/larsgw)) -* [`25573e9b9`](https://github.com/npm/cli/commit/25573e9b9d5d26261c68d453f06db5b3b1cd6789) - [npm.community#4770](https://npm.community/t/https://npm.community/t/4770) - Show installed but unmet peer deps. - ([@larsgw](https://github.com/larsgw)) -* [`ce2c4bd1a`](https://github.com/npm/cli/commit/ce2c4bd1a2ce7ac1727a4ca9a350b743a2e27b2a) - [#149](https://github.com/npm/cli/pull/149) - Use figgy-config to make sure extra opts are there. - ([@zkat](https://github.com/zkat)) -* [`3c22d1a35`](https://github.com/npm/cli/commit/3c22d1a35878f73c0af8ea5968b962a85a1a9b84) - [npm.community#5101](https://npm.community/t/npm-6-6-0-breaks-access-to-ls-collaborators/5101) - Fix `ls-collaborators` access error for non-scoped case. - ([@zkat](https://github.com/zkat)) -* [`d5137091d`](https://github.com/npm/cli/commit/d5137091dd695a2980f7ade85fdc56b2421ff677) - [npm.community#754](https://npm.community/t/npm-install-for-package-with-local-dependency-fails/754) - Fix issue with sub-folder local references. - ([@iarna](https://github.com/iarna)) - ([@jhecking](https://github.com/jhecking)) - -### DEPENDENCY BUMPS - -* [`d72141080`](https://github.com/npm/cli/commit/d72141080ec8fcf35bcc5650245efbe649de053e) - `npm-registry-couchapp@2.7.1` - ([@zkat](https://github.com/zkat)) -* [`671cad1b1`](https://github.com/npm/cli/commit/671cad1b18239d540da246d6f78de45d9f784396) - `npm-registry-fetch@3.9.0`: - Make sure publishing with legacy username:password `_auth` works again. - ([@zkat](https://github.com/zkat)) -* [`95ca1aef4`](https://github.com/npm/cli/commit/95ca1aef4077c8e68d9f4dce37f6ba49b591c4ca) - `pacote@9.4.1` - ([@aeschright](https://github.com/aeschright)) -* [`322fef403`](https://github.com/npm/cli/commit/322fef40376e71cd100159dc914e7ca89faae327) - `normalize-package-data@2.5.0` - ([@aeschright](https://github.com/aeschright)) -* [`32d34c0da`](https://github.com/npm/cli/commit/32d34c0da4f393a74697297667eb9226155ecc6b) - `npm-packlist@1.3.0` - ([@aeschright](https://github.com/aeschright)) -* [`338571cf0`](https://github.com/npm/cli/commit/338571cf0bd3a1e2ea800464d57581932ff0fb11) - `read-package-tree@5.2.2` - ([@zkat](https://github.com/zkat)) - -### MISC - -* [`89b23a5f7`](https://github.com/npm/cli/commit/89b23a5f7b0ccdcdda1d7d4d3eafb6903156d186) - [#120](https://github.com/npm/cli/pull/120) - Use `const` in lib/fetch-package-metadata.md. - ([@watilde](https://github.com/watilde)) -* [`4970d553c`](https://github.com/npm/cli/commit/4970d553c0ea66128931d118469fd31c87cc7986) - [#126](https://github.com/npm/cli/pull/126) - Replace ronn with marked-man in `.npmignore`. - ([@watilde](https://github.com/watilde)) -* [`d9b6090dc`](https://github.com/npm/cli/commit/d9b6090dc26cd0fded18b4f80248cff3e51bb185) - [#138](https://github.com/npm/cli/pull/138) - Reduce work to test if executable ends with a 'g'. - ([@elidoran](https://github.com/elidoran)) - ([@larsgw](https://github.com/larsgw)) - -## v6.7.0 (2019-01-23): - -Hey y'all! This is a quick hotfix release that includes some important fixes to -`npm@6.6.0` related to the large rewrite/refactor. We're tagging it as a feature -release because the changes involve some minor new features, and semver is -semver, but there's nothing major here. - -### NEW FEATURES - -* [`50463f58b`](https://github.com/npm/cli/commit/50463f58b4b70180a85d6d8c10fcf50d8970ef5e) - Improve usage errors to `npm org` commands and add optional filtering to `npm - org ls` subcommand. - ([@zkat](https://github.com/zkat)) - -### BUGFIXES - -* [`4027070b0`](https://github.com/npm/cli/commit/4027070b03be3bdae2515f2291de89b91f901df9) - Fix default usage printout for `npm org` so you actually see how it's supposed - to be used. - ([@zkat](https://github.com/zkat)) -* [`cfea6ea5b`](https://github.com/npm/cli/commit/cfea6ea5b67ec5e4ec57e3a9cb8c82d018cb5476) - fix default usage message for npm hook - ([@zkat](https://github.com/zkat)) - -### DOCS - -* [`e959e1421`](https://github.com/npm/cli/commit/e959e14217d751ddb295565fd75cc81de1ee0d5b) - Add manpage for `npm org` command. - ([@zkat](https://github.com/zkat)) - -### DEPENDENCY BUMPS - -* [`8543fc357`](https://github.com/npm/cli/commit/8543fc3576f64e91f7946d4c56a5ffb045b55156) - `pacote@9.4.0`: Fall back to "fullfat" packuments on ETARGET errors. This will - make it so that, when a package is published but the corgi follower hasn't - caught up, users can still install a freshly-published package. - ([@zkat](https://github.com/zkat)) -* [`75475043b`](https://github.com/npm/cli/commit/75475043b03a254b2e7db2c04c3f0baea31d8dc5) - [npm.community#4752](https://npm.community/t/npm-6-6-0-broke-authentication-with-npm-registry-couchapp/4752) - `libnpmpublish@1.1.1`: Fixes auth error for username/password legacy authentication. - ([@sreeramjayan](https://github.com/sreeramjayan)) -* [`0af8c00ac`](https://github.com/npm/cli/commit/0af8c00acb01849362ffca25b567cc62447c7175) - [npm.community#4746](https://npm.community/t/npm-6-6-0-release-breaking-docker-npm-ci-commands/4746) - `libcipm@3.0.3`: Fixes issue with "cannot run in wd" errors for run-scripts. - ([@zkat](https://github.com/zkat)) -* [`5a7962e46`](https://github.com/npm/cli/commit/5a7962e46f582c6bd91784b0ddc941ed45e9f802) - `write-file-atomic@2.4.2`: - Fixes issues with leaking `signal-exit` instances and file descriptors. - ([@iarna](https://github.com/iarna)) - -## v6.6.0 (2019-01-17): - -### REFACTORING OUT npm-REGISTRY-CLIENT - -Today is an auspicious day! This release marks the end of a massive internal -refactor to npm that means we finally got rid of the legacy -[`npm-registry-client`](https://npm.im/npm-registry-client) in favor of the -shiny, new, `window.fetch`-like -[`npm-registry-fetch`](https://npm.im/npm-registry-fetch). - -Now, the installer had already done most of this work with the release of -`npm@5`, but it turns out _every other command_ still used the legacy client. -This release updates all of those commands to use the new client, and while -we're at it, adds a few extra goodies: - -* All OTP-requiring commands will now **prompt**. `--otp` is no longer required for `dist-tag`, `access`, et al. -* We're starting to integrate a new config system which will eventually get extracted into a standalone package. -* We now use [`libnpm`](https://npm.im/libnpm) for the API functionality of a lot of our commands! That means you can install a library if you want to write your own tooling around them. -* There's now an `npm org` command for managing users in your org. -* [`pacote`](https://npm.im/pacote) now consumes npm-style configurations, instead of its own naming for various config vars. This will make it easier to load npm configs using `libnpm.config` and hand them directly to `pacote`. - -There's too many commits to list all of them here, so check out the PR if you're -curious about details: - -* [`c5af34c05`](https://github.com/npm/cli/commit/c5af34c05fd569aecd11f18d6d0ddeac3970b253) - [npm-registry-client@REMOVED](https://www.youtube.com/watch\?v\=kPIdRJlzERo) - ([@zkat](https://github.com/zkat)) -* [`4cca9cb90`](https://github.com/npm/cli/commit/4cca9cb9042c0eeb743377e8f1ae1c07733df43f) - [`ad67461dc`](https://github.com/npm/cli/commit/ad67461dc3a73d5ae6569fdbee44c67e1daf86e7) - [`77625f9e2`](https://github.com/npm/cli/commit/77625f9e20d4285b7726b3bf3ebc10cb21c638f0) - [`6e922aefb`](https://github.com/npm/cli/commit/6e922aefbb4634bbd77ed3b143e0765d63afc7f9) - [`584613ea8`](https://github.com/npm/cli/commit/584613ea8ff94b927db4957e5647504b30ca2b1f) - [`64de4ebf0`](https://github.com/npm/cli/commit/64de4ebf019b217179039124c6621e74651e4d27) - [`6cd87d1a9`](https://github.com/npm/cli/commit/6cd87d1a9bb90e795f9891ea4db384435f4a8930) - [`2786834c0`](https://github.com/npm/cli/commit/2786834c0257b8bb1bbb115f1ce7060abaab2e17) - [`514558e09`](https://github.com/npm/cli/commit/514558e094460fd0284a759c13965b685133b3fe) - [`dec07ebe3`](https://github.com/npm/cli/commit/dec07ebe3312245f6421c6e523660be4973ae8c2) - [`084741913`](https://github.com/npm/cli/commit/084741913c4fdb396e589abf3440b4be3aa0b67e) - [`45aff0e02`](https://github.com/npm/cli/commit/45aff0e02251785a85e56eafacf9efaeac6f92ae) - [`846ddcc44`](https://github.com/npm/cli/commit/846ddcc44538f2d9a51ac79405010dfe97fdcdeb) - [`8971ba1b9`](https://github.com/npm/cli/commit/8971ba1b953d4f05ff5094f1822b91526282edd8) - [`99156e081`](https://github.com/npm/cli/commit/99156e081a07516d6c970685bc3d858f89dc4f9c) - [`ab2155306`](https://github.com/npm/cli/commit/ab215530674d7f6123c9572d0ad4ca9e9b5fb184) - [`b37a66542`](https://github.com/npm/cli/commit/b37a66542ca2879069b2acd338b1904de71b7f40) - [`d2af0777a`](https://github.com/npm/cli/commit/d2af0777ac179ff5009dbbf0354a4a84f151b60f) - [`e0b4c6880`](https://github.com/npm/cli/commit/e0b4c6880504fa2e8491c2fbd098efcb2e496849) - [`ff72350b4`](https://github.com/npm/cli/commit/ff72350b4c56d65e4a92671d86a33080bf3c2ea5) - [`6ed943303`](https://github.com/npm/cli/commit/6ed943303ce7a267ddb26aa25caa035f832895dd) - [`90a069e7d`](https://github.com/npm/cli/commit/90a069e7d4646682211f4cabe289c306ee1d5397) - [`b24ed5fdc`](https://github.com/npm/cli/commit/b24ed5fdc3a4395628465ae5273bad54eea274c8) - [`ec9fcc14f`](https://github.com/npm/cli/commit/ec9fcc14f4e0e2f3967e2fd6ad8b8433076393cb) - [`8a56fa39e`](https://github.com/npm/cli/commit/8a56fa39e61136da45565447fe201a57f04ad4cd) - [`41d19e18f`](https://github.com/npm/cli/commit/41d19e18f769c6f0acfdffbdb01d12bf332908ce) - [`125ff9551`](https://github.com/npm/cli/commit/125ff9551595dda9dab2edaef10f4c73ae8e1433) - [`1c3b226ff`](https://github.com/npm/cli/commit/1c3b226ff37159c426e855e83c8f6c361603901d) - [`3c0a7b06b`](https://github.com/npm/cli/commit/3c0a7b06b6473fe068fc8ae8466c07a177975b87) - [`08fcb3f0f`](https://github.com/npm/cli/commit/08fcb3f0f26e025702b35253ed70a527ab69977f) - [`c8135d97a`](https://github.com/npm/cli/commit/c8135d97a424b38363dc4530c45e4583471e9849) - [`ae936f22c`](https://github.com/npm/cli/commit/ae936f22ce80614287f2769e9aaa9a155f03cc15) - [#2](https://github.com/npm/cli/pull/2) - Move rest of commands to `npm-registry-fetch` and use [`figgy-pudding`](https://npm.im/figgy-pudding) for configs. - ([@zkat](https://github.com/zkat)) - -### NEW FEATURES - -* [`02c837e01`](https://github.com/npm/cli/commit/02c837e01a71a26f37cbd5a09be89df8a9ce01da) - [#106](https://github.com/npm/cli/pull/106) - Make `npm dist-tags` the same as `npm dist-tag ls`. - ([@isaacs](https://github.com/isaacs)) -* [`1065a7809`](https://github.com/npm/cli/commit/1065a7809161fd4dc23e96b642019fc842fdacf2) - [#65](https://github.com/npm/cli/pull/65) - Add support for `IBM i`. - ([@dmabupt](https://github.com/dmabupt)) -* [`a22e6f5fc`](https://github.com/npm/cli/commit/a22e6f5fc3e91350d3c64dcc88eabbe0efbca759) - [#131](https://github.com/npm/cli/pull/131) - Update profile to support new npm-profile API. - ([@zkat](https://github.com/zkat)) - -### BUGFIXES - -* [`890a74458`](https://github.com/npm/cli/commit/890a74458dd4a55e2d85f3eba9dbf125affa4206) - [npm.community#3278](https://npm.community/t/3278) - Fix support for passing git binary path config with `--git`. - ([@larsgw](https://github.com/larsgw)) -* [`90e55a143`](https://github.com/npm/cli/commit/90e55a143ed1de8678d65c17bc3c2b103a15ddac) - [npm.community#2713](https://npm.community/t/npx-envinfo-preset-jest-fails-on-windows-with-a-stack-trace/2713) - Check for `npm.config`'s existence in `error-handler.js` to prevent weird - errors when failures happen before config object is loaded. - ([@BeniCheni](https://github.com/BeniCheni)) -* [`134207174`](https://github.com/npm/cli/commit/134207174652e1eb6d7b0f44fd9858a0b6a0cd6c) - [npm.community#2569](https://npm.community/t/2569) - Fix checking for optional dependencies. - ([@larsgw](https://github.com/larsgw)) -* [`7a2f6b05d`](https://github.com/npm/cli/commit/7a2f6b05d27f3bcf47a48230db62e86afa41c9d3) - [npm.community#4172](https://npm.community/t/4172) - Remove tink experiments. - ([@larsgw](https://github.com/larsgw)) -* [`c5b6056b6`](https://github.com/npm/cli/commit/c5b6056b6b35eefb81ae5fb00a5c7681c5318c22) - [#123](https://github.com/npm/cli/pull/123) - Handle git branch references correctly. - ([@johanneswuerbach](https://github.com/johanneswuerbach)) -* [`f58b43ef2`](https://github.com/npm/cli/commit/f58b43ef2c5e3dea2094340a0cf264b2d11a5da4) - [npm.community#3983](https://npm.community/t/npm-audit-error-messaging-update-for-401s/3983) - Report any errors above 400 as potentially not supporting audit. - ([@zkat](https://github.com/zkat)) -* [`a5c9e6f35`](https://github.com/npm/cli/commit/a5c9e6f35a591a6e2d4b6ace5c01bc03f2b75fdc) - [#124](https://github.com/npm/cli/pull/124) - Set default homepage to an empty string. - ([@anchnk](https://github.com/anchnk)) -* [`5d076351d`](https://github.com/npm/cli/commit/5d076351d7ec1d3585942a9289548166a7fbbd4c) - [npm.community#4054](https://npm.community/t/4054) - Fix npm-prefix description. - ([@larsgw](https://github.com/larsgw)) - -### DOCS - -* [`31a7274b7`](https://github.com/npm/cli/commit/31a7274b70de18b24e7bee51daa22cc7cbb6141c) - [#71](https://github.com/npm/cli/pull/71) - Fix typo in npm-token documentation. - ([@GeorgeTaveras1231](https://github.com/GeorgeTaveras1231)) -* [`2401b7592`](https://github.com/npm/cli/commit/2401b7592c6ee114e6db7077ebf8c072b7bfe427) - Correct docs for fake-registry interface. - ([@iarna](https://github.com/iarna)) - -### DEPENDENCIES - -* [`9cefcdc1d`](https://github.com/npm/cli/commit/9cefcdc1d2289b56f9164d14d7e499e115cfeaee) - `npm-registry-fetch@3.8.0` - ([@zkat](https://github.com/zkat)) -* [`1c769c9b3`](https://github.com/npm/cli/commit/1c769c9b3e431d324c1a5b6dd10e1fddb5cb88c7) - `pacote@9.1.0` - ([@zkat](https://github.com/zkat)) -* [`f3bc5539b`](https://github.com/npm/cli/commit/f3bc5539b30446500abcc3873781b2c717f8e22c) - `figgy-pudding@3.5.1` - ([@zkat](https://github.com/zkat)) -* [`bf7199d3c`](https://github.com/npm/cli/commit/bf7199d3cbf50545da1ebd30d28f0a6ed5444a00) - `npm-profile@4.0.1` - ([@zkat](https://github.com/zkat)) -* [`118c50496`](https://github.com/npm/cli/commit/118c50496c01231cab3821ae623be6df89cb0a32) - `semver@5.5.1` - ([@isaacs](https://github.com/isaacs)) -* [`eab4df925`](https://github.com/npm/cli/commit/eab4df9250e9169c694b3f6c287d2932bf5e08fb) - `libcipm@3.0.2` - ([@zkat](https://github.com/zkat)) -* [`b86e51573`](https://github.com/npm/cli/commit/b86e515734faf433dc6c457c36c1de52795aa870) - `libnpm@1.4.0` - ([@zkat](https://github.com/zkat)) -* [`56fffbff2`](https://github.com/npm/cli/commit/56fffbff27fe2fae8bef27d946755789ef0d89bd) - `get-stream@4.1.0` - ([@zkat](https://github.com/zkat)) -* [`df972e948`](https://github.com/npm/cli/commit/df972e94868050b5aa42ac18b527fd929e1de9e4) - npm-profile@REMOVED - ([@zkat](https://github.com/zkat)) -* [`32c73bf0e`](https://github.com/npm/cli/commit/32c73bf0e3f0441d0c7c940292235d4b93aa87e2) - `libnpm@2.0.1` - ([@zkat](https://github.com/zkat)) -* [`569491b80`](https://github.com/npm/cli/commit/569491b8042f939dc13986b6adb2a0a260f95b63) - `licensee@5.0.0` - ([@zkat](https://github.com/zkat)) -* [`a3ba0ccf1`](https://github.com/npm/cli/commit/a3ba0ccf1fa86aec56b1ad49883abf28c1f56b3c) - move rimraf to prod deps - ([@zkat](https://github.com/zkat)) -* [`f63a0d6cf`](https://github.com/npm/cli/commit/f63a0d6cf0b7db3dcc80e72e1383c3df723c8119) - `spdx-license-ids@3.0.3`: - Ref: https://github.com/npm/cli/pull/121 - ([@zkat](https://github.com/zkat)) -* [`f350e714f`](https://github.com/npm/cli/commit/f350e714f66a77f71a7ebe17daeea2ea98179a1a) - `aproba@2.0.0` - ([@aeschright](https://github.com/aeschright)) -* [`a67e4d8b2`](https://github.com/npm/cli/commit/a67e4d8b214e58ede037c3854961acb33fd889da) - `byte-size@5.0.1` - ([@aeschright](https://github.com/aeschright)) -* [`8bea4efa3`](https://github.com/npm/cli/commit/8bea4efa34857c4e547904b3630dd442def241de) - `cacache@11.3.2` - ([@aeschright](https://github.com/aeschright)) -* [`9d4776836`](https://github.com/npm/cli/commit/9d4776836a4eaa4b19701b4e4f00cd64578bf078) - `chownr@1.1.1` - ([@aeschright](https://github.com/aeschright)) -* [`70da139e9`](https://github.com/npm/cli/commit/70da139e97ed1660c216e2d9b3f9cfb986bfd4a4) - `ci-info@2.0.0` - ([@aeschright](https://github.com/aeschright)) -* [`bcdeddcc3`](https://github.com/npm/cli/commit/bcdeddcc3d4dc242f42404223dafe4afdc753b32) - `cli-table3@0.5.1` - ([@aeschright](https://github.com/aeschright)) -* [`63aab82c7`](https://github.com/npm/cli/commit/63aab82c7bfca4f16987cf4156ddebf8d150747c) - `is-cidr@3.0.0` - ([@aeschright](https://github.com/aeschright)) -* [`d522bd90c`](https://github.com/npm/cli/commit/d522bd90c3b0cb08518f249ae5b90bd609fff165) - `JSONStream@1.3.5` - ([@aeschright](https://github.com/aeschright)) -* [`2a59bfc79`](https://github.com/npm/cli/commit/2a59bfc7989bd5575d8cbba912977c6d1ba92567) - `libnpmhook@5.0.2` - ([@aeschright](https://github.com/aeschright)) -* [`66d60e394`](https://github.com/npm/cli/commit/66d60e394e5a96330f90e230505758f19a3643ac) - `marked@0.6.0` - ([@aeschright](https://github.com/aeschright)) -* [`8213def9a`](https://github.com/npm/cli/commit/8213def9aa9b6e702887e4f2ed7654943e1e4154) - `npm-packlist@1.2.0` - ([@aeschright](https://github.com/aeschright)) -* [`e4ffc6a2b`](https://github.com/npm/cli/commit/e4ffc6a2bfb8d0b7047cb6692030484760fc8c91) - `unique-filename@1.1.1` - ([@aeschright](https://github.com/aeschright)) -* [`09a5c2fab`](https://github.com/npm/cli/commit/09a5c2fabe0d1c00ec8c99f328f6d28a3495eb0b) - `semver@5.6.0` - ([@aeschright](https://github.com/aeschright)) -* [`740e79e17`](https://github.com/npm/cli/commit/740e79e17a78247f73349525043c9388ce94459a) - `rimraf@2.6.3` - ([@aeschright](https://github.com/aeschright)) -* [`455476c8d`](https://github.com/npm/cli/commit/455476c8d148ca83a4e030e96e93dcf1c7f0ff5f) - `require-inject@1.4.4` - ([@aeschright](https://github.com/aeschright)) -* [`3f40251c5`](https://github.com/npm/cli/commit/3f40251c5868feaacbcdbcb1360877ce76998f5e) - `npm-pick-manifest@2.2.3` - ([@aeschright](https://github.com/aeschright)) -* [`4ffa8a8e9`](https://github.com/npm/cli/commit/4ffa8a8e9e80e5562898dd76fe5a49f5694f38c8) - `query-string@6.2.0` - ([@aeschright](https://github.com/aeschright)) -* [`a0a0ca9ec`](https://github.com/npm/cli/commit/a0a0ca9ec2a962183d420fa751f4139969760f18) - `pacote@9.3.0` - ([@aeschright](https://github.com/aeschright)) -* [`5777ea8ad`](https://github.com/npm/cli/commit/5777ea8ad2058be3166a6dad2d31d2d393c9f778) - `readable-stream@3.1.1` - ([@aeschright](https://github.com/aeschright)) -* [`887e94386`](https://github.com/npm/cli/commit/887e94386f42cb59a5628e7762b3662d084b23c8) - `lru-cache@4.1.5` - ([@aeschright](https://github.com/aeschright)) -* [`41f15524c`](https://github.com/npm/cli/commit/41f15524c58c59d206c4b1d25ae9e0f22745213b) - Updating semver docs. - ([@aeschright](https://github.com/aeschright)) -* [`fb3bbb72d`](https://github.com/npm/cli/commit/fb3bbb72d448ac37a465b31233b21381917422f3) - `npm-audit-report@1.3.2`: - ([@melkikh](https://github.com/melkikh)) - -### TESTING - -* [`f1edffba9`](https://github.com/npm/cli/commit/f1edffba90ebd96cf88675d2e18ebc48954ba50e) - Modernize maketest script. - ([@iarna](https://github.com/iarna)) -* [`ae263473d`](https://github.com/npm/cli/commit/ae263473d92a896b482830d4019a04b5dbd1e9d7) - maketest: Use promise based example common.npm call. - ([@iarna](https://github.com/iarna)) -* [`d9970da5e`](https://github.com/npm/cli/commit/d9970da5ee97a354eab01cbf16f9101693a15d2d) - maketest: Use newEnv for env production. - ([@iarna](https://github.com/iarna)) - -### MISCELLANEOUS - -* [`c665f35aa`](https://github.com/npm/cli/commit/c665f35aacdb8afdbe35f3dd7ccb62f55ff6b896) - [#119](https://github.com/npm/cli/pull/119) - Replace var with const/let in lib/repo.js. - ([@watilde](https://github.com/watilde)) -* [`46639ba9f`](https://github.com/npm/cli/commit/46639ba9f04ea729502f1af28b02eb67fb6dcb66) - Update package-lock.json for https tarball URLs - ([@aeschright](https://github.com/aeschright)) - -## v6.5.0 (2018-11-28): - -### NEW FEATURES - -* [`fc1a8d185`](https://github.com/npm/cli/commit/fc1a8d185fc678cdf3784d9df9eef9094e0b2dec) - Backronym `npm ci` to `npm clean-install`. - ([@zkat](https://github.com/zkat)) -* [`4be51a9cc`](https://github.com/npm/cli/commit/4be51a9cc65635bb26fa4ce62233f26e0104bc20) - [#81](https://github.com/npm/cli/pull/81) - Adds 'Homepage' to outdated --long output. - ([@jbottigliero](https://github.com/jbottigliero)) - -### BUGFIXES - -* [`89652cb9b`](https://github.com/npm/cli/commit/89652cb9b810f929f5586fc90cc6794d076603fb) - [npm.community#1661](https://npm.community/t/1661) - Fix sign-git-commit options. They were previously totally wrong. - ([@zkat](https://github.com/zkat)) -* [`414f2d1a1`](https://github.com/npm/cli/commit/414f2d1a1bdffc02ed31ebb48a43216f284c21d4) - [npm.community#1742](https://npm.community/t/npm-audit-making-non-rfc-compliant-requests-to-server-resulting-in-400-bad-request-pr-with-fix/1742) - Set lowercase headers for npm audit requests. - ([@maartenba](https://github.com/maartenba)) -* [`a34246baf`](https://github.com/npm/cli/commit/a34246bafe73218dc9e3090df9ee800451db2c7d) - [#75](https://github.com/npm/cli/pull/75) - Fix `npm edit` handling of scoped packages. - ([@larsgw](https://github.com/larsgw)) -* [`d3e8a7c72`](https://github.com/npm/cli/commit/d3e8a7c7240dd25379a5bcad324a367c58733c73) - [npm.community#2303](https://npm.community/t/npm-ci-logs-success-to-stderr/2303) - Make summary output for `npm ci` go to `stdout`, not `stderr`. - ([@alopezsanchez](https://github.com/alopezsanchez)) -* [`71d8fb4a9`](https://github.com/npm/cli/commit/71d8fb4a94d65e1855f6d0c5f2ad2b7c3202e3c4) - [npm.community#1377](https://npm.community/t/unhelpful-error-message-when-publishing-without-logging-in-error-eperm-operation-not-permitted-unlink/1377/3) - Close the file descriptor during publish if exiting upload via an error. This - will prevent strange error messages when the upload fails and make sure - cleanup happens correctly. - ([@macdja38](https://github.com/macdja38)) - -### DOCS UPDATES - -* [`b1a8729c8`](https://github.com/npm/cli/commit/b1a8729c80175243fbbeecd164e9ddd378a09a50) - [#60](https://github.com/npm/cli/pull/60) - Mention --otp flag when prompting for OTP. - ([@bakkot](https://github.com/bakkot)) -* [`bcae4ea81`](https://github.com/npm/cli/commit/bcae4ea8173e489a76cc226bbd30dd9eabe21ec6) - [#64](https://github.com/npm/cli/pull/64) - Clarify that git dependencies use the default branch, not just `master`. - ([@zckrs](https://github.com/zckrs)) -* [`15da82690`](https://github.com/npm/cli/commit/15da8269032bf509ade3252978e934f2a61d4499) - [#72](https://github.com/npm/cli/pull/72) - `bash_completion.d` dir is sometimes found in `/etc` not `/usr/local`. - ([@RobertKielty](https://github.com/RobertKielty)) -* [`8a6ecc793`](https://github.com/npm/cli/commit/8a6ecc7936dae2f51638397ff5a1d35cccda5495) - [#74](https://github.com/npm/cli/pull/74) - Update OTP documentation for `dist-tag add` to clarify `--otp` is needed right - now. - ([@scotttrinh](https://github.com/scotttrinh)) -* [`dcc03ec85`](https://github.com/npm/cli/commit/dcc03ec858bddd7aa2173b5a86b55c1c2385a2a3) - [#82](https://github.com/npm/cli/pull/82) - Note that `prepare` runs when installing git dependencies. - ([@seishun](https://github.com/seishun)) -* [`a91a470b7`](https://github.com/npm/cli/commit/a91a470b71e08ccf6a75d4fb8c9937789fa8d067) - [#83](https://github.com/npm/cli/pull/83) - Specify that --dry-run isn't available in older versions of npm publish. - ([@kjin](https://github.com/kjin)) -* [`1b2fabcce`](https://github.com/npm/cli/commit/1b2fabccede37242233755961434c52536224de5) - [#96](https://github.com/npm/cli/pull/96) - Fix inline code tag issue in docs. - ([@midare](https://github.com/midare)) -* [`6cc70cc19`](https://github.com/npm/cli/commit/6cc70cc1977e58a3e1ea48e660ffc6b46b390e59) - [#68](https://github.com/npm/cli/pull/68) - Add semver link and a note on empty string format to `deprecate` doc. - ([@neverett](https://github.com/neverett)) -* [`61dbbb7c3`](https://github.com/npm/cli/commit/61dbbb7c3474834031bce88c423850047e8131dc) - Fix semver docs after version update. - ([@zkat](https://github.com/zkat)) -* [`4acd45a3d`](https://github.com/npm/cli/commit/4acd45a3d0ce92f9999446226fe7dfb89a90ba2e) - [#78](https://github.com/npm/cli/pull/78) - Correct spelling across various docs. - ([@hugovk](https://github.com/hugovk)) - -### DEPENDENCIES - -* [`4f761283e`](https://github.com/npm/cli/commit/4f761283e8896d0ceb5934779005646463a030e8) - `figgy-pudding@3.5.1` - ([@zkat](https://github.com/zkat)) -* [`3706db0bc`](https://github.com/npm/cli/commit/3706db0bcbc306d167bb902362e7f6962f2fe1a1) - [npm.community#1764](https://npm.community/t/crash-invalid-config-key-requested-error/1764) - `ssri@6.0.1` - ([@zkat](https://github.com/zkat)) -* [`83c2b117d`](https://github.com/npm/cli/commit/83c2b117d0b760d0ea8d667e5e4bdfa6a7a7a8f6) - `bluebird@3.5.2` - ([@petkaantonov](https://github.com/petkaantonov)) -* [`2702f46bd`](https://github.com/npm/cli/commit/2702f46bd7284fb303ca2119d23c52536811d705) - `ci-info@1.5.1` - ([@watson](https://github.com/watson)) -* [`4db6c3898`](https://github.com/npm/cli/commit/4db6c3898b07100e3a324e4aae50c2fab4b93a04) - `config-chain@1.1.1`:2 - ([@dawsbot](https://github.com/dawbot)) -* [`70bee4f69`](https://github.com/npm/cli/commit/70bee4f69bb4ce4e18c48582fe2b48d8b4aba566) - `glob@7.1.3` - ([@isaacs](https://github.com/isaacs)) -* [`e469fd6be`](https://github.com/npm/cli/commit/e469fd6be95333dcaa7cf377ca3620994ca8d0de) - `opener@1.5.1`: - Fix browser opening under Windows Subsystem for Linux (WSL). - ([@thijsputman](https://github.com/thijsputman)) -* [`03840dced`](https://github.com/npm/cli/commit/03840dced865abdca6e6449ea030962e5b19db0c) - `semver@5.5.1` - ([@iarna](https://github.com/iarna)) -* [`161dc0b41`](https://github.com/npm/cli/commit/161dc0b4177e76306a0e3b8660b3b496cc3db83b) - `bluebird@3.5.3` - ([@petkaantonov](https://github.com/petkaantonov)) -* [`bb6f94395`](https://github.com/npm/cli/commit/bb6f94395491576ec42996ff6665df225f6b4377) - `graceful-fs@4.1.1`:5 - ([@isaacs](https://github.com/isaacs)) -* [`43b1f4c91`](https://github.com/npm/cli/commit/43b1f4c91fa1d7b3ebb6aa2d960085e5f3ac7607) - `tar@4.4.8` - ([@isaacs](https://github.com/isaacs)) -* [`ab62afcc4`](https://github.com/npm/cli/commit/ab62afcc472de82c479bf91f560a0bbd6a233c80) - `npm-packlist@1.1.1`:2 - ([@isaacs](https://github.com/isaacs)) -* [`027f06be3`](https://github.com/npm/cli/commit/027f06be35bb09f390e46fcd2b8182539939d1f7) - `ci-info@1.6.0` - ([@watson](https://github.com/watson)) - -### MISCELLANEOUS - -* [`27217dae8`](https://github.com/npm/cli/commit/27217dae8adbc577ee9cb323b7cfe9c6b2493aca) - [#70](https://github.com/npm/cli/pull/70) - Automatically audit dependency licenses for npm itself. - ([@kemitchell](https://github.com/kemitchell)) - -## v6.4.1 (2018-08-22): - -### BUGFIXES - -* [`4bd40f543`](https://github.com/npm/cli/commit/4bd40f543dc89f0721020e7d0bb3497300d74818) - [#42](https://github.com/npm/cli/pull/42) - Prevent blowing up on malformed responses from the `npm audit` endpoint, such - as with third-party registries. - ([@framp](https://github.com/framp)) -* [`0e576f0aa`](https://github.com/npm/cli/commit/0e576f0aa6ea02653d948c10f29102a2d4a31944) - [#46](https://github.com/npm/cli/pull/46) - Fix `NO_PROXY` support by renaming npm-side config to `--noproxy`. The - environment variable should still work. - ([@SneakyFish5](https://github.com/SneakyFish5)) -* [`d8e811d6a`](https://github.com/npm/cli/commit/d8e811d6adf3d87474982cb831c11316ac725605) - [#33](https://github.com/npm/cli/pull/33) - Disable `update-notifier` checks when a CI environment is detected. - ([@Sibiraj-S](https://github.com/Sibiraj-S)) -* [`1bc5b8cea`](https://github.com/npm/cli/commit/1bc5b8ceabc86bfe4777732f25ffef0f3de81bd1) - [#47](https://github.com/npm/cli/pull/47) - Fix issue where `postpack` scripts would break if `pack` was used with - `--dry-run`. - ([@larsgw](https://github.com/larsgw)) - -### DEPENDENCY BUMPS - -* [`4c57316d5`](https://github.com/npm/cli/commit/4c57316d5633e940105fa545b52d8fbfd2eb9f75) - `figgy-pudding@3.4.1` - ([@zkat](https://github.com/zkat)) -* [`85f4d7905`](https://github.com/npm/cli/commit/85f4d79059865d5267f3516b6cdbc746012202c6) - `cacache@11.2.0` - ([@zkat](https://github.com/zkat)) -* [`d20ac242a`](https://github.com/npm/cli/commit/d20ac242aeb44aa3581c65c052802a02d5eb22f3) - `npm-packlist@1.1.11`: - No real changes in npm-packlist, but npm-bundled included a - circular dependency fix, as well as adding a proper LICENSE file. - ([@isaacs](https://github.com/isaacs)) -* [`e8d5f4418`](https://github.com/npm/cli/commit/e8d5f441821553a31fc8cd751670663699d2c8ce) - [npm.community#632](https://npm.community/t/using-npm-ci-does-not-run-prepare-script-for-git-modules/632) - `libcipm@2.0.2`: - Fixes issue where `npm ci` wasn't running the `prepare` lifecycle script when - installing git dependencies - ([@edahlseng](https://github.com/edahlseng)) -* [`a5e6f78e9`](https://github.com/npm/cli/commit/a5e6f78e916873f7d18639ebdb8abd20479615a9) - `JSONStream@1.3.4`: - Fixes memory leak problem when streaming large files (like legacy npm search). - ([@daern91](https://github.com/daern91)) -* [`3b940331d`](https://github.com/npm/cli/commit/3b940331dcccfa67f92366adb7ffd9ecf7673a9a) - [npm.community#1042](https://npm.community/t/3-path-variables-are-assigned-to-child-process-launched-by-npm/1042) - `npm-lifecycle@2.1.0`: - Fixes issue for Windows user where multiple `Path`/`PATH` variables were being - added to the environment and breaking things in all sorts of fun and - interesting ways. - ([@JimiC](https://github.com/JimiC)) -* [`d612d2ce8`](https://github.com/npm/cli/commit/d612d2ce8fab72026f344f125539ecbf3746af9a) - `npm-registry-client@8.6.0` - ([@iarna](https://github.com/iarna)) -* [`1f6ba1cb1`](https://github.com/npm/cli/commit/1f6ba1cb174590c1f5d2b00e2ca238dfa39d507a) - `opener@1.5.0` - ([@domenic](https://github.com/domenic)) -* [`37b8f405f`](https://github.com/npm/cli/commit/37b8f405f35c861b7beeed56f71ad20b0bf87889) - `request@2.88.0` - ([@mikeal](https://github.com/mikeal)) -* [`bb91a2a14`](https://github.com/npm/cli/commit/bb91a2a14562e77769057f1b6d06384be6d6bf7f) - `tacks@1.2.7` - ([@iarna](https://github.com/iarna)) -* [`30bc9900a`](https://github.com/npm/cli/commit/30bc9900ae79c80bf0bdee0ae6372da6f668124c) - `ci-info@1.4.0`: - Adds support for two more CI services - ([@watson](https://github.com/watson)) -* [`1d2fa4ddd`](https://github.com/npm/cli/commit/1d2fa4dddcab8facfee92096cc24b299387f3182) - `marked@0.5.0` - ([@joshbruce](https://github.com/joshbruce)) - -### DOCUMENTATION - -* [`08ecde292`](https://github.com/npm/cli/commit/08ecde2928f8c89a2fdaa800ae845103750b9327) - [#54](https://github.com/npm/cli/pull/54) - Mention registry terms of use in manpage and registry docs and update language - in README for it. - ([@kemitchell](https://github.com/kemitchell)) -* [`de956405d`](https://github.com/npm/cli/commit/de956405d8b72354f98579d00c6dd30ac3b9bddf) - [#41](https://github.com/npm/cli/pull/41) - Add documentation for `--dry-run` in `install` and `pack` docs. - ([@reconbot](https://github.com/reconbot)) -* [`95031b90c`](https://github.com/npm/cli/commit/95031b90ce0b0c4dcd5e4eafc86e3e5bfd59fb3e) - [#48](https://github.com/npm/cli/pull/48) - Update republish time and lightly reorganize republish info. - ([@neverett](https://github.com/neverett)) -* [`767699b68`](https://github.com/npm/cli/commit/767699b6829b8b899d5479445e99b0ffc43ff92d) - [#53](https://github.com/npm/cli/pull/53) - Correct `npm@6.4.0` release date in changelog. - ([@charmander](https://github.com/charmander)) -* [`3fea3166e`](https://github.com/npm/cli/commit/3fea3166eb4f43f574fcfd9ee71a171feea2bc29) - [#55](https://github.com/npm/cli/pull/55) - Align command descriptions in help text. - ([@erik](https://github.com/erik)) - -## v6.4.0 (2018-08-09): - -### NEW FEATURES - -* [`6e9f04b0b`](https://github.com/npm/cli/commit/6e9f04b0baed007169d4e0c341f097cf133debf7) - [npm/cli#8](https://github.com/npm/cli/pull/8) - Search for authentication token defined by environment variables by preventing - the translation layer from env variable to npm option from breaking - `:_authToken`. - ([@mkhl](https://github.com/mkhl)) -* [`84bfd23e7`](https://github.com/npm/cli/commit/84bfd23e7d6434d30595594723a6e1976e84b022) - [npm/cli#35](https://github.com/npm/cli/pull/35) - Stop filtering out non-IPv4 addresses from `local-addrs`, making npm actually - use IPv6 addresses when it must. - ([@valentin2105](https://github.com/valentin2105)) -* [`792c8c709`](https://github.com/npm/cli/commit/792c8c709dc7a445687aa0c8cba5c50bc4ed83fd) - [npm/cli#31](https://github.com/npm/cli/pull/31) - configurable audit level for non-zero exit - `npm audit` currently exits with exit code 1 if any vulnerabilities are found of any level. - Add a flag of `--audit-level` to `npm audit` to allow it to pass if only vulnerabilities below a certain level are found. - Example: `npm audit --audit-level=high` will exit with 0 if only low or moderate level vulns are detected. - ([@lennym](https://github.com/lennym)) - -### BUGFIXES - -* [`d81146181`](https://github.com/npm/cli/commit/d8114618137bb5b9a52a86711bb8dc18bfc8e60c) - [npm/cli#32](https://github.com/npm/cli/pull/32) - Don't check for updates to npm when we are updating npm itself. - ([@olore](https://github.com/olore)) - -### DEPENDENCY UPDATES - -A very special dependency update event! Since the [release of -`node-gyp@3.8.0`](https://github.com/nodejs/node-gyp/pull/1521), an awkward -version conflict that was preventing `request` from begin flattened was -resolved. This means two things: - -1. We've cut down the npm tarball size by another 200kb, to 4.6MB -2. `npm audit` now shows no vulnerabilities for npm itself! - -Thanks, [@rvagg](https://github.com/rvagg)! - -* [`866d776c2`](https://github.com/npm/cli/commit/866d776c27f80a71309389aaab42825b2a0916f6) - `request@2.87.0` - ([@simov](https://github.com/simov)) -* [`f861c2b57`](https://github.com/npm/cli/commit/f861c2b579a9d4feae1653222afcefdd4f0e978f) - `node-gyp@3.8.0` - ([@rvagg](https://github.com/rvagg)) -* [`32e6947c6`](https://github.com/npm/cli/commit/32e6947c60db865257a0ebc2f7e754fedf7a6fc9) - [npm/cli#39](https://github.com/npm/cli/pull/39) - `colors@1.1.2`: - REVERT REVERT, newer versions of this library are broken and print ansi - codes even when disabled. - ([@iarna](https://github.com/iarna)) -* [`beb96b92c`](https://github.com/npm/cli/commit/beb96b92caf061611e3faafc7ca10e77084ec335) - `libcipm@2.0.1` - ([@zkat](https://github.com/zkat)) -* [`348fc91ad`](https://github.com/npm/cli/commit/348fc91ad223ff91cd7bcf233018ea1d979a2af1) - `validate-npm-package-license@3.0.4`: Fixes errors with empty or string-only - license fields. - ([@Gudahtt](https://github.com/Gudahtt)) -* [`e57d34575`](https://github.com/npm/cli/commit/e57d3457547ef464828fc6f82ae4750f3e511550) - `iferr@1.0.2` - ([@shesek](https://github.com/shesek)) -* [`46f1c6ad4`](https://github.com/npm/cli/commit/46f1c6ad4b2fd5b0d7ec879b76b76a70a3a2595c) - `tar@4.4.6` - ([@isaacs](https://github.com/isaacs)) -* [`50df1bf69`](https://github.com/npm/cli/commit/50df1bf691e205b9f13e0fff0d51a68772c40561) - `hosted-git-info@2.7.1` - ([@iarna](https://github.com/iarna)) - ([@Erveon](https://github.com/Erveon)) - ([@huochunpeng](https://github.com/huochunpeng)) - -### DOCUMENTATION - -* [`af98e76ed`](https://github.com/npm/cli/commit/af98e76ed96af780b544962aa575585b3fa17b9a) - [npm/cli#34](https://github.com/npm/cli/pull/34) - Remove `npm publish` from list of commands not affected by `--dry-run`. - ([@joebowbeer](https://github.com/joebowbeer)) -* [`e2b0f0921`](https://github.com/npm/cli/commit/e2b0f092193c08c00f12a6168ad2bd9d6e16f8ce) - [npm/cli#36](https://github.com/npm/cli/pull/36) - Tweak formatting in repository field examples. - ([@noahbenham](https://github.com/noahbenham)) -* [`e2346e770`](https://github.com/npm/cli/commit/e2346e7702acccefe6d711168c2b0e0e272e194a) - [npm/cli#14](https://github.com/npm/cli/pull/14) - Used `process.env` examples to make accessing certain `npm run-scripts` - environment variables more clear. - ([@mwarger](https://github.com/mwarger)) - -## v6.3.0 (2018-08-01): - -This is basically the same as the prerelease, but two dependencies have been -bumped due to bugs that had been around for a while. - -* [`0a22be42e`](https://github.com/npm/cli/commit/0a22be42eb0d40cd0bd87e68c9e28fc9d72c0e19) - `figgy-pudding@3.2.0` - ([@zkat](https://github.com/zkat)) -* [`0096f6997`](https://github.com/npm/cli/commit/0096f69978d2f40b170b28096f269b0b0008a692) - `cacache@11.1.0` - ([@zkat](https://github.com/zkat)) - -## v6.3.0-next.0 (2018-07-25): - -### NEW FEATURES - -* [`ad0dd226f`](https://github.com/npm/cli/commit/ad0dd226fb97a33dcf41787ae7ff282803fb66f2) - [npm/cli#26](https://github.com/npm/cli/pull/26) - `npm version` now supports a `--preid` option to specify the preid for - prereleases. For example, `npm version premajor --preid rc` will tag a version - like `2.0.0-rc.0`. - ([@dwilches](https://github.com/dwilches)) - -### MESSAGING IMPROVEMENTS - -* [`c1dad1e99`](https://github.com/npm/cli/commit/c1dad1e994827f2eab7a13c0f6454f4e4c22ebc2) - [npm/cli#6](https://github.com/npm/cli/pull/6) - Make `npm audit fix` message provide better instructions for vulnerabilities - that require manual review. - ([@bradsk88](https://github.com/bradsk88)) -* [`15c1130fe`](https://github.com/npm/cli/commit/15c1130fe81961706667d845aad7a5a1f70369f3) - Fix missing colon next to tarball url in new `npm view` output. - ([@zkat](https://github.com/zkat)) -* [`21cf0ab68`](https://github.com/npm/cli/commit/21cf0ab68cf528d5244ae664133ef400bdcfbdb6) - [npm/cli#24](https://github.com/npm/cli/pull/24) - Use the default OTP explanation everywhere except when the context is - "OTP-aware" (like when setting double-authentication). This improves the - overall CLI messaging when prompting for an OTP code. - ([@jdeniau](https://github.com/jdeniau)) - -### MISC - -* [`a9ac8712d`](https://github.com/npm/cli/commit/a9ac8712dfafcb31a4e3deca24ddb92ff75e942d) - [npm/cli#21](https://github.com/npm/cli/pull/21) - Use the extracted `stringify-package` package. - ([@dpogue](https://github.com/dpogue)) -* [`9db15408c`](https://github.com/npm/cli/commit/9db15408c60be788667cafc787116555507dc433) - [npm/cli#27](https://github.com/npm/cli/pull/27) - `wrappy` was previously added to dependencies in order to flatten it, but we - no longer do legacy-style for npm itself, so it has been removed from - `package.json`. - ([@rickschubert](https://github.com/rickschubert)) - -### DOCUMENTATION - -* [`3242baf08`](https://github.com/npm/cli/commit/3242baf0880d1cdc0e20b546d3c1da952e474444) - [npm/cli#13](https://github.com/npm/cli/pull/13) - Update more dead links in README.md. - ([@u32i64](https://github.com/u32i64)) -* [`06580877b`](https://github.com/npm/cli/commit/06580877b6023643ec780c19d84fbe120fe5425c) - [npm/cli#19](https://github.com/npm/cli/pull/19) - Update links in docs' `index.html` to refer to new bug/PR URLs. - ([@watilde](https://github.com/watilde)) -* [`ca03013c2`](https://github.com/npm/cli/commit/ca03013c23ff38e12902e9569a61265c2d613738) - [npm/cli#15](https://github.com/npm/cli/pull/15) - Fix some typos in file-specifiers docs. - ([@Mstrodl](https://github.com/Mstrodl)) -* [`4f39f79bc`](https://github.com/npm/cli/commit/4f39f79bcacef11bf2f98d09730bc94d0379789b) - [npm/cli#16](https://github.com/npm/cli/pull/16) - Fix some typos in file-specifiers and package-lock docs. - ([@watilde](https://github.com/watilde)) -* [`35e51f79d`](https://github.com/npm/cli/commit/35e51f79d1a285964aad44f550811aa9f9a72cd8) - [npm/cli#18](https://github.com/npm/cli/pull/18) - Update build status badge url in README. - ([@watilde](https://github.com/watilde)) -* [`a67db5607`](https://github.com/npm/cli/commit/a67db5607ba2052b4ea44f66657f98b758fb4786) - [npm/cli#17](https://github.com/npm/cli/pull/17/) - Replace TROUBLESHOOTING.md with [posts in - npm.community](https://npm.community/c/support/troubleshooting). - ([@watilde](https://github.com/watilde)) -* [`e115f9de6`](https://github.com/npm/cli/commit/e115f9de65bf53711266152fc715a5012f7d3462) - [npm/cli#7](https://github.com/npm/cli/pull/7) - Use https URLs in documentation when appropriate. Happy [Not Secure Day](https://arstechnica.com/gadgets/2018/07/todays-the-day-that-chrome-brands-plain-old-http-as-not-secure/)! - ([@XhmikosR](https://github.com/XhmikosR)) - -## v6.2.0 (2018-07-13): - -In case you missed it, [we -moved!](https://blog.npmjs.org/post/175587538995/announcing-npmcommunity). We -look forward to seeing future PRs landing in -[npm/cli](https://github.com/npm/cli) in the future, and we'll be chatting with -you all in [npm.community](https://npm.community). Go check it out! - -This final release of `npm@6.2.0` includes a couple of features that weren't -quite ready on time but that we'd still like to include. Enjoy! - -### FEATURES - -* [`244b18380`](https://github.com/npm/npm/commit/244b18380ee55950b13c293722771130dbad70de) - [#20554](https://github.com/npm/npm/pull/20554) - Add support for tab-separated output for `npm audit` data with the - `--parseable` flag. - ([@luislobo](https://github.com/luislobo)) -* [`7984206e2`](https://github.com/npm/npm/commit/7984206e2f41b8d8361229cde88d68f0c96ed0b8) - [#12697](https://github.com/npm/npm/pull/12697) - Add new `sign-git-commit` config to control whether the git commit itself gets - signed, or just the tag (which is the default). - ([@tribou](https://github.com/tribou)) - -### FIXES - -* [`4c32413a5`](https://github.com/npm/npm/commit/4c32413a5b42e18a34afb078cf00eed60f08e4ff) - [#19418](https://github.com/npm/npm/pull/19418) - Do not use `SET` to fetch the env in git-bash or Cygwin. - ([@gucong3000](https://github.com/gucong3000)) - -### DEPENDENCY BUMPS - -* [`d9b2712a6`](https://github.com/npm/npm/commit/d9b2712a670e5e78334e83f89a5ed49616f1f3d3) - `request@2.81.0`: Downgraded to allow better deduplication. This does - introduce a bunch of `hoek`-related audit reports, but they don't affect npm - itself so we consider it safe. We'll upgrade `request` again once `node-gyp` - unpins it. - ([@simov](https://github.com/simov)) -* [`2ac48f863`](https://github.com/npm/npm/commit/2ac48f863f90166b2bbf2021ed4cc04343d2503c) - `node-gyp@3.7.0` - ([@MylesBorins](https://github.com/MylesBorins)) -* [`8dc6d7640`](https://github.com/npm/npm/commit/8dc6d76408f83ba35bda77a2ac1bdbde01937349) - `cli-table3@0.5.0`: `cli-table2` is unmaintained and required `lodash`. With - this dependency bump, we've removed `lodash` from our tree, which cut back - tarball size by another 300kb. - ([@Turbo87](https://github.com/Turbo87)) -* [`90c759fee`](https://github.com/npm/npm/commit/90c759fee6055cf61cf6709432a5e6eae6278096) - `npm-audit-report@1.3.1` - ([@zkat](https://github.com/zkat)) -* [`4231a0a1e`](https://github.com/npm/npm/commit/4231a0a1eb2be13931c3b71eba38c0709644302c) - Add `cli-table3` to bundleDeps. - ([@iarna](https://github.com/iarna)) -* [`322d9c2f1`](https://github.com/npm/npm/commit/322d9c2f107fd82a4cbe2f9d7774cea5fbf41b8d) - Make `standard` happy. - ([@iarna](https://github.com/iarna)) - -### DOCS - -* [`5724983ea`](https://github.com/npm/npm/commit/5724983ea8f153fb122f9c0ccab6094a26dfc631) - [#21165](https://github.com/npm/npm/pull/21165) - Fix some markdown formatting in npm-disputes.md. - ([@hchiam](https://github.com/hchiam)) -* [`738178315`](https://github.com/npm/npm/commit/738178315fe48e463028657ea7ae541c3d63d171) - [#20920](https://github.com/npm/npm/pull/20920) - Explicitly state that republishing an unpublished package requires a 72h - waiting period. - ([@gmattie](https://github.com/gmattie)) -* [`f0a372b07`](https://github.com/npm/npm/commit/f0a372b074cc43ee0e1be28dbbcef0d556b3b36c) - Replace references to the old repo or issue tracker. We're at npm/cli now! - ([@zkat](https://github.com/zkat)) - -## v6.2.0-next.1 (2018-07-05): - -This is a quick patch to the release to fix an issue that was preventing users -from installing `npm@next`. - -* [`ecdcbd745`](https://github.com/npm/npm/commit/ecdcbd745ae1edd9bdd102dc3845a7bc76e1c5fb) - [#21129](https://github.com/npm/npm/pull/21129) - Remove postinstall script that depended on source files, thus preventing - `npm@next` from being installable from the registry. - ([@zkat](https://github.com/zkat)) - -## v6.2.0-next.0 (2018-06-28): - -### NEW FEATURES - -* [`ce0793358`](https://github.com/npm/npm/commit/ce07933588ec2da1cc1980f93bdaa485d6028ae2) - [#20750](https://github.com/npm/npm/pull/20750) - You can now disable the update notifier entirely by using - `--no-update-notifier` or setting it in your config with `npm config set - update-notifier false`. - ([@travi](https://github.com/travi)) -* [`d2ad776f6`](https://github.com/npm/npm/commit/d2ad776f6dcd92ae3937465736dcbca171131343) - [#20879](https://github.com/npm/npm/pull/20879) - When `npm run-script <script>` fails due to a typo or missing script, npm will - now do a "did you mean?..." for scripts that do exist. - ([@watilde](https://github.com/watilde)) - -### BUGFIXES - -* [`8f033d72d`](https://github.com/npm/npm/commit/8f033d72da3e84a9dbbabe3a768693817af99912) - [#20948](https://github.com/npm/npm/pull/20948) - Fix the regular expression matching in `xcode_emulation` in `node-gyp` to also - handle version numbers with multiple-digit major versions which would - otherwise break under use of XCode 10. - ([@Trott](https://github.com/Trott)) -* [`c8ba7573a`](https://github.com/npm/npm/commit/c8ba7573a4ea95789f674ce038762d6a77a8b047) - Stop trying to hoist/dedupe bundles dependencies. - ([@iarna](https://github.com/iarna)) -* [`cd698f068`](https://github.com/npm/npm/commit/cd698f06840b7c9407ac802efa96d16464722a7d) - [#20762](https://github.com/npm/npm/pull/20762) - Add synopsis to brief help for `npm audit` and suppress trailing newline. - ([@wyardley](https://github.com/wyardley)) -* [`6808ee3bd`](https://github.com/npm/npm/commit/6808ee3bd59560b1334a18aa6c6e0120094b03c0) - [#20881](https://github.com/npm/npm/pull/20881) - Exclude /.github directory from npm tarball. - ([@styfle](https://github.com/styfle)) -* [`177cbb476`](https://github.com/npm/npm/commit/177cbb4762c1402bfcbf0636c4bc4905fd684fc1) - [#21105](https://github.com/npm/npm/pull/21105) - Add suggestion to use a temporary cache instead of `npm cache clear --force`. - ([@karanjthakkar](https://github.com/karanjthakkar)) - -### DOCS - -* [`7ba3fca00`](https://github.com/npm/npm/commit/7ba3fca00554b884eb47f2ed661693faf2630b27) - [#20855](https://github.com/npm/npm/pull/20855) - Direct people to npm.community instead of the GitHub issue tracker on error. - ([@zkat](https://github.com/zkat)) -* [`88efbf6b0`](https://github.com/npm/npm/commit/88efbf6b0b403c5107556ff9e1bb7787a410d14d) - [#20859](https://github.com/npm/npm/pull/20859) - Fix typo in registry docs. - ([@strugee](https://github.com/strugee)) -* [`61bf827ae`](https://github.com/npm/npm/commit/61bf827aea6f98bba08a54e60137d4df637788f9) - [#20947](https://github.com/npm/npm/pull/20947) - Fixed a small grammar error in the README. - ([@bitsol](https://github.com/bitsol)) -* [`f5230c90a`](https://github.com/npm/npm/commit/f5230c90afef40f445bf148cbb16d6129a2dcc19) - [#21018](https://github.com/npm/npm/pull/21018) - Small typo fix in CONTRIBUTING.md. - ([@reggi](https://github.com/reggi)) -* [`833efe4b2`](https://github.com/npm/npm/commit/833efe4b2abcef58806f823d77ab8bb8f4f781c6) - [#20986](https://github.com/npm/npm/pull/20986) - Document current structure/expectations around package tarballs. - ([@Maximaximum](https://github.com/Maximaximum)) -* [`9fc0dc4f5`](https://github.com/npm/npm/commit/9fc0dc4f58d728bac6a8db7143d04863d7b653db) - [#21019](https://github.com/npm/npm/pull/21019) - Clarify behavior of `npm link ../path` shorthand. - ([@davidgilbertson](https://github.com/davidgilbertson)) -* [`3924c72d0`](https://github.com/npm/npm/commit/3924c72d06b9216ac2b6a9d951fd565a1d5eda89) - [#21064](https://github.com/npm/npm/pull/21064) - Add missing "if" - ([@roblourens](https://github.com/roblourens)) - -### DEPENDENCY SHUFFLE! - -We did some reshuffling and moving around of npm's own dependencies. This -significantly reduces the total bundle size of the npm pack, from 8MB to 4.8MB -for the distributed tarball! We also moved around what we actually commit to the -repo as far as devDeps go. - -* [`0483f5c5d`](https://github.com/npm/npm/commit/0483f5c5deaf18c968a128657923103e49f4e67a) - Flatten and dedupe our dependencies! - ([@iarna](https://github.com/iarna)) -* [`ef9fa1ceb`](https://github.com/npm/npm/commit/ef9fa1ceb5f9d175fd453138b1a26d45a5071dfd) - Remove unused direct dependency `ansi-regex`. - ([@iarna](https://github.com/iarna)) -* [`0d14b0bc5`](https://github.com/npm/npm/commit/0d14b0bc59812f4e33798194e11ffacbea3c0493) - Reshuffle ansi-regex for better deduping. - ([@iarna](https://github.com/iarna)) -* [`68a101859`](https://github.com/npm/npm/commit/68a101859b2b6f78b2e7c3a936492acdb15f7c4a) - Reshuffle strip-ansi for better deduping. - ([@iarna](https://github.com/iarna)) -* [`0d5251f97`](https://github.com/npm/npm/commit/0d5251f97dc8b8b143064869e530d465c757ffbb) - Reshuffle is-fullwidth-code-point for better deduping. - ([@iarna](https://github.com/iarna)) -* [`2d0886632`](https://github.com/npm/npm/commit/2d08866327013522fc5fbe61ed872b8f30e92775) - Add fake-registry, npm-registry-mock replacement. - ([@iarna](https://github.com/iarna)) - -### DEPENDENCIES - -* [`8cff8eea7`](https://github.com/npm/npm/commit/8cff8eea75dc34c9c1897a7a6f65d7232bb0c64c) - `tar@4.4.3` - ([@zkat](https://github.com/zkat)) -* [`bfc4f873b`](https://github.com/npm/npm/commit/bfc4f873bd056b7e3aee389eda4ecd8a2e175923) - `pacote@8.1.6` - ([@zkat](https://github.com/zkat)) -* [`532096163`](https://github.com/npm/npm/commit/53209616329119be8fcc29db86a43cc8cf73454d) - `libcipm@2.0.0` - ([@zkat](https://github.com/zkat)) -* [`4a512771b`](https://github.com/npm/npm/commit/4a512771b67aa06505a0df002a9027c16a238c71) - `request@2.87.0` - ([@iarna](https://github.com/iarna)) -* [`b7cc48dee`](https://github.com/npm/npm/commit/b7cc48deee45da1feab49aa1dd4d92e33c9bcac8) - `which@1.3.1` - ([@iarna](https://github.com/iarna)) -* [`bae657c28`](https://github.com/npm/npm/commit/bae657c280f6ea8e677509a9576e1b47c65c5441) - `tar@4.4.4` - ([@iarna](https://github.com/iarna)) -* [`3d46e5c4e`](https://github.com/npm/npm/commit/3d46e5c4e3c5fecd9bf05a7425a16f2e8ad5c833) - `JSONStream@1.3.3` - ([@iarna](https://github.com/iarna)) -* [`d0a905daf`](https://github.com/npm/npm/commit/d0a905dafc7e3fcd304e8053acbe3da40ba22554) - `is-cidr@2.0.6` - ([@iarna](https://github.com/iarna)) -* [`4fc1f815f`](https://github.com/npm/npm/commit/4fc1f815fec5a7f6f057cf305e01d4126331d1f2) - `marked@0.4.0` - ([@iarna](https://github.com/iarna)) -* [`f72202944`](https://github.com/npm/npm/commit/f722029441a088d03df94bdfdeeec51cfd318659) - `tap@12.0.1` - ([@iarna](https://github.com/iarna)) -* [`bdce96eb3`](https://github.com/npm/npm/commit/bdce96eb3c30fcff873aa3f1190e8ae4928d690b) - `npm-profile@3.0.2` - ([@iarna](https://github.com/iarna)) -* [`fe4240e85`](https://github.com/npm/npm/commit/fe4240e852144770bf76d7b1952056ca5baa63cf) - `uuid@3.3.2` - ([@zkat](https://github.com/zkat)) - -## v6.1.0 (2018-05-17): - -### FIX WRITE AFTER END ERROR - -First introduced in 5.8.0, this finally puts to bed errors where you would -occasionally see `Error: write after end at MiniPass.write`. - -* [`171f3182f`](https://github.com/npm/npm/commit/171f3182f32686f2f94ea7d4b08035427e0b826e) - [node-tar#180](https://github.com/npm/node-tar/issues/180) - [npm.community#35](https://npm.community/t/write-after-end-when-installing-packages-with-5-8-and-later/35) - `pacote@8.1.5`: Fix write-after-end errors. - ([@zkat](https://github.com/zkat)) - -### DETECT CHANGES IN GIT SPECIFIERS - -* [`0e1726c03`](https://github.com/npm/npm/commit/0e1726c0350a02d5a60f5fddb1e69c247538625e) - We can now determine if the commitid of a git dependency in the lockfile is derived - from the specifier in the package.json and if it isn't we now trigger an update for it. - ([@iarna](https://github.com/iarna)) - -### OTHER BUGS - -* [`442d2484f`](https://github.com/npm/npm/commit/442d2484f686e3a371b07f8473a17708f84d9603) - [`2f0c88351`](https://github.com/npm/npm/commit/2f0c883519f17c94411dd1d9877c5666f260c12f) - [`631d30a34`](https://github.com/npm/npm/commit/631d30a340f5805aed6e83f47a577ca4125599b2) - When requesting the update of a direct dependency that was also a - transitive dependency to a version incompatible with the transitive - requirement and you had a lock-file but did not have a `node_modules` - folder then npm would fail to provide a new copy of the transitive - dependency, resulting in an invalid lock-file that could not self heal. - ([@iarna](https://github.com/iarna)) -* [`be5dd0f49`](https://github.com/npm/npm/commit/be5dd0f496ec1485b1ea3094c479dfc17bd50d82) - [#20715](https://github.com/npm/npm/pull/20715) - Cleanup output of `npm ci` summary report. - ([@legodude17](https://github.com/legodude17)) -* [`98ffe4adb`](https://github.com/npm/npm/commit/98ffe4adb55a6f4459271856de2e27e95ee63375) - Node.js now has a test that scans for things that look like conflict - markers in source code. This was triggering false positives on a fixture in a test - of npm's ability to heal lockfiles with conflicts in them. - ([@iarna](https://github.com/iarna)) - -### DEPENDENCY UPDATES - -* [`3f2e306b8`](https://github.com/npm/npm/commit/3f2e306b884a027df03f64524beb8658ce1772cb) - Using `npm audit fix`, replace some transitive dependencies with security - issues with versions that don't have any. - ([@iarna](https://github.com/iarna)) -* [`1d07134e0`](https://github.com/npm/npm/commit/1d07134e0b157f7484a20ce6987ff57951842954) - `tar@4.4.1`: - Dropping to 4.4.1 from 4.4.2 due to https://github.com/npm/node-tar/issues/183 - ([@zkat](https://github.com/zkat)) - - -## v6.1.0-next.0 (2018-05-17): - -Look at that! A feature bump! `npm@6` was super-exciting not just because it -used a bigger number than ever before, but also because it included a super -shiny new command: `npm audit`. Well, we've kept working on it since then and -have some really nice improvements for it. You can expect more of them, and the -occasional fix, in the next few releases as more users start playing with it and -we get more feedback about what y'all would like to see from something like -this. - -I, for one, have started running it (and the new subcommand...) in all my -projects, and it's one of those things that I don't know how I ever functioned --without- it! This will make a world of difference to so many people as far as -making the npm ecosystem a higher-quality, safer commons for all of us. - -This is also a good time to remind y'all that we have a new [RFCs -repository](https://github.com/npm/rfcs), along with a new process for them. -This repo is open to anyone's RFCs, and has already received some great ideas -about where we can take the CLI (and, to a certain extent, the registry). It's a -great place to get feedback, and completely replaces feature requests in the -main repo, so we won't be accepting feature requests there at all anymore. Check -it out if you have something you'd like to suggest, or if you want to keep track -of what the future might look like! - -### NEW FEATURE: `npm audit fix` - -This is the biggie with this release! `npm audit fix` does exactly what it says -on the tin. It takes all the actionable reports from your `npm audit` and runs -the installs automatically for you, so you don't have to try to do all that -mechanical work yourself! - -Note that by default, `npm audit fix` will stick to semver-compatible changes, -so you should be able to safely run it on most projects and carry on with your -day without having to track down what breaking changes were included. If you -want your (toplevel) dependencies to accept semver-major bumps as well, you can -use `npm audit fix --force` and it'll toss those in, as well. Since it's running -the npm installer under the hood, it also supports `--production` and -`--only=dev` flags, as well as things like `--dry-run`, `--json`, and -`--package-lock-only`, if you want more control over what it does. - -Give it a whirl and tell us what you think! See `npm help audit` for full docs! - -* [`3800a660d`](https://github.com/npm/npm/commit/3800a660d99ca45c0175061dbe087520db2f54b7) - Add `npm audit fix` subcommand to automatically fix detected vulnerabilities. - ([@zkat](https://github.com/zkat)) - -### OTHER NEW `audit` FEATURES - -* [`1854b1c7f`](https://github.com/npm/npm/commit/1854b1c7f09afceb49627e539a086d8a3565601c) - [#20568](https://github.com/npm/npm/pull/20568) - Add support for `npm audit --json` to print the report in JSON format. - ([@finnp](https://github.com/finnp)) -* [`85b86169d`](https://github.com/npm/npm/commit/85b86169d9d0423f50893d2ed0c7274183255abe) - [#20570](https://github.com/npm/npm/pull/20570) - Include number of audited packages in `npm install` summary output. - ([@zkat](https://github.com/zkat)) -* [`957cbe275`](https://github.com/npm/npm/commit/957cbe27542d30c33e58e7e6f2f04eeb64baf5cd) - `npm-audit-report@1.2.1`: - Overhaul audit install and detail output format. The new format is terser and - fits more closely into the visual style of the CLI, while still providing you - with the important bits of information you need. They also include a bit more - detail on the footer about what actions you can take! - ([@zkat](https://github.com/zkat)) - -### NEW FEATURE: GIT DEPS AND `npm init <pkg>`! - -Another exciting change that came with `npm@6` was the new `npm init` command -that allows for community-authored generators. That means you can, for example, -do `npm init react-app` and it'll one-off download, install, and run -[`create-react-app`](https://npm.im/create-react-app) for you, without requiring -or keeping around any global installs. That is, it basically just calls out to -[`npx`](https://npm.im/npx). - -The first version of this command only really supported registry dependencies, -but now, [@jdalton](https://github.com/jdalton) went ahead and extended this -feature so you can use hosted git dependencies, and their shorthands. - -So go ahead and do `npm init facebook/create-react-app` and it'll grab the -package from the github repo now! Or you can use it with a private github -repository to maintain your organizational scaffolding tools or whatnot. ✨ - -* [`483e01180`](https://github.com/npm/npm/commit/483e011803af82e63085ef41b7acce5b22aa791c) - [#20403](https://github.com/npm/npm/pull/20403) - Add support for hosted git packages to `npm init <name>`. - ([@jdalton](https://github.com/jdalton)) - -### BUGFIXES - -* [`a41c0393c`](https://github.com/npm/npm/commit/a41c0393cba710761a15612c6c85c9ef2396e65f) - [#20538](https://github.com/npm/npm/pull/20538) - Make the new `npm view` work when the license field is an object instead of a - string. - ([@zkat](https://github.com/zkat)) -* [`eb7522073`](https://github.com/npm/npm/commit/eb75220739302126c94583cc65a5ff12b441e3c6) - [#20582](https://github.com/npm/npm/pull/20582) - Add support for environments (like Docker) where the expected binary for - opening external URLs is not available. - ([@bcoe](https://github.com/bcoe)) -* [`212266529`](https://github.com/npm/npm/commit/212266529ae72056bf0876e2cff4b8ba01d09d0f) - [#20536](https://github.com/npm/npm/pull/20536) - Fix a spurious colon in the new update notifier message and add support for - the npm canary. - ([@zkat](https://github.com/zkat)) -* [`5ee1384d0`](https://github.com/npm/npm/commit/5ee1384d02c3f11949d7a26ec6322488476babe6) - [#20597](https://github.com/npm/npm/pull/20597) - Infer a version range when a `package.json` has a dist-tag instead of a - version range in one of its dependency specs. Previously, this would cause - dependencies to be flagged as invalid. - ([@zkat](https://github.com/zkat)) -* [`4fa68ae41`](https://github.com/npm/npm/commit/4fa68ae41324293e59584ca6cf0ac24b3e0825bb) - [#20585](https://github.com/npm/npm/pull/20585) - Make sure scoped bundled deps are shown in the new publish preview, too. - ([@zkat](https://github.com/zkat)) -* [`1f3ee6b7e`](https://github.com/npm/npm/commit/1f3ee6b7e1b36b52bdedeb9241296d4e66561d48) - `cacache@11.0.2`: - Stop dropping `size` from metadata on `npm cache verify`. - ([@jfmartinez](https://github.com/jfmartinez)) -* [`91ef93691`](https://github.com/npm/npm/commit/91ef93691a9d6ce7c016fefdf7da97854ca2b2ca) - [#20513](https://github.com/npm/npm/pull/20513) - Fix nested command aliases. - ([@mmermerkaya](https://github.com/mmermerkaya)) -* [`18b2b3cf7`](https://github.com/npm/npm/commit/18b2b3cf71a438648ced1bd13faecfb50c71e979) - `npm-lifecycle@2.0.3`: - Make sure different versions of the `Path` env var on Windows all get - `node_modules/.bin` prepended when running lifecycle scripts. - ([@laggingreflex](https://github.com/laggingreflex)) - -### DOCUMENTATION - -* [`a91d87072`](https://github.com/npm/npm/commit/a91d87072f292564e58dcab508b5a8c6702b9aae) - [#20550](https://github.com/npm/npm/pull/20550) - Update required node versions in README. - ([@legodude17](https://github.com/legodude17)) -* [`bf3cfa7b8`](https://github.com/npm/npm/commit/bf3cfa7b8b351714c4ec621e1a5867c8450c6fff) - Pull in changelogs from the last `npm@5` release. - ([@iarna](https://github.com/iarna)) -* [`b2f14b14c`](https://github.com/npm/npm/commit/b2f14b14ca25203c2317ac2c47366acb50d46e69) - [#20629](https://github.com/npm/npm/pull/20629) - Make tone in `publishConfig` docs more neutral. - ([@jeremyckahn](https://github.com/jeremyckahn)) - -### DEPENDENCY BUMPS - -* [`5fca4eae8`](https://github.com/npm/npm/commit/5fca4eae8a62a7049b1ae06aa0bbffdc6e0ad6cc) - `byte-size@4.0.3` - ([@75lb](https://github.com/75lb)) -* [`d9ef3fba7`](https://github.com/npm/npm/commit/d9ef3fba79f87c470889a6921a91f7cdcafa32b9) - `lru-cache@4.1.3` - ([@isaacs](https://github.com/isaacs)) -* [`f1baf011a`](https://github.com/npm/npm/commit/f1baf011a0d164f8dc8aa6cd31e89225e3872e3b) - `request@2.86.0` - ([@simonv](https://github.com/simonv)) -* [`005fa5420`](https://github.com/npm/npm/commit/005fa542072f09a83f77a9d62c5e53b8f6309371) - `require-inject@1.4.3` - ([@iarna](https://github.com/iarna)) -* [`1becdf09a`](https://github.com/npm/npm/commit/1becdf09a2f19716726c88e9a2342e1e056cfc71) - `tap@11.1.5` - ([@isaacs](https://github.com/isaacs)) - -## v6.0.1 (2018-05-09): - -### AUDIT SHOULDN'T WAIT FOREVER - -This will likely be reduced further with the goal that the audit process -shouldn't noticibly slow down your builds regardless of your network -situation. - -* [`3dcc240db`](https://github.com/npm/npm/commit/3dcc240dba5258532990534f1bd8a25d1698b0bf) - Timeout audit requests eventually. - ([@iarna](https://github.com/iarna)) - -### Looking forward - -We're still a way from having node@11, so now's a good time to ensure we -don't warn about being used with it. - -* [`ed1aebf55`](https://github.com/npm/npm/commit/ed1aebf55) - Allow node@11, when it comes. - ([@iarna](https://github.com/iarna)) - -## v6.0.1-next.0 (2018-05-03): - -### CTRL-C OUT DURING PACKAGE EXTRACTION AS MUCH AS YOU WANT! - -* [`b267bbbb9`](https://github.com/npm/npm/commit/b267bbbb9ddd551e3dbd162cc2597be041b9382c) - [npm/lockfile#29](https://github.com/npm/lockfile/pull/29) - `lockfile@1.0.4`: - Switches to `signal-exit` to detect abnormal exits and remove locks. - ([@Redsandro](https://github.com/Redsandro)) - -### SHRONKWRAPS AND LACKFILES - -If a published modules had legacy `npm-shrinkwrap.json` we were saving -ordinary registry dependencies (`name@version`) to your `package-lock.json` -as `https://` URLs instead of versions. - -* [`89102c0d9`](https://github.com/npm/npm/commit/89102c0d995c3d707ff2b56995a97a1610f8b532) - When saving the lock-file compute how the dependency is being required instead of using - `_resolved` in the `package.json`. This fixes the bug that was converting - registry dependencies into `https://` dependencies. - ([@iarna](https://github.com/iarna)) -* [`676f1239a`](https://github.com/npm/npm/commit/676f1239ab337ff967741895dbe3a6b6349467b6) - When encountering a `https://` URL in our lockfiles that point at our default registry, extract - the version and use them as registry dependencies. This lets us heal - `package-lock.json` files produced by 6.0.0 - ([@iarna](https://github.com/iarna)) - -### AUDIT AUDIT EVERYWHERE - -You can't use it _quite_ yet, but we do have a few last moment patches to `npm audit` to make -it even better when it is turned on! - -* [`b2e4f48f5`](https://github.com/npm/npm/commit/b2e4f48f5c07b8ebc94a46ce01a810dd5d6cd20c) - Make sure we hide stream errors on background audit submissions. Previously some classes - of error could end up being displayed (harmlessly) during installs. - ([@iarna](https://github.com/iarna)) -* [`1fe0c7fea`](https://github.com/npm/npm/commit/1fe0c7fea226e592c96b8ab22fd9435e200420e9) - Include session and scope in requests (as we do in other requests to the registry). - ([@iarna](https://github.com/iarna)) -* [`d04656461`](https://github.com/npm/npm/commit/d046564614639c37e7984fff127c79a8ddcc0c92) - Exit with non-zero status when vulnerabilities are found. So you can have `npm audit` as a test or prepublish step! - ([@iarna](https://github.com/iarna)) -* [`fcdbcbacc`](https://github.com/npm/npm/commit/fcdbcbacc16d96a8696dde4b6d7c1cba77828337) - Verify lockfile integrity before running. You'd get an error either way, but this way it's - faster and can give you more concrete instructions on how to fix it. - ([@iarna](https://github.com/iarna)) -* [`2ac8edd42`](https://github.com/npm/npm/commit/2ac8edd4248f2393b35896f0300b530e7666bb0e) - Refuse to run in global mode. Audits require a lockfile and globals don't have one. Yet. - ([@iarna](https://github.com/iarna)) - -### DOCUMENTATION IMPROVEMENTS - -* [`b7fca1084`](https://github.com/npm/npm/commit/b7fca1084b0be6f8b87ec0807c6daf91dbc3060a) - [#20407](https://github.com/npm/npm/pull/20407) - Update the lock-file spec doc to mention that we now generate the from field for `git`-type dependencies. - ([@watilde](https://github.com/watilde)) -* [`7a6555e61`](https://github.com/npm/npm/commit/7a6555e618e4b8459609b7847a9e17de2d4fa36e) - [#20408](https://github.com/npm/npm/pull/20408) - Describe what the colors in outdated mean. - ([@teameh](https://github.com/teameh)) - -### DEPENDENCY UPDATES - -* [`5e56b3209`](https://github.com/npm/npm/commit/5e56b3209c4719e3c4d7f0d9346dfca3881a5d34) - `npm-audit-report@1.0.8` - ([@evilpacket](https://github.com/evilpacket)) -* [`58a0b31b4`](https://github.com/npm/npm/commit/58a0b31b43245692b4de0f1e798fcaf71f8b7c31) - `lock-verify@2.0.2` - ([@iarna](https://github.com/iarna)) -* [`e7a8c364f`](https://github.com/npm/npm/commit/e7a8c364f3146ffb94357d8dd7f643e5563e2f2b) - [zkat/pacote#148](https://github.com/zkat/pacote/pull/148) - `pacote@8.1.1` - ([@redonkulus](https://github.com/redonkulus)) -* [`46c0090a5`](https://github.com/npm/npm/commit/46c0090a517526dfec9b1b6483ff640227f0cd10) - `tar@4.4.2` - ([@isaacs](https://github.com/isaacs)) -* [`8a16db3e3`](https://github.com/npm/npm/commit/8a16db3e39715301fd085a8f4c80ae836f0ec714) - `update-notifier@2.5.0` - ([@alexccl](https://github.com/alexccl)) -* [`696375903`](https://github.com/npm/npm/commit/6963759032fe955c1404d362e14f458d633c9444) - `safe-buffer@5.1.2` - ([@feross](https://github.com/feross)) -* [`c949eb26a`](https://github.com/npm/npm/commit/c949eb26ab6c0f307e75a546f342bb2ec0403dcf) - `query-string@6.1.0` - ([@sindresorhus](https://github.com/sindresorhus)) - -## v6.0.0 (2018-04-20): - -Hey y'all! Here's another `npm@6` release -- with `node@10` around the corner, -this might well be the last prerelease before we tag `6.0.0`! There's two major -features included with this release, along with a few miscellaneous fixes and -changes. - -### EXTENDED `npm init` SCAFFOLDING - -Thanks to the wonderful efforts of [@jdalton](https://github.com/jdalton) of -lodash fame, `npm init` can now be used to invoke custom scaffolding tools! - -You can now do things like `npm init react-app` or `npm init esm` to scaffold an -npm package by running `create-react-app` and `create-esm`, respectively. This -also adds an `npm create` alias, to correspond to Yarn's `yarn create` feature, -which inspired this. - -* [`008a83642`](https://github.com/npm/npm/commit/008a83642e04360e461f56da74b5557d5248a726) [`ed81d1426`](https://github.com/npm/npm/commit/ed81d1426776bcac47492cabef43f65e1d4ab536) [`833046e45`](https://github.com/npm/npm/commit/833046e45fe25f75daffd55caf25599a9f98c148) - [#20303](https://github.com/npm/npm/pull/20303) - Add an `npm init` feature that calls out to `npx` when invoked with positional - arguments. ([@jdalton](https://github.com/jdalton)) - -### DEPENDENCY AUDITING - -This version of npm adds a new command, `npm audit`, which will run a security -audit of your project's dependency tree and notify you about any actions you may -need to take. - -The registry-side services required for this command to work will be available -on the main npm registry in the coming weeks. Until then, you won't get much out -of trying to use this on the CLI. - -As part of this change, the npm CLI now sends scrubbed and cryptographically -anonymized metadata about your dependency tree to your configured registry, to -allow notifying you about the existence of critical security flaws. For details -about how the CLI protects your privacy when it shares this metadata, see `npm -help audit`, or [read the docs for `npm audit` -online](https://github.com/npm/npm/blob/release-next/doc/cli/npm-audit.md). You -can disable this altogether by doing `npm config set audit false`, but will no -longer benefit from the service. - -* [`f4bc648ea`](https://github.com/npm/npm/commit/f4bc648ea7b19d63cc9878c9da2cb1312f6ce152) - [#20389](https://github.com/npm/npm/pull/20389) - `npm-registry-fetch@1.1.0` - ([@iarna](https://github.com/iarna)) -* [`594d16987`](https://github.com/npm/npm/commit/594d16987465014d573c51a49bba6886cc19f8e8) - [#20389](https://github.com/npm/npm/pull/20389) - `npm-audit-report@1.0.5` - ([@iarna](https://github.com/iarna)) -* [`8c77dde74`](https://github.com/npm/npm/commit/8c77dde74a9d8f9007667cd1732c3329e0d52617) [`1d8ac2492`](https://github.com/npm/npm/commit/1d8ac2492196c4752b2e41b23d5ddc92780aaa24) [`552ff6d64`](https://github.com/npm/npm/commit/552ff6d64a5e3bcecb33b2a861c49a3396adad6d) [`09c734803`](https://github.com/npm/npm/commit/09c73480329e75e44fb8e55ca522f798be68d448) - [#20389](https://github.com/npm/npm/pull/20389) - Add new `npm audit` command. - ([@iarna](https://github.com/iarna)) -* [`be393a290`](https://github.com/npm/npm/commit/be393a290a5207dc75d3d70a32973afb3322306c) - [#20389](https://github.com/npm/npm/pull/20389) - Temporarily suppress git metadata till there's an opt-in. - ([@iarna](https://github.com/iarna)) -* [`8e713344f`](https://github.com/npm/npm/commit/8e713344f6e0828ddfb7733df20d75e95a5382d8) - [#20389](https://github.com/npm/npm/pull/20389) - Document the new command. - ([@iarna](https://github.com/iarna)) -* - [#20389](https://github.com/npm/npm/pull/20389) - Default audit to off when running the npm test suite itself. - ([@iarna](https://github.com/iarna)) - -### MORE `package-lock.json` FORMAT CHANGES?! - -* [`820f74ae2`](https://github.com/npm/npm/commit/820f74ae22b7feb875232d46901cc34e9ba995d6) - [#20384](https://github.com/npm/npm/pull/20384) - Add `from` field back into package-lock for git dependencies. This will give - npm the information it needs to figure out whether git deps are valid, - specially when running with legacy install metadata or in - `--package-lock-only` mode when there's no `node_modules`. This should help - remove a significant amount of git-related churn on the lock-file. - ([@zkat](https://github.com/zkat)) - -### BUGFIXES - -* [`9d5d0a18a`](https://github.com/npm/npm/commit/9d5d0a18a5458655275056156b5aa001140ae4d7) - [#20358](https://github.com/npm/npm/pull/20358) - `npm install-test` (aka `npm it`) will no longer generate `package-lock.json` - when running with `--no-package-lock` or `package-lock=false`. - ([@raymondfeng](https://github.com/raymondfeng)) -* [`e4ed976e2`](https://github.com/npm/npm/commit/e4ed976e20b7d1114c920a9dc9faf351f89a31c9) - [`2facb35fb`](https://github.com/npm/npm/commit/2facb35fbfbbc415e693d350b67413a66ff96204) - [`9c1eb945b`](https://github.com/npm/npm/commit/9c1eb945be566e24cbbbf186b0437bdec4be53fc) - [#20390](https://github.com/npm/npm/pull/20390) - Fix a scenario where a git dependency had a comittish associated with it - that was not a complete commitid. `npm` would never consider that entry - in the `package.json` as matching the entry in the `package-lock.json` and - this resulted in inappropriate pruning or reinstallation of git - dependencies. This has been addressed in two ways, first, the addition of the - `from` field as described in [#20384](https://github.com/npm/npm/pull/20384) means - we can exactly match the `package.json`. Second, when that's missing (when working with - older `package-lock.json` files), we assume that the match is ok. (If - it's not, we'll fix it up when a real installation is done.) - ([@iarna](https://github.com/iarna)) - - -### DEPENDENCIES - -* [`1c1f89b73`](https://github.com/npm/npm/commit/1c1f89b7319b2eef6adee2530c4619ac1c0d83cf) - `libnpx@10.2.0` - ([@zkat](https://github.com/zkat)) -* [`242d8a647`](https://github.com/npm/npm/commit/242d8a6478b725778c00be8ba3dc85f367006a61) - `pacote@8.1.0` - ([@zkat](https://github.com/zkat)) - -### DOCS - -* [`a1c77d614`](https://github.com/npm/npm/commit/a1c77d614adb4fe6769631b646b817fd490d239c) - [#20331](https://github.com/npm/npm/pull/20331) - Fix broken link to 'private-modules' page. The redirect went away when the new - npm website went up, but the new URL is better anyway. - ([@vipranarayan14](https://github.com/vipranarayan14)) -* [`ad7a5962d`](https://github.com/npm/npm/commit/ad7a5962d758efcbcfbd9fda9a3d8b38ddbf89a1) - [#20279](https://github.com/npm/npm/pull/20279) - Document the `--if-present` option for `npm run-script`. - ([@aleclarson](https://github.com/aleclarson)) - -## v6.0.0-next.1 (2018-04-12): - -### NEW FEATURES - -* [`a9e722118`](https://github.com/npm/npm/commit/a9e7221181dc88e14820d0677acccf0648ac3c5a) - [#20256](https://github.com/npm/npm/pull/20256) - Add support for managing npm webhooks. This brings over functionality - previously provided by the [`wombat`](https://www.npmjs.com/package/wombat) CLI. - ([@zkat](https://github.com/zkat)) -* [`8a1a64203`](https://github.com/npm/npm/commit/8a1a64203cca3f30999ea9e160eb63662478dcee) - [#20126](https://github.com/npm/npm/pull/20126) - Add `npm cit` command that's equivalent of `npm ci && npm t` that's equivalent of `npm it`. - ([@SimenB](https://github.com/SimenB)) -* [`fe867aaf1`](https://github.com/npm/npm/commit/fe867aaf19e924322fe58ed0cf0a570297a96559) - [`49d18b4d8`](https://github.com/npm/npm/commit/49d18b4d87d8050024f8c5d7a0f61fc2514917b1) - [`ff6b31f77`](https://github.com/npm/npm/commit/ff6b31f775f532bb8748e8ef85911ffb35a8c646) - [`78eab3cda`](https://github.com/npm/npm/commit/78eab3cdab6876728798f876d569badfc74ce68f) - The `requires` field in your lock-file will be upgraded to use ranges from - versions on your first use of npm. - ([@iarna](https://github.com/iarna)) -* [`cf4d7b4de`](https://github.com/npm/npm/commit/cf4d7b4de6fa241a656e58f662af0f8d7cd57d21) - [#20257](https://github.com/npm/npm/pull/20257) - Add shasum and integrity to the new `npm view` output. - ([@zkat](https://github.com/zkat)) - -### BUG FIXES - -* [`685764308`](https://github.com/npm/npm/commit/685764308e05ff0ddb9943b22ca77b3a56d5c026) - Fix a bug where OTPs passed in via the commandline would have leading - zeros deleted resulted in authentication failures. - ([@iarna](https://github.com/iarna)) -* [`8f3faa323`](https://github.com/npm/npm/commit/8f3faa3234b2d2fcd2cb05712a80c3e4133c8f45) - [`6800f76ff`](https://github.com/npm/npm/commit/6800f76ffcd674742ba8944f11f6b0aa55f4b612) - [`ec90c06c7`](https://github.com/npm/npm/commit/ec90c06c78134eb2618612ac72288054825ea941) - [`825b5d2c6`](https://github.com/npm/npm/commit/825b5d2c60e620da5459d9dc13d4f911294a7ec2) - [`4785f13fb`](https://github.com/npm/npm/commit/4785f13fb69f33a8c624ecc8a2be5c5d0d7c94fc) - [`bd16485f5`](https://github.com/npm/npm/commit/bd16485f5b3087625e13773f7251d66547d6807d) - Restore the ability to bundle dependencies that are uninstallable from the - registry. This also eliminates needless registry lookups for bundled - dependencies. - - Fixed a bug where attempting to install a dependency that is bundled - inside another module without reinstalling that module would result in - ENOENT errors. - ([@iarna](https://github.com/iarna)) -* [`429498a8c`](https://github.com/npm/npm/commit/429498a8c8d4414bf242be6a3f3a08f9a2adcdf9) - [#20029](https://github.com/npm/npm/pull/20029) - Allow packages with non-registry specifiers to follow the fast path that - the we use with the lock-file for registry specifiers. This will improve install time - especially when operating only on the package-lock (`--package-lock-only`). - ([@zkat](https://github.com/zkat)) - - Fix the a bug where `npm i --only=prod` could remove development - dependencies from lock-file. - ([@iarna](https://github.com/iarna)) -* [`834b46ff4`](https://github.com/npm/npm/commit/834b46ff48ade4ab4e557566c10e83199d8778c6) - [#20122](https://github.com/npm/npm/pull/20122) - Improve the update-notifier messaging (borrowing ideas from pnpm) and - eliminate false positives. - ([@zkat](https://github.com/zkat)) -* [`f9de7ef3a`](https://github.com/npm/npm/commit/f9de7ef3a1089ceb2610cd27bbd4b4bc2979c4de) - [#20154](https://github.com/npm/npm/pull/20154) - Let version succeed when `package-lock.json` is gitignored. - ([@nwoltman](https://github.com/nwoltman)) -* [`f8ec52073`](https://github.com/npm/npm/commit/f8ec520732bda687bc58d9da0873dadb2d65ca96) - [#20212](https://github.com/npm/npm/pull/20212) - Ensure that we only create an `etc` directory if we are actually going to write files to it. - ([@buddydvd](https://github.com/buddydvd)) -* [`ab489b753`](https://github.com/npm/npm/commit/ab489b75362348f412c002cf795a31dea6420ef0) - [#20140](https://github.com/npm/npm/pull/20140) - Note in documentation that `package-lock.json` version gets touched by `npm version`. - ([@srl295](https://github.com/srl295)) -* [`857c2138d`](https://github.com/npm/npm/commit/857c2138dae768ea9798782baa916b1840ab13e8) - [#20032](https://github.com/npm/npm/pull/20032) - Fix bug where unauthenticated errors would get reported as both 404s and - 401s, i.e. `npm ERR! 404 Registry returned 401`. In these cases the error - message will now be much more informative. - ([@iarna](https://github.com/iarna)) -* [`d2d290bca`](https://github.com/npm/npm/commit/d2d290bcaa85e44a4b08cc40cb4791dd4f81dfc4) - [#20082](https://github.com/npm/npm/pull/20082) - Allow optional @ prefix on scope with `npm team` commands for parity with other commands. - ([@bcoe](https://github.com/bcoe)) -* [`b5babf0a9`](https://github.com/npm/npm/commit/b5babf0a9aa1e47fad8a07cc83245bd510842047) - [#19580](https://github.com/npm/npm/pull/19580) - Improve messaging when two-factor authentication is required while publishing. - ([@jdeniau](https://github.com/jdeniau)) -* [`471ee1c5b`](https://github.com/npm/npm/commit/471ee1c5b58631fe2e936e32480f3f5ed6438536) - [`0da38b7b4`](https://github.com/npm/npm/commit/0da38b7b4aff0464c60ad12e0253fd389efd5086) - Fix a bug where optional status of a dependency was not being saved to - the package-lock on the initial install. - ([@iarna](https://github.com/iarna)) -* [`b3f98d8ba`](https://github.com/npm/npm/commit/b3f98d8ba242a7238f0f9a90ceea840b7b7070af) - [`9dea95e31`](https://github.com/npm/npm/commit/9dea95e319169647bea967e732ae4c8212608f53) - Ensure that `--no-optional` does not remove optional dependencies from the lock-file. - ([@iarna](https://github.com/iarna)) - -### MISCELLANEOUS - -* [`ec6b12099`](https://github.com/npm/npm/commit/ec6b120995c9c1d17ff84bf0217ba5741365af2d) - Exclude all tests from the published version of npm itself. - ([@iarna](https://github.com/iarna)) - -### DEPENDENCY UPDATES - -* [`73dc97455`](https://github.com/npm/npm/commit/73dc974555217207fb384e39d049da19be2f79ba) - [zkat/cipm#46](https://github.com/zkat/cipm/pull/46) - `libcipm@1.6.2`: - Detect binding.gyp for default install lifecycle. Let's `npm ci` work on projects that - have their own C code. - ([@caleblloyd](https://github.com/caleblloyd)) -* [`77c3f7a00`](https://github.com/npm/npm/commit/77c3f7a0091f689661f61182cd361465e2d695d5) - `iferr@1.0.0` -* [`dce733e37`](https://github.com/npm/npm/commit/dce733e37687c21cb1a658f06197c609ac39c793) - [zkat/json-parse-better-errors#1](https://github.com/zkat/json-parse-better-errors/pull/1) - `json-parse-better-errors@1.0.2` - ([@Hoishin](https://github.com/Hoishin)) -* [`c52765ff3`](https://github.com/npm/npm/commit/c52765ff32d195842133baf146d647760eb8d0cd) - `readable-stream@2.3.6` - ([@mcollina](https://github.com/mcollina)) -* [`e160adf9f`](https://github.com/npm/npm/commit/e160adf9fce09f226f66e0892cc3fa45f254b5e8) - `update-notifier@2.4.0` - ([@sindersorhus](https://github.com/sindersorhus)) -* [`9a9d7809e`](https://github.com/npm/npm/commit/9a9d7809e30d1add21b760804be4a829e3c7e39e) - `marked@0.3.1` - ([@joshbruce](https://github.com/joshbruce)) -* [`f2fbd8577`](https://github.com/npm/npm/commit/f2fbd857797cf5c12a68a6fb0ff0609d373198b3) - [#20256](https://github.com/npm/npm/pull/20256) - `figgy-pudding@2.0.1` - ([@zkat](https://github.com/zkat)) -* [`44972d53d`](https://github.com/npm/npm/commit/44972d53df2e0f0cc22d527ac88045066205dbbf) - [#20256](https://github.com/npm/npm/pull/20256) - `libnpmhook@3.0.0` - ([@zkat](https://github.com/zkat)) -* [`cfe562c58`](https://github.com/npm/npm/commit/cfe562c5803db08a8d88957828a2cd1cc51a8dd5) - [#20276](https://github.com/npm/npm/pull/20276) - `node-gyp@3.6.2` -* [`3c0bbcb8e`](https://github.com/npm/npm/commit/3c0bbcb8e5440a3b90fabcce85d7a1d31e2ecbe7) - [zkat/npx#172](https://github.com/zkat/npx/pull/172) - `libnpx@10.1.1` - ([@jdalton](https://github.com/jdalton)) -* [`0573d91e5`](https://github.com/npm/npm/commit/0573d91e57c068635a3ad4187b9792afd7b5e22f) - [zkat/cacache#128](https://github.com/zkat/cacache/pull/128) - `cacache@11.0.1` - ([@zkat](https://github.com/zkat)) -* [`396afa99f`](https://github.com/npm/npm/commit/396afa99f61561424866d5c8dd7aedd6f91d611a) - `figgy-pudding@3.1.0` - ([@zkat](https://github.com/zkat)) -* [`e7f869c36`](https://github.com/npm/npm/commit/e7f869c36ec1dacb630e5ab749eb3bb466193f01) - `pacote@8.0.0` - ([@zkat](https://github.com/zkat)) -* [`77dac72df`](https://github.com/npm/npm/commit/77dac72dfdb6add66ec859a949b1d2d788a379b7) - `ssri@6.0.0` - ([@zkat](https://github.com/zkat)) -* [`0b802f2a0`](https://github.com/npm/npm/commit/0b802f2a0bfa15c6af8074ebf9347f07bccdbcc7) - `retry@0.12.0` - ([@iarna](https://github.com/iarna)) -* [`4781b64bc`](https://github.com/npm/npm/commit/4781b64bcc47d4e7fb7025fd6517cde044f6b5e1) - `libnpmhook@4.0.1` - ([@zkat](https://github.com/zkat)) -* [`7bdbaeea6`](https://github.com/npm/npm/commit/7bdbaeea61853280f00c8443a3b2d6e6b893ada9) - `npm-package-arg@6.1.0` - ([@zkat](https://github.com/zkat)) -* [`5f2bf4222`](https://github.com/npm/npm/commit/5f2bf4222004117eb38c44ace961bd15a779fd66) - `read-package-tree@5.2.1` - ([@zkat](https://github.com/zkat)) - -## v6.0.0-0 (2018-03-23): - -Sometimes major releases are a big splash, sometimes they're something -smaller. This is the latter kind. That said, we expect to keep this in -release candidate status until Node 10 ships at the end of April. There -will likely be a few more features for the 6.0.0 release line between now -and then. We do expect to have a bigger one later this year though, so keep -an eye out for `npm@7`! - -### *BREAKING* AVOID DEPRECATED - -When selecting versions to install, we now avoid deprecated versions if -possible. For example: - -``` -Module: example -Versions: -1.0.0 -1.1.0 -1.1.2 -1.1.3 (deprecated) -1.2.0 (latest) -``` - -If you ask `npm` to install `example@~1.1.0`, `npm` will now give you `1.1.2`. - -By contrast, if you installed `example@~1.1.3` then you'd get `1.1.3`, as -it's the only version that can match the range. - -* [`78bebc0ce`](https://github.com/npm/npm/commit/78bebc0cedc4ce75c974c47b61791e6ca1ccfd7e) - [#20151](https://github.com/npm/npm/pull/20151) - Skip deprecated versions when possible. - ([@zkat](https://github.com/zkat)) - -### *BREAKING* UPDATE AND OUTDATED - -When `npm install` is finding a version to install, it first checks to see -if the specifier you requested matches the `latest` tag. If it doesn't, -then it looks for the highest version that does. This means you can do -release candidates on tags other than `latest` and users won't see them -unless they ask for them. Promoting them is as easy as setting the `latest` -tag to point at them. - -Historically `npm update` and `npm outdated` worked differently. They just -looked for the most recent thing that matched the semver range, disregarding -the `latest` tag. We're changing it to match `npm install`'s behavior. - -* [`3aaa6ef42`](https://github.com/npm/npm/commit/3aaa6ef427b7a34ebc49cd656e188b5befc22bae) - Make update and outdated respect latest interaction with semver as install does. - ([@iarna](https://github.com/iarna)) -* [`e5fbbd2c9`](https://github.com/npm/npm/commit/e5fbbd2c999ab9c7ec15b30d8b4eb596d614c715) - `npm-pick-manifest@2.1.0` - ([@iarna](https://github.com/iarna)) - -### PLUS ONE SMALLER PATCH - -Technically this is a bug fix, but the change in behavior is enough of an -edge case that I held off on bringing it in until a major version. - -When we extract a binary and it starts with a shebang (or "hash bang"), that -is, something like: - -``` -#!/usr/bin/env node -``` - -If the file has Windows line endings we strip them off of the first line. -The reason for this is that shebangs are only used in Unix-like environments -and the files with them can't be run if the shebang has a Windows line ending. - -Previously we converted ALL line endings from Windows to Unix. With this -patch we only convert the line with the shebang. (Node.js works just fine -with either set of line endings.) - -* [`814658371`](https://github.com/npm/npm/commit/814658371bc7b820b23bc138e2b90499d5dda7b1) - [`7265198eb`](https://github.com/npm/npm/commit/7265198ebb32d35937f4ff484b0167870725b054) - `bin-links@1.1.2`: - Only rewrite the CR after a shebang (if any) when fixing up CR/LFs. - ([@iarna](https://github.com/iarna)) - -### *BREAKING* SUPPORTED NODE VERSIONS - -Per our supported Node.js policy, we're dropping support for both Node 4 and -Node 7, which are no longer supported by the Node.js project. - -* [`077cbe917`](https://github.com/npm/npm/commit/077cbe917930ed9a0c066e10934d540e1edb6245) - Drop support for Node 4 and Node 7. - ([@iarna](https://github.com/iarna)) - -### DEPENDENCIES - -* [`478fbe2d0`](https://github.com/npm/npm/commit/478fbe2d0bce1534b1867e0b80310863cfacc01a) - `iferr@1.0.0` -* [`b18d88178`](https://github.com/npm/npm/commit/b18d88178a4cf333afd896245a7850f2f5fb740b) - `query-string@6.0.0` -* [`e02fa7497`](https://github.com/npm/npm/commit/e02fa7497f89623dc155debd0143aa54994ace74) - `is-cidr@2.0.5` -* [`c8f8564be`](https://github.com/npm/npm/commit/c8f8564be6f644e202fccd9e3de01d64f346d870) - [`311e55512`](https://github.com/npm/npm/commit/311e5551243d67bf9f0d168322378061339ecff8) - `standard@11.0.1` diff --git a/changelogs/CHANGELOG-7.md b/changelogs/CHANGELOG-7.md deleted file mode 100644 index 81249c78aa65b..0000000000000 --- a/changelogs/CHANGELOG-7.md +++ /dev/null @@ -1,3644 +0,0 @@ -## v7.24.2 (2021-10-04) - -### BUG FIXES - -* [`56d6cfdc0`](https://github.com/npm/cli/commit/56d6cfdc0745fe919645389b94efb36760eb4179) - [#3804](https://github.com/npm/cli/issues/3804) - encode url before opening - ([@isaacs](https://github.com/isaacs)) -* [`075fe5056`](https://github.com/npm/cli/commit/075fe50565ae5c66df727cdd7df9dd5ed8cd4015) - [#3799](https://github.com/npm/cli/issues/3799) - restore exit code on "npm outdated" - ([@gfyoung](https://github.com/gfyoung)) -* [`dbb90f799`](https://github.com/npm/cli/commit/dbb90f7997900b8ae6026dddaa718efe9a1db2f4) - [#3809](https://github.com/npm/cli/issues/3809) - use Intl.Collator for string sorting when available - ([@isaacs](https://github.com/isaacs)) - -### DEPENDENCIES - -* [`69ab10bbf`](https://github.com/npm/cli/commit/69ab10bbf83d42a5d3b5d3f43e5e5b861f3dfed0) - `is-core-module@2.7.0` -* [`e94ddeaca`](https://github.com/npm/cli/commit/e94ddeaca1e75ecc8f54ebcb3df222965e3635d1) - `@npmcli/arborist@2.9.0`: - * fix: avoid infinite loops in peer dep replacements - * fix: use Intl.Collator for string sorting when available - * feat(vuln): expose isDirect - -### DOCUMENTATION - -* [`f425950a6`](https://github.com/npm/cli/commit/f425950a6ca671b2df20703f70b59022c2858d4d) - [#3805](https://github.com/npm/cli/issues/3805) - remove npm Enterprise from documentation - ([@ethomson](https://github.com/ethomson)) -* [`bb0b2da6c`](https://github.com/npm/cli/commit/bb0b2da6c0275dd8c9eda894452ce45b2e8c4c51) - [#3699](https://github.com/npm/cli/issues/3699) - fix(docs): add note about workspace script order - ([@behnammodi](https://github.com/behnammodi)) - -## v7.24.1 (2021-09-23) - -### DEPENDENCIES - -* [`1be8d41e6`](https://github.com/npm/cli/commit/1be8d41e6f23f7a3d8411a31099ab546fbcb5bfa) - `socks-proxy-agent@6.1.0`: - * feat: allow passing tls connection options -* [`eafd55eae`](https://github.com/npm/cli/commit/eafd55eae219a6c15d2857d06b673a67d7f7d060) - `glob@7.2.0` - -### DOCS - -* [`dae5ce305`](https://github.com/npm/cli/commit/dae5ce3055ded57eab8aa3425004c60224a6fe67) - [#3784](https://github.com/npm/cli/issues/3784) - docs: document special meaning of registry.npmjs.com - ([@everett1992](https://github.com/everett1992)) - -## v7.24.0 (2021-09-16) - -### FEATURES - -* [`c7787b3fb`](https://github.com/npm/cli/commit/c7787b3fb7630aab84aae83ebf9a7117c7173b6b) - [`1fbbe1e04`](https://github.com/npm/cli/commit/1fbbe1e04be5d79c7b49910324e64c19ed599eeb) - bundled npm-install-checks ([@wraithgar](https://github.com/wraithgar)) - -### BUG FIXES - -* [`0320bd77e`](https://github.com/npm/cli/commit/0320bd77e2a38f48a88e377df4b122fd21043a83) - [#3739](https://github.com/npm/cli/issues/3739) - fix(view): Show the correct publish date for versions selected by range ([@andersk](https://github.com/andersk)) -* [`e4a521857`](https://github.com/npm/cli/commit/e4a5218573583149af795982a39fa64a4116cdab) - [#3748](https://github.com/npm/cli/issues/3748) - fix(install.sh): don't remove old npm first - ([@wraithgar](https://github.com/wraithgar)) -* [`b4aac345b`](https://github.com/npm/cli/commit/b4aac345b0a7cdec4d713c5be4daea37330b2b26) - [#3754](https://github.com/npm/cli/issues/3754) - fix(config): user-agent properly shows ci - ([@wraithgar](https://github.com/wraithgar)) -* [`b807cd62e`](https://github.com/npm/cli/commit/b807cd62eabe337e3243415c9870ea36d9289e12) - [#3738](https://github.com/npm/cli/issues/3738) - fix(search): return valid json for no results - ([@AyushRawal](https://github.com/AyushRawal)) -* [`2def17a3b`](https://github.com/npm/cli/commit/2def17a3b625b92b40c6185ff4b47e8ed006492c) - [#3760](https://github.com/npm/cli/issues/3760) - fix(install): use configured registry when checking manifest - ([@yacoman89](https://github.com/yacoman89)) -* [`ca792acdd`](https://github.com/npm/cli/commit/ca792acdd4ba683d8415c88188ec6739033fb4fd) - [#3761](https://github.com/npm/cli/issues/3761) - fix(logs): clean args for failed commands - ([@wraithgar](https://github.com/wraithgar)) - -### DEPENDENCIES - -* [`59743972c`](https://github.com/npm/cli/commit/59743972c2ae1d2dd601aaa6c59974c686b1cb29) - [#3747](https://github.com/npm/cli/issues/3747) - fix(did-you-mean): succeed if cwd is not a package - ([@wraithgar](https://github.com/wraithgar)) -* [`ac8e4ad18`](https://github.com/npm/cli/commit/ac8e4ad18a6b726dd2c3abcb0f605701cca0ae2c) - `init-package-json@2.0.5`: - * fix: bin script path -* [`371655a6b`](https://github.com/npm/cli/commit/371655a6b0e6664fec67f16cb247cc9f174a5197) - `minipass@3.1.5`: - * fix: re-emit 'error' event if missed and new listener added - * fix: do not blow up if process is missing - -### DOCUMENTATION - -* [`4d93b484a`](https://github.com/npm/cli/commit/4d93b484abb50e3704fb436db572b93fb36c7ac3) - [#3759](https://github.com/npm/cli/issues/3759) - fix(docs): use correct hyperlink to package-json - ([@nategreen](https://github.com/nategreen)) - -## v7.23.0 (2021-09-09) - -### FEATURES - -* [`6c12500ae`](https://github.com/npm/cli/commit/6c12500ae14a6f8b78e3ab091ee6cc8e2ea9fd23) - [#3731](https://github.com/npm/cli/issues/3731) - feat(install): very strict global npm engines - ([@wraithgar](https://github.com/wraithgar)) - -### BUG FIXES - -* [`1ad093824`](https://github.com/npm/cli/commit/1ad0938243110d983284e8763da41a57b561563d) - [#3732](https://github.com/npm/cli/issues/3732) - fix(error-message): clean urls from 404 error - ([@wraithgar](https://github.com/wraithgar)) - -### DOCUMENTATION - -* [`64f7d1a55`](https://github.com/npm/cli/commit/64f7d1a55db99b1aaf8fb59557b3dedcdcd954a0) - [#3727](https://github.com/npm/cli/issues/3727) - docs(contributing): add note on changes to tooling - ([@darcyclarke](https://github.com/darcyclarke)) -* [`eda9162f2`](https://github.com/npm/cli/commit/eda9162f2db19b512d3af6b0d43201d54045c13a) - [#3715](https://github.com/npm/cli/issues/3715) - Add --if-present flag documentation to workspaces - ([@Matsuuu](https://github.com/Matsuuu)) - -## v7.22.0 (2021-09-02) - -### BUG FIXES -* [`6f431fe23`](https://github.com/npm/cli/commit/6f431fe2325f77b4370f95848359a36fe7a011d1) - [#3690](https://github.com/npm/cli/issues/3690) - Fix one “see also” link - ([@tripu](https://github.com/tripu)) - -### DEPENDENCIES -* [`033e948c9`](https://github.com/npm/cli/commit/033e948c95b3455812e03a860ad1bd96a635e7eb) - `read-package-json@4.1.1`: - * feat: add types lookup - * fix(man): don't lose relative man path -* [`1fa549db0`](https://github.com/npm/cli/commit/1fa549db0955b55fd680a658809a6d97be306b06) - `@npmcli/config@2.3.0`: - * feat: export npm_config_local_prefix and npm_config_global_prefix to the environment -* [`e91578d10`](https://github.com/npm/cli/commit/e91578d10b1d5d930fec32e7070d975af4892140) - `minpass-fetch@1.4.1`: - * Made rejectUnauthorized depend on NODE_TLS_REJECT_UNAUTHORIZED -* [`6125db545`](https://github.com/npm/cli/commit/6125db545315da0217fe7b05062fd0a504c9a45b) - `are-we-there-yet@1.1.6` -* [`0dcda73b0`](https://github.com/npm/cli/commit/0dcda73b022083338c4cb755390a275757b9627b) - `string_decoder@1.3.0` -* [`4b913417c`](https://github.com/npm/cli/commit/4b913417c4e30980505a02eec50810f895dd52d7) - `npmlog@5.0.1` -* [`876c755eb`](https://github.com/npm/cli/commit/876c755eb0dfc215123682f798b5fca415f7c7d9) - `@npmcli/arborist@2.8.3`: - * fix: do not fail adding unresolvable optional dep - -## v7.21.1 (2021-08-26) - -### BUG FIXES - -* [`4e52217cb`](https://github.com/npm/cli/commit/4e52217cb25a697b0f6b0131bcb8c87e0dbcda53) - [#3684](https://github.com/npm/cli/issues/3684) - fix(config): respect --global, --package-lock-only - ([@nlf](https://github.com/nlf)) - -### DEPENDENCIES - -* [`e3878536f`](https://github.com/npm/cli/commit/e3878536f3612d9ddc3002c126cfa9a91021c7db) - `make-fetch-happen@9.1.0`: - * fix: use the same strictSSL default as tls.connect -* [`145f70cc1`](https://github.com/npm/cli/commit/145f70cc1b78dee4ffa53f557fa72d0948696839) - `read-package-json@4.0.1`: - * fix: Add gitHead in subdirectories too - * fix(man): don't resolve paths to man files -* [`3f4d37143`](https://github.com/npm/cli/commit/3f4d371432a1fc8280e73d8467acd0eed0bbef26) - `tar@6.1.11`: - * fix: perf regression on hot string munging path -* [`e63a942c6`](https://github.com/npm/cli/commit/e63a942c685233fa546788981ed9c144220d50e1) - `cacache@15.3.0`: - * feat: introduce @npmcli/fs for tmp dir methods - -### DOCUMENTATION - -* [`957fa6040`](https://github.com/npm/cli/commit/957fa604035992285572f63c38545eea86bbb1ff) - [#3681](https://github.com/npm/cli/issues/3681) - clarify uninstall lifecycle script - ([@fritzy](https://github.com/fritzy)) - -## v7.21.0 (2021-08-19) - -### FEATURES - -* [`ff34d6cd6`](https://github.com/npm/cli/commit/ff34d6cd6f2077962cba1ef9c893a958ac7174f8) - [#3592](https://github.com/npm/cli/issues/3592) - feat(cache): initial implementation of ls and rm - ([@fritzy](https://github.com/fritzy)) - -### BUG FIXES - -* [`32e88c943`](https://github.com/npm/cli/commit/32e88c94387bda6b25f66019793efcda8f01ef6e) - [#3640](https://github.com/npm/cli/issues/3640) - fix(did-you-mean): switch levenshtein libraries - ([@wraithgar](https://github.com/wraithgar)) -* [`487731cd5`](https://github.com/npm/cli/commit/487731cd56a22272c6ff72ef2fa7822368bf63e3) - [#3658](https://github.com/npm/cli/issues/3658) - fix(logging): sanitize logged argv - ([@wraithgar](https://github.com/wraithgar)) -* [`68a19bb02`](https://github.com/npm/cli/commit/68a19bb02aa0d7a566c8e2245f1e524b915faf09) - [#3661](https://github.com/npm/cli/issues/3661) - fix(error-message): look for er.path not er.file - ([@wraithgar](https://github.com/wraithgar)) - -### DEPENDENCIES - -* [`df57f0d53`](https://github.com/npm/cli/commit/df57f0d532d406b3b1409454ea5f2255fcd08248) - `@npmcli/run-script@1.8.6` -* [`8183976cf`](https://github.com/npm/cli/commit/8183976cfa53bab6e9116ec5de97b04225c5d09b) - `normalize-package-data@3.0.3`: - * fix: account for "licence" as spelling variant -* [`f07772401`](https://github.com/npm/cli/commit/f07772401c3712d5f9b0dfeef88e1943229cfa79) - `init-package-json@2.0.4` -* [`991a3bd39`](https://github.com/npm/cli/commit/991a3bd39f0abf8614373f267419c7b8f6e279ac) - `read-package-json@4.0.0` -* [`e9e5ee560`](https://github.com/npm/cli/commit/e9e5ee560e2baf694843df852d027fb9f2dbcb06) - `@npmcli/arborist@2.8.2`: - * fix: treat top-level global packages as "top" nodes - * fix: load global symlinks implicitly as file: deps - * fix(reify): debug crash when extracting into symlink - * fix: node_modules must be a directory - * fix: make Node.children() a case-insensitive Map - * fix(reify): verify existing deps in nm are dirs -* [`b6f40b5f8`](https://github.com/npm/cli/commit/b6f40b5f85094387f2fa8d42b6a624644b8ddcf1) - `tar@6.1.10`: - * fix: prune dirCache properly for unicode, windows - * fix: reserve paths properly for unicode, windows - * fix: prevent path escape using drive-relative paths - * fix: drop dirCache for symlink on all platforms -* [`218cacadc`](https://github.com/npm/cli/commit/218cacadcf35879ce178813c699258e7ffe91fe9) - `is-core-module@2.6.0` -* [`7ac621cd1`](https://github.com/npm/cli/commit/7ac621cd14f2ffbf5c15c3258f537fdfddc21ac6) - `smart-buffer@4.2.0` -* [`94f92de13`](https://github.com/npm/cli/commit/94f92de138432c900b195b71949f4933e872f26a) - `make-fetch-happen@9.0.5` -* [`71cdfd898`](https://github.com/npm/cli/commit/71cdfd8983cd0c61f39bdf91f87d40aad3b081c2) - `spdx-license-ids@3.0.10`: - * update license list to v3.14 - -### DOCUMENTATION - -* [`ff6626ab6`](https://github.com/npm/cli/commit/ff6626ab6ca9b4e189a3bc56a762104927dbeedb) - [#3630](https://github.com/npm/cli/issues/3630) - fix(docs): update npm-publish access flag info - ([@austincho](https://github.com/austincho)) - -## v7.20.6 (2021-08-12) - -### DEPENDENCIES - -* [`5bebf280f`](https://github.com/npm/cli/commit/5bebf280f228e818524f6989caab1cfba1ffaf90) - `tar@6.1.8` - * fix: reserve paths case-insensitively -* [`5d89de44d`](https://github.com/npm/cli/commit/5d89de44daa636dc151eaefcafabb357540d35ce) - `tar@6.1.7`: - * fix: normalize paths on Windows systems -* [`a1bdbea97`](https://github.com/npm/cli/commit/a1bdbea974ebfc6694b4c8ad5da86215c2924dde) - [#3569](https://github.com/npm/cli/issues/3569) - * remove byte-size - ([@wraithgar](https://github.com/wraithgar)) -* [`61782fa85`](https://github.com/npm/cli/commit/61782fa858c278455ce144f975c6b0e3ea2d9944) - `@npmcli/map-workspaces@1.0.4`: - * fix: better error message for duplicate workspace names -* [`b88f770fa`](https://github.com/npm/cli/commit/b88f770faa2651ca0833e1c9eb361e9e07e0bbc3) - `@npmcli/arborist@2.8.1`: - * [#3632] Fix "cannot read property path of null" error in 'npm dedupe' - * fix(shrinkwrap): always set name on the root node - -### DOCUMENTATION - -* [`001f2c1b7`](https://github.com/npm/cli/commit/001f2c1b7e9474049a45709f0e80ee3c474a4ba9) - [#3621](https://github.com/npm/cli/issues/3621) - fix(docs): do not include certain files - ([@AkiJoey](https://github.com/AkiJoey)) -* [`d1812f1a6`](https://github.com/npm/cli/commit/d1812f1a627d6a4d4cb6d07d7735d2d2cc2cf264) - [#3630](https://github.com/npm/cli/issues/3630) - fix(docs): update npm-publish access flag info - ([@austincho](https://github.com/austincho)) -* [`d5a099c7b`](https://github.com/npm/cli/commit/d5a099c7bf62977a5a5d8242c61f323a88e27c73) - [#3615](https://github.com/npm/cli/issues/3615) - fix(readme): add nvm-windows to installers links - ([@Yash-Singh1](https://github.com/Yash-Singh1)) - -## v7.20.5 (2021-08-05) - -### DEPENDENCIES - -* [`44377738e`](https://github.com/npm/cli/commit/44377738ef6b53607a7b17162aec984d5dcf7c58) - `graceful-fs@4.2.8` - * fix: start retrying immediately, stop after 60 seconds - - -## v7.20.4 (2021-08-05) - -### BUG FIXES - -* [`6a8086e25`](https://github.com/npm/cli/commit/6a8086e258aa209b877e182db4b75f11de5b291d) - [#3463](https://github.com/npm/cli/issues/3463) - fix(tests): move more tests to use real npm - ([@wraithgar](https://github.com/wraithgar)) - -### DEPENDENCIES - -* [`15fae4941`](https://github.com/npm/cli/commit/15fae4941475f4398e47d9cc4eb6a73683e15aac) - `tar@6.1.6`: - * fix: properly handle top-level files when using strip - * Avoid an unlikely but theoretically possible redos - * WriteEntry backpressure - * fix(unpack): always resume parsing after an entry error - * fix(unpack): fix hang on large file on open() fail - * fix: properly prefix hard links -* [`745326de0`](https://github.com/npm/cli/commit/745326de0fae9f27f1deaf7729777aae48ac29fc) - `libnpmexec@2.0.1`: - * Clear progress bar which overlays confirm prompt -* [`e82bcd4e8`](https://github.com/npm/cli/commit/e82bcd4e8355d083f8f3eedb6251a5f3053d6dfd) - `graceful-fs@4.2.7`: - * fix: start retrying immediately, stop after 10 attempts - -## v7.20.3 (2021-07-29) - -### BUG FIXES - -* [`66dc5f94d`](https://github.com/npm/cli/commit/66dc5f94dfb5bc99c715e075cde1ab9c1ec84a83) - [#3588](https://github.com/npm/cli/issues/3588) - update eresolve explanations for new arborist data provided -* [`99575acab`](https://github.com/npm/cli/commit/99575acab5c93c03c59cb918c7916647b2c0be51) - [#3591](https://github.com/npm/cli/issues/3591) - fix(node_modules): remove duplicated file - ([@wraithgar](https://github.com/wraithgar)) - -### DEPENDENCIES - -* [`97cb5ec31`](https://github.com/npm/cli/commit/97cb5ec312e151527ba2aab77ed0307917e1d845) - `@npmcli/arborist@2.8.0`: - * Refactor ideal tree building to handle more complicated - peerDependencies use cases. - * Do not modify ideal tree while checking if a peerSet can be placed. -* [`7db1a0a26`](https://github.com/npm/cli/commit/7db1a0a264cf67d2a2a3cdc71bbf09b36dc45075) - chore(deps): `mime-types@1.49.0` `mime-db@1.49.0` - -## v7.20.2 (2021-07-27) - -### DEPENDENCIES - -* [`f5aab1f88`](https://github.com/npm/cli/commit/f5aab1f8878b4e9a6f4d47dddc449e18a190e201) - `tar@6.1.1` - * fix: strip absolute paths more comprehensively -* [`ce8fb0f69`](https://github.com/npm/cli/commit/ce8fb0f69ae1b3fdd8834cf073d3d30c2bfc7bc6) - `tar@6.1.2` - * fix: Remove paths from dirCache when no longer dirs -* [`ced85087a`](https://github.com/npm/cli/commit/ced85087ac5fce5984ae28af910357a9a94434d7) - `gauge@3.0.1` - * add missing dependency to package.json - -## v7.20.1 (2021-07-22) - -### BUG FIXES - -* [`009ad1e68`](https://github.com/npm/cli/commit/009ad1e683aa061d7e5c78b9362b0bd1b14ee643) - [#3561](https://github.com/npm/cli/issues/3561) - fix(exit-handler): always warn if not called - ([@wraithgar](https://github.com/wraithgar)) -* [`eb67054c8`](https://github.com/npm/cli/commit/eb67054c8303348b25f9717c8f82c8d8d494a242) - [#3563](https://github.com/npm/cli/issues/3563) - fix(config): consolidate use of npm.color - ([@wraithgar](https://github.com/wraithgar)) - -### DOCUMENTATION - -* [`a014f3d28`](https://github.com/npm/cli/commit/a014f3d284e49cd085cfd060a71a161b93bca9d1) - [#3562](https://github.com/npm/cli/issues/3562) - fix(docs): typo in `npm cmd` docs - ([@wraithgar](https://github.com/wraithgar)) -* [`1fe1c9b74`](https://github.com/npm/cli/commit/1fe1c9b74ea3c3d5bb5b3696b954422b9b55dd91) - [#3523](https://github.com/npm/cli/issues/3523) - fix(docs): updated policy urls - ([@DemiraDimitrova](https://github.com/DemiraDimitrova)) - -### DEPENDENCIES - -* [`d7f29e8c9`](https://github.com/npm/cli/commit/d7f29e8c94ae77661390f82ae72efc1bd6fcfbc3) - `read-package-json-fast@2.0.3`: - - feat: load directories.bin as a bin object -* [`b1fefa73d`](https://github.com/npm/cli/commit/b1fefa73db2f8d9c55b4447ffc1cdbaf8e9bb298) - `npmlog@5.0.0` - * Drop support for node 6 and 8 -* [`b6e09971a`](https://github.com/npm/cli/commit/b6e09971a8f9a3c92188838b69be0a0dda27f0bb) - remove ignored files from node_modules - ([@Ruy Adorno](https://github.com/Ruy Adorno)) -* [`cf737c505`](https://github.com/npm/cli/commit/cf737c505e76a473850c5244b17f3469efbc3c02) - `debug@4.3.2` - -## v7.20.0 (2021-07-15) - -### FEATURES - -* [`f17aca5cd`](https://github.com/npm/cli/commit/f17aca5cdf355aaa7e1f517d1b3bb4213f4df092) - [#3487](https://github.com/npm/cli/issues/3487) - feat: add `npm pkg` command - ([@ruyadorno](https://github.com/ruyadorno)) -* [`98905ae37`](https://github.com/npm/cli/commit/98905ae3759165cd6d6f6306f31acc6a2baa4cde) - [#3471](https://github.com/npm/cli/issues/3471) - feat(config): introduce `location` parameter - ([@nlf](https://github.com/nlf)) - -### BUG FIXES - -* [`4755b0728`](https://github.com/npm/cli/commit/4755b072877f547585cb0e2562261b2c87e2ff0b) - [#3498](https://github.com/npm/cli/issues/3498) - friendlier errors for `ERR_SOCKET_TIMEOUT` - ([@nlf](https://github.com/nlf)) -* [`3ecf19cdc`](https://github.com/npm/cli/commit/3ecf19cdc35684ccb15280b2c34d27496aa1c634) - [#3508](https://github.com/npm/cli/issues/3508) - fix(config): fix noproxy - ([@wraithgar](https://github.com/wraithgar)) -* [`c3bd10e46`](https://github.com/npm/cli/commit/c3bd10e461976a073e6a898c46f8bde28b17668f) - [#3499](https://github.com/npm/cli/issues/3499) - fix(update-notifier): don't force black background - ([@wraithgar](https://github.com/wraithgar)) -* [`89483e888`](https://github.com/npm/cli/commit/89483e888acc56386b9ebc4d70a4676e4a5a5cb1) - [#3497](https://github.com/npm/cli/issues/3497) - fix(usage): better audit/boolean flag usage output - ([@wraithgar](https://github.com/wraithgar)) -* [`feeb8e42a`](https://github.com/npm/cli/commit/feeb8e42a7b0510023175dc86269edb544d97601) - [#3495](https://github.com/npm/cli/issues/3495) - fix(publish): obey --ignore-scripts flag - ([@wraithgar](https://github.com/wraithgar)) -* [`103c8c3ef`](https://github.com/npm/cli/commit/103c8c3ef3ba7ff0483557f32eebc4c6298285e3) - [#3479](https://github.com/npm/cli/issues/3479) - chore(exit): log any un-ended timings - ([@wraithgar](https://github.com/wraithgar)) -* [`efc4313c2`](https://github.com/npm/cli/commit/efc4313c2062ffad22aa24e5198d575a7eb5f20e) - [#3482](https://github.com/npm/cli/issues/3482) - chore(refactor): refactor exit handler and tests - ([@wraithgar](https://github.com/wraithgar)) -* [`d8eb49b70`](https://github.com/npm/cli/commit/d8eb49b705acb50b6bed971bfcce4db6e18e73dd) - [#3540](https://github.com/npm/cli/issues/3540) - fix(bundle-and-ignore): case sensitivity cleanup - ([@wraithgar](https://github.com/wraithgar)) - -### DOCUMENTATION - -* [`339145f64`](https://github.com/npm/cli/commit/339145f64f82d540dbc72ef97b54ae20c34315dd) - [#3491](https://github.com/npm/cli/issues/3491) - fix(docs): clarify what install type gets `.bin` - ([@wraithgar](https://github.com/wraithgar)) -* [`74c99755e`](https://github.com/npm/cli/commit/74c99755e522f9cfc0d602841568d5e1f835fcaf) - [#3494](https://github.com/npm/cli/issues/3494) - fix(docs): add npm update example - ([@wraithgar](https://github.com/wraithgar)) -* [`801a52330`](https://github.com/npm/cli/commit/801a52330636008fecadc812916c76fb945ce1f6) - [#3542](https://github.com/npm/cli/issues/3542) - fix(docs): correct Node.js JavaScript stylings - ([@relrelb](https://github.com/relrelb)) -* [`791416713`](https://github.com/npm/cli/commit/791416713d64c072d73bffbab2daf7b8eb3c4868) - [#3546](https://github.com/npm/cli/issues/3546) - fix(docs): how to see background script output - ([@cinderblock](https://github.com/cinderblock)) - -### DEPENDENCIES - -* [`691816f3d`](https://github.com/npm/cli/commit/691816f3de2a679152644a60f3e2c5962df6a81d) - `@npmcli/arborist@2.7.1` - * fixes running prepare scripts for workspaces on reify - * ensure pacote always compares correct integrity values -* [`b9597e944`](https://github.com/npm/cli/commit/b9597e944377e74907607ee280ec1e8c31dd3156) - `make-fetch-happen@9.0.4` - * fix: retry socket timeout failures - * fix: clean up invalid indexes and content after cacache read errors -* [`f573e7c56`](https://github.com/npm/cli/commit/f573e7c56e8505fd6dcc3e5f5b5be401d0a45b58) - `minipass-fetch@1.3.4` - * fix: correctly handle error events that happen after response events -* [`2d5797ea0`](https://github.com/npm/cli/commit/2d5797ea01e17b1559d792613446e1435e588a35) - `pacote@11.3.5` - * fix: show more actionable messages for git pathspec errors - * fix: include all dep types when building for prepare - * fix: do not set mtime when unpacking - -## v7.19.1 (2021-07-01) - -### BUG FIXES - -* [`013f0262d`](https://github.com/npm/cli/commit/013f0262db3e16605820f6117749fd3ebc70f6d1) - [#3469](https://github.com/npm/cli/issues/3469) - fix(exitHandler): write code to logfile - ([@wraithgar](https://github.com/wraithgar)) -* [`0dd0341ac`](https://github.com/npm/cli/commit/0dd0341ac9a65a2df8fc262ad9a56b7351f99d66) - [#3474](https://github.com/npm/cli/issues/3474) - fix(ping): make "npm ping" echo a right time - ([@aluneed](https://github.com/aluneed)) -* [`d2e298f3c`](https://github.com/npm/cli/commit/d2e298f3cbab278071480f94ff7d916d42cbf43b) - [#3484](https://github.com/npm/cli/issues/3484) - fix(deprecate): add undeprecate support - ([@wraithgar](https://github.com/wraithgar)) - - ### DOCUMENTATION - -* [`9dd32d08e`](https://github.com/npm/cli/commit/9dd32d08e09c21c9a4517161abfc7eed6518faf2) - [#3485](https://github.com/npm/cli/issues/3485) - fix(docs): remove npm package config override - ([@wraithgar](https://github.com/wraithgar)) -* [`a4e095618`](https://github.com/npm/cli/commit/a4e095618cda72244a18aaff9d6660b9082a2b84) - [#3486](https://github.com/npm/cli/issues/3486) - fix(docs): remove .hooks scripts - ([@wraithgar](https://github.com/wraithgar)) - -### TESTING - -* [`5f8ccccef`](https://github.com/npm/cli/commit/5f8ccccef9fc19229320df8cbcae9fcea8d31388) - [#3483](https://github.com/npm/cli/issues/3483) - chore(tests): clean snapshot for lib/view.js tests - ([@wraithgar](https://github.com/wraithgar)) - -## v7.19.0 (2021-06-24) - -### FEATURES - -* [`23ce3af19`](https://github.com/npm/cli/commit/23ce3af199c8a14ef16c63fc638a1ac21fd9a9b0) - [#3460](https://github.com/npm/cli/issues/3460) - feat(ls): report *why* something is invalid - ([@isaacs](https://github.com/isaacs)) - -### BUG FIXES - -* [`53f81af31`](https://github.com/npm/cli/commit/53f81af319f298a0fdd8f143184c3e89770f24ea) - [#3450](https://github.com/npm/cli/issues/3450) - fix(docs): Improve phrasing of workspace example - ([@lumaxis](https://github.com/lumaxis)) -* [`78da60ffe`](https://github.com/npm/cli/commit/78da60ffefcfd457a4432ce1492ee7b53d854450) - [#3454](https://github.com/npm/cli/issues/3454) - chore(linting): add bin and clean up lib/ls.js -* [`54eae3063`](https://github.com/npm/cli/commit/54eae3063eeb197225ee930525a1316e34ecf34c) - [#3416](https://github.com/npm/cli/issues/3416) - chore(errorHandler): rename to exit handler - ([@wraithgar](https://github.com/wraithgar)) -* [`d0f50b156`](https://github.com/npm/cli/commit/d0f50b156725e5b414050d9e9a59d5fad8a39a3d) - [#3451](https://github.com/npm/cli/issues/3451) - chore(refactor): async npm.load - ([@wraithgar](https://github.com/wraithgar)) -* [`87f67d9ef`](https://github.com/npm/cli/commit/87f67d9efaf6f897cf0d74e738c2625a21044109) - [#3458](https://github.com/npm/cli/issues/3458) - chore(tests): expose real mock npm object - ([@wraithgar](https://github.com/wraithgar)) -* [`f3dce0917`](https://github.com/npm/cli/commit/f3dce0917088dc37795af39e7f6b5089beff984c) - [#3459](https://github.com/npm/cli/issues/3459) - chore(config): snapshot config descriptions - ([@wraithgar](https://github.com/wraithgar)) -* [`6254b6f72`](https://github.com/npm/cli/commit/6254b6f726a301908f73b36ccfa52cd4fd6619e5) - [#3234](https://github.com/npm/cli/issues/3234) - [#3455](https://github.com/npm/cli/issues/3455) - @npmcli/package-json refactor - ([@ruyadorno](https://github.com/ruyadorno)) - -### DEPENDENCIES - -* [`fe4138381`](https://github.com/npm/cli/commit/fe4138381fd2e8c919bb9f794e20033ff049f783) - `@npmcli/arborist@2.6.4`: - * bin: allow turning off timer display with --timers=false - * fix: do not try to inflate a fresh lockfile - * fix(diff): walk target children if root is a link - * chore: @npmcli/package-json refactor - -## v7.18.1 (2021-06-17) - -## BUG FIXES - -* [`fce30e423`](https://github.com/npm/cli/commit/fce30e423745a2b81530176d2f08ca84896eef4c) - [#3435](https://github.com/npm/cli/issues/3435) - fix(docs): rebuild config docs - ([@wraithgar](https://github.com/wraithgar)) - -## v7.18.0 (2021-06-17) - -## FEATURES - -* [`ae285b391`](https://github.com/npm/cli/commit/ae285b39191f3a0c4edfb045a334057bef4567b5) - [#3408](https://github.com/npm/cli/issues/3408) - feat(ls): support `--package-lock-only` flag - ([@G-Rath](https://github.com/G-Rath)) -* [`c984fb59c`](https://github.com/npm/cli/commit/c984fb59c5af087b91acd927cbbacad7c6a46576) - [#3420](https://github.com/npm/cli/issues/3420) - feat(pack): add pack-destination config - ([@wraithgar](https://github.com/wraithgar)) - -## BUG FIXES - -* [`40829ec40`](https://github.com/npm/cli/commit/40829ec40c33a6d23f18715e60e3395bdcb0467e) - [#2554](https://github.com/npm/cli/issues/2554) - [#3399](https://github.com/npm/cli/issues/3399) - fix(link): do not prune packages - ([@ruyadorno](https://github.com/ruyadorno)) -* [`102d4e6fb`](https://github.com/npm/cli/commit/102d4e6fb3c3b02148dbeee977a7d1e6372340d5) - [#3417](https://github.com/npm/cli/issues/3417) - fix(workspaces): explicitly error in global mode - ([@wraithgar](https://github.com/wraithgar)) -* [`993df3041`](https://github.com/npm/cli/commit/993df3041f5bdaa496c3c8d80f00d16b9cf0a1e6) - [#3423](https://github.com/npm/cli/issues/3423) - fix(docs): ls command usage instructions - ([@gurdiga](https://github.com/gurdiga)) -* [`dcc13662c`](https://github.com/npm/cli/commit/dcc13662c1d3e22eaf392647a9cddbb5b0710d24) - [#3418](https://github.com/npm/cli/issues/3418) - fix(config): update link definition - ([@wraithgar](https://github.com/wraithgar)) -* [`b19e56c2e`](https://github.com/npm/cli/commit/b19e56c2e54c035518165470c10480201cefa997) - [#3382](https://github.com/npm/cli/issues/3382) - [#3429](https://github.com/npm/cli/issues/3429) - fix(ls): respect prod config for workspaces - ([@ruyadorno](https://github.com/ruyadorno)) -* [`c99b8b53c`](https://github.com/npm/cli/commit/c99b8b53c3d7a9b0daa6d4416e9c40202ddd59a2) - [#3430](https://github.com/npm/cli/issues/3430) - fix(config): add flatOptions.npxCache - ([@wraithgar](https://github.com/wraithgar)) -* [`e5abf2a21`](https://github.com/npm/cli/commit/e5abf2a2171d95bafc0993f337230d2b6633a6ed) - [#3386](https://github.com/npm/cli/issues/3386) - chore(libnpmdiff): added as workspace - ([@ruyadorno](https://github.com/ruyadorno)) -* [`c6a8734d7`](https://github.com/npm/cli/commit/c6a8734d7d6e4b6d061110a01e45e1d418d56489) - [#3388](https://github.com/npm/cli/issues/3388) - chore(refactor): finish passing npm context - ([@wraithgar](https://github.com/wraithgar)) -* [`d16ee452a`](https://github.com/npm/cli/commit/d16ee452a4a034caada4e9b96faf5c453a658876) - [#3426](https://github.com/npm/cli/issues/3426) - chore(tests): use path.resolve - ([@wraithgar](https://github.com/wraithgar)) - -## DEPENDENCIES - -* [`6b951c042`](https://github.com/npm/cli/commit/6b951c042084e639be929a7ea783c2d85b311bad) - `libnpmversion@1.2.1`: - * fix(retrieve-tag): pass match in a way git accepts -* [`de820a021`](https://github.com/npm/cli/commit/de820a0213f54bbcd155dff25b05d072d5c4a57a) - `npm-package-arg@8.1.5`: - * fix: Make file: URLs (mostly) RFC 8909 compliant -* [`16a95c647`](https://github.com/npm/cli/commit/16a95c64731609c69630c17c45b16edb53ee81b2) - `@npmcli/arborist@2.6.3`: - * fix(inventory) handle old and british forms of 'license' - * fix: removes [_complete] check to apply correct metadata - * ensure node.fsParent is not set to node itself - * fix extraneous deps on load-actual -* [`d341bd86c`](https://github.com/npm/cli/commit/d341bd86ce05fabe44f3be5888ba2611b61914b4) - `make-fetch-happen@9.0.3`: - * fix: implement cache modes correctly -* [`c90612cf5`](https://github.com/npm/cli/commit/c90612cf566d563199553749900d8b05367e2532) - `libnpmexec@2.0.0`: - * use new npxCache option - - -## v7.17.0 (2021-06-10) - -## FEATURES - -* [`ef668ab57`](https://github.com/npm/cli/commit/ef668ab57b15789c6e2971ac39d8ecb3757629fa) - [#3368](https://github.com/npm/cli/issues/3368) - feat(diff): add workspace support - ([@wraithgar](https://github.com/wraithgar)) - -## BUG FIXES - -* [`26d00c477`](https://github.com/npm/cli/commit/26d00c47785dfb300eab6a926f9d7c4d566776b1) - [#3364](https://github.com/npm/cli/issues/3364) - fix(tests): mock writeFile in pack tests so we dont create 0 byte files in the repo - ([@nlf](https://github.com/nlf)) -* [`f130a81d6`](https://github.com/npm/cli/commit/f130a81d62bf4f540ab252a09ff5a618827f9265) - [#3367](https://github.com/npm/cli/issues/3367) - fix(linting): add scripts, docs, smoke-tests - ([@wraithgar](https://github.com/wraithgar)) -* [`992799cd8`](https://github.com/npm/cli/commit/992799cd8c4427ed8c57270b399b2d6bbc94f2a8) - [#3383](https://github.com/npm/cli/issues/3383) - fix(login): properly save scope if defined - ([@wraithgar](https://github.com/wraithgar)) - -## DOCUMENTATION - -* [`844229519`](https://github.com/npm/cli/commit/844229519dd51d0bcafc8c39109a671b6333cf6c) - [#3392](https://github.com/npm/cli/issues/3392) - docs(workspaces): update using npm section - Added examples of using `npm init` to bootstrap a new workspace and a - section on how to add/manage dependencies to workspaces. - ([@ruyadorno](https://github.com/ruyadorno)) - -## DEPENDENCIES - -* [`3654890fb`](https://github.com/npm/cli/commit/3654890fb3be8b57e73f7e6ac4d895017603ca9e) - remove ignored dep - ([@nlf](https://github.com/nlf)) -* [`a4a0e68a9`](https://github.com/npm/cli/commit/a4a0e68a9e34a4c99e10e4fb8c5f89d323a4192f) - [#3362](https://github.com/npm/cli/issues/3362) - check less stuff into node_modules - ([@isaacs](https://github.com/isaacs)) -* [`7d5b049b6`](https://github.com/npm/cli/commit/7d5b049b654f96fc4c49d2f18a19adb4aa0f7d3c) - [#3365](https://github.com/npm/cli/issues/3365) - chore(package) Use a "files" list - ([@isaacs](https://github.com/isaacs)) - -## v7.16.0 (2021-06-03) - -## FEATURES - -* [`e92b5f2ba`](https://github.com/npm/cli/commit/e92b5f2ba07746ae07646566f3dc73c9e004a2fc) - `npm-registry-fetch@11.0.0` - * feat: improved logging of cache status - -## BUG FIXES - -* [`e864bd3ce`](https://github.com/npm/cli/commit/e864bd3ce8e8467e0f8ebb499dc2daf06143bc33) - [#3345](https://github.com/npm/cli/issues/3345) - fix(update-notifier): do not update notify when installing npm@spec - ([@isaacs](https://github.com/isaacs)) -* [`aafe23572`](https://github.com/npm/cli/commit/aafe2357279230e333d3342752a28fce6b9cd152) - [#3348](https://github.com/npm/cli/issues/3348) - fix(update-notifier): parallelize check for updates - ([@isaacs](https://github.com/isaacs)) - -## DOCUMENTATION - -* [`bc9c57dda`](https://github.com/npm/cli/commit/bc9c57dda7cf3abcdee17550205daf1a82e90438) - [#3353](https://github.com/npm/cli/issues/3353) - fix(docs): remove documentation for '--scripts-prepend-node-path' as it was removed in npm@7 - ([@gimli01](https://github.com/gimli01)) -* [`ca2822110`](https://github.com/npm/cli/commit/ca28221103aa0e9ccba7043ac515a541b625c53a) - [#3360](https://github.com/npm/cli/issues/3360) - fix(docs): link foreground-scripts w/ loglevel - ([@wraithgar](https://github.com/wraithgar)) -* [`fb630b5a9`](https://github.com/npm/cli/commit/fb630b5a9af86c71602803297634ec291eeedee0) - [#3342](https://github.com/npm/cli/issues/3342) - chore(docs): manage docs as a workspace - ([@ruyadorno](https://github.com/ruyadorno)) - -## DEPENDENCIES - -* [`54de5c6a4`](https://github.com/npm/cli/commit/54de5c6a4cd593bbbe364132f3f7348586441b31) - `npm-package-arg@8.1.4`: - * fix: trim whitespace from fetchSpec - * fix: handle file: when root directory begins with a special character -* [`e92b5f2ba`](https://github.com/npm/cli/commit/e92b5f2ba07746ae07646566f3dc73c9e004a2fc) - `make-fetch-happen@9.0.1` - * breaking: complete refactor of caching. drops warning headers, - prevents cache indexes from growing for every request, correctly - handles varied requests to the same url, and now caches redirects. - * fix: support url-encoded proxy authorization - * fix: do not lazy-load proxy agents or agentkeepalive. fixes the - intermittent failures to update npm on slower connections. - `npm-registry-fetch@11.0.0` - * breaking: drop handling of deprecated warning headers - * docs: fix header type for npm-command - * docs: update registry param - * feat: improved logging of cache status -* [`23c50a45f`](https://github.com/npm/cli/commit/23c50a45f59ea3ed4c36f35df15e54adc5603034) - `make-fetch-happen@9.0.2`: - * fix: work around negotiator's lazy loading - -## AUTOMATION - -* [`c4ef78b08`](https://github.com/npm/cli/commit/c4ef78b08e6859fc191cabbe58c8d88c070e0612) - [#3344](https://github.com/npm/cli/issues/3344) - fix(automation): update incorrect variable name in create-cli-deps-pr workflow - ([@gimli01](https://github.com/gimli01)) - -## v7.15.1 (2021-05-31) - -### BUG FIXES - -* [`598a17a26`](https://github.com/npm/cli/commit/598a17a2671c9e3bc204dddd6488169c9a72c6a1) - [#3329](https://github.com/npm/cli/issues/3329) - fix(libnpmexec): don't detach output from npm - ([@wraithgar](https://github.com/wraithgar)) - -### DEPENDENCIES - -* [`c4fc03e9e`](https://github.com/npm/cli/commit/c4fc03e9eb3a6386e8feacb67c19f0a1578dfe38) - `@npmcli/arborist@2.6.1` - * fixes reifying deps with mismatching version ranges between - actual and virtual trees -* [`9159fa62a`](https://github.com/npm/cli/commit/9159fa62a10dee09daef178fc7be161a02824004) - `libnpmexec@1.2.0` - -## v7.15.0 (2021-05-27) - -### FEATURES - -* [`399ff8cbc`](https://github.com/npm/cli/commit/399ff8cbccd5198f637518ccafa86c43bab47a4a) - [#3312](https://github.com/npm/cli/issues/3312) - feat(link): add workspace support - ([@isaacs](https://github.com/isaacs)) - -### BUG FIXES - -* [`46a9bcbcb`](https://github.com/npm/cli/commit/46a9bcbcb0bb2435dca6f45a61b8631f580c7f06) - [#3282](https://github.com/npm/cli/issues/3282) - fix(docs): proper postinstall script file name - ([@KevinFCormier](https://github.com/KevinFCormier)) -* [`83590d40f`](https://github.com/npm/cli/commit/83590d40f94347f21714dbd158b9ddcad9c82de9) - [#3272](https://github.com/npm/cli/issues/3272) - fix(ls): show relative paths from root - ([@isaacs](https://github.com/isaacs)) -* [`a574b518a`](https://github.com/npm/cli/commit/a574b518ae5b8f0664ed388cf1be6288d8c2e68d) - [#3304](https://github.com/npm/cli/issues/3304) - fix(completion): restore IFS even if `npm completion` returns error - ([@NariyasuHeseri](https://github.com/NariyasuHeseri)) -* [`554e8a5cd`](https://github.com/npm/cli/commit/554e8a5cd7034052a59a9ada31e4b8f73712211a) - [#3311](https://github.com/npm/cli/issues/3311) - set audit exit code properly - ([@isaacs](https://github.com/isaacs)) -* [`4a4fbe33c`](https://github.com/npm/cli/commit/4a4fbe33c51413adcd558b4af6f1e204b1b87e41) - [#3268](https://github.com/npm/cli/issues/3268) - [#3285](https://github.com/npm/cli/issues/3285) - fix(publish): skip private workspaces - ([@ruyadorno](https://github.com/ruyadorno)) - -### DOCUMENTATION - -* [`3c53d631f`](https://github.com/npm/cli/commit/3c53d631f557cf2484e2f6a6172c44e36aea4817) - [#3307](https://github.com/npm/cli/issues/3307) - fix(docs): typo in package-lock.json docs - ([@rethab](https://github.com/rethab)) -* [`96367f93f`](https://github.com/npm/cli/commit/96367f93f46c24494d084c8b8d34e4de9cd375da) - rebuild npm-pack doc - ([@isaacs](https://github.com/isaacs)) -* [`64b13dd10`](https://github.com/npm/cli/commit/64b13dd1082b6ca7eac4e8e329bfdd8cd8daf157) - [#3313](https://github.com/npm/cli/issues/3313) - Drop stale Python 3<->node-gyp remark - ([@spencerwilson](https://github.com/spencerwilson)) - -### DEPENDENCIES - -* [`7b56bfdf3`](https://github.com/npm/cli/commit/7b56bfdf3f2ac67a926fc7893b883a16b46eb3fd) - `cacache@15.2.0`: - * feat: allow fully deleting indices - * feat: add a validateEntry option to compact - * chore: lint - * chore: use standard npm style release scripts -* [`dbbc151a3`](https://github.com/npm/cli/commit/dbbc151a3bcf89e2627dc267063edd185ead1cb8) - `npm-audit-report@2.1.5`: - * fix(exit-code): account for null auditLevel default (#46) -* [`5b2604507`](https://github.com/npm/cli/commit/5b26045076477d3d350f539e60adf48a80376fda) - chore(package-lock): update devDependencies - ([@Gar](https://github.com/Gar)) - -### AUTOMATION - -* [`3d5df0082`](https://github.com/npm/cli/commit/3d5df0082ae904dacdea8644286e8362d4a2ed50) - [#3294](https://github.com/npm/cli/issues/3294) - chore(ci): move node release PR workflow to cli repo - ([@gimli01](https://github.com/gimli01)) - -## v7.14.0 (2021-05-20) - -### FEATURES - -* [`0d1a9d787`](https://github.com/npm/cli/commit/0d1a9d78779dc015242fc03d2dad2039004fa2df) - [#3227](https://github.com/npm/cli/issues/3227) - feat(install): add workspaces support to npm install commands - ([@isaacs](https://github.com/isaacs)) -* [`c18626f04`](https://github.com/npm/cli/commit/c18626f047e3a0fedd3c86554a4a0a8f27925e77) - [#3250](https://github.com/npm/cli/issues/3250) - feat(ls): add workspaces support - ([@ruyadorno](https://github.com/ruyadorno)) -* [`41099d395`](https://github.com/npm/cli/commit/41099d3958d08f166313b7eb69b76458f8f9224c) - [#3265](https://github.com/npm/cli/issues/3265) - feat(explain): add workspaces support - ([@ruyadorno](https://github.com/ruyadorno)) -* [`fde354669`](https://github.com/npm/cli/commit/fde35466915b5ac5958c827fa7e919e1f186db51) - [#3251](https://github.com/npm/cli/issues/3251) - feat(unpublish): add workspace/dry-run support - ([@wraithgar](https://github.com/wraithgar)) -* [`83df3666c`](https://github.com/npm/cli/commit/83df3666cd82819230fb45f2a40afd531fe3b3c7) - [#3260](https://github.com/npm/cli/issues/3260) - feat(outdated): add workspaces support - ([@ruyadorno](https://github.com/ruyadorno)) -* [`63a7635f7`](https://github.com/npm/cli/commit/63a7635f7a2225a4edd1fe92f94a563965ac06c7) - [#3217](https://github.com/npm/cli/issues/3217) - feat(pack): add support to json config/output - ([@mrmlnc](https://github.com/mrmlnc)) - -### BUG FIXES - -* [`faa12ccc2`](https://github.com/npm/cli/commit/faa12ccc26b5f0790f79b2589780e536f4284491) - [#3253](https://github.com/npm/cli/issues/3253) - fix search description typos - ([@juanpicado](https://github.com/juanpicado)) -* [`2f5c28a68`](https://github.com/npm/cli/commit/2f5c28a68719e948d2efedf463ebcb35972aaefb) - [#3243](https://github.com/npm/cli/issues/3243) - fix(docs): autogenerate config docs for commands - ([@isaacs](https://github.com/isaacs)) - -### DEPENDENCIES - -* [`ec256a14a`](https://github.com/npm/cli/commit/ec256a14aa6eb2bd59fd55dcc6a4bc0148662c4e) - `@npmcli/arborist@2.6.0` -* [`5f15aba86`](https://github.com/npm/cli/commit/5f15aba866026e7c0d6844e6c07a528dc7454f14) - `cacache@15.1.0` -* [`b3add87e6`](https://github.com/npm/cli/commit/b3add87e686968b7af3067c685d2561baf90e397) - [#3262](https://github.com/npm/cli/pull/3262) - `npm-registry-client@10.1.2`: - * fixed sso login token - -## v7.13.0 (2021-05-13) - -### FEATURES - -* [`076420c14`](https://github.com/npm/cli/commit/076420c149d097056f687e44e21744b743b86e4e) - [#3231](https://github.com/npm/cli/issues/3231) - feat(publish): add workspace support - ([@wraithgar](https://github.com/wraithgar)) -* [`370b36a36`](https://github.com/npm/cli/commit/370b36a36ca226840761e4214cbccaf2a1a90e3c) - [#3241](https://github.com/npm/cli/issues/3241) - feat(fund): add workspaces support - ([@ruyadorno](https://github.com/ruyadorno)) - -### DEPENDENCIES - -* [`0c18e4f77`](https://github.com/npm/cli/commit/0c18e4f774562fa054fedf323bea25805ebf39b3) - `@npmcli/arborist@2.5.0` -* [`b551c6811`](https://github.com/npm/cli/commit/b551c6811251dbc901f47fea3c137f93e205a9e4) - `libnpmfund@1.1.0` - -## v7.12.1 (2021-05-10) - -### BUG FIXES - -* [`de49f58f5`](https://github.com/npm/cli/commit/de49f58f55dc2ac3a5057cd492a43c32ae41381e) - [#3216](https://github.com/npm/cli/issues/3216) - fix(contributing): link to proper cli repo - ([@mrmlnc](https://github.com/mrmlnc)) -* [`1d092144e`](https://github.com/npm/cli/commit/1d092144eaaabff63ac8424b40b2286822be7677) - [#3203](https://github.com/npm/cli/issues/3203) - fix(packages): locale-agnostic string sorting - ([@isaacs](https://github.com/isaacs)) -* [`0696fca13`](https://github.com/npm/cli/commit/0696fca13d10726e04ca97ff50eef7bd7455a3ab) - [#3209](https://github.com/npm/cli/issues/3209) - fix(view): fix non-registry specs - ([@wraithgar](https://github.com/wraithgar)) -* [`71ac93597`](https://github.com/npm/cli/commit/71ac935976390e4fd05987ff510049f82bc6e2a9) - [#3206](https://github.com/npm/cli/issues/3206) - chore(github): Convert md issue template to yaml - ([@lukehefson](https://github.com/lukehefson)) -* [`6fb386d3b`](https://github.com/npm/cli/commit/6fb386d3bfbaa8e4771ff87a08de1f3aa6f9b34d) - [#3201](https://github.com/npm/cli/issues/3201) - fix(tests): increase test fuzziness - ([@wraithgar](https://github.com/wraithgar)) -* [`f3a662fcd`](https://github.com/npm/cli/commit/f3a662fcd869653f9753aef3d40cc96ed28ed509) - [#3211](https://github.com/npm/cli/issues/3211) - fix(tests): use config defaults - ([@wraithgar](https://github.com/wraithgar)) - -### DEPENDENCIES - -* [`285976fd1`](https://github.com/npm/cli/commit/285976fd12f037f59da47307d98df7ebda5278d9) - `@npmcli/arborist@2.4.4` - * fix(reify): properly save spec if prerelease -* [`f9f24d17c`](https://github.com/npm/cli/commit/f9f24d17c29c421de3c9b82c6b98a40268aeb920) - `libnpmexec@1.1.1` - * fix(add): Specify 'en' locale to String.localeCompare -* [`cb9f17499`](https://github.com/npm/cli/commit/cb9f174996dbb4779a1be82890564f9abffb11f4) - `glob@7.1.7` - * force 'en' locale in string sorting -* [`24b4e4a41`](https://github.com/npm/cli/commit/24b4e4a41b451db3de381fac6b719149db14c288) - `ignore-walk@3.0.4` - * Avoid locale-specific sorting issues -* [`1eb7e5c7d`](https://github.com/npm/cli/commit/1eb7e5c7d466293b472c2506c64e5a89ec84ac2f) - `@npmcli/arborist@2.4.3` - * guard against locale-specific sorting -* [`a6a826067`](https://github.com/npm/cli/commit/a6a826067cb46c711521772c2d0158257d54400a) - `npm-packlist@2.2.2`: - * fix(sort): avoid locale-dependent sorting issues - -## v7.12.0 (2021-05-06) - -### FEATURES - -* [`701627c51`](https://github.com/npm/cli/commit/701627c5169934e59da2959d76a49c77278cc9dc) - [#3098](https://github.com/npm/cli/issues/3098) - feat(cache): Allow `add` to accept multiple specs - ([@mjsir911](https://github.com/mjsir911)) -* [`59171f030`](https://github.com/npm/cli/commit/59171f0304f048a009f1697eec6f74f778bc52ff) - [#3187](https://github.com/npm/cli/issues/3187) - feat(config): add workspaces boolean to user-agent - ([@nlf](https://github.com/nlf)) - -### BUG FIXES - -* [`2c9b8713c`](https://github.com/npm/cli/commit/2c9b8713c4c88fbd0c3c48eb0de84dbd7269398f) - [#3182](https://github.com/npm/cli/issues/3182) - fix(docs): fix broken links - ([@wangsai](https://github.com/wangsai)) -* [`88cbc8c44`](https://github.com/npm/cli/commit/88cbc8c447cbaef20b5a8f19246211ce4918f4d8) - [#3198](https://github.com/npm/cli/issues/3198) - fix(tests): reflect new libnpmexec logic - -### DEPENDENCIES - -* [`d01ce5e13`](https://github.com/npm/cli/commit/d01ce5e132cb4661698012fd5017753c2bdb660b) - `libnpmexec@1.1.0`: - * feat: add walk up dir lookup to satisfy local bins -* [`81c1dfaaa`](https://github.com/npm/cli/commit/81c1dfaaaf918229316a975aa8075769ffafdb6d) - `@npmcli/arborist@2.4.2`: - * fix(add): save packages in the right place - * fix(reify): do not clean up nodes with no parent - * fix(audit): support alias specs & root package names -* [`87c2303ea`](https://github.com/npm/cli/commit/87c2303eaa6edfa5309da0a30f5ad291b6d57640) - `@npmcli/git@2.0.9`: - * fix(clone): Do not allow git replacement objects by default -* [`99ff40dff`](https://github.com/npm/cli/commit/99ff40dff5e5e55a5d5f045ba90e76c08174ca38) - `npm-packlist@2.2.0`: - * feat(npmignore): Do not force include history, changelogs, notice - * fix(package.json): add missing bin/index.js to files - -## v7.11.2 (2021-04-29) - -### BUG FIXES - -* [`c371f183e`](https://github.com/npm/cli/commit/c371f183ebe833c2439e98b679f14e7a59f22c34) - [#3137](https://github.com/npm/cli/issues/3137) - [#3140](https://github.com/npm/cli/issues/3140) - fix(ls): do not warn on missing optional deps - ([@isaacs](https://github.com/isaacs)) -* [`861f606c7`](https://github.com/npm/cli/commit/861f606c7609d177c644814a171581afbb72f6db) - [#3156](https://github.com/npm/cli/issues/3156) - fix(build): make prune rule work on case-sensitive file systems - ([@lpinca](https://github.com/lpinca)) - -### DEPENDENCIES - -* [`fb79d89a0`](https://github.com/npm/cli/commit/fb79d89a07ef03e76633db275463f701d3dae42f) - `tap@15.0.6` -* [`ce3820043`](https://github.com/npm/cli/commit/ce38200437e9ed527df973794909b2699909bc9b) - `@npmcli/arborist@2.4.1` - * fix: prevent and eliminate unnecessary duplicates - * fix: support resolvable partial intersecting peerSets - -### DOCUMENTATION - -* [`e479f1dac`](https://github.com/npm/cli/commit/e479f1dac9a7639304d20116583034861635b2b1) - [#3146](https://github.com/npm/cli/issues/3146) - mention `directories.bin` in `bin` - ([@felipecrs](https://github.com/felipecrs)) - -## v7.11.1 (2021-04-23) - -### DEPENDENCIES - -* [`7925cca24`](https://github.com/npm/cli/commit/7925cca24543d9e1a8297844b3e53e11057643ef) - `pacote@11.3.3`: - * fix(registry): normalize manfest -* [`b61eac693`](https://github.com/npm/cli/commit/b61eac693df82c52b955e6c18ec4dcf4cedea8a3) - [#3130](https://github.com/npm/cli/issues/3130) - `@npmcli/config@2.2.0` -* [`c74e67fc6`](https://github.com/npm/cli/commit/c74e67fc6572bb001d74c7486c05d211a0e03de8) - [#3130](https://github.com/npm/cli/issues/3130) - `npm-registry-fetch@10.1.1` - -### DOCUMENTATION - -* [`72a7eeb49`](https://github.com/npm/cli/commit/72a7eeb493e0e71cba3af36490cb245030ed31a3) - Remove unused and incorrectly documented `--always-auth` config definition - ([@isaacs](https://github.com/isaacs)) - -## v7.11.0 (2021-04-22) - -### FEATURES - -* [`4c1f16d2c`](https://github.com/npm/cli/commit/4c1f16d2c29a7a56c19b97f2820e6305a6075083) - [#3095](https://github.com/npm/cli/issues/3095) - feat(init): add workspaces support - ([@ruyadorno](https://github.com/ruyadorno)) - -### BUG FIXES - -* [`42ca59eee`](https://github.com/npm/cli/commit/42ca59eeedd3e402aa1c606941f7f52864e6039b) - [#3086](https://github.com/npm/cli/issues/3086) - fix(ls): do not exit with error when all problems are extraneous deps - ([@nlf](https://github.com/nlf)) -* [`2aecec591`](https://github.com/npm/cli/commit/2aecec591df6866e27d0b17dc49cef8f7d738d77) - [#2724](https://github.com/npm/cli/issues/2724) - [#3119](https://github.com/npm/cli/issues/3119) - fix(ls): make --long work when missing deps - ([@ruyadorno](https://github.com/ruyadorno)) -* [`42e0587a9`](https://github.com/npm/cli/commit/42e0587a9ea6940a5d5be5903370ad1113feef21) - [#3115](https://github.com/npm/cli/issues/3115) - fix(pack): refuse to pack invalid packument - ([@wraithgar](https://github.com/wraithgar)) -* [`1c4eff7b5`](https://github.com/npm/cli/commit/1c4eff7b513b8e84876818ede014d3ab19d203c6) - [#3126](https://github.com/npm/cli/issues/3126) - fix(logout): use isBasicAuth attribute - ([@wraithgar](https://github.com/wraithgar)) - -### DOCUMENTATION - -* [`c93f1c39e`](https://github.com/npm/cli/commit/c93f1c39e326feff0857712a10ef6183fbafe1ab) - [#3101](https://github.com/npm/cli/issues/3101) - chore(docs): update view docs - ([@wraithgar](https://github.com/wraithgar)) -* [`c4ff4bc11`](https://github.com/npm/cli/commit/c4ff4bc113c3a5b6ee5d74ab0b1adee95169ed32) - [npm/statusboard#313](https://github.com/npm/statusboard/issues/313) - [#3109](https://github.com/npm/cli/issues/3109) - fix(usage): fix refs to ws shorthand - ([@ruyadorno](https://github.com/ruyadorno)) - -### DEPENDENCIES - -* [`83166ebcc`](https://github.com/npm/cli/commit/83166ebcc4ba5e3bf215f08151437d96637f4f33) - `npm-registry-fetch@10.1.0` - * feat(auth): set isBasicAuth -* [`e02bda6da`](https://github.com/npm/cli/commit/e02bda6da68b8e8f490bf270cb5d6adec81685ea) - `npm-registry-fetch@10.0.0` - * feat(auth) load/send based on URI, not registry -* [`a0382deba`](https://github.com/npm/cli/commit/a0382deba346b09834e75db89e1fd4527f1f07dd) - `@npmcli/run-script@1.8.5` - * fix: windows ComSpec env variable name -* [`7f82ef5a8`](https://github.com/npm/cli/commit/7f82ef5a84d70e28983ed43ba1d8aced0fb4ba45) - `pacote@11.3.2` -* [`35e49b94f`](https://github.com/npm/cli/commit/35e49b94fba478a63df6cc9b62816eafe5f1fbdd) - `@npmcli/arborist@2.4.0` -* [`95faf8ce6`](https://github.com/npm/cli/commit/95faf8ce6c007082a02c160977da194c08ee9d82) - `libnpmaccess@4.0.2` -* [`17fffc0e4`](https://github.com/npm/cli/commit/17fffc0e42b2a9e7b84691093e45ba511906cbfa) - `libnpmhook@6.0.2` -* [`1b5a213aa`](https://github.com/npm/cli/commit/1b5a213aaf39652661ba72ba2e8751f049b170fb) - `libnpmorg@2.0.2` -* [`9f83e6484`](https://github.com/npm/cli/commit/9f83e6484aa163d066f318df42ec89c8234b614e) - `libnpmpublish@4.0.1` -* [`251f788c5`](https://github.com/npm/cli/commit/251f788c554a198ab42682453fa5504f8abe93fe) - `libnpmsearch@3.1.1` -* [`35873a989`](https://github.com/npm/cli/commit/35873a989fe67041ddcf30a0a278ed77ace5ee3c) - `libnpmteam@2.0.3` -* [`23e12b4d8`](https://github.com/npm/cli/commit/23e12b4d8f63d765a48036e7bb08f53319c73304) - `npm-profile@5.0.3` - -## v7.10.0 (2021-04-15) - -### FEATURES - -* [`f9b639eb6`](https://github.com/npm/cli/commit/f9b639eb6c504ded6cdd59e83e26a392bfe81e5d) - [#3052](https://github.com/npm/cli/issues/3052) - feat(bugs): fall back to email if provided - ([@Yash-Singh1](https://github.com/Yash-Singh1)) -* [`8c9e24778`](https://github.com/npm/cli/commit/8c9e24778db867cb3148bc247c7e321639aa9f58) - [#3055](https://github.com/npm/cli/issues/3055) - feat(version): add workspace support - ([@wraithgar](https://github.com/wraithgar)) - -### DEPENDENCIES - -* [`f1e6743a6`](https://github.com/npm/cli/commit/f1e6743a6e8e32ddad6d1964eb05d17e6c50a456) - `libnpmversion@1.2.0` - * feat(retrieve-tag): retrieve unannotated git tags - * fix(retrieve-tag): use semver to look for semver -* [`3b476a24c`](https://github.com/npm/cli/commit/3b476a24cf0b2823fdf92505b84bddde4fcc8b14) - `@npmcl/git@2.0.8` - * fix(git): do not use shell when calling git -* [`dfcd0c1e2`](https://github.com/npm/cli/commit/dfcd0c1e2331c1f4b6573466b50505772eddaf22) - [#3069](https://github.com/npm/cli/issues/3069) - `tap@15.0.2` - -### DOCUMENTATION - -* [`90b61eda9`](https://github.com/npm/cli/commit/90b61eda9b41af108ed69fc0c43a522a92745047) - [#3053](https://github.com/npm/cli/issues/3053) - fix(contributing.md): explicitely outline dep updates - ([@darcyclarke](https://github.com/darcyclarke)) - -## v7.9.0 (2021-04-08) - -### FEATURES - -* [`1f3e88eba`](https://github.com/npm/cli/commit/1f3e88ebaf4901d8f9f07b43404d824fef7e5ff5) - [#3032](https://github.com/npm/cli/issues/3032) - feat(dist-tag): add workspace support - ([@nlf](https://github.com/nlf)) -* [`6e31df4e7`](https://github.com/npm/cli/commit/6e31df4e7957337962fd3d93e495931e3592bb9e) - [#3033](https://github.com/npm/cli/issues/3033) - feat(pack): add workspace support - ([@wraithgar](https://github.com/wraithgar)) - -### DEPENDENCIES - -* [`ba4f7fea8`](https://github.com/npm/cli/commit/ba4f7fea8fca8e3509469a218f094fe69095888b) - `licensee@8.2.0` - -## v7.8.0 (2021-04-01) - -### FEATURES - - -* [`8bcc5d73f`](https://github.com/npm/cli/commit/8bcc5d73f35434e781ff56419dd7f0c380efd072) - [#2972](https://github.com/npm/cli/issues/2972) - feat(workspaces): add repo and docs - ([@wraithgar](https://github.com/wraithgar)) -* [`ec520ce32`](https://github.com/npm/cli/commit/ec520ce32d5e834a32ebd58491df4200e01ce690) - [#2998](https://github.com/npm/cli/issues/2998) - feat(set-script): implement workspaces -* [`32717a60e`](https://github.com/npm/cli/commit/32717a60eb55fcf8c7e5016223bfee78a6daba0e) - [#3001](https://github.com/npm/cli/issues/3001) - feat(view): add workspace support - ([@wraithgar](https://github.com/wraithgar)) -* [`7b177e43f`](https://github.com/npm/cli/commit/7b177e43f3bfb558bcd8723cdb2166a3df19647a) - [#3014](https://github.com/npm/cli/issues/3014) - feat(config): add 'envExport' flag - ([@isaacs](https://github.com/isaacs)) - -### BUG FIXES - -* [`4c4252348`](https://github.com/npm/cli/commit/4c4252348c538246e1072421d65f4558dc948080) - [#3016](https://github.com/npm/cli/issues/3016) - fix(usage): specify the key each time for multiples - ([@isaacs](https://github.com/isaacs)) -* [`9237d375b`](https://github.com/npm/cli/commit/9237d375b0b7d34c7dc5ba70aec7f616f4133732) - [#3013](https://github.com/npm/cli/issues/3013) - fix(docs): add workspaces configuration - ([@wraithgar](https://github.com/wraithgar)) -* [`cb6eb0d20`](https://github.com/npm/cli/commit/cb6eb0d206b7e2f63d5c7a7a17bea4aed1b9f2bf) - [#3015](https://github.com/npm/cli/issues/3015) - fix(ERESOLVE): better errors when current is missing - ([@isaacs](https://github.com/isaacs)) - -### DEPENDENCIES - -* [`61da39beb`](https://github.com/npm/cli/commit/61da39beb5373320e2b591b61ecd6596eeaba6ed) - `@npmcli/config@2.1.0` - * feat(config): add support for envExport:false -* [`fb095a708`](https://github.com/npm/cli/commit/fb095a708a1f930bbd0195446ac611b82bfeff14) - `@npmcli/arborist@2.3.0`: - * [#2896](https://github.com/npm/cli/issues/2896) Provide currentEdge in - ERESOLVE if known, and address self-linking edge case. - * Add/remove dependencies to/from workspaces when set, not root project - * Only reify the portions of the dependency graph identified by the - `workspace` configuration value. - * Do not recursively `chown` the project root path. - -## v7.7.6 (2021-03-29) - -### BUG FIXES - -* [`9dd2ed518`](https://github.com/npm/cli/commit/9dd2ed5189b6f283094664e9e192cf1598ec3f79) - fix empty newline printed to stderr - ([@ruyadorno](https://github.com/ruyadorno)) -* [`9d391462a`](https://github.com/npm/cli/commit/9d391462a25f637219501e2430ef1f7b89710816) - [#2973](https://github.com/npm/cli/issues/2973) - fix spelling in workspaces.md file - ([@sethomas](https://github.com/sethomas)) -* [`4b100249a`](https://github.com/npm/cli/commit/4b100249a6cad67e002186816e64817313b636c7) - [#2979](https://github.com/npm/cli/issues/2979) - change 'maxsockets' default value back to 15 - ([@wallrat](https://github.com/wallrat)) - -### DEPENDENCIES - -* [`a28f89572`](https://github.com/npm/cli/commit/a28f89572a708cced69cc938f877eaa969dbad9e) - `libnpmversion@1.1.0` - * fix reading `script-shell` config on `npm version` lifecycle scripts -* [`03734c29e`](https://github.com/npm/cli/commit/03734c29e00191d17f164d1c0e75d9f228268842) - `npm-packlist@2.1.5` - * fix packaging `bundledDependencies` -* [`80ce2a019`](https://github.com/npm/cli/commit/80ce2a019526632b01b70e1c75c42608dc160332) - `@npmcli/metavuln-calculator@1.1.1` - * fix error auditing package documents with missing dependencies - -## v7.7.5 (2021-03-25) - -### BUG FIXES - -* [`95ba87622`](https://github.com/npm/cli/commit/95ba87622e00d68270eda9e071b19737718fca16) - [#2949](https://github.com/npm/cli/issues/2949) - fix handling manual indexes in `npm help` - ([@dmchurch](https://github.com/dmchurch)) -* [`59cf37962`](https://github.com/npm/cli/commit/59cf37962a2286e0f7d3bd37fa9c8bc3bac94218) - [#2958](https://github.com/npm/cli/issues/2958) - always set `npm.command` to canonical command name - ([@isaacs](https://github.com/isaacs)) -* [`1415b4bde`](https://github.com/npm/cli/commit/1415b4bdeeaabb6e0ba12b6b1b0cc56502bd64ab) - [#2964](https://github.com/npm/cli/issues/2964) - fix(config): properly translate user-agent - ([@wraithgar](https://github.com/wraithgar)) -* [`59271936d`](https://github.com/npm/cli/commit/59271936d90fbd6956a41967119f578c0ba63db9) - [#2965](https://github.com/npm/cli/issues/2965) - fix(config): tie save-exact/save-prefix together - ([@wraithgar](https://github.com/wraithgar)) - -### TESTS - -* [`97b415287`](https://github.com/npm/cli/commit/97b41528739460b2e9e72e09000aded412418cb2) - [#2959](https://github.com/npm/cli/issues/2959) - add smoke tests - ([@ruyadorno](https://github.com/ruyadorno)) - -## v7.7.4 (2021-03-24) - -### BUG FIXES - -* [`200bee74b`](https://github.com/npm/cli/commit/200bee74b31a738687446b7b535cac67b1c582fd) - [#2951](https://github.com/npm/cli/issues/2951) - fix(config): accept explicit `production=false` - ([@wraithgar](https://github.com/wraithgar)) -* [`7b45e9df6`](https://github.com/npm/cli/commit/7b45e9df6102c7bd6e403d1fdc9939581c38f546) - [#2950](https://github.com/npm/cli/issues/2950) - warn if using workspaces config options in `npm config` - ([@ruyadorno](https://github.com/ruyadorno)) - -## v7.7.3 (2021-03-24) - -### BUG FIXES - -* [`c76f04ac2`](https://github.com/npm/cli/commit/c76f04ac28ddf2ae4df4b3ce0aec684a118de1b5) - [#2925](https://github.com/npm/cli/issues/2925) - fix(set-script): add completion - ([@Yash-Singh1](https://github.com/Yash-Singh1)) -* [`0379eab69`](https://github.com/npm/cli/commit/0379eab698b78ae4aa89bbe2043607f420e52f11) - [#2929](https://github.com/npm/cli/issues/2929) - fix(install): ignore auditLevel - `npm install` should not be affected by the `auditLevel` config, as the - results of audit do not change its exit status. - ([@wraithgar](https://github.com/wraithgar)) -* [`98efadeb4`](https://github.com/npm/cli/commit/98efadeb4b2ae9289f14ed6f42a169230faf7239) - [#2923](https://github.com/npm/cli/issues/2923) - fix(audit-level): add `info` audit level - This is a valid level but wasn't configured to be allowed. - Also added this param to the usage output for `npm audit` - ([@wraithgar](https://github.com/wraithgar)) -* [`e8d2adcf4`](https://github.com/npm/cli/commit/e8d2adcf40ad63030f844c9aa44c6d16e2146797) - [#2945](https://github.com/npm/cli/issues/2945) - config should not error when workspaces are configured - ([@nlf](https://github.com/nlf)) -* [`aba2bc623`](https://github.com/npm/cli/commit/aba2bc623ea99e563b1b15b81dbb4ba94f86fe4c) - [#2944](https://github.com/npm/cli/issues/2944) - fix(progress): re-add progress bar to reify - The logger was no longer in flatOptions, we pass it in explicitly now - ([@wraithgar](https://github.com/wraithgar)) -* [`877b4ed29`](https://github.com/npm/cli/commit/877b4ed2925c97b5249a4d33575420dda64f7339) - [#2946](https://github.com/npm/cli/issues/2946) - fix(flatOptions): re-add `_auth` - This was not being added to flatOptions, and things like - `npm-registry-fetch` are looking for it. - ([@wraithgar](https://github.com/wraithgar)) - -## v7.7.2 (2021-03-24) - -### BUG FIXES -* [`a4df2b98d`](https://github.com/npm/cli/commit/a4df2b98d89429b19cd29b5fc895cdbfc0a6bd78) - [#2942](https://github.com/npm/cli/issues/2942) - Restore --dev flag, unify --omit flatteners - ([@isaacs](https://github.com/isaacs)) - -### DEPENDENCIES -* [`2cbfaac0e`](https://github.com/npm/cli/commit/2cbfaac0ecd5810316f6d76168ed9618bd11bf3a) - `hosted-git-info@4.0.2` - * [#83](https://github.com/npm/hosted-git-info/pull/83) Do not parse - urls for gitlab - ([@nlf](https://github.com/nlf)) - -## v7.7.1 (2021-03-24) - -### BUG FIXES - -* [`543b0e39b`](https://github.com/npm/cli/commit/543b0e39bcb94fc408804b01ca9c0d7b960b2681) - [#2930](https://github.com/npm/cli/issues/2930) - fix(uninstall): use correct local prefix - ([@jameschensmith](https://github.com/jameschensmith)) -* [`dce4960ef`](https://github.com/npm/cli/commit/dce4960ef6d52af128affe7755b2ca72de913b6c) - [#2932](https://github.com/npm/cli/issues/2932) - fix(config): flatten savePrefix properly - ([@wraithgar](https://github.com/wraithgar)) - -## v7.7.0 (2021-03-23) - -### FEATURES - -* [`33c4189f9`](https://github.com/npm/cli/commit/33c4189f939aebdfaf85ea419e6ea01d0977b79d) - [#2864](https://github.com/npm/cli/issues/2864) - add `npm run-script` workspaces support - ([@ruyadorno](https://github.com/ruyadorno)) -* [`e1b3b318f`](https://github.com/npm/cli/commit/e1b3b318f095a7e1a7cc4b131907de4955275d9d) - [#2886](https://github.com/npm/cli/issues/2886) - add `npm exec` workspaces support - ([@ruyadorno](https://github.com/ruyadorno)) -* [`41facf643`](https://github.com/npm/cli/commit/41facf6435ced4e416d74111d9c3ff00ee19ab7d) - [#2859](https://github.com/npm/cli/issues/2859) - expanded "Did you mean?" suggestions for missing cmds and scripts - ([@wraithgar](https://github.com/wraithgar)) - -### BUG FIXES - -* [`8cce4282f`](https://github.com/npm/cli/commit/8cce4282f7bef11aeeb73cffd532b477b241985e) - [#2865](https://github.com/npm/cli/issues/2865) - `npm publish`: handle case where multiple config list is present - ([@kenrick95](https://github.com/kenrick95)) -* [`6598bfe86`](https://github.com/npm/cli/commit/6598bfe8697439e827d84981f8504febca64a55a) - mark deprecated configs - ([@isaacs](https://github.com/isaacs)) -* [`8a38afe77`](https://github.com/npm/cli/commit/8a38afe779ce71a10178ed62b13709d06adf7a66) - [#2881](https://github.com/npm/cli/issues/2881) - docs(package-json): document default main behavior - ([@klausbayrhammer](https://github.com/klausbayrhammer)) -* [`93a061d73`](https://github.com/npm/cli/commit/93a061d737dc769663652368e8586e4202267b9e) - [#2917](https://github.com/npm/cli/issues/2917) - add action items to `npm run` error output - ([@wraithgar](https://github.com/wraithgar)) - -### DOCUMENTATION - -* [`ad65bd910`](https://github.com/npm/cli/commit/ad65bd9101aa8e8b94bc1e48df3ef93deca6d30c) - [#2860](https://github.com/npm/cli/issues/2860) - fix link in configuring-npm - ([@varmakarthik12](https://github.com/varmakarthik12)) -* [`b419bfb02`](https://github.com/npm/cli/commit/b419bfb0259596fb338d45b2eaeab25a7a0d1f1e) - [#2876](https://github.com/npm/cli/issues/2876) - fix test-coverage command in contributing guide - ([@chowkapow](https://github.com/chowkapow)) - -### DEPENDENCIES - -* [`7b5606b93`](https://github.com/npm/cli/commit/7b5606b931083e8a70f5ea094c2b46f0b7a38a18) - `@npmcli/arborist@2.2.9` - * [#254](https://github.com/npm/arborist/pull/254) Honor explicit - prefix when saving dependencies - ([@jameschensmith](https://github.com/jameschensmith)) - * [#255](https://github.com/npm/arborist/pull/255) Never save to - `bundleDependencies` when saving a `peer` or `peerOptional` - dependency. ([@isaacs](https://github.com/isaacs)) -* [`f76e7c21f`](https://github.com/npm/cli/commit/f76e7c21ffd87b08593d8c396a78ab9c5fa790bd) - `pacote@11.3.1` - * increases tarball compression level -* [`4928512bc`](https://github.com/npm/cli/commit/4928512bcefd8448ff5852978cfc7f903e3ae996) - `semver@7.3.5` - * fix handling prereleases/ANY ranges in subset -* [`1924eb457`](https://github.com/npm/cli/commit/1924eb457aea7c93dfaf4a911355a63d84d66eee) - `libnpmversion@1.0.12` - * fix removing undescored-prefixed package.json properties in `npm version` -* [`916623056`](https://github.com/npm/cli/commit/91662305643509eebd2f79ed7e3ff01562aa4968) - `@npmcli/run-script@1.8.4` - * fix expanding windows-style environment variables -* [`a8d0751e4`](https://github.com/npm/cli/commit/a8d0751e4b7c7d8b808c8a49f288fc7272f729b0) - `npm-pick-manifest@6.1.1` - * fix running packages with a single executable binary with `npm exec` -* [`af7eaac50`](https://github.com/npm/cli/commit/af7eaac5018ed821d72d43d08f1d7e49e7491453) - `hosted-git-info@4.0.1` -* [`f52c51db1`](https://github.com/npm/cli/commit/f52c51db13c39cfbaed18dbd13ba7302a4b6a0d9) - `@npmcli/config@2.0.0` - -## v7.6.3 (2021-03-11) - -### DOCUMENTATION - -* [`8c44e999b`](https://github.com/npm/cli/commit/8c44e999bdf7639893535c55beebf7996da2c47f) - [#2855](https://github.com/npm/cli/issues/2855) - Correct "npm COMMAND help" to "npm help COMMAND" - ([@dwardu](https://github.com/dwardu)) - -### DEPENDENCIES - -* [`57ed390d6`](https://github.com/npm/cli/commit/57ed390d64a44ae0a1b2c4afd79d690170b194ec) - `@npmcli/arborist@2.2.8` - * Respect link deps when calculating peerDep sets - -## v7.6.2 (2021-03-09) - -### BUG FIXES - -* [`e0a3a5218`](https://github.com/npm/cli/commit/e0a3a5218cac7ca5850930aaaad8a939ddf75d4d) - [#2831](https://github.com/npm/cli/issues/2831) - Fix cb() never called in search with --json option - ([@fraqe](https://github.com/fraqe)) -* [`85a8694dd`](https://github.com/npm/cli/commit/85a8694dd9b4a924a474ba75261914511a216868) - [#2795](https://github.com/npm/cli/issues/2795) - fix(npm.output): make output go through npm.output - ([@wraithgar](https://github.com/wraithgar)) -* [`9fe0df5b5`](https://github.com/npm/cli/commit/9fe0df5b5d7606e5841288d9931be6c04767c9ca) - [#2821](https://github.com/npm/cli/issues/2821) - fix(usage): clean up usage declarations - ([@wraithgar](https://github.com/wraithgar)) - -### DEPENDENCIES - -* [`7f470b5c2`](https://github.com/npm/cli/commit/7f470b5c25d544e36d97b28e28ae20dfa1d4ab31) - `@npmcli/arborist@2.2.7` - * fix(install): Do not revert a file: dep to version on bare name re-install -* [`e9b7fc275`](https://github.com/npm/cli/commit/e9b7fc275a0bdf8f00dbcf5dd2283675776fc459) - `libnpmdiff@2.0.4` - * fix(diff): Gracefully handle packages with prepare script -* [`c7314aa62`](https://github.com/npm/cli/commit/c7314aa62195b7f0d8886776692e8a2c892413ed) - `byte-size@7.0.1` -* [`864f48d43`](https://github.com/npm/cli/commit/864f48d4327269f521161cf89888ea2b6db5fdab) - `pacote@11.3.0` - -## v7.6.1 (2021-03-04) - -### BUG FIXES - -* [`3c9a589b0`](https://github.com/npm/cli/commit/3c9a589b004fa828a304abaf52d1d781710e1143) - [#2807](https://github.com/npm/cli/issues/2807) - `npm explain` show when an edge is a bundled edge - ([@kumavis](https://github.com/kumavis)) -* [`b33c760ce`](https://github.com/npm/cli/commit/b33c760cea7fe2696d35b5530abc1b455980fef1) - [#2766](https://github.com/npm/cli/issues/2766) - unused arguments cleanup - ([@sandersn](https://github.com/sandersn)) -* [`4a5dd3a5a`](https://github.com/npm/cli/commit/4a5dd3a5a200b3f4f7b47168497d8e03dca3a2ca) - [#2772](https://github.com/npm/cli/issues/2772) - fix(npm) pass npm context everywhere - ([@wraithgar](https://github.com/wraithgar)) -* [`e69be2ac5`](https://github.com/npm/cli/commit/e69be2ac5c35e985732e2baa00b70d39332e4b9f) - [#2789](https://github.com/npm/cli/issues/2789) - fix npm prefix on all Windows unix shells - ([@isaacs](https://github.com/isaacs)) -* [`2d682e4ca`](https://github.com/npm/cli/commit/2d682e4cab0cf109a16332f3222f1e9a4027db69) - [#2803](https://github.com/npm/cli/issues/2803) - fix(search): don't pass unused args - ([@wraithgar](https://github.com/wraithgar)) -* [`b3e7dd19b`](https://github.com/npm/cli/commit/b3e7dd19bb4888dad2bfb6702aed6560a7f91bf8) - [#2822](https://github.com/npm/cli/issues/2822) - fix(diff): set option "where" for pacote - ([@ruyadorno](https://github.com/ruyadorno)) -* [`96006640b`](https://github.com/npm/cli/commit/96006640b902d31415260df5ce3ad8d066a64623) - [#2824](https://github.com/npm/cli/issues/2824) - fix(repo, auth.sso): don't promisify open-url - ([@wraithgar](https://github.com/wraithgar)) - -### DOCUMENTATION - -* [`c8b73db82`](https://github.com/npm/cli/commit/c8b73db82f0f2445c20a0a64110586253accd66b) - [#2690](https://github.com/npm/cli/issues/2690) - fix(docs): update scripts docs - ([@wraithgar](https://github.com/wraithgar)) -* [`5d922394b`](https://github.com/npm/cli/commit/5d922394b7874b2b38d34f03f2decbe0eb3e8583) - [#2809](https://github.com/npm/cli/issues/2809) - update republish timeout after unpublish - ([@BAJ-](https://github.com/BAJ-)) - -### DEPENDENCIES - -* [`2d4ae598f`](https://github.com/npm/cli/commit/2d4ae598f30049680797685f76154b16a7e15a66) - `@npmcli/arborist@2.2.6` - -## v7.6.0 (2021-02-25) - -### FEATURES - -* [`983d218f7`](https://github.com/npm/cli/commit/983d218f7e68e3c7866f2efa23ea2aff7ff3881e) - [#2750](https://github.com/npm/cli/issues/2750) - feat(explain): mark when dependency is bundled - ([@kumavis](https://github.com/kumavis)) - -### DEPENDENCIES - -* [`b9fa7e32a`](https://github.com/npm/cli/commit/b9fa7e32a63a3dc3a4865865c4ca737c862b9cf2) - chore(package-lock): resetdeps and `eslint@7.20.0` - ([@wraithgar](https://github.com/wraithgar)) -* [`28d036ae9`](https://github.com/npm/cli/commit/28d036ae9179f742bd0518e558a54f014a7a895e) - `arborist@2.2.5` - * fix: hidden lockfiles were not respected on Node v10.0-10.12 - -### DOCUMENTATION - -* [`ba1adef42`](https://github.com/npm/cli/commit/ba1adef4292123e87e26b59e0c6fd6f5ff1fe775) - [#2760](https://github.com/npm/cli/issues/2760) - chore(docs): capitalize all Instaces of "package" - ([@MrBrain295](https://github.com/MrBrain295)) -* [`8bfa05fa1`](https://github.com/npm/cli/commit/8bfa05fa1dfd4a64381c7ec750df6d174724e8c1) - [#2775](https://github.com/npm/cli/issues/2775) - chore(docs): add navigation configuration - ([@ethomson](https://github.com/ethomson)) -* [`238e474a4`](https://github.com/npm/cli/commit/238e474a48ddecc33c76eb3d2c4d0642cfe8829a) - [#2778](https://github.com/npm/cli/issues/2778) - chore(docs):update unpublish cooldown - ([@christoflemke](https://github.com/christoflemke)) - -## v7.5.6 (2021-02-22) - -### BUG FIXES - -* [`4e58274ed`](https://github.com/npm/cli/commit/4e58274ed0fd2dd29d3c8d6c7c47f37a37dc0f0f) - [#2742](https://github.com/npm/cli/issues/2742) - Do not print error banner for shell proxy commands - ([@isaacs](https://github.com/isaacs)) - -### DOCS - -* [`3c72ab441`](https://github.com/npm/cli/commit/3c72ab4412111c708736e3a7b8342150372a4af4) - [#2749](https://github.com/npm/cli/issues/2749) - Capitalize Package in a Heading - ([@MrBrain295](https://github.com/MrBrain295)) - -### DEPENDENCIES - -* [`f3ae6ed0d`](https://github.com/npm/cli/commit/f3ae6ed0d25ce80868f59353ef71c09ac77b1cf5) - `read-package-json@3.0.1`, `read-package-json-fast@2.0.2` -* [`9b311fe52`](https://github.com/npm/cli/commit/9b311fe522077c7f8a242b94b0e1dbe746992bef) - [#2736](https://github.com/npm/cli/issue/2736) `@npmcli/arborist@2.2.4`: - * Do not rely on underscore fields in `package.json` files - * Do not remove global packages when updating by name - * Keep `yarn.lock` and `package-lock.json` more in sync - -## v7.5.5 (2021-02-22) - -### BUG FIXES -* [`49c95375a`](https://github.com/npm/cli/commit/49c95375af49308e2db6ba28e91c65193754e091) - [#2688](https://github.com/npm/cli/issues/2688) - fix shrinkwrap in node v10.0 - ([@ljharb](https://github.com/ljharb)) -* [`00afa3161`](https://github.com/npm/cli/commit/00afa316195f2db903146110a07ffdaec9bb6aa2) - [#2718](https://github.com/npm/cli/issues/2718) - restore the prefix on output from `npm version <inc>` - ([@nlf](https://github.com/nlf)) -* [`69e0c4e8c`](https://github.com/npm/cli/commit/69e0c4e8cd684c475a4450c40dfb32c995061aea) - [#2716](https://github.com/npm/cli/issues/2716) - throw an error when trying to dedupe in global mode - ([@nlf](https://github.com/nlf)) -* [`b018eb842`](https://github.com/npm/cli/commit/b018eb84266dc5a02274849135ca148cb59cc349) - [#2719](https://github.com/npm/cli/issues/2719) - obey silent loglevel in run-script - ([@wraithgar](https://github.com/wraithgar)) - -### DEPENDENCIES -* [`8c36697df`](https://github.com/npm/cli/commit/8c36697dfffe8b5e853fe889c9ead5578100c413) - `@npmcli/arborist@2.2.3` - * [#1875](https://github.com/npm/cli/issues/1875) - [arborist#230](https://github.com/npm/arborist/pull/230) - Set default advisory `severity`/`vulnerable_range` when missing from audit endpoint data - ([@isaacs](https://github.com/isaacs)) - * [npm/arborist#231](https://github.com/npm/arborist/pull/231) - skip optional deps with mismatched platform or engine - ([@nlf](https://github.com/nlf)) - * [#2251](https://github.com/npm/cli/issues/2251) - Unpack shrinkwrapped deps not already unpacked - ([@isaacs](https://github.com/isaacs), - [@nlf](https://github.com/nlf)) - * [#2714](https://github.com/npm/cli/issues/2714) - Do not write package.json if nothing changed - ([@isaacs](https://github.com/isaacs)) - * [npm/rfcs#324](https://github.com/npm/rfcs/issues/324) - Prefer peer over prod dep, if both specified - ([@isaacs](https://github.com/isaacs)) - * [npm/arborist#236](https://github.com/npm/arborist/issues/236) - Fix additional peerOptional conflict cases - ([@isaacs](https://github.com/isaacs)) -* [`d865b101f`](https://github.com/npm/cli/commit/d865b101f72142619531311645479f0596a68a1a) - `libnpmpack@2.0.1` - * respect silent loglevel -* [`e606953e5`](https://github.com/npm/cli/commit/e606953e5795803a7c4eddb4ea993735ef65ec95) - `libnpmversion@1.0.11` - * respect silent loglevel -* [`9c51005a1`](https://github.com/npm/cli/commit/9c51005a19fd4c3e7cd4c987d2e39d1b763036bf) - `npm-package-arg@8.1.1` - * do a better job of detecting git specifiers like `git@github.com:npm/cli` -* [`8b6bf0db4`](https://github.com/npm/cli/commit/8b6bf0db49a3378bd85a0d1ffdd19fbdd68a944a) - `pacote@11.2.7` - * respect silent loglevel - * fix INVALID_URL errors for certain git dependencies - -### TESTS -* [`80c2ac995`](https://github.com/npm/cli/commit/80c2ac995170a05b26856a2b72fe9c8163b2c999) - [#2717](https://github.com/npm/cli/issues/2717) - refactor publish tests - ([@wraithgar](https://github.com/wraithgar)) -* [`9d81e0ceb`](https://github.com/npm/cli/commit/9d81e0ceba7d69e0651662508415ee3705bddfd9) - [#2729](https://github.com/npm/cli/issues/2729) - fix typo in shrinkwrap tests - ([@eltociear](https://github.com/eltociear)) - -### DOCUMENTATION -* [`e3de7befb`](https://github.com/npm/cli/commit/e3de7befb3a9e2fcb7aac5b740d09b3b7d99d724) - [#2685](https://github.com/npm/cli/issues/2685) - docs(readme): add note back about branding/origin - ([@darcyclarke](https://github.com/darcyclarke)) -* [`38d87e7c2`](https://github.com/npm/cli/commit/38d87e7c24aea13b0f1c1157aad58d9d15bf8e63) - [#2698](https://github.com/npm/cli/issues/2698) - mention nodenv in README.md - ([@RA80533](https://github.com/RA80533)) -* [`af4422cdb`](https://github.com/npm/cli/commit/af4422cdbc110f93203667efc08b16f7aa74ac2f) - [#2711](https://github.com/npm/cli/issues/2711) - validate that the docs can be parsed by mdx - ([@ethomson](https://github.com/ethomson)) - - -## v7.5.4 (2021-02-12) - -### BUG FIXES - -* [`ef687f545`](https://github.com/npm/cli/commit/ef687f545b177d0496ce74faacf1bf738978355a) - [#2655](https://github.com/npm/cli/issues/2655) - fix(env): Do not clobber defined 'env' script - ([@isaacs](https://github.com/isaacs)) -* [`868954a72`](https://github.com/npm/cli/commit/868954a72c06ff2210b35e1e75571f4ec3357c43) - [#2654](https://github.com/npm/cli/issues/2654) - [fix] node v10.0 lacks `fs.promises` - ([@ljharb](https://github.com/ljharb)) - - -### DEPENDENCIES - -* [`14dd93853`](https://github.com/npm/cli/commit/14dd9385358b3815c2285526f7c2e53ed3c5e8da) - fix(package.json): resetdeps - ([@wraithgar](https://github.com/wraithgar)) -* [`39e4a6401`](https://github.com/npm/cli/commit/39e4a640130b85d62199a33cc2026b04390520ee) - `graceful-fs@4.2.6` -* [`96dffab98`](https://github.com/npm/cli/commit/96dffab988048164516d8cf73c1fbf66781f86df) - `eslint-plugin-promise@4.3.1` -* [`9a6e9d38a`](https://github.com/npm/cli/commit/9a6e9d38abccec793b6ac14871c2b639d62a6c41) - `@npmcli/run-script@1.8.3` - * fix fs.promises reference to run in node v10.0 -* [`584b746a2`](https://github.com/npm/cli/commit/584b746a2c8cdc697629298be27dd23d19de1231) - `@npmcli/git@2.0.5` -* [`6305ebde4`](https://github.com/npm/cli/commit/6305ebde43796737014aedbe019db8cd81dcbbec) - `make-fetch-happen@8.0.14` -* [`e99881117`](https://github.com/npm/cli/commit/e998811170ce5df00a725b2d683b4bff124c6792) - `libnpmversion@1.0.10` -* [`554d91cdf`](https://github.com/npm/cli/commit/554d91cdf82e9c92c2ac3752ed91e7081c2271e5) - chore(package-lock): rebuild package-lock - ([@wraithgar](https://github.com/wraithgar)) -* [`37e8cc507`](https://github.com/npm/cli/commit/37e8cc507b2ce0b89f92e7e77b1d909d1bf5513f) - `@npmcli/arborist@2.2.2` - * [#2505](https://github.com/npm/cli/issues/2505) properly install - dependenciess of linked dependencies - ([@ruyadorno](https://github.com/ruyadorno)) - * [#2504](https://github.com/npm/cli/issues/2504) Allow `--force` to - override conflicted optional peerDependencies - ([@isaacs](https://github.com/isaacs)) - * Ensure correct flags on shrinkwrapped module deps - ([@isaacs](https://github.com/isaacs)) - * Correct relative paths for global packages installed from tarball files - ([nlf](https://github.com/nlf)) -* [`7788ce47b`](https://github.com/npm/cli/commit/7788ce47bc264d9d951055da85f2b695eb8b3f15) - `@npmcli/map-workspaces@1.0.3` - -### TESTS - -* [`3a159d27e`](https://github.com/npm/cli/commit/3a159d27e976933098ec18fa9c3e474c85b5b332) - [#2681](https://github.com/npm/cli/issues/2681) - fix(tests): rewrite doctor tests - ([@ljharb](https://github.com/ljharb)) -* [`abcc96a20`](https://github.com/npm/cli/commit/abcc96a204ed581fc7cd603f47cdca0afe299530) - [#2682](https://github.com/npm/cli/issues/2682) - [tests] separate tests from linting and license validation - ([@ljharb](https://github.com/ljharb)) - -### DOCUMENTATION - -* [`7e1e84181`](https://github.com/npm/cli/commit/7e1e84181ccaca8a8b499a21b1aa7d731a14d5b7) - [#2662](https://github.com/npm/cli/issues/2662) - fix(docs): fix angle brackets in npm diff docs - ([@ethomson](https://github.com/ethomson)) - -## v7.5.3 (2021-02-08) - -### BUG FIXES - -* [`df596bf4c`](https://github.com/npm/cli/commit/df596bf4c10d6917672579cc38800f5e846002bc) - fix(publish): follow all configs for registry auth check - [#2602](https://github.com/npm/cli/issues/2602) - ([@wraithgar](https://github.com/wraithgar)) -* [`6d7afb03c`](https://github.com/npm/cli/commit/6d7afb03cd7602b60e709516711a2f94cd61ff25) - [#2613](https://github.com/npm/cli/issues/2613) - install script: pass -q to curl calls to disable user .curlrc files - ([@nlf](https://github.com/nlf)) - -### DEPENDENCIES - -* [`3294fed6f`](https://github.com/npm/cli/commit/3294fed6f18626516978c21fac5f28ecfdb58124) - `pacote@11.2.5` - * prevent infinite recursion in git dep preparation -* [`0f7a3a87c`](https://github.com/npm/cli/commit/0f7a3a87c12e30bdd2cdab596ca6511de787c969) - `read-package-json-fast@2.0.1` - * avoid duplicating optionalDependencies as dependencies in package.json -* [`6f46b0f7f`](https://github.com/npm/cli/commit/6f46b0f7fef9891e6de4af3547c70a67cb3a7a13) - `init-package-json@2.0.2` -* [`df4f65acc`](https://github.com/npm/cli/commit/df4f65acc4ceaf15db4c227670e80f94584c055c) - `@npmcli/arborist@2.2.0` -* [`7038c2ff4`](https://github.com/npm/cli/commit/7038c2ff49022f8babd495d1b831b5c82d6aed05) - `@npmcli/run-script@1.8.2` -* [`54cd4c87a`](https://github.com/npm/cli/commit/54cd4c87a71c9381519d8ac52e306096066dc92e) - `libnpmversion@1.0.8` -* [`9ab36aae4`](https://github.com/npm/cli/commit/9ab36aae429784df754211d5f086a515012b9bdd) - `graceful-fs@4.2.5` -* [`e1822cf27`](https://github.com/npm/cli/commit/e1822cf277336728f1d5696ffe0db3ea6e700d9e) - `@npmcli/installed-package-contents@1.0.7` - -## v7.5.2 (2021-02-02) - -### BUG FIXES - -* [`37613e4e6`](https://github.com/npm/cli/commit/37613e4e686e4891210acaabc9c23f41456eda3f) -[#2395](https://github.com/npm/cli/issues/2395) -[#2329](https://github.com/npm/cli/issues/2329) -fix(exec): use latest version when possible -([@wraithgar](https://github.com/wraithgar)) -* [`567c9bd03`](https://github.com/npm/cli/commit/567c9bd03a7669111fbba6eb6d1f12ed7cad5a1b) -fix(lib/npm): do not clobber config.execPath -([@wraithgar](https://github.com/wraithgar)) - -### DEPENDENCIES - -* [`643709706`](https://github.com/npm/cli/commit/64370970653af5c8d7a2be2c2144e355aa6431b0) -`@npmcli/config@1.2.9` ([@isaacs](https://github.com/isaacs)) - * [`4c6be4a`](https://github.com/npm/config/commit/4c6be4a66a3e89ae607e08172b8543b588a95fb5) Restore npm v6 behavior with `INIT_CWD` - * [`bbebc66`](https://github.com/npm/config/commit/bbebc668888f71dba57959682364b6ff26ff4fac) Do not set the `PREFIX` environment variable - -## v7.5.1 (2021-02-01 - -### BUG FIXES - -* [`0ea134e41`](https://github.com/npm/cli/commit/0ea134e4190f322138299c51672eab5387ec41bb) - [#2587](https://github.com/npm/cli/issues/2587) - pass all settings through to pacote.packument, fixes #2060 - ([@nlf](https://github.com/nlf)) -* [`8c5ca2f51`](https://github.com/npm/cli/commit/8c5ca2f516f5ac87f3bbd7f1fd95c0b283a21f14) - Add test for npm-usage.js, and fix 'npm --long' output - ([@isaacs](https://github.com/isaacs)) - -### DEPENDENCIES - -* [`7e4e88e93`](https://github.com/npm/cli/commit/7e4e88e938323e34a2a41176472d8e43e84bd4dd) - `@npmcli/arborist@2.1.1`, `pacote@11.2.4` - * Properly raise ERESOLVE errors on root dev dependencies - * Ignore ERESOLVE errors when performing git dep 'prepare' scripts - * Always reinstall packages that are explicitly requested - * fix global update all so it actually updates things - * Install bins properly when global root is a link - ([@isaacs](https://github.com/isaacs)) - -### DOCUMENTATION - -* [`23dac2fef`](https://github.com/npm/cli/commit/23dac2feff1d02193791c7e39d9e93bc9bf8e624) - [#2557](https://github.com/npm/cli/issues/2557) - npm team revamp - ([@ruyadorno](https://github.com/ruyadorno)) -* [`dd05ba0c0`](https://github.com/npm/cli/commit/dd05ba0c0b2f4c70eb8558c0ecc54889efbe98f5) - [#2572](https://github.com/npm/cli/issues/2572) - add note about `--force` overriding peer dependencies - ([@isaacs](https://github.com/isaacs)) -* [`e27639780`](https://github.com/npm/cli/commit/e276397809aceb01cc468e02a83bc6f2265376d9) - [#2584](https://github.com/npm/cli/issues/2584) - Fixed the spelling of contributor as it was written as conributor - ([@pavanbellamkonda](https://github.com/pavanbellamkonda)) -* [`13a5e3178`](https://github.com/npm/cli/commit/13a5e31781cdaa37d3f007e1c8583c7cb591c62a) - [#2502](https://github.com/npm/cli/issues/2502) - elaborate that npm help uses browser - ([@ariccio](https://github.com/ariccio)) - -## v7.5.0 (2021-01-28) - -### FEATURES - -* [`d011266b7`](https://github.com/npm/cli/commit/d011266b733367aad283ccbfb9d2b19442c3405f) - [#1319](https://github.com/npm/cli/issues/1319) - add npm diff command - ([@ruyadorno](https://github.com/ruyadorno)) - -### BUG FIXES - -* [`d2f8af2da`](https://github.com/npm/cli/commit/d2f8af2da64d510d3d363aec10531bebf840d84e) - [#2445](https://github.com/npm/cli/issues/2445) - publish: don't complain about missing auth until after registry is chosen - ([@dr-js](https://github.com/dr-js)) - -### DOCUMENTATION - -* [`8d3fd63aa`](https://github.com/npm/cli/commit/8d3fd63aaa6a5c9b3d2281dd0bd9e1c270b35941) - [#2559](https://github.com/npm/cli/issues/2559) - updates to readme, removal, contributing and several other docs - ([@darcyclarke](https://github.com/darcyclarke)) -* [`7772d9f9f`](https://github.com/npm/cli/commit/7772d9f9f9f853573a7ff8e7fb60c5e46566f596) - [#2542](https://github.com/npm/cli/issues/2542) - fix grammar on caching docs for search, exec and init - ([@wraithgar](https://github.com/wraithgar)) -* [`52e8a1aef`](https://github.com/npm/cli/commit/52e8a1aef4aab3f378c20276a9109bb3f00eccd5) - [#2558](https://github.com/npm/cli/issues/2558) - refreshed npm updated docs - ([@ruyadorno](https://github.com/ruyadorno)) -* [`abae00ca0`](https://github.com/npm/cli/commit/abae00ca05925e521696dd12480853509aab6c0a) - [#2565](https://github.com/npm/cli/issues/2565) - update npm command docs - ([@wraithgar](https://github.com/wraithgar)) -* [`9351cbf9a`](https://github.com/npm/cli/commit/9351cbf9afd2310c56b9953c005505ea5126a5d4) - [#2566](https://github.com/npm/cli/issues/2566) - refresh npm run-script docs - ([@ruyadorno](https://github.com/ruyadorno)) - -### DEPENDENCIES - -* [`56c08863e`](https://github.com/npm/cli/commit/56c08863e15cb9cf8662b99ddc627cfcdff0348d) - `hosted-git-info@3.0.8` -* [`18a93f06b`](https://github.com/npm/cli/commit/18a93f06b632be051b9455e32a85e4e75066f52c) - `ssri@8.0.1` -* [`cb768f671`](https://github.com/npm/cli/commit/cb768f671c4d8d5a09d9a6c5a74227d300e81104) - `@npmcli/move-file@1.1.1` -* [`32cc0a4be`](https://github.com/npm/cli/commit/32cc0a4be76465093e3d0f314215a0ec46dc03c6) - `minipass-fetch@1.3.3` - * fixes ssl settings passthrough -* [`530997968`](https://github.com/npm/cli/commit/530997968fbbd9e8bf016689b1d192daa812b4de) - `@npmcli/arborist@2.1.0` - * added signal handler to rollback when possible - * prevent ERESOLVEs caused by loose root dep specs - * detect conflicts among nested peerOptional deps - * properly buildIdealTree when root is a symlink - -## v7.4.3 (2021-01-21) - -### DOCUMENTATION - -* [`ec1f06d06`](https://github.com/npm/cli/commit/ec1f06d06447a29c74bee063cff103ede7a2111b) - [#2498](https://github.com/npm/cli/issues/2498) - docs(npm): update `npm` docs - ([@darcyclarke](https://github.com/darcyclarke)) - -### DEPENDENCIES -* [`bc23284cd`](https://github.com/npm/cli/commit/bc23284cd5c4cc4532875aff14df94213727a509) - [#2511](https://github.com/npm/cli/issues/2511) - remove coverage files - ([@ruyadorno](https://github.com/ruyadorno)) -* [`fcbc676b8`](https://github.com/npm/cli/commit/fcbc676b88e1b7c8d01a3799683cd388a82c44d6) - `pacote@11.2.3` -* [`ebd3a24ff`](https://github.com/npm/cli/commit/ebd3a24ff8381f2def306136b745d1615fd6139f) - `@npmcli/arborist@2.0.6` - * Preserve git+https auth when provided - -## v7.4.2 (2021-01-15) - -### DEPENDENCIES - -* [`e5ce6bbba`](https://github.com/npm/cli/commit/e5ce6bbbad82b85c8e74a4558503513e4f337476) - * `@npmcli/arborist@2.0.5` - * fix creating missing dirs when using --prefix and --global - * fix omit types of deps in global installs - * fix prioritizing npm-shrinkwrap.json over package-lock.json - * better cache system for packuments - * improves audit performance - -## v7.4.1 (2021-01-14) - -### BUG FIXES - -* [`23df96d33`](https://github.com/npm/cli/commit/23df96d3394ba0b69a37f416d7f0c26bb9354975) - [#2486](https://github.com/npm/cli/issues/2486) - npm link no longer deletes entire project when global prefix is a symlink - ([@nlf](https://github.com/nlf)) - -### DOCUMENTATION - -* [`7dd0dfc59`](https://github.com/npm/cli/commit/7dd0dfc59c861e7d3e30a86a8e6db10872fc6b44) - [#2459](https://github.com/npm/cli/issues/2459) - fix(docs): clean up `npm start` docs - ([@wraithgar](https://github.com/wraithgar)) -* [`307b3bd9f`](https://github.com/npm/cli/commit/307b3bd9f90e96fcc8805a1d5ddec80787a3d3a7) - [#2460](https://github.com/npm/cli/issues/2460) - fix(docs): clean up `npm stop` docs - ([@wraithgar](https://github.com/wraithgar)) -* [`23f01b739`](https://github.com/npm/cli/commit/23f01b739d7a01a7dc3672322e14eb76ff33d712) - [#2462](https://github.com/npm/cli/issues/2462) - fix(docs): clean up `npm test` docs - ([@wraithgar](https://github.com/wraithgar)) -* [`4b43656fc`](https://github.com/npm/cli/commit/4b43656fc608783a29ccf8495dc305459abc5cc7) - [#2463](https://github.com/npm/cli/issues/2463) - fix(docs): clean up `npm prefix` docs - ([@wraithgar](https://github.com/wraithgar)) -* [`1135539ba`](https://github.com/npm/cli/commit/1135539bac9f98bb1a5d5ed05227a8ecd19493d3) - [`a07bb8e69`](https://github.com/npm/cli/commit/a07bb8e692a85b55d51850534c09fa58224c2285) - [`9b55b798e`](https://github.com/npm/cli/commit/9b55b798ed8f2b9be7b3199a1bfc23b1cd89c4cd) - [`cd5eeaaa0`](https://github.com/npm/cli/commit/cd5eeaaa08eabb505b65747a428c3c59159663dc) - [`6df69ce10`](https://github.com/npm/cli/commit/6df69ce107912f8429665eb851825d2acebc8575) - [`dc6b2a8b0`](https://github.com/npm/cli/commit/dc6b2a8b032d118be3566ce0fa7c67c171c8d2cb) - [`a3c127446`](https://github.com/npm/cli/commit/a3c1274460e16d1edbdca6a0cee86ef313fdd961) - [#2464](https://github.com/npm/cli/issues/2464) - fix(docs): clean up `npm uninstall` docs - ([@wraithgar](https://github.com/wraithgar)) -* [`cfdcf32fd`](https://github.com/npm/cli/commit/cfdcf32fd7628501712b8cad4a541c6b8e7b66bc) - [#2474](https://github.com/npm/cli/issues/2474) - fix(docs): clean up `npm unpublish` docs - ([@wraithgar](https://github.com/wraithgar)) -* [`acd5b062a`](https://github.com/npm/cli/commit/acd5b062a811fcd98849df908ce26855823ca671) - [#2475](https://github.com/npm/cli/issues/2475) - fix(docs): update `package-lock.json` docs - ([@isaacs](https://github.com/isaacs)) -* [`b0b0edf6d`](https://github.com/npm/cli/commit/b0b0edf6de1678de7f4a000700c88daa5f7194ef) - [#2482](https://github.com/npm/cli/issues/2482) - fix(docs): clean up `npm token` docs - ([@wraithgar](https://github.com/wraithgar)) -* [`35559201a`](https://github.com/npm/cli/commit/35559201a4a0a5b111ce58d6824e5b4030eb4496) - [#2487](https://github.com/npm/cli/issues/2487) - fix(docs): clean up `npm search` docs - ([@wraithgar](https://github.com/wraithgar)) - -### DEPENDENCIES - -* [`ea8c02169`](https://github.com/npm/cli/commit/ea8c02169cfbf0484d67db7c0e7a6ec8aecb7210) - `@npmcli/arborist@2.0.5` -* [`fb6f2c313`](https://github.com/npm/cli/commit/fb6f2c313d1d9770cc7d02a3900c7945df3cb661) - `pacote@11.2.1` -* [`c549b7657`](https://github.com/npm/cli/commit/c549b76573b1835a63e1e5898e9c16860079d84e) - `make-fetch-happen@8.0.13` - -## v7.4.0 (2021-01-07) - -### FEATURES - -* [`47ed2dfd8`](https://github.com/npm/cli/commit/47ed2dfd865566643bc1d39e8a4f98d2e1add99a) - [#2456](https://github.com/npm/cli/issues/2456) add - `--foreground-scripts` option ([@isaacs](https://github.com/isaacs)) - -### BUG FIXES - -* [`d01746a5a`](https://github.com/npm/cli/commit/d01746a5a6dde115ee6a600cdf54c9b35afcab3f) - [#2444](https://github.com/npm/cli/issues/2444) - [#1103](https://github.com/npm/cli/issues/1103) Remove deprecated - `process.umask()` ([@isaacs](https://github.com/isaacs)) -* [`b2e2edf8a`](https://github.com/npm/cli/commit/b2e2edf8aee57347c96a61209c7a10139a0cc85a) - [#2422](https://github.com/npm/cli/issues/2422) npm publish --dry-run - should not check login status ([@buyan302](https://github.com/buyan302)) -* [`99156df80`](https://github.com/npm/cli/commit/99156df8099f55bc69dfa99d7ddcf8d1d569016e) - [#2448](https://github.com/npm/cli/issues/2448) - [#2425](https://github.com/npm/cli/issues/2425) pass extra arguments - directly to run-script as an array ([@nlf](https://github.com/nlf)) -* [`907b34b2e`](https://github.com/npm/cli/commit/907b34b2ecc34ac376d989f824f7492064e43ef4) - [#2455](https://github.com/npm/cli/issues/2455) fix(ci): pay attention to - --ignore-scripts ([@wraithgar](https://github.com/wraithgar)) - -### DEPENDENCIES - -* [`7a49fd4af`](https://github.com/npm/cli/commit/7a49fd4afc8cd24db40aee008031ea648583d0bc) - `tar@6.1.0`, `pacote@11.1.14` -* [`54a7bd16c`](https://github.com/npm/cli/commit/54a7bd16c130525ade71ec9894af71c2825d8584) - `@npmcli/arborist@2.0.3` - -### DOCUMENTATION - -* [`a390d7456`](https://github.com/npm/cli/commit/a390d74561b72f0b13cba65844ce60c379198087) - [#2440](https://github.com/npm/cli/issues/2440) Updated the url for RFC - 19 so that it isn't a 404. - ([@therealjeffg](https://github.com/therealjeffg)) -* [`e02b46ad7`](https://github.com/npm/cli/commit/e02b46ad7acdeb9fbb63f782e546c2f8db94ae6e) - [#2436](https://github.com/npm/cli/issues/2436) Grammatical Fix in npm-ls - Documentation 'Therefore' is spelled 'Therefor' - ([@marsonya](https://github.com/marsonya)) -* [`0fed44dea`](https://github.com/npm/cli/commit/0fed44dea12f125b639b5e3575adcea74a86d3a0) - [#2417](https://github.com/npm/cli/issues/2417) Fix npm bug reporting url - ([@AkiaCode](https://github.com/AkiaCode)) - -## 7.3.0 (2020-12-18) - -### FEATURES - -* [`a9b8bf263`](https://github.com/npm/cli/commit/a9b8bf2634c627fbb16ca3a6bb2c2f1058c3e586) - [#2362](https://github.com/npm/cli/issues/2362) - Support multiple set/get/deletes in npm config - ([@isaacs](https://github.com/isaacs)) - -### BUG FIXES - -* [`9eef63849`](https://github.com/npm/cli/commit/9eef638499c88689acb00d812c10f0407cb95c08) - Pass full set of options to login helper functions. - This fixes `npm login --no-strict-ssl`, as well as a host of other - options that one might want to set while logging in. - Reported by: [@toddself](https://github.com/toddself) - ([@isaacs](https://github.com/isaacs)) -* [`628a554bc`](https://github.com/npm/cli/commit/628a554bc113e4e115d34778bfe8a77cfad1d933) - [#2358](https://github.com/npm/cli/issues/2358) - fix doctor test to work correctly for node pre-release versions - ([@nlf](https://github.com/nlf)) -* [`be4a0900b`](https://github.com/npm/cli/commit/be4a0900b14b2c6315bf62bed8f5affb648215ae) - [#2360](https://github.com/npm/cli/issues/2360) - raise an error early if publishing without login, registry - ([@isaacs](https://github.com/isaacs)) -* [`44d433105`](https://github.com/npm/cli/commit/44d4331058c53909ada62470b23b2185102b2128) - [#2366](https://github.com/npm/cli/issues/2366) - Include prerelease versions when deprecating - ([@tiegz](https://github.com/tiegz)) -* [`cba3341da`](https://github.com/npm/cli/commit/cba3341dae4c92541049dc976e82e2ba19566e95) - [#2373](https://github.com/npm/cli/issues/2373) - npm profile refactor - ([@ruyadorno](https://github.com/ruyadorno)) -* [`7539504e3`](https://github.com/npm/cli/commit/7539504e3abdec28039a7798e5ccb745b536cb6e) - [#2382](https://github.com/npm/cli/issues/2382) - remove the metrics sender - ([@nlf](https://github.com/nlf)) - -### DOCS - -* [`b98569a8c`](https://github.com/npm/cli/commit/b98569a8ca28dbd611fe84492aee996e2e567b55) - add note about `INIT_CWD` to run-script doc -* [`292929279`](https://github.com/npm/cli/commit/292929279854a06ca60ff737b574cbd6503ec5db) - [#2368](https://github.com/npm/cli/issues/2368) - Revert bug-reporting links to GH. - Re: <https://blog.npmjs.org/post/188841555980/updates-to-community-docs-more> - ([@tiegz](https://github.com/tiegz)) -* [`f4560626f`](https://github.com/npm/cli/commit/f4560626f09dba4889d752f7f739aa5a5f3da741) - update `ISSUE_TEMPLATE` with modern links - ([@isaacs](https://github.com/isaacs)) -* [`bc1c567ed`](https://github.com/npm/cli/commit/bc1c567ed3d853ed4f01d33a800eb453956de6ef) - update npm command doc feature request links - ([@isaacs](https://github.com/isaacs)) -* [`0ad958fe1`](https://github.com/npm/cli/commit/0ad958fe1cb811699caca235f361c8328baac8c4) - [#2381](https://github.com/npm/cli/issues/2381) - (docs,test): assorted typo fixes - ([@XhmikosR](https://github.com/XhmikosR)) - -### TESTING - -* [`a92d310b7`](https://github.com/npm/cli/commit/a92d310b7e9e4c48b08f52785c2e3a6d52a82ad7) - [#2361](https://github.com/npm/cli/issues/2361) - Add max-len to lint rules - ([@Edu93Jer](https://github.com/Edu93Jer)) - -### DEPENDENCIES - -* [`4fc2f3e05`](https://github.com/npm/cli/commit/4fc2f3e05b600aa64fe5eb6b8b77bc070e5a9403) - [#2300](https://github.com/npm/cli/issues/2300) - `@npmcli/config@1.2.8`: - * Support setting email without username/password - -## 7.2.0 (2020-12-15) - -### FEATURES - -* [`a9c4b158c`](https://github.com/npm/cli/commit/a9c4b158c46dd0d0c8d8744a97750ffd0c30cc09) - [#2342](https://github.com/npm/cli/issues/2342) - allow npm rebuild to accept a path to a module - ([@nlf](https://github.com/nlf)) - -### DEPENDENCIES - -* [`beb371800`](https://github.com/npm/cli/commit/beb371800292140bf3882253c447168a378bc154) - [#2334](https://github.com/npm/cli/issues/2334) - remove unused top level dep tough-cookie - ([@darcyclarke](https://github.com/darcyclarke)) -* [`d45e181d1`](https://github.com/npm/cli/commit/d45e181d17dd88d82b3a97f8d9cd5fa5b6230e48) - [#2335](https://github.com/npm/cli/issues/2335) - `ini@2.0.0`, `@npmcli/config@1.2.7` - ([@isaacs](https://github.com/isaacs)) -* [`ef4b18b5a`](https://github.com/npm/cli/commit/ef4b18b5a70381b264d234817cff32eeb6848a73) - [#2309](https://github.com/npm/cli/issues/2309) - `@npmcli/arborist@2.0.2` - * properly remove deps when no lockfile and package.json is present -* [`c6c013e6e`](https://github.com/npm/cli/commit/c6c013e6ebc4fe036695db1fd491eb68f3b57c68) - `readdir-scoped-modules@1.1.0` -* [`a1a2134aa`](https://github.com/npm/cli/commit/a1a2134aa9a1092493db6d6c9a729ff5203f0dd4) - remove unused sorted-object dep - ([@nlf](https://github.com/nlf)) -* [`85c2a2d31`](https://github.com/npm/cli/commit/85c2a2d318ae066fb2c161174f5aea97e18bc9c5) - [#2344](https://github.com/npm/cli/issues/2344) - remove editor dependency - ([@nlf](https://github.com/nlf)) - -### TESTING - -* [`3a6dd511c`](https://github.com/npm/cli/commit/3a6dd511c944c5f2699825a99bba1dde333a45ef) - npm edit - ([@nlf](https://github.com/nlf)) -* [`3ba5de4e7`](https://github.com/npm/cli/commit/3ba5de4e7f6c5c0f995a29844926d6ed2833addd) - [#2347](https://github.com/npm/cli/issues/2347) - npm help-search - ([@nlf](https://github.com/nlf)) -* [`6caf19f49`](https://github.com/npm/cli/commit/6caf19f491e144be3e2a1a50f492dad48b01f361) - [#2348](https://github.com/npm/cli/issues/2348) - npm help - ([@nlf](https://github.com/nlf)) -* [`cb5847e32`](https://github.com/npm/cli/commit/cb5847e3203c52062485b5de68e4f6d29b33c361) - [#2349](https://github.com/npm/cli/issues/2349) - npm hook - ([@nlf](https://github.com/nlf)) -* [`996a2f6b1`](https://github.com/npm/cli/commit/996a2f6b130d6678998a2f6a5ec97d75534d5f66) - [#2353](https://github.com/npm/cli/issues/2353) - npm org - ([@nlf](https://github.com/nlf)) -* [`8c67c38a4`](https://github.com/npm/cli/commit/8c67c38a4f476ff5be938db6b6b3ee9ac6b44db5) - [#2354](https://github.com/npm/cli/issues/2354) - npm set - ([@nlf](https://github.com/nlf)) - -## 7.1.2 (2020-12-11) - -### DEPENDENCIES - -* [`c3ba1daf7`](https://github.com/npm/cli/commit/c3ba1daf7cd335d72aeba80ae0e9f9d215ca9ea5) - [#2033](https://github.com/npm/cli/issues/2033) `@npmcli/config@1.2.6`: - * Set `INIT_CWD` to initial current working directory - * Set `NODE` to initial process.execPath -* [`8029608b9`](https://github.com/npm/cli/commit/8029608b914fe5ba35a7cd37ae95ab93b0532e2e) - `json-parse-even-better-errors@2.3.1` -* [`0233818e6`](https://github.com/npm/cli/commit/0233818e606888b80881b17a2c6aca9f10a619b2) - [#2332](https://github.com/npm/cli/issues/2332) `treeverse@1.0.4` -* [`e401d6bb3`](https://github.com/npm/cli/commit/e401d6bb37ffc767b4fefe89878dd3c3ef490b2c) - `ini@1.3.8` -* [`011bb1220`](https://github.com/npm/cli/commit/011bb122035dcd43769ec35982662cca41635068) - [#2320](https://github.com/npm/cli/issues/2320) `@npmcli/arborist@2.0.1`: - * Do not save with `^` and no version - -### BUGFIXES - -* [`244c2069f`](https://github.com/npm/cli/commit/244c2069fd093f053d3061c85575ac13e72e2454) - [#2325](https://github.com/npm/cli/issues/2325) npm search - include/exclude ([@ruyadorno](https://github.com/ruyadorno)) -* [`d825e901e`](https://github.com/npm/cli/commit/d825e901eceea4cf8d860e35238dc30008eb4da4) - [#1905](https://github.com/npm/cli/issues/1905) - [#2316](https://github.com/npm/cli/issues/2316) run install scripts for - root project -* [`315449142`](https://github.com/npm/cli/commit/31544914294948085a84097af7f0f5de2a2e8f7e) - [#2331](https://github.com/npm/cli/issues/2331) - [#2021](https://github.com/npm/cli/issues/2021) Set `NODE_ENV=production` - if 'dev' is on the omit list ([@isaacs](https://github.com/isaacs)) - -### TESTING - -* [`c243e3b9d`](https://github.com/npm/cli/commit/c243e3b9d9bda0580a0fc1b3e230b4d47412176e) - [#2313](https://github.com/npm/cli/issues/2313) tests: completion - ([@nlf](https://github.com/nlf)) -* [`7ff6efbb8`](https://github.com/npm/cli/commit/7ff6efbb866591b2330b967215cef8146dff3ebf) - [#2314](https://github.com/npm/cli/issues/2314) npm team - ([@ruyadorno](https://github.com/ruyadorno)) -* [`7a4f0c96c`](https://github.com/npm/cli/commit/7a4f0c96c2ab9f264f7bda2caf7e72c881571270) - [#2323](https://github.com/npm/cli/issues/2323) npm doctor - ([@nlf](https://github.com/nlf)) - -### DOCUMENTATION - -* [`e340cf64b`](https://github.com/npm/cli/commit/e340cf64ba31ef329a9049b60c32ffd0342cfb7d) - [#2330](https://github.com/npm/cli/issues/2330) explain through - run-script ([@isaacs](https://github.com/isaacs)) - -## 7.1.1 (2020-12-08) - -### DEPENDENCIES - -* [`bf09e719c`](https://github.com/npm/cli/commit/bf09e719c7f563a255b1e9af6b1237ebc5598db6) - `@npmcli/arborist@2.0.0` - * Much stricter tree integrity guarantees - * Fix issues where the root project is a symlink, or linked as a - workspace -* [`7ceb5b728`](https://github.com/npm/cli/commit/7ceb5b728b9f326c567f5ffe5831c9eccf013aa0) - `ini@1.3.6` -* [`77c6ced2a`](https://github.com/npm/cli/commit/77c6ced2a6daaadbff715c8f05b2e61ba76e9bab) - `make-fetch-happen@8.0.11` - * Avoid caching headers that are hazardous or unnecessary to leave - lying around (authorization, npm-session, etc.) - * [#38](https://github.com/npm/make-fetch-happen/pull/38) Include query - string in cache key ([@jpb](https://github.com/jpb)) -* [`0ef25b6cd`](https://github.com/npm/cli/commit/0ef25b6cd2921794d36f066e2b11c406342cf167) - `libnpmsearch@3.1.0`: - * Update to accept query params as options, so we can paginate. - ([@nlf](https://github.com/nlf)) -* [`518a66450`](https://github.com/npm/cli/commit/518a664500bcde30475788e8c1c3e651f23e881b) - `@npmcli/config@1.2.4`: - * Do not allow path options to be set to a boolean `false` value -* [`3d7aff9d8`](https://github.com/npm/cli/commit/3d7aff9d8dd1cf29956aa306464cd44fbc2af426) - update all dependencies using latest npm to install them - -### TESTS - -* [`2848f5940`](https://github.com/npm/cli/commit/2848f594034b87939bfc5546e3e603f123d98a01) - [npm/statusboard#173](https://github.com/npm/statusboard/issues/173) - [#2293](https://github.com/npm/cli/issues/2293) npm shrinkwrap - ([@ruyadorno](https://github.com/ruyadorno)) -* [`f6824459a`](https://github.com/npm/cli/commit/f6824459ae0c86e2fa9c84b3dcec85f572ae8e1b) - [#2302](https://github.com/npm/cli/issues/2302) npm deprecate - ([@nlf](https://github.com/nlf)) -* [`b7d74b627`](https://github.com/npm/cli/commit/b7d74b627859f08fca23209d6e0d3ec6657a4489) - [npm/statusboard#180](https://github.com/npm/statusboard/issues/180) - [#2304](https://github.com/npm/cli/issues/2304) npm unpublish - ([@ruyadorno](https://github.com/ruyadorno)) - -### FEATURES - -* [`3db90d944`](https://github.com/npm/cli/commit/3db90d94474f673591811fdab5eb6a5bfdeba261) - [#2303](https://github.com/npm/cli/issues/2303) allow for passing object - keys to searchopts to allow pagination ([@nlf](https://github.com/nlf)) - -## 7.1.0 (2020-12-04) - -### FEATURES - -* [`6b1575110`](https://github.com/npm/cli/commit/6b15751106beb99234aa4bf39ae05cf40076d42a) - [#2237](https://github.com/npm/cli/pull/2237) - add `npm set-script` command - ([@Yash-Singh1](https://github.com/Yash-Singh1)) -* [`15d7333f8`](https://github.com/npm/cli/commit/15d7333f832e3d68ae16895569f27a27ef86573e) - add interactive `npm exec` - ([@isaacs](https://github.com/isaacs)) - -### BUG FIXES - -* [`2a1192e4b`](https://github.com/npm/cli/commit/2a1192e4b03acdf6e6e24e58de68f736ab9bb35f) - [#2202](https://github.com/npm/cli/pull/2202) - Do not run interactive `npm exec` in CI when a TTY - ([@isaacs](https://github.com/isaacs)) - -### DOCUMENTATION - -* [`0599cc37d`](https://github.com/npm/cli/commit/0599cc37df453bf79d47490eb4fca3cd63f67f80) - [#2271](https://github.com/npm/cli/pull/2271) - don't wrap code block - ([@ethomson](https://github.com/ethomson)) - -### DEPENDENCIES - -* [`def85c726`](https://github.com/npm/cli/commit/def85c72640ffe2d27977c56b7aa06c6f6346ca9) - `@npmcli/arborist@1.0.14` - * fixes running `npm exec` from file system root folder -* [`4c94673ab`](https://github.com/npm/cli/commit/4c94673ab5399d27e5a48e52f7a65b038a456265) - `semver@7.3.4` - -## 7.0.15 (2020-11-27) - -### DEPENDENCIES - -* [`00e6028ef`](https://github.com/npm/cli/commit/00e6028ef83bf76eaae10241fd7ba59e39768603) - `@npmcli/arborist@1.0.13` - * do not override user-defined shorthand values when saving `package.json` - -### BUG FIXES - -* [`9c3413fbc`](https://github.com/npm/cli/commit/9c3413fbcb37e79fc0b3d980e0b5810d7961277c) - [#2034](https://github.com/npm/cli/issues/2034) - [#2245](https://github.com/npm/cli/issues/2245) - `npm link <pkg>` should not save `package.json` - ([@ruyadorno](https://github.com/ruyadorno)) - -### DOCUMENTATION - -* [`1875347f9`](https://github.com/npm/cli/commit/1875347f9f4f2b50c28fe8857c5533eeebf42da2) - [#2196](https://github.com/npm/cli/issues/2196) - remove doc on obsolete `unsafe-perm` flag - ([@kaizhu256](https://github.com/kaizhu256)) -* [`f51e50603`](https://github.com/npm/cli/commit/f51e5060340c783a8a00dadd98e5786960caf43f) - [#2200](https://github.com/npm/cli/issues/2200) - `config.md` cleanup - ([@alexwoollam](https://github.com/alexwoollam)) -* [`997cbdb40`](https://github.com/npm/cli/commit/997cbdb400bcd22e457e8a06b69a7be697cfd66d) - [#2238](https://github.com/npm/cli/issues/2238) - Fix broken link to `package.json` documentation - ([@d-fischer](https://github.com/d-fischer)) -* [`9da972dc4`](https://github.com/npm/cli/commit/9da972dc44c21cf0e337f1c3fca44eb9df3e40d5) - [#2241](https://github.com/npm/cli/issues/2241) - `npm star` docs cleanup - ([@ruyadorno](https://github.com/ruyadorno)) - -## 7.0.14 (2020-11-23) - -### DEPENDENCIES -* [`09d21ab90`](https://github.com/npm/cli/commit/09d21ab903dcfebdfd446b8b29ad46c425b6510e) - `@npmcli/run-script@1.8.1` - - fix a regression in how scripts are escaped - -## 7.0.13 (2020-11-20) - -### BUG FIXES -* [`5fc56b6db`](https://github.com/npm/cli/commit/5fc56b6dbcc7d7d1463a761abb67d2fc16ad3657) - [npm/statusboard#174](https://github.com/npm/statusboard/issues/174) - [#2204](https://github.com/npm/cli/issues/2204) - fix npm unstar command - ([@ruyadorno](https://github.com/ruyadorno)) -* [`7842b4d4d`](https://github.com/npm/cli/commit/7842b4d4dca1e076b0d26d554f9dce67484cd7be) - [npm/statusboard#182](https://github.com/npm/statusboard/issues/182) - [#2205](https://github.com/npm/cli/issues/2205) - fix npm version usage output - ([@ruyadorno](https://github.com/ruyadorno)) -* [`a0adbf9f8`](https://github.com/npm/cli/commit/a0adbf9f8f77531fcf81ae31bbc7102698765ee3) - [#2206](https://github.com/npm/cli/issues/2206) - [#2213](https://github.com/npm/cli/issues/2213) - fix: fix flatOptions usage in npm init - ([@ruyadorno](https://github.com/ruyadorno)) - -### DEPENDENCIES - -* [`3daaf000a`](https://github.com/npm/cli/commit/3daaf000aee0ba81af855977d7011850e79099e6) - `@npmcli/arborist@1.0.12` - - fixes some windows specific bugs in how paths are handled and compared - -### DOCUMENTATION - -* [`084a7b6ad`](https://github.com/npm/cli/commit/084a7b6ad6eaf9f2d92eb05da93e745f5357cce2) - [#2210](https://github.com/npm/cli/issues/2210) - docs: Fix typo - ([@HollowMan6](https://github.com/HollowMan6)) - -## 7.0.12 (2020-11-17) - -### BUG FIXES - -* [`7b89576bd`](https://github.com/npm/cli/commit/7b89576bd1fa557a312a841afa66b895558d1b12) - [#2174](https://github.com/npm/cli/issues/2174) - fix running empty scripts with `npm run-script` - ([@nlf](https://github.com/nlf)) -* [`bc9afb195`](https://github.com/npm/cli/commit/bc9afb195f5aad7c06bc96049c0f00dc8e752dee) - [#2002](https://github.com/npm/cli/issues/2002) - [#2184](https://github.com/npm/cli/issues/2184) - Preserve builtin conf when installing npm globally - ([@isaacs](https://github.com/isaacs)) - -### DEPENDENCIES - -* [`b74c05d88`](https://github.com/npm/cli/commit/b74c05d88dc48fabef031ea66ffaa4e548845655) - `@npmcli/run-script@1.8.0` - * fix windows command-line argument escaping - -### DOCUMENTATION - -* [`4e522fdc9`](https://github.com/npm/cli/commit/4e522fdc917bc85af2ca8ff7669a0178e2f35123) - [#2179](https://github.com/npm/cli/issues/2179) - remove mention to --parseable option from `npm audit` docs - ([@Primajin](https://github.com/Primajin)) - -## 7.0.11 (2020-11-13) - -### DEPENDENCIES - -* [`629a667a9`](https://github.com/npm/cli/commit/629a667a9b30b0b870075da965606979622a5e2e) - `eslint@7.13.0` -* [`de9891bd2`](https://github.com/npm/cli/commit/de9891bd2a16fe890ff5cfb140c7b1209aeac0de) - `eslint-plugin-standard@4.1.0` -* [`c3e7aa31c`](https://github.com/npm/cli/commit/c3e7aa31c565dfe21cd1f55a8433bfbcf58aa289) - [#2123](https://github.com/npm/cli/issues/2123) - [#1957](https://github.com/npm/cli/issues/1957) - `@npmcli/arborist@1.0.11` - -### BUG FIXES - -* [`a8aa38513`](https://github.com/npm/cli/commit/a8aa38513ad5c4ad44e6bb3e1499bfc40c31e213) - [#2134](https://github.com/npm/cli/issues/2134) - [#2156](https://github.com/npm/cli/issues/2156) - Fix `cannot read property length of undefined` in `ERESOLVE` explanation code - ([@isaacs](https://github.com/isaacs)) -* [`1dbf0f9bb`](https://github.com/npm/cli/commit/1dbf0f9bb26ba70f4c6d0a807701d7652c31d7d4) - [#2150](https://github.com/npm/cli/issues/2150) - [#2155](https://github.com/npm/cli/issues/2155) - send json errors to stderr, not stdout - ([@isaacs](https://github.com/isaacs)) -* [`fd1d7a21b`](https://github.com/npm/cli/commit/fd1d7a21b247bb35d112c51ff8d8a06fd83c8b44) - [#1927](https://github.com/npm/cli/issues/1927) - [#2154](https://github.com/npm/cli/issues/2154) - Set process.title a bit more usefully - ([@isaacs](https://github.com/isaacs)) -* [`2a80c67ef`](https://github.com/npm/cli/commit/2a80c67ef8c12c3d9d254f5be6293a6461067d99) - [#2008](https://github.com/npm/cli/issues/2008) - [#2153](https://github.com/npm/cli/issues/2153) - Support legacy auth tokens for registries that use them - ([@ruyadorno](https://github.com/ruyadorno)) -* [`786e36404`](https://github.com/npm/cli/commit/786e36404068fd51657ddac766e066a98754edbf) - [#2017](https://github.com/npm/cli/issues/2017) - [#2159](https://github.com/npm/cli/issues/2159) - pass all options to Arborist for `npm ci` - ([@darcyclarke](https://github.com/darcyclarke)) -* [`b47ada7d1`](https://github.com/npm/cli/commit/b47ada7d1623e9ee586ee0cf781ee3ac5ea3c223) - [#2161](https://github.com/npm/cli/issues/2161) - fixed typo - ([@scarabedore](https://github.com/scarabedore)) - -## 7.0.10 (2020-11-10) - -### DOCUMENTATION - -* [`e48badb03`](https://github.com/npm/cli/commit/e48badb03058286a557584d7319db4143049cc6b) - [#2148](https://github.com/npm/cli/issues/2148) - Fix link in documentation - ([@gurdiga](https://github.com/gurdiga)) - -### BUG FIXES - -* [`8edbbdc70`](https://github.com/npm/cli/commit/8edbbdc706694fa32f52d0991c76ae9f207b7bbc) - [#1972](https://github.com/npm/cli/issues/1972) - Support exec auto pick bin when all bin is alias - ([@dr-js](https://github.com/dr-js)) - -### DEPENDENCIES - -* [`04a3e8c10`](https://github.com/npm/cli/commit/04a3e8c10c3f38e1c7a35976d77c2929bdc39868) - [#1962](https://github.com/npm/cli/issues/1962) - `@npmcli/arborist@1.0.10`: - * prevent self-assignment of parent/fsParent - * Support update options in global package space - -## 7.0.9 (2020-11-06) - -### BUG FIXES - -* [`96a0d2802`](https://github.com/npm/cli/commit/96a0d2802d3e619c6ea47290f5c460edfe94070a) - default the 'start' script when server.js present - ([@isaacs](https://github.com/isaacs)) -* [`7716e423e`](https://github.com/npm/cli/commit/7716e423ee92a81730c0dfe5b9ecb4bb41a3f947) - [#2075](https://github.com/npm/cli/issues/2075) - [#2071](https://github.com/npm/cli/issues/2071) print the registry when - using 'npm login' ([@Wicked7000](https://github.com/Wicked7000)) -* [`7046fe10c`](https://github.com/npm/cli/commit/7046fe10c5035ac57246a31ca8a6b09e3f5562bf) - [#2122](https://github.com/npm/cli/issues/2122) tests for `npm cache` - command ([@nlf](https://github.com/nlf)) - -### DEPENDENCIES - -* [`74325f53b`](https://github.com/npm/cli/commit/74325f53b9d813b0e42203c037189418fad2f64a) - [#2124](https://github.com/npm/cli/issues/2124) - `@npmcli/run-script@1.7.5`: - * Export the `isServerPackage` method - * Proxy signals to and from foreground child processes -* [`0e58e6f6b`](https://github.com/npm/cli/commit/0e58e6f6b8f0cd62294642a502c17561aaf46553) - [#1984](https://github.com/npm/cli/issues/1984) - [#2079](https://github.com/npm/cli/issues/2079) - [#1923](https://github.com/npm/cli/issues/1923) - [#606](https://github.com/npm/cli/issues/606) - [#2031](https://github.com/npm/cli/issues/2031) `@npmcli/arborist@1.0.9`: - * Process deps for all link nodes - * Use junctions instead of symlinks - * Use @npmcli/move-file instead of fs.rename -* [`1dad328a1`](https://github.com/npm/cli/commit/1dad328a17d93def7799545596b4eba9833b35aa) - [#1865](https://github.com/npm/cli/issues/1865) - [#2106](https://github.com/npm/cli/issues/2106) - [#2084](https://github.com/npm/cli/issues/2084) `pacote@11.1.13`: - * Properly set the installation command for `prepare` scripts when - installing git/dir deps -* [`e090d706c`](https://github.com/npm/cli/commit/e090d706ca637d4df96d28bff1660590aa3f3b62) - [#2097](https://github.com/npm/cli/issues/2097) `libnpmversion@1.0.7`: - * Do not crash when the package.json file lacks a 'version' field -* [`8fa541a10`](https://github.com/npm/cli/commit/8fa541a10dbdc09376175db7a378cc9b33e8b17b) - `cmark-gfm@0.8.4` - -## 7.0.8 (2020-11-03) - -### DOCUMENTATION - -* [`052e977b9`](https://github.com/npm/cli/commit/052e977b9d071e1b3654976881d10cd3ddcba788) - [#1822](https://github.com/npm/cli/issues/1822) - [#1247](https://github.com/npm/cli/issues/1247) - add section on peerDependenciesMeta field in package.json - ([@foxxyz](https://github.com/foxxyz)) -* [`52d32d175`](https://github.com/npm/cli/commit/52d32d1758c5ebc58944a1e8d98d57e30048e527) - [#1970](https://github.com/npm/cli/issues/1970) - match npm-exec.md -p usage with lib/exec.js - ([@dr-js](https://github.com/dr-js)) -* [`48ee8d01e`](https://github.com/npm/cli/commit/48ee8d01edd11ed6186c483e1169ff4d2070b963) - [#2096](https://github.com/npm/cli/issues/2096) - Fix RFC links in changelog - ([@jtojnar](https://github.com/jtojnar)) - - -### BUG FIXES - -* [`6cd3cd08a`](https://github.com/npm/cli/commit/6cd3cd08af56445e13757cac3af87f3e7d54ed27) - Support *all* conf keys in publishConfig -* [`a1f9be8a7`](https://github.com/npm/cli/commit/a1f9be8a7f9b7a3a813fc3e5e705bc982470b0e2) - [#2074](https://github.com/npm/cli/issues/2074) - Support publishing any kind of spec, not just directories - -### DEPENDENCIES - -* [`545382df6`](https://github.com/npm/cli/commit/545382df62e3014f3e51d7034e52498fb2b01a37) - `libnpmpublish@4.0.0`: - * Support publishing things other than folders -* [`7d88f1719`](https://github.com/npm/cli/commit/7d88f17197e3c8cca9b277378d6f9b054b1b7886) - `npm-registry-fetch@9.0.0` -* [`823b40a4e`](https://github.com/npm/cli/commit/823b40a4e9c6ef76388af6fe01a3624f6f7675be) - `pacote@11.1.12` -* [`90bf57826`](https://github.com/npm/cli/commit/90bf57826edf2f78ddf8deb0793115ead8a8b556) - `npm-profile@5.0.2` -* [`e5a413577`](https://github.com/npm/cli/commit/e5a4135770d13cf114fac439167637181f87d824) - `libnpmteam@2.0.2` -* [`fc5aa7b4a`](https://github.com/npm/cli/commit/fc5aa7b4ad45cb65893f734e1229a6720f7966e5) - `libnpmsearch@3.0.1` -* [`9fc1dee13`](https://github.com/npm/cli/commit/9fc1dee138ca33ecdbd57e63142b27c60cf88f9b) - `libnpmorg@2.0.1` -* [`0ea870ec5`](https://github.com/npm/cli/commit/0ea870ec5d2be1d44f050ad8bc24ed936cc45fde) - `libnpmhook@6.0.1` -* [`32fd744ea`](https://github.com/npm/cli/commit/32fd744ea745f297f0be79a80955f077a57c4ac7) - `libnpmaccess@4.0.1` -* [`fc76f3d9f`](https://github.com/npm/cli/commit/fc76f3d9fcf19e65a9373ab3d9068c4326d2f782) - `@npmcli/arborist@1.0.8` - * Fix `cannot read property 'description' of undefined` in `npm ls` - when `package-lock.json` is corrupted - * Do not allow peerDependencies to be nested under dependents in any - circumstances - * Always resolve peerDependencies in `--prefer-dedupe` mode - -## 7.0.7 (2020-10-30) - -### BUG FIXES - -* [`3990b422d`](https://github.com/npm/cli/commit/3990b422d3ff63c54d96b61596bdb8f26a45ca7b) - [#2067](https://github.com/npm/cli/pull/2067) - use sh as default unix shell, not bash - ([@isaacs](https://github.com/isaacs)) -* [`81d6ceef6`](https://github.com/npm/cli/commit/81d6ceef6947e46355eb3ddb05a73da50870dfc1) - [#1975](https://github.com/npm/cli/issues/1975) - fix npm exec on folders missing package.json - ([@ruyadorno](https://github.com/ruyadorno)) -* [`2a680e91a`](https://github.com/npm/cli/commit/2a680e91a2be1f3f03a6fbd946f74628ee1cb370) - [#2083](https://github.com/npm/cli/pull/2083) - delete the contents of `node_modules` only in `npm ci` - ([@nlf](https://github.com/nlf)) -* [`2636fe1f4`](https://github.com/npm/cli/commit/2636fe1f45383cb1b6fc164564dc49318815db37) - [#2086](https://github.com/npm/cli/pull/2086) - disable banner output if loglevel is silent in `npm run-script` - ([@macno](https://github.com/macno)) - -### DEPENDENCIES - -* [`4156f053e`](https://github.com/npm/cli/commit/4156f053ee8712a4b53a210e62fba1e6562ba43a) - `@npmcli/run-script@1.7.4` - * restore the default `npm start` script -* [`1900ae9ad`](https://github.com/npm/cli/commit/1900ae9adecd227dd6f8b49de61a99c978ba89cf) - `@npmcli/promise-spawn@1.3.2` - * fix errors when processing scripts as root -* [`8cb0c166c`](https://github.com/npm/cli/commit/8cb0c166ccc019146a7a94d13c12723f001d2551) - `@npmcli/arborist@1.0.6` - * make sure missing bin links get set on reify - -## 7.0.6 (2020-10-27) - -### BUG FIXES - -* [`46c7f792a`](https://github.com/npm/cli/commit/46c7f792ab16dd0b091e1ad6d37de860c8885883) - [#2047](https://github.com/npm/cli/pull/2047) - [#1935](https://github.com/npm/cli/issues/1935) - skip the prompt when in a known ci environment - ([@nlf](https://github.com/nlf)) -* [`f8f6e1fad`](https://github.com/npm/cli/commit/f8f6e1fad8057edc02e4ce4382b1bc086d01211c) - [#2049](https://github.com/npm/cli/pull/2049) - properly remove pycache in release script - ([@MylesBorins](https://github.com/MylesBorins)) -* [`5db95b393`](https://github.com/npm/cli/commit/5db95b393e9c461ad34c1774f3515c322bf375bf) - [#2050](https://github.com/npm/cli/pull/2050) - pack: do not show individual files of bundled deps - ([@isaacs](https://github.com/isaacs)) -* [`3ee8f3b34`](https://github.com/npm/cli/commit/3ee8f3b34055da2ef1e735e1a06f64593512f1e3) - [#2051](https://github.com/npm/cli/pull/2051) - view: Better errors when package.json is not JSON - ([@isaacs](https://github.com/isaacs)) - -### DEPENDENCIES - -* [`99ae633f6`](https://github.com/npm/cli/commit/99ae633f6ccc8aa93dc3dcda863071658b0653db) - `libnpmversion@1.0.6` - - respect gitTagVersion = false -* [`d4173f58d`](https://github.com/npm/cli/commit/d4173f58ddefdd5456145f34f3c9f4ba5fca407e) - `@npmcli/promise-spawn@1.3.1` - - do not return empty buffer when stdio is inherited - - attach child process to returned promise -* [`c09380fa5`](https://github.com/npm/cli/commit/c09380fa51b720141a9971602f4bb7aabd4d6242) - `@npmcli/run-script@1.7.3` - - forward SIGINT and SIGTERM to children that inherit stdio -* [`b154861ad`](https://github.com/npm/cli/commit/b154861ad244b6a14020c43738d0cce1948bfdd3) - `@npmcli/arborist@1.0.5` -* [`ffea6596b`](https://github.com/npm/cli/commit/ffea6596b8653da32a2b4c9a4903970e7146eee4) - `agent-base@6.0.2` - - support http proxy for https registries - -## 7.0.5 (2020-10-23) - -* [`77ad86b5e`](https://github.com/npm/cli/commit/77ad86b5eedf139dda3329a6686d5f104dc233bb) - Merge docs deps with main project - -## 7.0.4 (2020-10-23) - -### DOCUMENTATION - -* [`cc026daf8`](https://github.com/npm/cli/commit/cc026daf8c8330256de01375350a1407064562f9) - docs: `npm-dedupe` through `npm-install` -* [`aec77acf8`](https://github.com/npm/cli/commit/aec77acf886d73f85e747cafdf7a2b360befba16) - [#1915](https://github.com/npm/cli/pull/1915) - use "dockhand" for faster static documentation generation - ([@ethomson](https://github.com/ethomson)) -* [`aeb10d210`](https://github.com/npm/cli/commit/aeb10d210816cf6829e0ac557c79d9efd8c4bdd1) - [#2024](https://github.com/npm/cli/pull/2024) - Fix post-install script name - ([@irajtaghlidi](https://github.com/irajtaghlidi)) - -### BUG FIXES - -* [`59e8dd6c6`](https://github.com/npm/cli/commit/59e8dd6c621f9a5c6e0b65533d8256be87a8e0d3) - [#2015](https://github.com/npm/cli/issues/2015) - [#2016](https://github.com/npm/cli/pull/2016) - Properly set `npm_command` environment variable. - -### TESTS - -* [`39ad1ad9e`](https://github.com/npm/cli/commit/39ad1ad9e1e1a9530db5b90a588b5081b71abc8d) - [#2001](https://github.com/npm/cli/pull/2001) - `npm config` tests - ([@ruyadorno](https://github.com/ruyadorno)) -* [`b9c1caa8e`](https://github.com/npm/cli/commit/b9c1caa8e4cc7c900d09657425ea361db5974319) - [#2026](https://github.com/npm/cli/pull/2026) - `npm owner` test and refactor - ([@ruyadorno](https://github.com/ruyadorno)) - -### DEPENDENCIES - -* [`ed6e6a9d3`](https://github.com/npm/cli/commit/ed6e6a9d3c36ffc5fb77fc25b6d66dbcb26beeb9) - `eslint-plugin-standard@4.0.2` -* [`b737ee999`](https://github.com/npm/cli/commit/b737ee99961364827bacf210a3e5ca5d2b7edad2) - [#2009](https://github.com/npm/cli/issues/2009) - [#2007](https://github.com/npm/cli/issues/2007) - `npm-packlist@2.1.4`: - - * Maintain order in package.json files array globs - * Strip slashes from package files list results - -* [`783965508`](https://github.com/npm/cli/commit/783965508d49f8ab0d8ceff38bee700cd0a06a54) - [#1997](https://github.com/npm/cli/issues/1997) - [#2000](https://github.com/npm/cli/issues/2000) - [#2005](https://github.com/npm/cli/issues/2005) - `@npmcli/arborist@1.0.4` - - * Ensure that root is added when root.meta is set - * Include all edges in explain() output when a root edge exists - * Do not conflict on meta-peers that will not be replaced - * Install peerOptionals if explicitly requested, or dev - -## 7.0.3 (2020-10-20) - -### BUG FIXES - -* [`ce4724a38`](https://github.com/npm/cli/commit/ce4724a3835ded9a4a29d8d67323f925461155e5) - [#1986](https://github.com/npm/cli/pull/1986) - check `result` when determining exit code of `ls <filter>` - ([@G-Rath](https://github.com/G-Rath)) -* [`00d926f8d`](https://github.com/npm/cli/commit/00d926f8d884872d08d9a0cd73aa9cace2acb91b) - [#1987](https://github.com/npm/cli/pull/1987) - don't suppress run output when `--silent` is passed - ([@G-Rath](https://github.com/G-Rath)) -* [`043da2347`](https://github.com/npm/cli/commit/043da234745f36d55742e827314837dead5807ab) - improve cache clear error message - ([@isaacs](https://github.com/isaacs)) - -### DOCUMENTATION - -* [`a57f5c466`](https://github.com/npm/cli/commit/a57f5c466ceae59575ef05bb7941cce8752d8c58) - update docs for: access, adduser, audit, bin, bugs, build, cache, ci, - completion, config and dedupe - ([@isaacs](https://github.com/isaacs)) -* [`5b88b72b9`](https://github.com/npm/cli/commit/5b88b72b9821f7114cc4e475bbf52726a1674e52) - remove the long-gone bundle command - ([@isaacs](https://github.com/isaacs)) -* [`ae09aa5c1`](https://github.com/npm/cli/commit/ae09aa5c1cd150727b05ccfaeaba8d45e5697e50) - [#1993](https://github.com/npm/cli/pull/1993) - document --save-peer as a common option to npm install - ([@JakeChampion](https://github.com/JakeChampion)) -* [`c9993e6b1`](https://github.com/npm/cli/commit/c9993e6b1c2918699c2d125bf9b966f44f5d3ebe) - [#1982](https://github.com/npm/cli/pull/1982) - fix url links for init-package-json/node-semver - ([@takenspc](https://github.com/takenspc)) - -### DEPENDENCIES - -* [`5d9df8395`](https://github.com/npm/cli/commit/5d9df83958d3d5e6d8acad2ebabfbe5f3fd23c13) - `node-gyp@7.1.2` - -## 7.0.2 (2020-10-16) - -### DOCUMENTATION - -* [`9476734b7`](https://github.com/npm/cli/commit/9476734b7d5fa6df80ad17ad277a6bee9a16235c) - [#1967](https://github.com/npm/cli/pull/1967) - add mention to workspaces prepare lifecycle - ([@ruyadorno](https://github.com/ruyadorno)) - -### BUG FIXES - -* [`5cf71c689`](https://github.com/npm/cli/commit/5cf71c689bcfcd423405e59d05b7cc5704cb4c02) - [#1971](https://github.com/npm/cli/pull/1971) - owner rm at local pkg not work - ([@ShangguanQuail](https://github.com/ShangguanQuail)) - -### DEPENDENCIES - -* [`722b7ae63`](https://github.com/npm/cli/commit/722b7ae63da8b386fe188066dc2dae0121d9353b) - [#1974](https://github.com/npm/cli/pull/1974) - patch node-gyp - ([@targos](https://github.com/MylesBorins)) -* [`4ae825c01`](https://github.com/npm/cli/commit/4ae825c01c7ca3031361f9df72594a190c6ed1e4) - [#1976](https://github.com/npm/cli/pull/1976) - patch node-gyp - ([@MylesBorins](https://github.com/MylesBorins)) -* [`181eabf13`](https://github.com/npm/cli/commit/181eabf132c823af086380368de73d2f42e5aac1) - `@npmcli/arborist@1.0.3` - * fix workspaces `prepare` lifecycle scripts - * fix peer deps overchecks resulting in ERESOLVE -* [`6cc115409`](https://github.com/npm/cli/commit/6cc115409b7eb2df8e11db6232ee3d00e4316a7d) - `init-package-json@2.0.1` -* [`dbf9d6d1f`](https://github.com/npm/cli/commit/dbf9d6d1f060ea43b700409306574396a798127d) - `libnpmpublish@3.0.2` - -## 7.0.1 (2020-10-15) - -### DOCUMENTATION - -* [`03fca6a3b`](https://github.com/npm/cli/commit/03fca6a3b227f71562863bec7a1de1732bd719f1) - Adds docs on workspaces, explaining its basic concept and how to use it. - ([@ruyadorno](https://github.com/ruyadorno)) - -### BUG FIXES - -* [`2ccb63659`](https://github.com/npm/cli/commit/2ccb63659f9a757201658d5d019099b492d04a5b) - [#1951](https://github.com/npm/cli/issues/1951) - [#1956](https://github.com/npm/cli/pull/1956) - Handle errors from audit endpoint appropriately - ([@isaacs](https://github.com/isaacs)) - -### DEPENDENCIES - -* [`120e62736`](https://github.com/npm/cli/commit/120e6273604f15a2ce55668dfb2c23d06bf1e06c) - `node-gyp@7.1.1` -* [`6560b8d95`](https://github.com/npm/cli/commit/6560b8d952a613cefbd900186aa38df53bc201d1) - `@npmcli/arborist@1.0.2` - * do not drop scope information when fetching scoped package tarballs - * fix cycles/ordering resolution when peer deps require nesting -* [`282a1e008`](https://github.com/npm/cli/commit/282a1e00820b9abfb3465d044b30b2cade107909) - `npm-user-validate@1.0.1` -* [`b259edcb4`](https://github.com/npm/cli/commit/b259edcb4bac37e6f26d56af5f6666afbda8c126) - `hosted-git-info@3.0.7` - -## v7.0.0 (2020-10-12) - -### BUG FIXES - -* [`7bcdb3636`](https://github.com/npm/cli/commit/7bcdb3636e29291b9c722fe03a8450859dcb5b4f) - [#1949](https://github.com/npm/cli/pull/1949) fix: ensure `publishConfig` - is passed through ([@nlf](https://github.com/nlf)) -* [`97978462e`](https://github.com/npm/cli/commit/97978462e9050261e4ce2549e71fe94a48796577) - fix: patch `config.js` to remove duplicate vals - ([@darcyclarke](https://github.com/darcyclarke)) - -### DOCUMENTATION - -* [`60769d757`](https://github.com/npm/cli/commit/60769d757859c88e2cceab66975f182a47822816) - [#1911](https://github.com/npm/cli/pull/1911) docs: v7 npm-install - refresh ([@ruyadorno](https://github.com/ruyadorno)) -* [`08de49042`](https://github.com/npm/cli/commit/08de4904255742cbf7477a20bdeebe82f283a406) - [#1938](https://github.com/npm/cli/pull/1938) docs: v7 using npm config - updates ([@ruyadorno](https://github.com/ruyadorno)) - -### DEPENDENCIES - -* [`15366a1cf`](https://github.com/npm/cli/commit/15366a1cf0073327b90ac7eb977ff8a73b52cc62) - `npm-registry-fetch@8.1.5` -* [`f04a74140`](https://github.com/npm/cli/commit/f04a74140bf65db36be3c379e0eb20dd6db3cc5c) - `init-package-json@2.0.0` - * [`1de21dce0`](https://github.com/npm/cli/commit/1de21dce0e56874203a789ce33124a4fc4d3b15f) - fix: support dot-separated aliases defined in a `.npmrc` ini files - for `init-*` configs ([@ruyadorno](https://github.com/ruyadorno)) -* [`a67275cd9`](https://github.com/npm/cli/commit/a67275cd9a75fa05ee3d3265832d0a015b14e81c) - `eslint@7.11.0` -* [`6fb83b78d`](https://github.com/npm/cli/commit/6fb83b78db09adfafd7cbd4b926e77802c4993e4) - `hosted-git-info@3.0.6` -* [`1ca30cc9b`](https://github.com/npm/cli/commit/1ca30cc9b8e7edc2043c1f848855f19781729dc9) - `libnpmfund@1.0.0` -* [`28a2d2ba4`](https://github.com/npm/cli/commit/28a2d2ba4a63808614f5d98685a64531e3198b93) - `@npmcli/arborist@1.0.0` - * [npm/rfcs#239](https://github.com/npm/rfcs/pull/239) Improve handling - of conflicting `peerDependencies` in transitive dependencies, so that - `--force` will always accept a best effort override, and - `--strict-peer-deps` will fail faster on conflicts. -* [`9306c6833`](https://github.com/npm/cli/commit/9306c6833e2e77675e0cfddd569b6b54a8bcf172) - `libnpmfund@1.0.1` -* [`fafb348ef`](https://github.com/npm/cli/commit/fafb348ef976116d47ada238beb258d5db5758a7) - `npm-package-arg@8.1.0` -* [`365f2e756`](https://github.com/npm/cli/commit/365f2e7565d0cfde858a43d894a77fb3c6338bb7) - `read-package-json@3.0.0` - -## v7.0.0-rc.4 (2020-10-09) - -* [`09b456f2d`](https://github.com/npm/cli/commit/09b456f2d776e2757956d2b9869febd1e01a1076) - `@npmcli/config@1.2.1` - * [#1919](https://github.com/npm/cli/pull/1919) - exposes `npm_config_user_agent` env variable - ([@nlf](https://github.com/nlf)) -* [`e859fba9e`](https://github.com/npm/cli/commit/e859fba9e7c267b0587b7d22da72e33f3e8f906b) - [#1936](https://github.com/npm/cli/pull/1936) - fix npx for non-interactive shells - ([@nlf](https://github.com/nlf)) -* [`9320b8e4f`](https://github.com/npm/cli/commit/9320b8e4f0e0338ea95e970ec9bbf0704def64b8) - [#1906](https://github.com/npm/cli/pull/1906) - restore old npx behavior of running existing bins first - ([@nlf](https://github.com/nlf)) -* [`7bd47ca2c`](https://github.com/npm/cli/commit/7bd47ca2c718df0a7d809f1992b7a87eece3f6dc) - `@npmcli/arborist@0.0.33` - * fixed handling of invalid package.json file -* [`02737453b`](https://github.com/npm/cli/commit/02737453bc2363daeef8c4e4b7d239e2299029b2) - `make-fetch-happen@8.0.10` - * do not calculate integrity values of http errors - -## v7.0.0-rc.3 (2020-10-06) - -* [`d816c2efa`](https://github.com/npm/cli/commit/d816c2efae41930cbdf4fff8657e0adc450d1dd4) - [`c8f0d5457`](https://github.com/npm/cli/commit/c8f0d5457dd913b425987ae30a611d4eb9e84b7d) - [`d48086d0d`](https://github.com/npm/cli/commit/d48086d0d3e006e76f364fb2c62b406a97ce8f68) - [`f34595f2e`](https://github.com/npm/cli/commit/f34595f2e5814a929049aca0349ce418a7f400c6) - [#1902](https://github.com/npm/cli/pull/1902) - tests for several commands - ([@nlf](https://github.com/nlf)) -* [`6d49207db`](https://github.com/npm/cli/commit/6d49207dbc5d66f91f4f462f05dd8916046e3a7b) - [#1903](https://github.com/npm/cli/pull/1903) - Revert "Remove unused npx binary" - ([@MylesBorins](https://github.com/MylesBorins)) -* [`138dfc202`](https://github.com/npm/cli/commit/138dfc202f401d2d93b4b5d2499799be6eb4ff0b) - set executable permissions on bins that node installer uses -* [`b06d68078`](https://github.com/npm/cli/commit/b06d68078830cc2446b1e51553db10e87591865b) - `@npmcli/arborist@0.0.32` - * Do not remove `node_modules` folders from Workspaces when - `loadActual` races with `buildIdealTree` ([@ruyadorno](https://github.com/ruyadorno)) -* [`2509e3a1b`](https://github.com/npm/cli/commit/2509e3a1bf76289062f1f6f06eee184df386054b) - `uuid@8.3.1` - -## v7.0.0-rc.2 (2020-10-02) - -* [`6de81a013`](https://github.com/npm/cli/commit/6de81a013833e0961abdec6f7c1ad50b63faaae6) - `@npmcli/run-script@1.7.2` - * Fix regression running 'install' scripts when package.json does not - contain a scripts object - -## v7.0.0-rc.1 (2020-10-02) - -* [`281a7f39a`](https://github.com/npm/cli/commit/281a7f39ac314bd7657ce2bcd7918b21eee99210) - `@npmcli/arborist@0.0.31` - * Allow `npm update` to update bundled root dependencies - * Only do implicit node-gyp build for gyp files named `binding.gyp` -* [`384f5ec47`](https://github.com/npm/cli/commit/384f5ec47091eed66c2a47f2c98df3ba7506ec9f) - update minipass-fetch to fix many 'cb() never called' errors -* [`7b1e75906`](https://github.com/npm/cli/commit/7b1e75906351bd73cde2f745ccaf63b9ad7de435) - `@npmcli/run-script@1.7.1` - * Only do implicit node-gyp build for gyp files named `binding.gyp` -* [`c20e2f0c7`](https://github.com/npm/cli/commit/c20e2f0c7766a04f999fdc64faad29277904c2d3) - [#1892](https://github.com/npm/cli/pull/1892) - Support `--omit` options in npm outdated - -## v7.0.0-rc.0 (2020-10-01) - -* [`3b417055c`](https://github.com/npm/cli/commit/3b417055cf07c4ef8e4c5063f00d3c24b5f5cbd2) - [#1859](https://github.com/npm/cli/pull/1859) - fix `proxy` and `https-proxy` config support - ([@badeggg](https://github.com/badeggg)) -* [`dd7d7a284`](https://github.com/npm/cli/commit/dd7d7a284d5150d1804d0cd5a85519c86adf3bc2) - `@npmcli/arborist@0.0.30` - * [#1849](https://github.com/npm/cli/issues/1849) Do not drop peer/dev - dep while saving if both set - * Do not install or build if there is a global top bin conflict - * Default to building node-gyp dependencies -* [`40c17e12c`](https://github.com/npm/cli/commit/40c17e12c5a734c37b88692e36221ac974c0c63d) - `cli-table3@0.6.0` -* [`47a8ca1d7`](https://github.com/npm/cli/commit/47a8ca1d72f0f0835b45cfb2c4fb8ab1218dc14a) - `byte-size@7.0.0` -* [`81073f99a`](https://github.com/npm/cli/commit/81073f99a93b680e3ca08b8f099e9aca2aaf50be) - `eslint@7.10.0` -* [`67793abd4`](https://github.com/npm/cli/commit/67793abd4abdf315816b6266ddb045289f607b03) - `eslint-plugin-import@2.22.1` -* [`a27e8d006`](https://github.com/npm/cli/commit/a27e8d00664e5d4c3e81d664253a10176adb39c8) - `is-cidr@4.0.2` -* [`893fed45e`](https://github.com/npm/cli/commit/893fed45e2272ef764ebf927c659fcf5e7b355b3) - `marked-man@0.7.0` -* [`bc20e0c8a`](https://github.com/npm/cli/commit/bc20e0c8ae30a202c72af88586ab9c167dff980a) - `rimraf@3.0.2` -* [`a2b8fd3c1`](https://github.com/npm/cli/commit/a2b8fd3c153ecca55cb2d60654fff207688532ab) - `uuid@8.3.0` -* [`ee4c85b87`](https://github.com/npm/cli/commit/ee4c85b878410143644460c3860ab706a8c925e0) - `write-file-atomic@3.0.3` -* [`4bdad5fdf`](https://github.com/npm/cli/commit/4bdad5fdf6ef387e2159b529ba4652f0221433b5) - `bin-links@2.2.1` -* [`c394937ec`](https://github.com/npm/cli/commit/c394937ec1911cd17ec42c8fc74773047d47322c) - `@npmcli/run-script@1.7.0` - * Default to building node-gyp dependencies and projects -* remove many unused dependencies - ([@ruyadorno](https://github.com/ruyadorno)) - * [`558e9781a`](https://github.com/npm/cli/commit/558e9781ada06b66be4d2d5d0f7e763f645eda25) - deep-equal - * [`2aa9a1f8a`](https://github.com/npm/cli/commit/2aa9a1f8a5773b9a960b14b51c8111fb964bc9ae) - request - * [`d77594e52`](https://github.com/npm/cli/commit/d77594e52f2f7d65d45347f542f48e4dbb6d2f26) - npm-registry-couchapp - * [`8ec84d9f6`](https://github.com/npm/cli/commit/8ec84d9f691686da67bd14c2728472c94ab3b955) - tacks - * [`a07b421f7`](https://github.com/npm/cli/commit/a07b421f708c13d8239e7283ad89611b24b23d0a) - lincesee - * [`41126e165`](https://github.com/npm/cli/commit/41126e165d3d5625a55e140b84fdd02052520146) - npm-cache-filename - * [`130da51b5`](https://github.com/npm/cli/commit/130da51b553e550584f31e2a8a961f4338f2a0cd) - npm-registry-mock - * [`b355af486`](https://github.com/npm/cli/commit/b355af48696bb5001c6d2b938974d9ab9f5e2360) - sprintf-js - * [`721c0a873`](https://github.com/npm/cli/commit/721c0a8736f3cd0a0e75e0b89518a431553843c6) - uid-number - * [`9c920e5f5`](https://github.com/npm/cli/commit/9c920e5f584e4d912aabc6e412693f7142242a89) - umask - * [`aae1c38bb`](https://github.com/npm/cli/commit/aae1c38bbb983cf40e9b3df012b18bebba5e5400) - config-chain - * [`450845eac`](https://github.com/npm/cli/commit/450845eaceb7e178c8ec7867a67e5cc948986904) - find-npm-prefix - * [`963d542d3`](https://github.com/npm/cli/commit/963d542d385c7fe26830a885fe40d96010d01862) - has-unicode - * [`cad9cbc70`](https://github.com/npm/cli/commit/cad9cbc70561c8638ed6e56286f753693f411000) - infer-owner - * [`3ae02914d`](https://github.com/npm/cli/commit/3ae02914d49f3302d25c85d2242096bb2291f9f4) - lockfile - * [`7bc474d7c`](https://github.com/npm/cli/commit/7bc474d7cb2e2e083fd8358d0648d7c5fb43707f) - once - * [`5c5e0099a`](https://github.com/npm/cli/commit/5c5e0099a4708ec84da3d2e427e16c4a9cfe3c8a) - retry - * [`cfaddd334`](https://github.com/npm/cli/commit/cfaddd334b8b1eddcefa3cd2a9b823ec140271a4) - sha - * [`3a978ffc7`](https://github.com/npm/cli/commit/3a978ffc7fddd6802c81996a5710b2efd15edc11) - slide - -## v7.0.0-beta.13 (2020-09-29) - -* [`405e051f7`](https://github.com/npm/cli/commit/405e051f724a2e79844f78f8ea9ba019fdc513aa) - Fix EBADPLATFORM error message - ([@#1876](https://github.com/#1876)) -* [`e4d911d21`](https://github.com/npm/cli/commit/e4d911d219899c0fdc12f8951b7d70e0887909f8) - `@npmcli/arborist@0.0.28` - * fix: workspaces install entering an infinite loop - * Save provided range if not a subset of savePrefix - * package-lock.json custom indentation - * Check engine and platform when building ideal tree -* [`90550b2e0`](https://github.com/npm/cli/commit/90550b2e023e7638134e91c80ed96828afb41539) - [#1853](https://github.com/npm/cli/pull/1853) - test coverage and refactor for token command - ([@nlf](https://github.com/nlf)) -* [`2715220c9`](https://github.com/npm/cli/commit/2715220c9b5d3f325e65e95bae2b5af8a485a579) - [#1858](https://github.com/npm/cli/pull/1858) - [#1813](https://github.com/npm/cli/issues/1813) - do not include omitted optional dependencies in install output - ([@ruyadorno](https://github.com/ruyadorno)) -* [`e225ddcf8`](https://github.com/npm/cli/commit/e225ddcf8d74a6b1cfb24ec49e37e3f5d06e5151) - [#1862](https://github.com/npm/cli/pull/1862) - [#1861](https://github.com/npm/cli/issues/1861) - respect depth when running `npm ls <pkg>` - ([@ruyadorno](https://github.com/ruyadorno)) -* [`2469ae515`](https://github.com/npm/cli/commit/2469ae5153fa4114a72684376a1b226aa07edf81) - [#1870](https://github.com/npm/cli/pull/1870) - [#1780](https://github.com/npm/cli/issues/1780) - Add 'fetch-timeout' config - ([@isaacs](https://github.com/isaacs)) -* [`52114b75e`](https://github.com/npm/cli/commit/52114b75e83db8a5e08f23889cce41c89af9eb93) - [#1871](https://github.com/npm/cli/pull/1871) - fix `npm ls` for linked dependencies - ([@ruyadorno](https://github.com/ruyadorno)) -* [`9981211c0`](https://github.com/npm/cli/commit/9981211c070ce2b1e34d30223d12bd275adcacf5) - [#1857](https://github.com/npm/cli/pull/1857) - [#1703](https://github.com/npm/cli/issues/1703) - fix `npm outdated` parsing invalid specs - ([@ruyadorno](https://github.com/ruyadorno)) - -## v7.0.0-beta.12 (2020-09-22) - -* [`24f3a5448`](https://github.com/npm/cli/commit/24f3a5448f021ad603046dfb9fd97ed66bd63bba) - [#1811](https://github.com/npm/cli/issues/1811) - npm ci should never save package.json or lockfile - ([@isaacs](https://github.com/isaacs)) -* [`5e780a5f0`](https://github.com/npm/cli/commit/5e780a5f067476c1d207173fc9249faf9eaac0c2) - remove unused spec parameter, assign error code - ([@nlf](https://github.com/nlf)) -* [`f019a248a`](https://github.com/npm/cli/commit/f019a248a67e8c46dbe41bf31f4818c5ca2138bf) - Remove unused npx binary - ([@isaacs](https://github.com/isaacs)) -* [`db157b3ce`](https://github.com/npm/cli/commit/db157b3ceb46327ca2089604d5f4fc9de391584e) - `@npmcli/arborist@0.0.27` - * Resolve race condition with conflicting bin links in local installs - * [#1812](https://github.com/npm/cli/issues/1812) Log engine mismatches more usefully - * [#1814](https://github.com/npm/cli/issues/1814) Do not loop trying to resolve dependencies that fail to load - * [npm/rfcs#224](https://github.com/npm/rfcs/pull/224) Do not automatically install optional peer dependencies - * Add the `strictPeerDeps` option, defaulting to `false` - * fix forwarding configs to resolve pkg spec when adding new deps -* [`b3a50d275`](https://github.com/npm/cli/commit/b3a50d27501e47c61b52c3cc4de99ff4e4641efe) - [#1846](https://github.com/npm/cli/pull/1846) - `@npmcli/run-script@1.6.0` - * This updates node-gyp to v7, allowing us to deduplicate a lot of significant dependencies. -* [`a1d375f6b`](https://github.com/npm/cli/commit/a1d375f6b0ee358be41110a49acc1c9fdb775fbe) - [#1819](https://github.com/npm/cli/pull/1819) - Add `--strict-peer-deps` option - ([@isaacs](https://github.com/isaacs)) -* [`5837a4843`](https://github.com/npm/cli/commit/5837a4843ab1f19fb62f60151f522ca0fa5449ae) - [#1699](https://github.com/npm/cli/pull/1699) - Use allow/deny list in docs - ([@luciomartinez](https://github.com/luciomartinez)) - -## v7.0.0-beta.11 (2020-09-16) - -* [`63005f4a9`](https://github.com/npm/cli/commit/63005f4a98d55786fda46f3bbb3feab044d078df) - [#1639](https://github.com/npm/cli/issues/1639) - npm view should not output extra newline ([@MylesBorins](https://github.com/MylesBorins)) -* [`3743a42c8`](https://github.com/npm/cli/commit/3743a42c854d9ea7e333d7ff86d206a4b079a352) - [#1750](https://github.com/npm/cli/pull/1750) - add outdated tests ([@claudiahdz](https://github.com/claudiahdz)) -* [`2019abdf1`](https://github.com/npm/cli/commit/2019abdf159eb13c9fb3a2bd2f35897a8f52b0d9) - [#1786](https://github.com/npm/cli/pull/1786) - add lib/link.js tests ([@ruyadorno](https://github.com/ruyadorno)) -* [`2f8d11968`](https://github.com/npm/cli/commit/2f8d11968607a74c8def3c05266049bee5e313eb) - `@npmcli/arborist@0.0.25` - * add meta vulnerability calculator for faster audits - * changed parsing specs to be relative to cwd - * fix logging script execution - * fix properly following resolved symlinks - * fix package.json dependencies order -* [`49b2bf5a7`](https://github.com/npm/cli/commit/49b2bf5a798b49d52166744088a80b8a39ccaeb6) - `@npmcli/config@1.1.8` - * fix unknown envs to be passed through - * fix setting correct globalPrefix on load -* [`f9aac351d`](https://github.com/npm/cli/commit/f9aac351dd36a19d14e1f951a2e8e20b41545822) - `libnpmversion@1.0.5` - * fix git ignored lockfiles - -## v7.0.0-beta.10 (2020-09-08) - -* [`7418970f0`](https://github.com/npm/cli/commit/7418970f03229dd2bce7973b99b981779aee6916) - Improve output of dependency node explanations -* [`5e49bdaa3`](https://github.com/npm/cli/commit/5e49bdaa34e29dbd25c687f8e6881747a86b7435) - [#1776](https://github.com/npm/cli/pull/1776) Add 'npm explain' command - -## v7.0.0-beta.9 (2020-09-04) - -* [`ef8f5676b`](https://github.com/npm/cli/commit/ef8f5676b1c90dcf44256b8ed1f61ddb6277c23a) - [#1757](https://github.com/npm/cli/pull/1757) - view: always fetch fullMetadata, and preferOnline -* [`ac5aa709a`](https://github.com/npm/cli/commit/ac5aa709a8609ec2beb7a8c60b3bde18f882f4e8) - [#1758](https://github.com/npm/cli/pull/1758) - fix scope config -* [`a36e2537f`](https://github.com/npm/cli/commit/a36e2537fd4c81df53fb6de01900beb9fa4fa0aa) - outdated: don't throw on non-version/tag/range dep -* [`371f0f062`](https://github.com/npm/cli/commit/371f0f06215ad8caf598c20e3d0d38ff597531e9) - `@npmcli/arborist@0.0.20` - - * Provide explanation objects for `ERESOLVE` errors - * Support overriding certain classes of `ERESOLVE` errors with `--force` - * Detect changes to package.json requiring package-lock dependency flag - re-evaluation - -* [`2a4e2e9ef`](https://github.com/npm/cli/commit/2a4e2e9efecb7f86147e5071c59cfc2461a5a7f5) - [#1761](https://github.com/npm/cli/pull/1761) - Explain `ERESOLVE` errors -* [`8e3e83bd4`](https://github.com/npm/cli/commit/8e3e83bd4f816bfed0efb8266985143ee9b94b86) - `@npmcli/arborist@0.0.21` - - * Remove bin links on prune - * Remove unnecessary tree walk for workspace projects - * Install workspaces on update:true - -* [`d6b134fd9`](https://github.com/npm/cli/commit/d6b134fd9005d911343831270615f80dfead7e3d) - [#1738](https://github.com/npm/cli/pull/1738) - [#1734](https://github.com/npm/cli/pull/1734) - fix package spec parsing during cache add process - ([@mjeanroy](https://github.com/mjeanroy)) -* [`f105eb833`](https://github.com/npm/cli/commit/f105eb8333fa3300c5b47464b129c1b0057ed7bf) - `npm-audit-report@2.1.4`: - - * Do not crash on cyclical meta-vulnerability references - -* [`03a9f569b`](https://github.com/npm/cli/commit/03a9f569b5121a173f14711980db297d4a04ac6b) - `opener@1.5.2` -* [`5616a23b4`](https://github.com/npm/cli/commit/5616a23b4b868d19aa100a6d86d781cc9bfd94f7) - `@npmcli/git@2.0.4` - - * Support `.git` files, so that git worktrees are respected - -## v7.0.0-beta.8 (2020-09-01) - -* [`834e62a0e`](https://github.com/npm/cli/commit/834e62a0e5b76e97cfe9ea3d3188661579ebc874) - * fix: npm ls extraneous workspaces - * `@npmcli/arborist@0.0.19` -* [`758b02358`](https://github.com/npm/cli/commit/758b02358613591ea877e26fcdb76e5b1d40f892) - [#1739](https://github.com/npm/cli/pull/1739) - add full install options to npm exec - ([@ruyadorno](https://github.com/ruyadorno)) -* [`2ee7c8a98`](https://github.com/npm/cli/commit/2ee7c8a98cf01225a3c9ac247139243f868e2e03) - `@npmcli/config@1.1.7` - ([@ruyadorno](https://github.com/ruyadorno)) - -## v7.0.0-beta.7 (2020-08-25) - -* [`b38f68acd`](https://github.com/npm/cli/commit/b38f68acd9292b7432c936db3b6d2d12e896f45d) - ensure `npm-command` HTTP header is sent properly -* [`9f200abb9`](https://github.com/npm/cli/commit/9f200abb94ea2127d9a104c225159b1b7080c82c) - Properly exit with error status code -* [`aa0152b58`](https://github.com/npm/cli/commit/aa0152b58f34f8cdae05be63853c6e0ace03236a) - [#1719](https://github.com/npm/cli/pull/1719) Detect CI properly -* [`50f9740ca`](https://github.com/npm/cli/commit/50f9740ca8000b1c4bd3155bf1bc3d58fb6f0e20) - [#1717](https://github.com/npm/cli/pull/1717) fund with multiple funding - sources ([@ruyadorno](https://github.com/ruyadorno)) -* [`3a63ecb6f`](https://github.com/npm/cli/commit/3a63ecb6f6a0b235660f73a3ffa329b1f131b0c3) - [#1718](https://github.com/npm/cli/pull/1718) - [RFC-0029](https://github.com/npm/rfcs/blob/latest/implemented/0029-add-ability-to-skip-hooks.md) - add ability to skip pre/post hooks to `npm run-script` by using - `--ignore-scripts` ([@ruyadorno](https://github.com/ruyadorno)) - -## v7.0.0-beta.6 (2020-08-21) - -* [`707207bdd`](https://github.com/npm/cli/commit/707207bddb2900d6f7a57ff864cef26cda75a71a) - add `@npmcli/config` dependency - -* [`5cb9a1d4d`](https://github.com/npm/cli/commit/5cb9a1d4d985aaa8e988c51fe5ae7f7ed3602811) - [#1688](https://github.com/npm/cli/pull/1688) use `@npmcli/config` for - configuration ([@isaacs](https://github.com/isaacs)) - -* [`a4295f5db`](https://github.com/npm/cli/commit/a4295f5db7667e8cc6b83abdad168619ad31a12f) - `npm-registry-fetch@8.1.4`: - - * Redact passwords from HTTP logs - -* [`a5a6a516d`](https://github.com/npm/cli/commit/a5a6a516d16828c1375eaf41d04468d919df4a57) - `json-parse-even-better-errors@2.3.0`: - - * Adds support for indentation/newline formatting preservation - -* [`a14054558`](https://github.com/npm/cli/commit/a1405455843db1b14938596303b29fb3ad4f90f0) - `read-package-json-fast@1.2.1`: - - * Adds support for indentation/newline formatting preservation - -* [`f8603c8af`](https://github.com/npm/cli/commit/f8603c8affefc342d81c109e4676d498a8359b78) - `libnpmversion@1.0.4`: - - * Adds support for indentation/newline formatting preservation - -* [`9891fa71c`](https://github.com/npm/cli/commit/9891fa71c88f425bef8d881c3795e5823d732e1f) - `read-package-json@2.1.2`: - - * Adds support for indentation/newline formatting preservation - -* [`b44768aac`](https://github.com/npm/cli/commit/b44768aace0e9c938ebd6d05a5de1cc4368e2d7d) - [#1662](https://github.com/npm/cli/issues/1662) - [#1693](https://github.com/npm/cli/issues/1693) - [#1690](https://github.com/npm/cli/issues/1690) - `@npmcli/arborist@0.0.17`: - - * Load root project `package.json` when running loadVirtual. - * Fetch metadata from registry when loading tree from outdated - package-lock.json file. This avoids a situation where a lockfile or - shrinkwrap from npm v5 would result in deleting dependencies on - install. - * Preserve `package.json` and `package-lock.json` formatting in all - places where these files are written. - -* [`281da6fdc`](https://github.com/npm/cli/commit/281da6fdcda3fb3860b73ed35daa234ad228c363) - `tar@6.0.5` - -* [`1faa5b33d`](https://github.com/npm/cli/commit/1faa5b33dcc6d7e4eba1c0d85ad30cf0c237c9e1) - [#1655](https://github.com/npm/cli/issues/1655) show usage when - `help-search` finds no results - -* [`10fcff73a`](https://github.com/npm/cli/commit/10fcff73a3381ea5e6dcb03888679ae4b501d2f0) - [#1695](https://github.com/npm/cli/issues/1695) fix `pulseWhileDone` - promise handling - -* [`88e4241c5`](https://github.com/npm/cli/commit/88e4241c5d4f512a4e2b09d26fcdcc7f877e65ed) - [#1698](https://github.com/npm/cli/pull/1698) add lib/logout.js unit - tests ([@ruyadorno](https://github.com/ruyadorno)) - -## v7.0.0-beta.5 (2020-08-18) - -* [`b718b0e28`](https://github.com/npm/cli/commit/b718b0e2844d9244cc63667f62ccf81864cc1092) - [#1657](https://github.com/npm/cli/pull/1657) display multiple versions - when using `--json` with `npm view` - ([@claudiahdz](https://github.com/claudiahdz)) -* [`9e7cc42f6`](https://github.com/npm/cli/commit/9e7cc42f687b479d96d222b61f76b2a30c7e6507) - [#1071](https://github.com/npm/cli/pull/1071) migrate from `meant` to - `leven` ([@jamesgeorge007](https://github.com/jamesgeorge007)) -* [`85027f40c`](https://github.com/npm/cli/commit/85027f40ca5237bd750a5633104d12bcc248551c) - [#1664](https://github.com/npm/cli/pull/1664) refactor and add tests for - `npm adduser` ([@ruyadorno](https://github.com/ruyadorno)) -* [`6e03e5583`](https://github.com/npm/cli/commit/6e03e55833d50fd0f5b7824ed14b7e2b14f70eaf) - [#1672](https://github.com/npm/cli/pull/1672) refactor and add tests for - `npm audit` ([@claudiahdz](https://github.com/claudiahdz)) - -## v7.0.0-beta.4 (2020-08-11) - -Replace some environment variables that were excluded. This implements the -[amendment to RFC0021](https://github.com/npm/rfcs/pull/183). - -* [`631142f4a`](https://github.com/npm/cli/commit/631142f4a13959fbe02dc115fb6efa55a3368795) - `@npmcli/run-script@1.5.0` -* [`da95386ae`](https://github.com/npm/cli/commit/da95386aedb3f0c0cc51761bfa750b64ac0eabc9) - [#1650](https://github.com/npm/cli/pull/1650) - [#1652](https://github.com/npm/cli/pull/1652) - include booleans, skip already-set envs - -## v7.0.0-beta.3 (2020-08-10) - -Bring back support for `npm audit --production`, fix a minor `npm version` -annoyance, and track down a very serious issue where a project could be -blown away when it matches a meta-dep in the tree. - -* [`5fb217701`](https://github.com/npm/cli/commit/5fb217701c060e37a3fb4a2e985f80fb015157b9) - [#1641](https://github.com/npm/cli/issues/1641) `@npmcli/arborist@0.0.15` -* [`3598fe1f2`](https://github.com/npm/cli/commit/3598fe1f2dfe6c55221bbac8aaf21feab74a936a) - `@npmcli/arborist@0.0.16` Add support for `npm audit --production` -* [`8ba2aeaee`](https://github.com/npm/cli/commit/8ba2aeaeeb77718cb06fe577fdd56dcdcbfe9c52) - `libnpmversion@1.0.3` - -## v7.0.0-beta.2 (2020-08-07) - -New notification style for updates, and a working doctor. - -* [`cf2819210`](https://github.com/npm/cli/commit/cf2819210327952696346486002239f9fc184a3e) - [#1622](https://github.com/npm/cli/pull/1622) - Improve abbrevs for install and help -* [`d062b2c02`](https://github.com/npm/cli/commit/d062b2c02a4d6d5f1a274aa8eb9c5969ca6253db) - new npm-specific update-notifier implementation -* [`f6d468a3b`](https://github.com/npm/cli/commit/f6d468a3b4bef0b3cc134065d776969869fca51e) - update doctor command -* [`b8b4d77af`](https://github.com/npm/cli/commit/b8b4d77af836f8c49832dda29a0de1b3c2d39233) - [#1638](https://github.com/npm/cli/pull/1638) - Direct users to our GitHub issues instead of npm.community - -## v7.0.0-beta.1 (2020-08-05) - -Fix some issues found in the beta pubish process, and initial attempts to -use npm v7 with [citgm](https://github.com/nodejs/citgm/). - -* [`2c305e8b7`](https://github.com/npm/cli/commit/2c305e8b7bfa28b07812df74f46983fad2cb85b6) - output generated tarball filename -* [`0808328c9`](https://github.com/npm/cli/commit/0808328c93d9cd975837eeb53202ce3844e1cf70) - pack: set correct filename for scoped packages - ([@isaacs](https://github.com/isaacs)) -* [`cf27df035`](https://github.com/npm/cli/commit/cf27df035cfba4f859d14859229bb90841b8fda6) - `@npmcli/arborist@0.0.14` ([@isaacs](https://github.com/isaacs)) - -## v7.0.0-beta.0 (2020-08-04) - -Major refactoring and overhaul of, well, pretty much everything. Almost -all dependencies have been updated, many have been removed, and the entire -`Installer` class is moved into -[`@npmcli/arborist`](http://npm.im/@npmcli/arborist). - -### Some High-level Changes and Improvements - -- You can install GitHub pull requests by adding `#pull/<number>` to the - git url. So it'd be something like `npm install - github:user/project#pull/123` to install PR number 123 of the - `user/project` git repo. You can of course also use this in - dependencies, or anywhere else dependency specifiers are found. -- Initial Workspaces support is added. If you `npm install` in a project - with a `workspaces` declaration, npm will install all your sub-projects' - dependencies as well, and link everything up proper. -- `npm exec` is added, to run any arbitrary command as if it was an npm - script. This is sort of like `npx`, which is also ported to use `npm - exec` under the hood. -- `npm audit` output is tightened up, and prettified. Audit can also now - fix a few more classes of problems, sends far less data over the wire, - and doesn't place blame on the wrong maintainers. (Technically this is a - breaking change if you depend on the specific audit output, but it's - also a big improvement!) -- `npm install` got faster. Like a lot faster. "So fast you'll think it's - broken" faster. `npm ls` got even fasterer. A lot of stuff sped up, is - what we're saying. -- Support has been dropped for Node.js versions less than v10. - -### On the "Breaking" in "Breaking Changes" - -The Semantic Versioning specification precisely defines what constitutes a -"breaking" change. In a nutshell, it's any change that causes a you to -change _your_ code in order to start using _our_ code. We hasten to point -this out, because a "breaking change" does not mean that something about -the update is "broken", necessarily. - -We're sure that some things likely _are_ broken in this beta, because beta -software, and a healthy pessimism about things. But nothing is "broken" on -purpose here, and if you find a bug, we'd love for you to [let us -know](https://github.com/npm/cli/issues). - -### Known Issues, and What's Missing From This Beta (Why Not GA?) - -It's beta software! - -#### Tests - -We have not yet gotten to 100% test coverage of the npm CLI codebase. As -such, there are almost certainly bugs lying in wait. We _do_ have 100% -test coverage of most of the commands, and all recently-updated -dependencies in the npm stack, so it's certainly more well-tested than any -version of npm before. - -#### Docs - -The documentation is incorrect and out of date in most places. Prior to a -GA release, we'll be going through all of our documentation with a -fine-toothed comb to minimize the lies that it tells. - -#### Error Messaging - -There are a few cases where this release will just say something failed, -and not give you as much help as we'd like. We know, and we'll fix that -prior to the GA 7.0.0 release. - -In particular, if you install a project that has conflicting -`peerDependencies` in the tree, it'll just say "Unable to resolve package -tree". Prior to GA release, it'll tell you how to fix it. (For the time -being, just run it again with `--legacy-peer-deps`, and that'll make it -operate like npm v6.) - -#### Audit Issue - -There is a known performance issue in some cases that we've identified -where `npm audit` can spin wildly out of control like a dancer gripped by a -fever, heating up your laptop with fires of passion and CPU work. This -happens when a vulnerability is in a tree with a _lot_ of cross-linked -dependencies that all depend on one another. - -We have a fix for it, but if you run into this issue, you can run with -`--no-audit` to tell npm to chill out a little bit. - -That's about it! It's ready to use, and you should try it out. - -Now on to the list of **BREAKING CHANGES**! - -### Programmatic Usage - -- [RFC - 20](https://github.com/npm/rfcs/blob/latest/implemented/0020-npm-option-handling.md) - The CLI and its dependencies no longer use the `figgy-pudding` library - for configs. Configuration is done using a flat plain old JavaScript - object. -- The `lib/fetch-package-metadata.js` module is removed. Use - [`pacote`](http://npm.im/pacote) to fetch package metadata. -- [`@npmcli/arborist`](http://npm.im/@npmcli/arborist) should be used to do - most things programmatically involving dependency trees. -- The `onload-script` option is no longer supported. -- The `log-stream` option is no longer supported. -- `npm.load()` MUST be called with two arguments (the parsed cli options - and a callback). -- `npm.root` alias for `npm.dir` removed. -- The `package.json` in npm now defines an `exports` field, making it no - longer possible to `require()` npm's internal modules. (This was always - a bad idea, but now it won't work.) - -### All Registry Interactions - -The following affect all commands that contact the npm registry. - -- `referer` header no longer sent -- `npm-command` header added - -### All Lifecycle Scripts - -The environment for lifecycle scripts (eg, build scripts, `npm test`, etc.) -has changed. - -- [RFC - 21](https://github.com/npm/rfcs/blob/latest/implemented/0021-reduce-lifecycle-script-environment.md) - Environment no longer includes `npm_package_*` fields, or `npm_config_*` - fields for default configs. `npm_package_json`, `npm_package_integrity`, - `npm_package_resolved`, and `npm_command` environment variables added. - - (NB: this [will change a bit prior to a `v7.0.0` GA - release](https://github.com/npm/rfcs/pull/183)) - -- [RFC - 22](https://github.com/npm/rfcs/blob/latest/implemented/0022-quieter-install-scripts.md) - Scripts run during the normal course of installation are silenced unless - they exit in error (ie, with a signal or non-zero exit status code), and - are for a non-optional dependency. - -- [RFC - 24](https://github.com/npm/rfcs/blob/latest/implemented/0024-npm-run-traverse-directory-tree.md) - `PATH` environment variable includes all `node_modules/.bin` folders, - even if found outside of an existing `node_modules` folder hierarchy. - -- The `user`, `group`, `uid`, `gid`, and `unsafe-perms` configurations are - no longer relevant. When npm is run as root, scripts are always run with - the effective `uid` and `gid` of the working directory owner. - -- Commands that just run a single script (`npm test`, `npm start`, `npm - stop`, and `npm restart`) will now run their script even if - `--ignore-scripts` is set. Prior to the GA v7.0.0 release, [they will - _not_ run the pre/post scripts](https://github.com/npm/rfcs/pull/185), - however. (So, it'll be possible to run `npm test --ignore-scripts` to - run your test but not your linter, for example.) - -### npx - -The `npx` binary was rewritten in npm v7, and the standalone `npx` package -deprecated when v7.0.0 hits GA. `npx` uses the new `npm exec` command -instead of a separate argument parser and install process, with some -affordances to maintain backwards compatibility with the arguments it -accepted in previous versions. - -This resulted in some shifts in its functionality: - -- Any `npm` config value may be provided. -- To prevent security and user-experience problems from mistyping package - names, `npx` prompts before installing anything. Suppress this - prompt with the `-y` or `--yes` option. -- The `--no-install` option is deprecated, and will be converted to `--no`. -- Shell fallback functionality is removed, as it is not advisable. -- The `-p` argument is a shorthand for `--parseable` in npm, but shorthand - for `--package` in npx. This is maintained, but only for the `npx` - executable. (Ie, running `npm exec -p foo` will be different from - running `npx -p foo`.) -- The `--ignore-existing` option is removed. Locally installed bins are - always present in the executed process `PATH`. -- The `--npm` option is removed. `npx` will always use the `npm` it ships - with. -- The `--node-arg` and `-n` options are removed. -- The `--always-spawn` option is redundant, and thus removed. -- The `--shell` option is replaced with `--script-shell`, but maintained - in the `npx` executable for backwards compatibility. - -We do intend to continue supporting the `npx` that npm ships; just not the -`npm install -g npx` library that is out in the wild today. - -### Files On Disk - -- [RFC - 13](https://github.com/npm/rfcs/blob/latest/implemented/0013-no-package-json-_fields.md) - Installed `package.json` files no longer are mutated to include extra - metadata. (This extra metadata is stored in the lockfile.) -- `package-lock.json` is updated to a newer format, using - `"lockfileVersion": 2`. This format is backwards-compatible with npm CLI - versions using `"lockfileVersion": 1`, but older npm clients will print a - warning about the version mismatch. -- `yarn.lock` files used as source of package metadata and resolution - guidance, if available. (Prior to v7, they were ignored.) - -### Dependency Resolution - -These changes affect `install`, `ci`, `install-test`, `install-ci-test`, -`update`, `prune`, `dedupe`, `uninstall`, `link`, and `audit fix`. - -- [RFC - 25](https://github.com/npm/rfcs/blob/latest/implemented/0025-install-peer-deps.md) - `peerDependencies` are installed by default. This behavior can be - disabled by setting the `legacy-peer-deps` configuration flag. - - **BREAKING CHANGE**: this can cause some packages to not be - installable, if they have unresolveable peer dependency conflicts. - While the correct solution is to fix the conflict, this was not forced - upon users for several years, and some have come to rely on this lack - of correctness. Use the `--legacy-peer-deps` config flag if impacted. - -- [RFC - 23](https://github.com/npm/rfcs/blob/latest/implemented/0023-acceptDependencies.md) - Support for `acceptDependencies` is added. This can result in dependency - resolutions that previous versions of npm will incorrectly flag as invalid. - -- Git dependencies on known git hosts (GitHub, BitBucket, etc.) will - always attempt to fetch package contents from the relevant tarball CDNs - if possible, falling back to `git+ssh` for private packages. `resolved` - value in `package-lock.json` will always reflect the `git+ssh` url value. - Saved value in `package.json` dependencies will always reflect the - canonical shorthand value. - -- Support for the `--link` flag (to install a link to a globall-installed - copy of a module if present, otherwise install locally) has been removed. - Local installs are always local, and `npm link <pkg>` must be used - explicitly if desired. - -- Installing a dependency with the same name as the root project no longer - requires `--force`. (That is, the `ENOSELF` error is removed.) - -### Workspaces - -- [RFC - 26](https://github.com/npm/rfcs/blob/latest/implemented/0026-workspaces.md) - First phase of `workspaces` support is added. This changes npm's - behavior when a root project's `package.json` file contains a - `workspaces` field. - -### `npm update` - -- [RFC - 19](https://github.com/npm/rfcs/blob/latest/implemented/0019-remove-update-depth-option.md) - Update all dependencies when `npm update` is run without any arguments. - As it is no longer relevant, `--depth` config flag removed from `npm - update`. - -### `npm outdated` - -- [RFC - 27](https://github.com/npm/rfcs/blob/latest/implemented/0027-remove-depth-outdated.md) - Remove `--depth` config from `npm outdated`. Only top-level dependencies - are shown, unless `--all` config option is set. - -### `npm adduser`, `npm login` - -- The `--sso` options are deprecated, and will print a warning. - -### `npm audit` - -- Output and data structure is significantly refactored to call attention - to issues, identify classes of fixes not previously available, and - remove extraneous data not used for any purpose. - - **BREAKING CHANGE**: Any tools consuming the output of `npm audit` will - almost certainly need to be updated, as this has changed significantly, - both in the readable and `--json` output styles. - -### `npm dedupe` - -- Performs a full dependency tree reification to disk. As a result, `npm - dedupe` can cause missing or invalid packages to be installed or updated, - though it will only do this if required by the stated dependency - semantics. - -- Note that the `--prefer-dedupe` flag has been added, so that you may - install in a maximally deduplicated state from the outset. - -### `npm fund` - -- Human readable output updated, reinstating depth level to the printed - output. - -### `npm ls` - -- Extraneous dependencies are listed based on their location in the - `node_modules` tree. -- `npm ls` only prints the first level of dependencies by default. You can - make it print more of the tree by using `--depth=<n>` to set a specific - depth, or `--all` to print all of them. - -### `npm pack`, `npm publish` - -- Generated gzipped tarballs no longer contain the zlib OS indicator. As a - result, they are truly dependent _only_ on the contents of the package, - and fully reproducible. However, anyone relying on this byte to identify - the operating system of a package's creation may no longer rely on it. - -### `npm rebuild` - -- Runs package installation scripts as well as re-creating links to bins. - Properly respects the `--ignore-scripts` and `--bin-links=false` - configuration options. - -### `npm build`, `npm unbuild` - -- These two internal commands were removed, as they are no longer needed. - -### `npm test` - -- When no test is specified, will fail with `missing script: test` rather - than injecting a synthetic `echo 'Error: no test specified'` test script - into the `package.json` data. - -## Credits - -Huge thanks to the people who wrote code for this update, as well as our -group of dedicated Open RFC call participants. Your participation has -contributed immeasurably to the quality and design of npm. diff --git a/docs/.gitignore b/docs/.gitignore index c09c2f4a26d85..79af2bfcaa4d8 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -10,12 +10,10 @@ !/.gitignore !/bin/ !/CHANGELOG* -!/content/ !/docs/ !/lib/ !/LICENSE* !/map.js -!/nav.yml !/package.json !/README* !/scripts/ diff --git a/docs/bin/build.js b/docs/bin/build.js new file mode 100644 index 0000000000000..80ce0a63490ff --- /dev/null +++ b/docs/bin/build.js @@ -0,0 +1,12 @@ +const run = require('../lib/build.js') +const { paths } = require('../lib/index') + +run({ + verify: true, + ...paths, +}) + .then((res) => console.log(`Wrote ${res.length} files`)) + .catch((err) => { + process.exitCode = 1 + console.error(err) + }) diff --git a/docs/bin/config-doc-command.js b/docs/bin/config-doc-command.js deleted file mode 100644 index f55213cdcfd6d..0000000000000 --- a/docs/bin/config-doc-command.js +++ /dev/null @@ -1,142 +0,0 @@ -const fs = require('fs').promises -const { resolve } = require('path') -const { definitions, aliases } = require('../lib/npm.js') - -const describeAll = (content) => - content.map(name => definitions[name].describe()).join( - '\n\n<!-- automatically generated, do not edit manually -->\n' + - '<!-- see lib/utils/config/definitions.js -->\n\n' - ) - -const describeUsage = ({ usage, configDoc, commandFile }) => { - const synopsis = [] - - // Grab the command name from the *.md filename - // NOTE: We cannot use the name property command file because in the case of - // `npx` the file being used is `lib/commands/exec.js` - const commandName = configDoc.split('/').pop().split('.')[0].replace('npm-', '') - synopsis.push('\n```bash') - - if (commandName) { - // special case for `npx`: - // `npx` is not technically a command in and of itself, - // so it just needs the usage and parameters of npm exec, and none of the aliases - if (commandName === 'npx') { - synopsis.push(usage.map(usageInfo => `npx ${usageInfo}`).join('\n')) - } else { - const baseCommand = `npm ${commandName}` - if (!usage) { - synopsis.push(baseCommand) - } else { - synopsis.push(usage.map(usageInfo => `${baseCommand} ${usageInfo}`).join('\n')) - } - - const cmdAliases = Object.keys(aliases).reduce((p, c) => { - if (aliases[c] === commandName) { - p.push(c) - } - return p - }, []) - - if (cmdAliases.length === 1) { - synopsis.push('') - synopsis.push(`alias: ${cmdAliases[0]}`) - } else if (cmdAliases.length > 1) { - synopsis.push('') - synopsis.push(`aliases: ${cmdAliases.join(', ')}`) - } - } - } else { - console.error(`could not determine command name from ${commandFile}`) - } - - synopsis.push('```') - return synopsis.join('\n') -} - -const addBetweenTags = ( - doc, - startTag, - endTag, - body, - sourceFilepath = 'lib/utils/config/definitions.js') => { - const startSplit = doc.split(startTag) - - if (startSplit.length !== 2) { - throw new Error('Did not find exactly one start tag') - } - - const endSplit = startSplit[1].split(endTag) - if (endSplit.length !== 2) { - throw new Error('Did not find exactly one end tag') - } - - return [ - startSplit[0], - startTag, - '\n<!-- automatically generated, do not edit manually -->\n' + - '<!-- see ' + sourceFilepath + ' -->\n', - body, - '\n\n<!-- automatically generated, do not edit manually -->\n' + - '<!-- see ' + sourceFilepath + ' -->', - '\n\n', - endTag, - endSplit[1], - ].join('') -} - -const TAGS = { - CONFIG: { - START: '<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->', - END: '<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->', - }, - USAGE: { - START: '<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->', - END: '<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->', - }, -} - -const addDescriptions = ({ doc, params }) => - addBetweenTags(doc, TAGS.CONFIG.START, TAGS.CONFIG.END, describeAll(params)) - -const addUsageDescriptions = ({ doc, usage, configDoc, commandFile }) => - addBetweenTags(doc, TAGS.USAGE.START, TAGS.USAGE.END, - describeUsage({ usage, configDoc, commandFile }), - commandFile - ) - -const run = async (configDoc, commandFile) => { - try { - // Note: commands without params skip this whole process. - const { params, usage } = require(resolve(commandFile)) - - // always write SOMETHING so that Make sees the file is up to date. - const doc = await fs.readFile(configDoc, 'utf8') - const hasTag = doc.includes(TAGS.CONFIG.START) - const hasUsageTag = doc.includes(TAGS.USAGE.START) - - if (params && params.length) { - let newDoc = hasTag ? addDescriptions({ doc, params }) : doc - newDoc = hasUsageTag - ? addUsageDescriptions({ doc: newDoc, usage, configDoc, commandFile }) - : newDoc - - if (!hasTag) { - console.error('WARNING: did not find config description section', configDoc) - } - - if ((usage && usage.length) && !hasUsageTag) { - console.error('WARNING: did not find usage description section', configDoc) - } - await fs.writeFile(configDoc, newDoc) - } - } catch (err) { - console.error(`WARNING: file cannot be open: ${configDoc}`) - throw err - } -} - -run(...process.argv.slice(2)).catch((err) => { - process.exitCode = 1 - console.error(err) -}) diff --git a/docs/bin/config-doc.js b/docs/bin/config-doc.js deleted file mode 100644 index 1aa96e53cbb43..0000000000000 --- a/docs/bin/config-doc.js +++ /dev/null @@ -1,63 +0,0 @@ -const fs = require('fs').promises -const { resolve, relative } = require('path') -const { shorthands, describeAll } = require('../lib/npm.js') - -const addBetweenTags = (doc, startTag, endTag, body) => { - const startSplit = doc.split(startTag) - if (startSplit.length !== 2) { - throw new Error('Did not find exactly one start tag') - } - - const endSplit = startSplit[1].split(endTag) - if (endSplit.length !== 2) { - throw new Error('Did not find exactly one end tag') - } - - return [ - startSplit[0], - startTag, - '\n<!-- automatically generated, do not edit manually -->\n' + - '<!-- see lib/utils/config/definitions.js -->\n', - body, - '\n\n<!-- automatically generated, do not edit manually -->\n' + - '<!-- see lib/utils/config/definitions.js -->\n', - endTag, - endSplit[1], - ].join('') -} - -const addDescriptions = doc => { - const startTag = '<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->' - const endTag = '<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->' - return addBetweenTags(doc, startTag, endTag, describeAll()) -} - -const addShorthands = doc => { - const startTag = '<!-- AUTOGENERATED CONFIG SHORTHANDS START -->' - const endTag = '<!-- AUTOGENERATED CONFIG SHORTHANDS END -->' - const body = Object.entries(shorthands) - .sort(([shorta, expansiona], [shortb, expansionb]) => { - // sort by what they're short FOR - return expansiona.join(' ').localeCompare(expansionb.join(' '), 'en') || - shorta.localeCompare(shortb, 'en') - }) - .map(([short, expansion]) => { - const dash = short.length === 1 ? '-' : '--' - return `* \`${dash}${short}\`: \`${expansion.join(' ')}\`` - }).join('\n') - return addBetweenTags(doc, startTag, endTag, body) -} - -const run = async (dir) => { - const configDoc = resolve(dir, '../content/using-npm/config.md') - const doc = await fs.readFile(configDoc, 'utf8') - - await fs.writeFile(configDoc, addDescriptions(addShorthands(doc))) - - return `updated ${relative(process.cwd(), configDoc)}` -} - -run(__dirname).then(console.log).catch((err) => { - process.exitCode = 1 - console.error(err) -}) diff --git a/docs/bin/dockhand.js b/docs/bin/dockhand.js deleted file mode 100644 index 56160136eed6f..0000000000000 --- a/docs/bin/dockhand.js +++ /dev/null @@ -1,322 +0,0 @@ -const path = require('path') -const fs = require('fs') -const yaml = require('yaml') -const cmark = require('cmark-gfm') -const mdx = require('@mdx-js/mdx') -const mkdirp = require('mkdirp') -const jsdom = require('jsdom') -const { version: VERSION } = require('../lib/npm.js') - -function ensureNavigationComplete (navPaths, fsPaths) { - const unmatchedNav = {} - const unmatchedFs = {} - - for (const navPath of navPaths) { - unmatchedNav[navPath] = true - } - - for (let fsPath of fsPaths) { - fsPath = path.sep + fsPath.replace(/\.md$/, '') - fsPath = fsPath.split(path.sep).join(path.posix.sep) - - if (unmatchedNav[fsPath]) { - delete unmatchedNav[fsPath] - } else { - unmatchedFs[fsPath] = true - } - } - - const toKeys = (v) => Object.keys(v).sort().map((p) => p.split(path.posix.sep).join(path.sep)) - const missingNav = toKeys(unmatchedNav) - const missingFs = toKeys(unmatchedFs) - - if (missingNav.length > 0 || missingFs.length > 0) { - let message = 'Error: documentation navigation (nav.yml) does not match filesystem.\n' - - if (missingNav.length > 0) { - message += '\nThe following path(s) exist on disk but are not present in nav.yml:\n\n' - - for (const n of missingNav) { - message += ` ${n}\n` - } - } - - if (missingNav.length > 0 && missingFs.length > 0) { - message += '\nThe following path(s) exist in nav.yml but are not present on disk:\n\n' - - for (const m of missingFs) { - message += ` ${m}\n` - } - } - - message += '\nUpdate nav.yml to ensure that all files are listed in the appropriate place.' - - return message - } -} - -function getNavigationPaths (entries) { - const paths = [] - - for (const entry of entries) { - if (entry.children) { - paths.push(...getNavigationPaths(entry.children)) - } else { - paths.push(entry.url) - } - } - - return paths -} - -async function renderFilesystemPaths ({ input, output, ...opts }, dirRelative = null) { - const paths = [] - - const dirPath = dirRelative ? path.join(input, dirRelative) : input - const children = fs.readdirSync(dirPath) - - for (const childFilename of children) { - const childRelative = dirRelative ? path.join(dirRelative, childFilename) : childFilename - const childPath = path.join(input, childRelative) - - if (fs.lstatSync(childPath).isDirectory()) { - paths.push(...(await renderFilesystemPaths({ input, output, ...opts }, childRelative))) - } else { - await renderFile(input, output, childRelative, opts) - paths.push(childRelative) - } - } - - return paths -} - -async function renderFile (root, outputRoot, childPath, { template, config }) { - const inputPath = path.join(root, childPath) - - if (!inputPath.match(/\.md$/)) { - console.error(`warning: unknown file type ${inputPath}, ignored`) - return - } - - const outputPath = path.join(outputRoot, childPath.replace(/\.md$/, '.html')) - - let md = fs.readFileSync(inputPath).toString() - let frontmatter = {} - - // Take the leading frontmatter out of the markdown - md = md.replace(/^---\n([\s\S]+)\n---\n/, (header, fm) => { - frontmatter = yaml.parse(fm, 'utf8') - return '' - }) - - // Replace any tokens in the source - md = md.replace(/@VERSION@/, VERSION) - - // Render the markdown into an HTML snippet using a GFM renderer. - const content = cmark.renderHtmlSync(md, { - smart: false, - githubPreLang: true, - strikethroughDoubleTilde: true, - unsafe: false, - extensions: { - table: true, - strikethrough: true, - tagfilter: true, - autolink: true, - }, - }) - - // Test that mdx can parse this markdown file. We don't actually - // use the output, it's just to ensure that the upstream docs - // site (docs.npmjs.com) can parse it when this file gets there. - try { - await mdx(md, { skipExport: true }) - } catch (error) { - throw new MarkdownError(childPath, error) - } - - // Inject this data into the template, using a mustache-like - // replacement scheme. - const html = template.replace(/{{\s*([\w.]+)\s*}}/g, (token, key) => { - switch (key) { - case 'content': - return `<div id="_content">${content}</div>` - case 'path': - return childPath - case 'url_path': - return encodeURI(childPath) - - case 'toc': - return '<div id="_table_of_contents"></div>' - - case 'title': - case 'section': - case 'description': - return frontmatter[key] - - case 'config.github_repo': - case 'config.github_branch': - case 'config.github_path': - return config[key.replace(/^config\./, '')] - - default: - console.error(`warning: unknown token '${token}' in ${inputPath}`) - return '' - } - }) - - const dom = new jsdom.JSDOM(html) - const document = dom.window.document - - // Rewrite relative URLs in links and image sources to be relative to - // this file; this is for supporting `file://` links. HTML pages need - // suffix appended. - const links = [ - { tag: 'a', attr: 'href', suffix: '.html' }, - { tag: 'img', attr: 'src' }, - ] - - for (const linktype of links) { - for (const tag of document.querySelectorAll(linktype.tag)) { - let url = tag.getAttribute(linktype.attr) - - if (url.startsWith('/')) { - const childDepth = childPath.split('/').length - 1 - const prefix = childDepth > 0 ? '../'.repeat(childDepth) : './' - - url = url.replace(/^\//, prefix) - - if (linktype.suffix) { - url += linktype.suffix - } - - tag.setAttribute(linktype.attr, url) - } - } - } - - // Give headers a unique id so that they can be linked within the doc - const headerIds = [] - for (const header of document.querySelectorAll('h1, h2, h3, h4, h5, h6')) { - if (header.getAttribute('id')) { - headerIds.push(header.getAttribute('id')) - continue - } - - const headerText = header.textContent - .replace(/[A-Z]/g, x => x.toLowerCase()) - .replace(/ /g, '-') - .replace(/[^a-z0-9-]/g, '') - let headerId = headerText - let headerIncrement = 1 - - while (document.getElementById(headerId) !== null) { - headerId = headerText + ++headerIncrement - } - - headerIds.push(headerId) - header.setAttribute('id', headerId) - } - - // Walk the dom and build a table of contents - const toc = document.getElementById('_table_of_contents') - - if (toc) { - toc.appendChild(generateTableOfContents(document)) - } - - // Write the final output - const output = dom.serialize() - - mkdirp.sync(path.dirname(outputPath)) - fs.writeFileSync(outputPath, output) -} - -function generateTableOfContents (document) { - const headers = [] - walkHeaders(document.getElementById('_content'), headers) - - // The nesting depth of headers are not necessarily the header level. - // (eg, h1 > h3 > h5 is a depth of three even though there's an h5.) - const hierarchy = [] - for (const header of headers) { - const level = headerLevel(header) - - while (hierarchy.length && hierarchy[hierarchy.length - 1].headerLevel > level) { - hierarchy.pop() - } - - if (!hierarchy.length || hierarchy[hierarchy.length - 1].headerLevel < level) { - const newList = document.createElement('ul') - newList.headerLevel = level - - if (hierarchy.length) { - hierarchy[hierarchy.length - 1].appendChild(newList) - } - - hierarchy.push(newList) - } - - const element = document.createElement('li') - - const link = document.createElement('a') - link.setAttribute('href', `#${header.getAttribute('id')}`) - link.innerHTML = header.innerHTML - element.appendChild(link) - - const list = hierarchy[hierarchy.length - 1] - list.appendChild(element) - } - - return hierarchy[0] -} - -function walkHeaders (element, headers) { - for (const child of element.childNodes) { - if (headerLevel(child)) { - headers.push(child) - } - - walkHeaders(child, headers) - } -} - -function headerLevel (node) { - const level = node.tagName ? node.tagName.match(/^[Hh]([123456])$/) : null - return level ? level[1] : 0 -} - -class MarkdownError extends Error { - constructor (file, inner) { - super(`failed to parse ${file}`) - this.file = file - this.inner = inner - } -} - -const run = async function (rootDir) { - const dir = (...p) => path.join(rootDir, '..', ...p) - - const config = require(dir('lib', 'config.json')) - const template = fs.readFileSync(dir('lib', 'template.html'), 'utf-8') - const nav = yaml.parse(fs.readFileSync(dir('nav.yml'), 'utf-8')) - - const navPaths = getNavigationPaths(nav) - const fsPaths = await renderFilesystemPaths({ - input: dir('content'), - output: dir('output'), - config, - template, - }) - - const navErrors = ensureNavigationComplete(navPaths, fsPaths) - if (navErrors) { - console.error(navErrors) - throw new Error('Nav Errors') - } -} - -run(__dirname).catch((err) => { - process.exitCode = 1 - console.error(err) -}) diff --git a/docs/bin/docs-build.js b/docs/bin/docs-build.js deleted file mode 100644 index 61343bfa45729..0000000000000 --- a/docs/bin/docs-build.js +++ /dev/null @@ -1,39 +0,0 @@ -const fs = require('fs').promises -const marked = require('marked-man') -const { version: VERSION } = require('../lib/npm.js') - -function frontmatter (_, p1) { - const fm = {} - - p1.split(/\r?\n/).forEach((kv) => { - const result = kv.match(/^([^\s:]+):\s*(.*)/) - if (result) { - fm[result[1]] = result[2] - } - }) - - return `# ${fm.title}(${fm.section}) - ${fm.description}` -} - -function replacer (_, p1) { - return 'npm help ' + p1.replace(/npm /, '') -} - -const run = async (src, dest = src) => { - const data = await fs.readFile(src, 'utf8') - - const result = data.replace(/@VERSION@/g, VERSION) - .replace(/^<!--.*-->$/gm, '') - .replace(/^---\n([\s\S]+\n)---/, frontmatter) - .replace(/\[([^\]]+)\]\(\/commands\/([^)]+)\)/g, replacer) - .replace(/\[([^\]]+)\]\(\/configuring-npm\/([^)]+)\)/g, replacer) - .replace(/\[([^\]]+)\]\(\/using-npm\/([^)]+)\)/g, replacer) - .trim() - - await fs.writeFile(dest, marked(result), 'utf8') -} - -run(...process.argv.slice(2)).catch((err) => { - process.exitCode = 1 - console.error(err) -}) diff --git a/docs/content/commands/npm-adduser.md b/docs/content/commands/npm-adduser.md deleted file mode 100644 index 710060f838ff7..0000000000000 --- a/docs/content/commands/npm-adduser.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: npm-adduser -section: 1 -description: Add a registry user account ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/adduser.js --> - -```bash -npm adduser - -alias: add-user -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/adduser.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -Note: This command is unaware of workspaces. - -### Description - -Create a new user in the specified registry, and save the credentials to -the `.npmrc` file. If no registry is specified, the default registry -will be used (see [`registry`](/using-npm/registry)). - -When using `legacy` for your `auth-type`, the username, password, and -email are read in from prompts. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `scope` - -* Default: the scope of the current project, if any, or "" -* Type: String - -Associate an operation with a scope for a scoped registry. - -Useful when logging in to or out of a private registry: - -``` -# log in, linking the scope to the custom registry -npm login --scope=@mycorp --registry=https://registry.mycorp.com - -# log out, removing the link and the auth token -npm logout --scope=@mycorp -``` - -This will cause `@mycorp` to be mapped to the registry for future -installation of packages specified according to the pattern -`@mycorp/package`. - -This will also cause `npm init` to create a scoped package. - -``` -# accept all defaults, and create a package named "@foo/whatever", -# instead of just named "whatever" -npm init --scope=@foo --yes -``` - - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `auth-type` - -* Default: "web" -* Type: "legacy" or "web" - -What authentication strategy to use with `login`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm registry](/using-npm/registry) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [npm owner](/commands/npm-owner) -* [npm whoami](/commands/npm-whoami) -* [npm token](/commands/npm-token) -* [npm profile](/commands/npm-profile) diff --git a/docs/content/commands/npm-bin.md b/docs/content/commands/npm-bin.md deleted file mode 100644 index 94b72cfd5c81c..0000000000000 --- a/docs/content/commands/npm-bin.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: npm-bin -section: 1 -description: Display npm bin folder ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/bin.js --> - -```bash -npm bin -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/bin.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -Note: This command is unaware of workspaces. - -### Description - -Print the folder where npm will install executables. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm prefix](/commands/npm-prefix) -* [npm root](/commands/npm-root) -* [npm folders](/configuring-npm/folders) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) diff --git a/docs/content/commands/npm-bugs.md b/docs/content/commands/npm-bugs.md deleted file mode 100644 index af52548389c92..0000000000000 --- a/docs/content/commands/npm-bugs.md +++ /dev/null @@ -1,134 +0,0 @@ ---- -title: npm-bugs -section: 1 -description: Report bugs for a package in a web browser ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/bugs.js --> - -```bash -npm bugs [<pkgname> [<pkgname> ...]] - -alias: issues -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/bugs.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -This command tries to guess at the likely location of a package's bug -tracker URL or the `mailto` URL of the support email, and then tries to -open it using the [`--browser` config](/using-npm/config#browser) param. If no -package name is provided, it will search for a `package.json` in the current -folder and use the `name` property. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `browser` - -* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` -* Type: null, Boolean, or String - -The browser that is called by npm commands to open websites. - -Set to `false` to suppress browser behavior and instead print urls to -terminal. - -Set to `true` to use default system URL opener. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm docs](/commands/npm-docs) -* [npm view](/commands/npm-view) -* [npm publish](/commands/npm-publish) -* [npm registry](/using-npm/registry) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [package.json](/configuring-npm/package-json) diff --git a/docs/content/commands/npm-ci.md b/docs/content/commands/npm-ci.md deleted file mode 100644 index fee305618cca3..0000000000000 --- a/docs/content/commands/npm-ci.md +++ /dev/null @@ -1,379 +0,0 @@ ---- -title: npm-ci -section: 1 -description: Clean install a project ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/ci.js --> - -```bash -npm ci - -aliases: clean-install, ic, install-clean, isntall-clean -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/ci.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -This command is similar to [`npm install`](/commands/npm-install), except -it's meant to be used in automated environments such as test platforms, -continuous integration, and deployment -- or any situation where you want -to make sure you're doing a clean install of your dependencies. - -The main differences between using `npm install` and `npm ci` are: - -* The project **must** have an existing `package-lock.json` or - `npm-shrinkwrap.json`. -* If dependencies in the package lock do not match those in `package.json`, - `npm ci` will exit with an error, instead of updating the package lock. -* `npm ci` can only install entire projects at a time: individual - dependencies cannot be added with this command. -* If a `node_modules` is already present, it will be automatically removed - before `npm ci` begins its install. -* It will never write to `package.json` or any of the package-locks: - installs are essentially frozen. - -NOTE: If you create your `package-lock.json` file by running `npm install` -with flags that can affect the shape of your dependency tree, such as -`--legacy-peer-deps` or `--install-links`, you _must_ provide the same -flags to `npm ci` or you are likely to encounter errors. An easy way to do -this is to run, for example, -`npm config set legacy-peer-deps=true --location=project` and commit the -`.npmrc` file to your repo. - -### Example - -Make sure you have a package-lock and an up-to-date install: - -```bash -$ cd ./my/npm/project -$ npm install -added 154 packages in 10s -$ ls | grep package-lock -``` - -Run `npm ci` in that project - -```bash -$ npm ci -added 154 packages in 5s -``` - -Configure Travis CI to build using `npm ci` instead of `npm install`: - -```bash -# .travis.yml -install: -- npm ci -# keep the npm cache around to speed up installs -cache: - directories: - - "$HOME/.npm" -``` - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `save` - -* Default: `true` unless when using `npm update` where it defaults to `false` -* Type: Boolean - -Save installed packages to a `package.json` file as dependencies. - -When used with the `npm rm` command, removes the dependency from -`package.json`. - -Will also prevent writing to `package-lock.json` if set to `false`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `save-exact` - -* Default: false -* Type: Boolean - -Dependencies saved to package.json will be configured with an exact version -rather than using npm's default semver range operator. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `global-style` - -* Default: false -* Type: Boolean - -Causes npm to install the package into your local `node_modules` folder with -the same layout it uses with the global `node_modules` folder. Only your -direct dependencies will show in `node_modules` and everything they depend -on will be flattened in their `node_modules` folders. This obviously will -eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling` -will be preferred. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `legacy-bundling` - -* Default: false -* Type: Boolean - -Causes npm to install the package such that versions of npm prior to 1.4, -such as the one included with node 0.8, can install the package. This -eliminates all automatic deduping. If used with `global-style` this option -will be preferred. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `strict-peer-deps` - -* Default: false -* Type: Boolean - -If set to `true`, and `--legacy-peer-deps` is not set, then _any_ -conflicting `peerDependencies` will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships. - -By default, conflicting `peerDependencies` deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's `peerDependencies` object. - -When such and override is performed, a warning is printed, explaining the -conflict and the packages involved. If `--strict-peer-deps` is set, then -this warning is treated as a failure. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `package-lock` - -* Default: true -* Type: Boolean - -If set to false, then ignore `package-lock.json` files when installing. This -will also prevent _writing_ `package-lock.json` if `save` is true. - -This configuration does not affect `npm ci`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `foreground-scripts` - -* Default: false -* Type: Boolean - -Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process. - -Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `audit` - -* Default: true -* Type: Boolean - -When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for [`npm audit`](/commands/npm-audit) for details on what is -submitted. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `bin-links` - -* Default: true -* Type: Boolean - -Tells npm to create symlinks (or `.cmd` shims on Windows) for package -executables. - -Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `fund` - -* Default: true -* Type: Boolean - -When "true" displays the message at the end of each `npm install` -acknowledging the number of dependencies looking for funding. See [`npm -fund`](/commands/npm-fund) for details. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `install-links` - -* Default: true -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm install](/commands/npm-install) -* [package-lock.json](/configuring-npm/package-lock-json) diff --git a/docs/content/commands/npm-config.md b/docs/content/commands/npm-config.md deleted file mode 100644 index 6e0c0b682d724..0000000000000 --- a/docs/content/commands/npm-config.md +++ /dev/null @@ -1,189 +0,0 @@ ---- -title: npm-config -section: 1 -description: Manage the npm configuration files ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/config.js --> - -```bash -npm config set <key>=<value> [<key>=<value> ...] -npm config get [<key> [<key> ...]] -npm config delete <key> [<key> ...] -npm config list [--json] -npm config edit - -alias: c -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/config.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -Note: This command is unaware of workspaces. - -### Description - -npm gets its config settings from the command line, environment -variables, `npmrc` files, and in some cases, the `package.json` file. - -See [npmrc](/configuring-npm/npmrc) for more information about the npmrc -files. - -See [config](/using-npm/config) for a more thorough explanation of the -mechanisms involved, and a full list of config options available. - -The `npm config` command can be used to update and edit the contents -of the user and global npmrc files. - -### Sub-commands - -Config supports the following sub-commands: - -#### set - -```bash -npm config set key=value [key=value...] -npm set key=value [key=value...] -``` - -Sets each of the config keys to the value provided. - -If value is omitted, then it sets it to an empty string. - -Note: for backwards compatibility, `npm config set key value` is supported -as an alias for `npm config set key=value`. - -#### get - -```bash -npm config get [key ...] -npm get [key ...] -``` - -Echo the config value(s) to stdout. - -If multiple keys are provided, then the values will be prefixed with the -key names. - -If no keys are provided, then this command behaves the same as `npm config -list`. - -#### list - -```bash -npm config list -``` - -Show all the config settings. Use `-l` to also show defaults. Use `--json` -to show the settings in json format. - -#### delete - -```bash -npm config delete key [key ...] -``` - -Deletes the specified keys from all configuration files. - -#### edit - -```bash -npm config edit -``` - -Opens the config file in an editor. Use the `--global` flag to edit the -global config. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `editor` - -* Default: The EDITOR or VISUAL environment variables, or 'notepad.exe' on - Windows, or 'vim' on Unix systems -* Type: String - -The command to run for `npm edit` and `npm config edit`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `location` - -* Default: "user" unless `--global` is passed, which will also set this value - to "global" -* Type: "global", "user", or "project" - -When passed to `npm config` this refers to which config file to use. - -When set to "global" mode, packages are installed into the `prefix` folder -instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `long` - -* Default: false -* Type: Boolean - -Show extended information in `ls`, `search`, and `help-search`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm folders](/configuring-npm/folders) -* [npm config](/commands/npm-config) -* [package.json](/configuring-npm/package-json) -* [npmrc](/configuring-npm/npmrc) -* [npm](/commands/npm) diff --git a/docs/content/commands/npm-dedupe.md b/docs/content/commands/npm-dedupe.md deleted file mode 100644 index 4a7e0ab6b9851..0000000000000 --- a/docs/content/commands/npm-dedupe.md +++ /dev/null @@ -1,328 +0,0 @@ ---- -title: npm-dedupe -section: 1 -description: Reduce duplication in the package tree ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/dedupe.js --> - -```bash -npm dedupe - -alias: ddp -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/dedupe.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -Searches the local package tree and attempts to simplify the overall -structure by moving dependencies further up the tree, where they can -be more effectively shared by multiple dependent packages. - -For example, consider this dependency graph: - -``` -a -+-- b <-- depends on c@1.0.x -| `-- c@1.0.3 -`-- d <-- depends on c@~1.0.9 - `-- c@1.0.10 -``` - -In this case, `npm dedupe` will transform the tree to: - -```bash -a -+-- b -+-- d -`-- c@1.0.10 -``` - -Because of the hierarchical nature of node's module lookup, b and d -will both get their dependency met by the single c package at the root -level of the tree. - -In some cases, you may have a dependency graph like this: - -``` -a -+-- b <-- depends on c@1.0.x -+-- c@1.0.3 -`-- d <-- depends on c@1.x - `-- c@1.9.9 -``` - -During the installation process, the `c@1.0.3` dependency for `b` was -placed in the root of the tree. Though `d`'s dependency on `c@1.x` could -have been satisfied by `c@1.0.3`, the newer `c@1.9.0` dependency was used, -because npm favors updates by default, even when doing so causes -duplication. - -Running `npm dedupe` will cause npm to note the duplication and -re-evaluate, deleting the nested `c` module, because the one in the root is -sufficient. - -To prefer deduplication over novelty during the installation process, run -`npm install --prefer-dedupe` or `npm config set prefer-dedupe true`. - -Arguments are ignored. Dedupe always acts on the entire tree. - -Note that this operation transforms the dependency tree, but will never -result in new modules being installed. - -Using `npm find-dupes` will run the command in `--dry-run` mode. - -Note: `npm dedupe` will never update the semver values of direct -dependencies in your project `package.json`, if you want to update -values in `package.json` you can run: `npm update --save` instead. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `global-style` - -* Default: false -* Type: Boolean - -Causes npm to install the package into your local `node_modules` folder with -the same layout it uses with the global `node_modules` folder. Only your -direct dependencies will show in `node_modules` and everything they depend -on will be flattened in their `node_modules` folders. This obviously will -eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling` -will be preferred. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `legacy-bundling` - -* Default: false -* Type: Boolean - -Causes npm to install the package such that versions of npm prior to 1.4, -such as the one included with node 0.8, can install the package. This -eliminates all automatic deduping. If used with `global-style` this option -will be preferred. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `strict-peer-deps` - -* Default: false -* Type: Boolean - -If set to `true`, and `--legacy-peer-deps` is not set, then _any_ -conflicting `peerDependencies` will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships. - -By default, conflicting `peerDependencies` deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's `peerDependencies` object. - -When such and override is performed, a warning is printed, explaining the -conflict and the packages involved. If `--strict-peer-deps` is set, then -this warning is treated as a failure. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `package-lock` - -* Default: true -* Type: Boolean - -If set to false, then ignore `package-lock.json` files when installing. This -will also prevent _writing_ `package-lock.json` if `save` is true. - -This configuration does not affect `npm ci`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `audit` - -* Default: true -* Type: Boolean - -When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for [`npm audit`](/commands/npm-audit) for details on what is -submitted. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `bin-links` - -* Default: true -* Type: Boolean - -Tells npm to create symlinks (or `.cmd` shims on Windows) for package -executables. - -Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `fund` - -* Default: true -* Type: Boolean - -When "true" displays the message at the end of each `npm install` -acknowledging the number of dependencies looking for funding. See [`npm -fund`](/commands/npm-fund) for details. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `install-links` - -* Default: true -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm find-dupes](/commands/npm-find-dupes) -* [npm ls](/commands/npm-ls) -* [npm update](/commands/npm-update) -* [npm install](/commands/npm-install) diff --git a/docs/content/commands/npm-diff.md b/docs/content/commands/npm-diff.md deleted file mode 100644 index 7dcc8af7c3b4c..0000000000000 --- a/docs/content/commands/npm-diff.md +++ /dev/null @@ -1,349 +0,0 @@ ---- -title: npm-diff -section: 1 -description: The registry diff command ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/diff.js --> - -```bash -npm diff [...<paths>] -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/diff.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -Similar to its `git diff` counterpart, this command will print diff patches -of files for packages published to the npm registry. - -* `npm diff --diff=<spec-a> --diff=<spec-b>` - - Compares two package versions using their registry specifiers, e.g: - `npm diff --diff=pkg@1.0.0 --diff=pkg@^2.0.0`. It's also possible to - compare across forks of any package, - e.g: `npm diff --diff=pkg@1.0.0 --diff=pkg-fork@1.0.0`. - - Any valid spec can be used, so that it's also possible to compare - directories or git repositories, - e.g: `npm diff --diff=pkg@latest --diff=./packages/pkg` - - Here's an example comparing two different versions of a package named - `abbrev` from the registry: - - ```bash - npm diff --diff=abbrev@1.1.0 --diff=abbrev@1.1.1 - ``` - - On success, output looks like: - - ```bash - diff --git a/package.json b/package.json - index v1.1.0..v1.1.1 100644 - --- a/package.json - +++ b/package.json - @@ -1,6 +1,6 @@ - { - "name": "abbrev", - - "version": "1.1.0", - + "version": "1.1.1", - "description": "Like ruby's abbrev module, but in js", - "author": "Isaac Z. Schlueter <i@izs.me>", - "main": "abbrev.js", - ``` - - Given the flexible nature of npm specs, you can also target local - directories or git repos just like when using `npm install`: - - ```bash - npm diff --diff=https://github.com/npm/libnpmdiff --diff=./local-path - ``` - - In the example above we can compare the contents from the package installed - from the git repo at `github.com/npm/libnpmdiff` with the contents of the - `./local-path` that contains a valid package, such as a modified copy of - the original. - -* `npm diff` (in a package directory, no arguments): - - If the package is published to the registry, `npm diff` will fetch the - tarball version tagged as `latest` (this value can be configured using the - `tag` option) and proceed to compare the contents of files present in that - tarball, with the current files in your local file system. - - This workflow provides a handy way for package authors to see what - package-tracked files have been changed in comparison with the latest - published version of that package. - -* `npm diff --diff=<pkg-name>` (in a package directory): - - When using a single package name (with no version or tag specifier) as an - argument, `npm diff` will work in a similar way to - [`npm-outdated`](npm-outdated) and reach for the registry to figure out - what current published version of the package named `<pkg-name>` - will satisfy its dependent declared semver-range. Once that specific - version is known `npm diff` will print diff patches comparing the - current version of `<pkg-name>` found in the local file system with - that specific version returned by the registry. - - Given a package named `abbrev` that is currently installed: - - ```bash - npm diff --diff=abbrev - ``` - - That will request from the registry its most up to date version and - will print a diff output comparing the currently installed version to this - newer one if the version numbers are not the same. - -* `npm diff --diff=<spec-a>` (in a package directory): - - Similar to using only a single package name, it's also possible to declare - a full registry specifier version if you wish to compare the local version - of an installed package with the specific version/tag/semver-range provided - in `<spec-a>`. - - An example: assuming `pkg@1.0.0` is installed in the current `node_modules` - folder, running: - - ```bash - npm diff --diff=pkg@2.0.0 - ``` - - It will effectively be an alias to - `npm diff --diff=pkg@1.0.0 --diff=pkg@2.0.0`. - -* `npm diff --diff=<semver-a> [--diff=<semver-b>]` (in a package directory): - - Using `npm diff` along with semver-valid version numbers is a shorthand - to compare different versions of the current package. - - It needs to be run from a package directory, such that for a package named - `pkg` running `npm diff --diff=1.0.0 --diff=1.0.1` is the same as running - `npm diff --diff=pkg@1.0.0 --diff=pkg@1.0.1`. - - If only a single argument `<version-a>` is provided, then the current local - file system is going to be compared against that version. - - Here's an example comparing two specific versions (published to the - configured registry) of the current project directory: - - ```bash - npm diff --diff=1.0.0 --diff=1.1.0 - ``` - -Note that tag names are not valid `--diff` argument values, if you wish to -compare to a published tag, you must use the `pkg@tagname` syntax. - -#### Filtering files - -It's possible to also specify positional arguments using file names or globs -pattern matching in order to limit the result of diff patches to only a subset -of files for a given package, e.g: - - ```bash - npm diff --diff=pkg@2 ./lib/ CHANGELOG.md - ``` - -In the example above the diff output is only going to print contents of files -located within the folder `./lib/` and changed lines of code within the -`CHANGELOG.md` file. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `diff` - -* Default: -* Type: String (can be set multiple times) - -Define arguments to compare in `npm diff`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `diff-name-only` - -* Default: false -* Type: Boolean - -Prints only filenames when using `npm diff`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `diff-unified` - -* Default: 3 -* Type: Number - -The number of lines of context to print in `npm diff`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `diff-ignore-all-space` - -* Default: false -* Type: Boolean - -Ignore whitespace when comparing lines in `npm diff`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `diff-no-prefix` - -* Default: false -* Type: Boolean - -Do not show any source or destination prefix in `npm diff` output. - -Note: this causes `npm diff` to ignore the `--diff-src-prefix` and -`--diff-dst-prefix` configs. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `diff-src-prefix` - -* Default: "a/" -* Type: String - -Source prefix to be used in `npm diff` output. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `diff-dst-prefix` - -* Default: "b/" -* Type: String - -Destination prefix to be used in `npm diff` output. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `diff-text` - -* Default: false -* Type: Boolean - -Treat all files as text in `npm diff`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `tag` - -* Default: "latest" -* Type: String - -If you ask npm to install a package and don't tell it a specific version, -then it will install the specified tag. - -Also the tag that is added to the package@version specified by the `npm tag` -command, if no explicit tag is given. - -When used by the `npm diff` command, this is the tag used to fetch the -tarball that will be compared with the local files by default. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> -## See Also - -* [npm outdated](/commands/npm-outdated) -* [npm install](/commands/npm-install) -* [npm config](/commands/npm-config) -* [npm registry](/using-npm/registry) diff --git a/docs/content/commands/npm-docs.md b/docs/content/commands/npm-docs.md deleted file mode 100644 index e48695ced005a..0000000000000 --- a/docs/content/commands/npm-docs.md +++ /dev/null @@ -1,133 +0,0 @@ ---- -title: npm-docs -section: 1 -description: Open documentation for a package in a web browser ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/docs.js --> - -```bash -npm docs [<pkgname> [<pkgname> ...]] - -alias: home -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/docs.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -This command tries to guess at the likely location of a package's -documentation URL, and then tries to open it using the -[`--browser` config](/using-npm/config#browser) param. You can pass multiple -package names at once. If no package name is provided, it will search for a -`package.json` in the current folder and use the `name` property. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `browser` - -* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` -* Type: null, Boolean, or String - -The browser that is called by npm commands to open websites. - -Set to `false` to suppress browser behavior and instead print urls to -terminal. - -Set to `true` to use default system URL opener. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm view](/commands/npm-view) -* [npm publish](/commands/npm-publish) -* [npm registry](/using-npm/registry) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [package.json](/configuring-npm/package-json) diff --git a/docs/content/commands/npm-find-dupes.md b/docs/content/commands/npm-find-dupes.md deleted file mode 100644 index af41f5ccb14f2..0000000000000 --- a/docs/content/commands/npm-find-dupes.md +++ /dev/null @@ -1,253 +0,0 @@ ---- -title: npm-find-dupes -section: 1 -description: Find duplication in the package tree ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/find-dupes.js --> - -```bash -npm find-dupes -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/find-dupes.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -Runs `npm dedupe` in `--dry-run` mode, making npm only output the -duplications, without actually changing the package tree. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `global-style` - -* Default: false -* Type: Boolean - -Causes npm to install the package into your local `node_modules` folder with -the same layout it uses with the global `node_modules` folder. Only your -direct dependencies will show in `node_modules` and everything they depend -on will be flattened in their `node_modules` folders. This obviously will -eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling` -will be preferred. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `legacy-bundling` - -* Default: false -* Type: Boolean - -Causes npm to install the package such that versions of npm prior to 1.4, -such as the one included with node 0.8, can install the package. This -eliminates all automatic deduping. If used with `global-style` this option -will be preferred. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `strict-peer-deps` - -* Default: false -* Type: Boolean - -If set to `true`, and `--legacy-peer-deps` is not set, then _any_ -conflicting `peerDependencies` will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships. - -By default, conflicting `peerDependencies` deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's `peerDependencies` object. - -When such and override is performed, a warning is printed, explaining the -conflict and the packages involved. If `--strict-peer-deps` is set, then -this warning is treated as a failure. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `package-lock` - -* Default: true -* Type: Boolean - -If set to false, then ignore `package-lock.json` files when installing. This -will also prevent _writing_ `package-lock.json` if `save` is true. - -This configuration does not affect `npm ci`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `audit` - -* Default: true -* Type: Boolean - -When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for [`npm audit`](/commands/npm-audit) for details on what is -submitted. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `bin-links` - -* Default: true -* Type: Boolean - -Tells npm to create symlinks (or `.cmd` shims on Windows) for package -executables. - -Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `fund` - -* Default: true -* Type: Boolean - -When "true" displays the message at the end of each `npm install` -acknowledging the number of dependencies looking for funding. See [`npm -fund`](/commands/npm-fund) for details. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `install-links` - -* Default: true -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm dedupe](/commands/npm-dedupe) -* [npm ls](/commands/npm-ls) -* [npm update](/commands/npm-update) -* [npm install](/commands/npm-install) - diff --git a/docs/content/commands/npm-fund.md b/docs/content/commands/npm-fund.md deleted file mode 100644 index 53100f6716537..0000000000000 --- a/docs/content/commands/npm-fund.md +++ /dev/null @@ -1,166 +0,0 @@ ---- -title: npm-fund -section: 1 -description: Retrieve funding information ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/fund.js --> - -```bash -npm fund [<package-spec>] -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/fund.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -This command retrieves information on how to fund the dependencies of a -given project. If no package name is provided, it will list all -dependencies that are looking for funding in a tree structure, listing -the type of funding and the url to visit. If a package name is provided -then it tries to open its funding url using the -[`--browser` config](/using-npm/config#browser) param; if there are multiple -funding sources for the package, the user will be instructed to pass the -`--which` option to disambiguate. - -The list will avoid duplicated entries and will stack all packages that -share the same url as a single entry. Thus, the list does not have the -same shape of the output from `npm ls`. - -#### Example - -### Workspaces support - -It's possible to filter the results to only include a single workspace -and its dependencies using the -[`workspace` config](/using-npm/config#workspace) option. - -#### Example: - -Here's an example running `npm fund` in a project with a configured -workspace `a`: - -```bash -$ npm fund -test-workspaces-fund@1.0.0 -+-- https://example.com/a -| | `-- a@1.0.0 -| `-- https://example.com/maintainer -| `-- foo@1.0.0 -+-- https://example.com/npmcli-funding -| `-- @npmcli/test-funding -`-- https://example.com/org - `-- bar@2.0.0 -``` - -And here is an example of the expected result when filtering only by a -specific workspace `a` in the same project: - -```bash -$ npm fund -w a -test-workspaces-fund@1.0.0 -`-- https://example.com/a - | `-- a@1.0.0 - `-- https://example.com/maintainer - `-- foo@2.0.0 -``` - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `browser` - -* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` -* Type: null, Boolean, or String - -The browser that is called by npm commands to open websites. - -Set to `false` to suppress browser behavior and instead print urls to -terminal. - -Set to `true` to use default system URL opener. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `unicode` - -* Default: false on windows, true on mac/unix systems with a unicode locale, - as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables. -* Type: Boolean - -When set to true, npm uses unicode characters in the tree output. When -false, it uses ascii characters instead of unicode glyphs. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `which` - -* Default: null -* Type: null or Number - -If there are multiple funding sources, which 1-indexed source URL to open. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -## See Also - -* [package spec](/using-npm/package-spec) -* [npm install](/commands/npm-install) -* [npm docs](/commands/npm-docs) -* [npm ls](/commands/npm-ls) -* [npm config](/commands/npm-config) -* [npm workspaces](/using-npm/workspaces) diff --git a/docs/content/commands/npm-help-search.md b/docs/content/commands/npm-help-search.md deleted file mode 100644 index 152f9f6bec16f..0000000000000 --- a/docs/content/commands/npm-help-search.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: npm-help-search -section: 1 -description: Search npm help documentation ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/help-search.js --> - -```bash -npm help-search <text> -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/help-search.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -Note: This command is unaware of workspaces. - -### Description - -This command will search the npm markdown documentation files for the terms -provided, and then list the results, sorted by relevance. - -If only one result is found, then it will show that help topic. - -If the argument to `npm help` is not a known help topic, then it will call -`help-search`. It is rarely if ever necessary to call this command -directly. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `long` - -* Default: false -* Type: Boolean - -Show extended information in `ls`, `search`, and `help-search`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm](/commands/npm) -* [npm help](/commands/npm-help) diff --git a/docs/content/commands/npm-help.md b/docs/content/commands/npm-help.md deleted file mode 100644 index 83c595db696b9..0000000000000 --- a/docs/content/commands/npm-help.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: npm-help -section: 1 -description: Get help on npm ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/help.js --> - -```bash -npm help <term> [<terms..>] - -alias: hlep -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/help.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -Note: This command is unaware of workspaces. - -### Description - -If supplied a topic, then show the appropriate documentation page. - -If the topic does not exist, or if multiple terms are provided, then npm -will run the `help-search` command to find a match. Note that, if -`help-search` finds a single subject, then it will run `help` on that -topic, so unique matches are equivalent to specifying a topic name. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `viewer` - -* Default: "man" on Posix, "browser" on Windows -* Type: String - -The program to use to view help content. - -Set to `"browser"` to view html help content in the default web browser. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm](/commands/npm) -* [npm folders](/configuring-npm/folders) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [package.json](/configuring-npm/package-json) -* [npm help-search](/commands/npm-help-search) diff --git a/docs/content/commands/npm-init.md b/docs/content/commands/npm-init.md deleted file mode 100644 index f3124a7768dfc..0000000000000 --- a/docs/content/commands/npm-init.md +++ /dev/null @@ -1,327 +0,0 @@ ---- -title: npm-init -section: 1 -description: Create a package.json file ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/init.js --> - -```bash -npm init <package-spec> (same as `npx <package-spec>) -npm init <@scope> (same as `npx <@scope>/create`) - -aliases: create, innit -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/init.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -`npm init <initializer>` can be used to set up a new or existing npm -package. - -`initializer` in this case is an npm package named `create-<initializer>`, -which will be installed by [`npm-exec`](/commands/npm-exec), and then have its -main bin executed -- presumably creating or updating `package.json` and -running any other initialization-related operations. - -The init command is transformed to a corresponding `npm exec` operation as -follows: - -* `npm init foo` -> `npm exec create-foo` -* `npm init @usr/foo` -> `npm exec @usr/create-foo` -* `npm init @usr` -> `npm exec @usr/create` -* `npm init @usr@2.0.0` -> `npm exec @usr/create@2.0.0` -* `npm init @usr/foo@2.0.0` -> `npm exec @usr/create-foo@2.0.0` - -If the initializer is omitted (by just calling `npm init`), init will fall -back to legacy init behavior. It will ask you a bunch of questions, and -then write a package.json for you. It will attempt to make reasonable -guesses based on existing fields, dependencies, and options selected. It is -strictly additive, so it will keep any fields and values that were already -set. You can also use `-y`/`--yes` to skip the questionnaire altogether. If -you pass `--scope`, it will create a scoped package. - -*Note:* if a user already has the `create-<initializer>` package -globally installed, that will be what `npm init` uses. If you want npm -to use the latest version, or another specific version you must specify -it: - -* `npm init foo@latest` # fetches and runs the latest `create-foo` from - the registry -* `npm init foo@1.2.3` # runs `create-foo@1.2.3` specifically - -#### Forwarding additional options - -Any additional options will be passed directly to the command, so `npm init -foo -- --hello` will map to `npm exec -- create-foo --hello`. - -To better illustrate how options are forwarded, here's a more evolved -example showing options passed to both the **npm cli** and a create package, -both following commands are equivalent: - -- `npm init foo -y --registry=<url> -- --hello -a` -- `npm exec -y --registry=<url> -- create-foo --hello -a` - -### Examples - -Create a new React-based project using -[`create-react-app`](https://npm.im/create-react-app): - -```bash -$ npm init react-app ./my-react-app -``` - -Create a new `esm`-compatible package using -[`create-esm`](https://npm.im/create-esm): - -```bash -$ mkdir my-esm-lib && cd my-esm-lib -$ npm init esm --yes -``` - -Generate a plain old package.json using legacy init: - -```bash -$ mkdir my-npm-pkg && cd my-npm-pkg -$ git init -$ npm init -``` - -Generate it without having it ask any questions: - -```bash -$ npm init -y -``` - -### Workspaces support - -It's possible to create a new workspace within your project by using the -`workspace` config option. When using `npm init -w <dir>` the cli will -create the folders and boilerplate expected while also adding a reference -to your project `package.json` `"workspaces": []` property in order to make -sure that new generated **workspace** is properly set up as such. - -Given a project with no workspaces, e.g: - -``` -. -+-- package.json -``` - -You may generate a new workspace using the legacy init: - -```bash -$ npm init -w packages/a -``` - -That will generate a new folder and `package.json` file, while also updating -your top-level `package.json` to add the reference to this new workspace: - -``` -. -+-- package.json -`-- packages - `-- a - `-- package.json -``` - -The workspaces init also supports the `npm init <initializer> -w <dir>` -syntax, following the same set of rules explained earlier in the initial -**Description** section of this page. Similar to the previous example of -creating a new React-based project using -[`create-react-app`](https://npm.im/create-react-app), the following syntax -will make sure to create the new react app as a nested **workspace** within your -project and configure your `package.json` to recognize it as such: - -```bash -npm init -w packages/my-react-app react-app . -``` - -This will make sure to generate your react app as expected, one important -consideration to have in mind is that `npm exec` is going to be run in the -context of the newly created folder for that workspace, and that's the reason -why in this example the initializer uses the initializer name followed with a -dot to represent the current directory in that context, e.g: `react-app .`: - -``` -. -+-- package.json -`-- packages - +-- a - | `-- package.json - `-- my-react-app - +-- README - +-- package.json - `-- ... -``` - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `yes` - -* Default: null -* Type: null or Boolean - -Automatically answer "yes" to any prompts that npm might print on the -command line. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `force` - -* Default: false -* Type: Boolean - -Removes various protections against unfortunate side effects, common -mistakes, unnecessary performance degradation, and malicious input. - -* Allow clobbering non-npm files in global installs. -* Allow the `npm version` command to work on an unclean git repository. -* Allow deleting the cache folder with `npm cache clean`. -* Allow installing packages that have an `engines` declaration requiring a - different version of npm. -* Allow installing packages that have an `engines` declaration requiring a - different version of `node`, even if `--engine-strict` is enabled. -* Allow `npm audit fix` to install modules outside your stated dependency - range (including SemVer-major changes). -* Allow unpublishing all versions of a published package. -* Allow conflicting peerDependencies to be installed in the root project. -* Implicitly set `--yes` during `npm init`. -* Allow clobbering existing values in `npm pkg` -* Allow unpublishing of entire packages (not just a single version). - -If you don't have a clear idea of what you want to do, it is strongly -recommended that you do not use this option! - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `scope` - -* Default: the scope of the current project, if any, or "" -* Type: String - -Associate an operation with a scope for a scoped registry. - -Useful when logging in to or out of a private registry: - -``` -# log in, linking the scope to the custom registry -npm login --scope=@mycorp --registry=https://registry.mycorp.com - -# log out, removing the link and the auth token -npm logout --scope=@mycorp -``` - -This will cause `@mycorp` to be mapped to the registry for future -installation of packages specified according to the pattern -`@mycorp/package`. - -This will also cause `npm init` to create a scoped package. - -``` -# accept all defaults, and create a package named "@foo/whatever", -# instead of just named "whatever" -npm init --scope=@foo --yes -``` - - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces-update` - -* Default: true -* Type: Boolean - -If set to true, the npm cli will run an update after operations that may -possibly change the workspaces installed to the `node_modules` folder. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [package spec](/using-npm/package-spec) -* [init-package-json module](http://npm.im/init-package-json) -* [package.json](/configuring-npm/package-json) -* [npm version](/commands/npm-version) -* [npm scope](/using-npm/scope) -* [npm exec](/commands/npm-exec) -* [npm workspaces](/using-npm/workspaces) diff --git a/docs/content/commands/npm-install-ci-test.md b/docs/content/commands/npm-install-ci-test.md deleted file mode 100644 index 4de56d372fefe..0000000000000 --- a/docs/content/commands/npm-install-ci-test.md +++ /dev/null @@ -1,326 +0,0 @@ ---- -title: npm-install-ci-test -section: 1 -description: Install a project with a clean slate and run tests ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/install-ci-test.js --> - -```bash -npm install-ci-test - -alias: cit -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/install-ci-test.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -This command runs `npm ci` followed immediately by `npm test`. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `save` - -* Default: `true` unless when using `npm update` where it defaults to `false` -* Type: Boolean - -Save installed packages to a `package.json` file as dependencies. - -When used with the `npm rm` command, removes the dependency from -`package.json`. - -Will also prevent writing to `package-lock.json` if set to `false`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `save-exact` - -* Default: false -* Type: Boolean - -Dependencies saved to package.json will be configured with an exact version -rather than using npm's default semver range operator. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `global-style` - -* Default: false -* Type: Boolean - -Causes npm to install the package into your local `node_modules` folder with -the same layout it uses with the global `node_modules` folder. Only your -direct dependencies will show in `node_modules` and everything they depend -on will be flattened in their `node_modules` folders. This obviously will -eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling` -will be preferred. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `legacy-bundling` - -* Default: false -* Type: Boolean - -Causes npm to install the package such that versions of npm prior to 1.4, -such as the one included with node 0.8, can install the package. This -eliminates all automatic deduping. If used with `global-style` this option -will be preferred. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `strict-peer-deps` - -* Default: false -* Type: Boolean - -If set to `true`, and `--legacy-peer-deps` is not set, then _any_ -conflicting `peerDependencies` will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships. - -By default, conflicting `peerDependencies` deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's `peerDependencies` object. - -When such and override is performed, a warning is printed, explaining the -conflict and the packages involved. If `--strict-peer-deps` is set, then -this warning is treated as a failure. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `package-lock` - -* Default: true -* Type: Boolean - -If set to false, then ignore `package-lock.json` files when installing. This -will also prevent _writing_ `package-lock.json` if `save` is true. - -This configuration does not affect `npm ci`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `foreground-scripts` - -* Default: false -* Type: Boolean - -Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process. - -Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `audit` - -* Default: true -* Type: Boolean - -When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for [`npm audit`](/commands/npm-audit) for details on what is -submitted. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `bin-links` - -* Default: true -* Type: Boolean - -Tells npm to create symlinks (or `.cmd` shims on Windows) for package -executables. - -Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `fund` - -* Default: true -* Type: Boolean - -When "true" displays the message at the end of each `npm install` -acknowledging the number of dependencies looking for funding. See [`npm -fund`](/commands/npm-fund) for details. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `install-links` - -* Default: true -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm install-test](/commands/npm-install-test) -* [npm ci](/commands/npm-ci) -* [npm test](/commands/npm-test) diff --git a/docs/content/commands/npm-install-test.md b/docs/content/commands/npm-install-test.md deleted file mode 100644 index 4dad775e927c9..0000000000000 --- a/docs/content/commands/npm-install-test.md +++ /dev/null @@ -1,327 +0,0 @@ ---- -title: npm-install-test -section: 1 -description: Install package(s) and run tests ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/install-test.js --> - -```bash -npm install-test [<package-spec> ...] - -alias: it -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/install-test.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -This command runs an `npm install` followed immediately by an `npm test`. It -takes exactly the same arguments as `npm install`. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `save` - -* Default: `true` unless when using `npm update` where it defaults to `false` -* Type: Boolean - -Save installed packages to a `package.json` file as dependencies. - -When used with the `npm rm` command, removes the dependency from -`package.json`. - -Will also prevent writing to `package-lock.json` if set to `false`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `save-exact` - -* Default: false -* Type: Boolean - -Dependencies saved to package.json will be configured with an exact version -rather than using npm's default semver range operator. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `global-style` - -* Default: false -* Type: Boolean - -Causes npm to install the package into your local `node_modules` folder with -the same layout it uses with the global `node_modules` folder. Only your -direct dependencies will show in `node_modules` and everything they depend -on will be flattened in their `node_modules` folders. This obviously will -eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling` -will be preferred. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `legacy-bundling` - -* Default: false -* Type: Boolean - -Causes npm to install the package such that versions of npm prior to 1.4, -such as the one included with node 0.8, can install the package. This -eliminates all automatic deduping. If used with `global-style` this option -will be preferred. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `strict-peer-deps` - -* Default: false -* Type: Boolean - -If set to `true`, and `--legacy-peer-deps` is not set, then _any_ -conflicting `peerDependencies` will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships. - -By default, conflicting `peerDependencies` deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's `peerDependencies` object. - -When such and override is performed, a warning is printed, explaining the -conflict and the packages involved. If `--strict-peer-deps` is set, then -this warning is treated as a failure. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `package-lock` - -* Default: true -* Type: Boolean - -If set to false, then ignore `package-lock.json` files when installing. This -will also prevent _writing_ `package-lock.json` if `save` is true. - -This configuration does not affect `npm ci`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `foreground-scripts` - -* Default: false -* Type: Boolean - -Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process. - -Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `audit` - -* Default: true -* Type: Boolean - -When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for [`npm audit`](/commands/npm-audit) for details on what is -submitted. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `bin-links` - -* Default: true -* Type: Boolean - -Tells npm to create symlinks (or `.cmd` shims on Windows) for package -executables. - -Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `fund` - -* Default: true -* Type: Boolean - -When "true" displays the message at the end of each `npm install` -acknowledging the number of dependencies looking for funding. See [`npm -fund`](/commands/npm-fund) for details. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `install-links` - -* Default: true -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm install](/commands/npm-install) -* [npm install-ci-test](/commands/npm-install-ci-test) -* [npm test](/commands/npm-test) diff --git a/docs/content/commands/npm-link.md b/docs/content/commands/npm-link.md deleted file mode 100644 index 81a31acfa0272..0000000000000 --- a/docs/content/commands/npm-link.md +++ /dev/null @@ -1,407 +0,0 @@ ---- -title: npm-link -section: 1 -description: Symlink a package folder ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/link.js --> - -```bash -npm link [<package-spec>] - -alias: ln -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/link.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -This is handy for installing your own stuff, so that you can work on it and -test iteratively without having to continually rebuild. - -Package linking is a two-step process. - -First, `npm link` in a package folder with no arguments will create a -symlink in the global folder `{prefix}/lib/node_modules/<package>` that -links to the package where the `npm link` command was executed. It will -also link any bins in the package to `{prefix}/bin/{name}`. Note that -`npm link` uses the global prefix (see `npm prefix -g` for its value). - -Next, in some other location, `npm link package-name` will create a -symbolic link from globally-installed `package-name` to `node_modules/` of -the current folder. - -Note that `package-name` is taken from `package.json`, _not_ from the -directory name. - -The package name can be optionally prefixed with a scope. See -[`scope`](/using-npm/scope). The scope must be preceded by an @-symbol and -followed by a slash. - -When creating tarballs for `npm publish`, the linked packages are -"snapshotted" to their current state by resolving the symbolic links, if -they are included in `bundleDependencies`. - -For example: - -```bash -cd ~/projects/node-redis # go into the package directory -npm link # creates global link -cd ~/projects/node-bloggy # go into some other package directory. -npm link redis # link-install the package -``` - -Now, any changes to `~/projects/node-redis` will be reflected in -`~/projects/node-bloggy/node_modules/node-redis/`. Note that the link -should be to the package name, not the directory name for that package. - -You may also shortcut the two steps in one. For example, to do the -above use-case in a shorter way: - -```bash -cd ~/projects/node-bloggy # go into the dir of your main project -npm link ../node-redis # link the dir of your dependency -``` - -The second line is the equivalent of doing: - -```bash -(cd ../node-redis; npm link) -npm link redis -``` - -That is, it first creates a global link, and then links the global -installation target into your project's `node_modules` folder. - -Note that in this case, you are referring to the directory name, -`node-redis`, rather than the package name `redis`. - -If your linked package is scoped (see [`scope`](/using-npm/scope)) your -link command must include that scope, e.g. - -```bash -npm link @myorg/privatepackage -``` - -### Caveat - -Note that package dependencies linked in this way are _not_ saved to -`package.json` by default, on the assumption that the intention is to have -a link stand in for a regular non-link dependency. Otherwise, for example, -if you depend on `redis@^3.0.1`, and ran `npm link redis`, it would replace -the `^3.0.1` dependency with `file:../path/to/node-redis`, which you -probably don't want! Additionally, other users or developers on your -project would run into issues if they do not have their folders set up -exactly the same as yours. - -If you are adding a _new_ dependency as a link, you should add it to the -relevant metadata by running `npm install <dep> --package-lock-only`. - -If you _want_ to save the `file:` reference in your `package.json` and -`package-lock.json` files, you can use `npm link <dep> --save` to do so. - -### Workspace Usage - -`npm link <pkg> --workspace <name>` will link the relevant package as a -dependency of the specified workspace(s). Note that It may actually be -linked into the parent project's `node_modules` folder, if there are no -conflicting dependencies. - -`npm link --workspace <name>` will create a global link to the specified -workspace(s). - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `save` - -* Default: `true` unless when using `npm update` where it defaults to `false` -* Type: Boolean - -Save installed packages to a `package.json` file as dependencies. - -When used with the `npm rm` command, removes the dependency from -`package.json`. - -Will also prevent writing to `package-lock.json` if set to `false`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `save-exact` - -* Default: false -* Type: Boolean - -Dependencies saved to package.json will be configured with an exact version -rather than using npm's default semver range operator. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `global-style` - -* Default: false -* Type: Boolean - -Causes npm to install the package into your local `node_modules` folder with -the same layout it uses with the global `node_modules` folder. Only your -direct dependencies will show in `node_modules` and everything they depend -on will be flattened in their `node_modules` folders. This obviously will -eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling` -will be preferred. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `legacy-bundling` - -* Default: false -* Type: Boolean - -Causes npm to install the package such that versions of npm prior to 1.4, -such as the one included with node 0.8, can install the package. This -eliminates all automatic deduping. If used with `global-style` this option -will be preferred. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `strict-peer-deps` - -* Default: false -* Type: Boolean - -If set to `true`, and `--legacy-peer-deps` is not set, then _any_ -conflicting `peerDependencies` will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships. - -By default, conflicting `peerDependencies` deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's `peerDependencies` object. - -When such and override is performed, a warning is printed, explaining the -conflict and the packages involved. If `--strict-peer-deps` is set, then -this warning is treated as a failure. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `package-lock` - -* Default: true -* Type: Boolean - -If set to false, then ignore `package-lock.json` files when installing. This -will also prevent _writing_ `package-lock.json` if `save` is true. - -This configuration does not affect `npm ci`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `audit` - -* Default: true -* Type: Boolean - -When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for [`npm audit`](/commands/npm-audit) for details on what is -submitted. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `bin-links` - -* Default: true -* Type: Boolean - -Tells npm to create symlinks (or `.cmd` shims on Windows) for package -executables. - -Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `fund` - -* Default: true -* Type: Boolean - -When "true" displays the message at the end of each `npm install` -acknowledging the number of dependencies looking for funding. See [`npm -fund`](/commands/npm-fund) for details. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `install-links` - -* Default: true -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [package spec](/using-npm/package-spec) -* [npm developers](/using-npm/developers) -* [package.json](/configuring-npm/package-json) -* [npm install](/commands/npm-install) -* [npm folders](/configuring-npm/folders) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) diff --git a/docs/content/commands/npm-login.md b/docs/content/commands/npm-login.md deleted file mode 100644 index a3772dc882a9d..0000000000000 --- a/docs/content/commands/npm-login.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: npm-login -section: 1 -description: Login to a registry user account ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/login.js --> - -```bash -npm login -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/login.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -Note: This command is unaware of workspaces. - -### Description - -Verify a user in the specified registry, and save the credentials to the -`.npmrc` file. If no registry is specified, the default registry will be -used (see [`config`](/using-npm/config)). - -When using `legacy` for your `auth-type`, the username and password, are -read in from prompts. - -To reset your password, go to <https://www.npmjs.com/forgot> - -To change your email address, go to <https://www.npmjs.com/email-edit> - -You may use this command multiple times with the same user account to -authorize on a new machine. When authenticating on a new machine, -the username, password and email address must all match with -your existing record. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `scope` - -* Default: the scope of the current project, if any, or "" -* Type: String - -Associate an operation with a scope for a scoped registry. - -Useful when logging in to or out of a private registry: - -``` -# log in, linking the scope to the custom registry -npm login --scope=@mycorp --registry=https://registry.mycorp.com - -# log out, removing the link and the auth token -npm logout --scope=@mycorp -``` - -This will cause `@mycorp` to be mapped to the registry for future -installation of packages specified according to the pattern -`@mycorp/package`. - -This will also cause `npm init` to create a scoped package. - -``` -# accept all defaults, and create a package named "@foo/whatever", -# instead of just named "whatever" -npm init --scope=@foo --yes -``` - - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `auth-type` - -* Default: "web" -* Type: "legacy" or "web" - -What authentication strategy to use with `login`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm registry](/using-npm/registry) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [npm owner](/commands/npm-owner) -* [npm whoami](/commands/npm-whoami) -* [npm token](/commands/npm-token) -* [npm profile](/commands/npm-profile) diff --git a/docs/content/commands/npm-logout.md b/docs/content/commands/npm-logout.md deleted file mode 100644 index f0dd5cb856eae..0000000000000 --- a/docs/content/commands/npm-logout.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: npm-logout -section: 1 -description: Log out of the registry ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/logout.js --> - -```bash -npm logout -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/logout.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -Note: This command is unaware of workspaces. - -### Description - -When logged into a registry that supports token-based authentication, tell -the server to end this token's session. This will invalidate the token -everywhere you're using it, not just for the current environment. - -When logged into a legacy registry that uses username and password -authentication, this will clear the credentials in your user configuration. -In this case, it will _only_ affect the current environment. - -If `--scope` is provided, this will find the credentials for the registry -connected to that scope, if set. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `scope` - -* Default: the scope of the current project, if any, or "" -* Type: String - -Associate an operation with a scope for a scoped registry. - -Useful when logging in to or out of a private registry: - -``` -# log in, linking the scope to the custom registry -npm login --scope=@mycorp --registry=https://registry.mycorp.com - -# log out, removing the link and the auth token -npm logout --scope=@mycorp -``` - -This will cause `@mycorp` to be mapped to the registry for future -installation of packages specified according to the pattern -`@mycorp/package`. - -This will also cause `npm init` to create a scoped package. - -``` -# accept all defaults, and create a package named "@foo/whatever", -# instead of just named "whatever" -npm init --scope=@foo --yes -``` - - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm adduser](/commands/npm-adduser) -* [npm registry](/using-npm/registry) -* [npm config](/commands/npm-config) -* [npm whoami](/commands/npm-whoami) diff --git a/docs/content/commands/npm-ls.md b/docs/content/commands/npm-ls.md deleted file mode 100644 index 0e01dc3409011..0000000000000 --- a/docs/content/commands/npm-ls.md +++ /dev/null @@ -1,314 +0,0 @@ ---- -title: npm-ls -section: 1 -description: List installed packages ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/ls.js --> - -```bash -npm ls <package-spec> - -alias: list -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/ls.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -This command will print to stdout all the versions of packages that are -installed, as well as their dependencies when `--all` is specified, in a -tree structure. - -Note: to get a "bottoms up" view of why a given package is included in the -tree at all, use [`npm explain`](/commands/npm-explain). - -Positional arguments are `name@version-range` identifiers, which will limit -the results to only the paths to the packages named. Note that nested -packages will *also* show the paths to the specified packages. For -example, running `npm ls promzard` in npm's source tree will show: - -```bash -npm@@VERSION@ /path/to/npm -└─┬ init-package-json@0.0.4 - └── promzard@0.1.5 -``` - -It will print out extraneous, missing, and invalid packages. - -If a project specifies git urls for dependencies these are shown -in parentheses after the `name@version` to make it easier for users to -recognize potential forks of a project. - -The tree shown is the logical dependency tree, based on package -dependencies, not the physical layout of your `node_modules` folder. - -When run as `ll` or `la`, it shows extended information by default. - -### Note: Design Changes Pending - -The `npm ls` command's output and behavior made a _ton_ of sense when npm -created a `node_modules` folder that naively nested every dependency. In -such a case, the logical dependency graph and physical tree of packages on -disk would be roughly identical. - -With the advent of automatic install-time deduplication of dependencies in -npm v3, the `ls` output was modified to display the logical dependency -graph as a tree structure, since this was more useful to most users. -However, without using `npm ls -l`, it became impossible to show _where_ a -package was actually installed much of the time! - -With the advent of automatic installation of `peerDependencies` in npm v7, -this gets even more curious, as `peerDependencies` are logically -"underneath" their dependents in the dependency graph, but are always -physically at or above their location on disk. - -Also, in the years since npm got an `ls` command (in version 0.0.2!), -dependency graphs have gotten much larger as a general rule. Therefore, in -order to avoid dumping an excessive amount of content to the terminal, `npm -ls` now only shows the _top_ level dependencies, unless `--all` is -provided. - -A thorough re-examination of the use cases, intention, behavior, and output -of this command, is currently underway. Expect significant changes to at -least the default human-readable `npm ls` output in npm v8. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `all` - -* Default: false -* Type: Boolean - -When running `npm outdated` and `npm ls`, setting `--all` will show all -outdated or installed packages, rather than only those directly depended -upon by the current project. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `long` - -* Default: false -* Type: Boolean - -Show extended information in `ls`, `search`, and `help-search`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `parseable` - -* Default: false -* Type: Boolean - -Output parseable results from commands that write to standard output. For -`npm search`, this will be tab-separated table format. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `depth` - -* Default: `Infinity` if `--all` is set, otherwise `1` -* Type: null or Number - -The depth to go when recursing packages for `npm ls`. - -If not set, `npm ls` will show only the immediate dependencies of the root -project. If `--all` is set, then npm will show all dependencies by default. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `link` - -* Default: false -* Type: Boolean - -Used with `npm ls`, limiting output to only those packages that are linked. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `package-lock-only` - -* Default: false -* Type: Boolean - -If set to true, the current operation will only use the `package-lock.json`, -ignoring `node_modules`. - -For `update` this means only the `package-lock.json` will be updated, -instead of checking `node_modules` and downloading dependencies. - -For `list` this means the output will be based on the tree described by the -`package-lock.json`, rather than the contents of `node_modules`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `unicode` - -* Default: false on windows, true on mac/unix systems with a unicode locale, - as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables. -* Type: Boolean - -When set to true, npm uses unicode characters in the tree output. When -false, it uses ascii characters instead of unicode glyphs. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `install-links` - -* Default: true -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [package spec](/using-npm/package-spec) -* [npm explain](/commands/npm-explain) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [npm folders](/configuring-npm/folders) -* [npm explain](/commands/npm-explain) -* [npm install](/commands/npm-install) -* [npm link](/commands/npm-link) -* [npm prune](/commands/npm-prune) -* [npm outdated](/commands/npm-outdated) -* [npm update](/commands/npm-update) diff --git a/docs/content/commands/npm-org.md b/docs/content/commands/npm-org.md deleted file mode 100644 index 975581c860df6..0000000000000 --- a/docs/content/commands/npm-org.md +++ /dev/null @@ -1,132 +0,0 @@ ---- -title: npm-org -section: 1 -description: Manage orgs ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/org.js --> - -```bash -npm org set orgname username [developer | admin | owner] -npm org rm orgname username -npm org ls orgname [<username>] - -alias: ogr -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/org.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -Note: This command is unaware of workspaces. - -### Example - -Add a new developer to an org: - -```bash -$ npm org set my-org @mx-smith -``` - -Add a new admin to an org (or change a developer to an admin): - -```bash -$ npm org set my-org @mx-santos admin -``` - -Remove a user from an org: - -```bash -$ npm org rm my-org mx-santos -``` - -List all users in an org: - -```bash -$ npm org ls my-org -``` - -List all users in JSON format: - -```bash -$ npm org ls my-org --json -``` - -See what role a user has in an org: - -```bash -$ npm org ls my-org @mx-santos -``` - -### Description - -You can use the `npm org` commands to manage and view users of an -organization. It supports adding and removing users, changing their roles, -listing them, and finding specific ones and their roles. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `parseable` - -* Default: false -* Type: Boolean - -Output parseable results from commands that write to standard output. For -`npm search`, this will be tab-separated table format. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [using orgs](/using-npm/orgs) -* [Documentation on npm Orgs](https://docs.npmjs.com/orgs/) diff --git a/docs/content/commands/npm-owner.md b/docs/content/commands/npm-owner.md deleted file mode 100644 index ebc29ef693939..0000000000000 --- a/docs/content/commands/npm-owner.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -title: npm-owner -section: 1 -description: Manage package owners ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/owner.js --> - -```bash -npm owner add <user> <package-spec> -npm owner rm <user> <package-spec> -npm owner ls <package-spec> - -alias: author -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/owner.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -Note: This command is unaware of workspaces. - -### Description - -Manage ownership of published packages. - -* ls: List all the users who have access to modify a package and push new - versions. Handy when you need to know who to bug for help. -* add: Add a new user as a maintainer of a package. This user is enabled - to modify metadata, publish new versions, and add other owners. -* rm: Remove a user from the package owner list. This immediately revokes - their privileges. - -Note that there is only one level of access. Either you can modify a package, -or you can't. Future versions may contain more fine-grained access levels, but -that is not implemented at this time. - -If you have two-factor authentication enabled with `auth-and-writes` (see -[`npm-profile`](/commands/npm-profile)) then you'll need to include an otp -on the command line when changing ownership with `--otp`. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [package spec](/using-npm/package-spec) -* [npm profile](/commands/npm-profile) -* [npm publish](/commands/npm-publish) -* [npm registry](/using-npm/registry) -* [npm adduser](/commands/npm-adduser) diff --git a/docs/content/commands/npm-pack.md b/docs/content/commands/npm-pack.md deleted file mode 100644 index 7921042eae8fe..0000000000000 --- a/docs/content/commands/npm-pack.md +++ /dev/null @@ -1,152 +0,0 @@ ---- -title: npm-pack -section: 1 -description: Create a tarball from a package ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/pack.js --> - -```bash -npm pack <package-spec> -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/pack.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `pack-destination` - -* Default: "." -* Type: String - -Directory in which `npm pack` will save tarballs. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### Description - -For anything that's installable (that is, a package folder, tarball, -tarball url, git url, name@tag, name@version, name, or scoped name), this -command will fetch it to the cache, copy the tarball to the current working -directory as `<name>-<version>.tgz`, and then write the filenames out to -stdout. - -If the same package is specified multiple times, then the file will be -overwritten the second time. - -If no arguments are supplied, then npm packs the current package folder. - -### See Also - -* [package spec](/using-npm/package-spec) -* [npm-packlist package](http://npm.im/npm-packlist) -* [npm cache](/commands/npm-cache) -* [npm publish](/commands/npm-publish) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) diff --git a/docs/content/commands/npm-ping.md b/docs/content/commands/npm-ping.md deleted file mode 100644 index 161d7292f8c97..0000000000000 --- a/docs/content/commands/npm-ping.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: npm-ping -section: 1 -description: Ping npm registry ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/ping.js --> - -```bash -npm ping -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/ping.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -Note: This command is unaware of workspaces. - -### Description - -Ping the configured or given npm registry and verify authentication. -If it works it will output something like: - -```bash -npm notice PING https://registry.npmjs.org/ -npm notice PONG 255ms -``` -otherwise you will get an error: -```bash -npm notice PING http://foo.com/ -npm ERR! code E404 -npm ERR! 404 Not Found - GET http://www.foo.com/-/ping?write=true -``` - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm doctor](/commands/npm-doctor) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) diff --git a/docs/content/commands/npm-prefix.md b/docs/content/commands/npm-prefix.md deleted file mode 100644 index 39328bcc88a14..0000000000000 --- a/docs/content/commands/npm-prefix.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: npm-prefix -section: 1 -description: Display prefix ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/prefix.js --> - -```bash -npm prefix [-g] -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/prefix.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -Note: This command is unaware of workspaces. - -### Description - -Print the local prefix to standard output. This is the closest parent directory -to contain a `package.json` file or `node_modules` directory, unless `-g` is -also specified. - -If `-g` is specified, this will be the value of the global prefix. See -[`npm config`](/commands/npm-config) for more detail. - -### Example - -```bash -npm prefix -/usr/local/projects/foo -``` - -```bash -npm prefix -g -/usr/local -``` - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm root](/commands/npm-root) -* [npm bin](/commands/npm-bin) -* [npm folders](/configuring-npm/folders) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) diff --git a/docs/content/commands/npm-prune.md b/docs/content/commands/npm-prune.md deleted file mode 100644 index 6cbfc2ad438cd..0000000000000 --- a/docs/content/commands/npm-prune.md +++ /dev/null @@ -1,212 +0,0 @@ ---- -title: npm-prune -section: 1 -description: Remove extraneous packages ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/prune.js --> - -```bash -npm prune [[<@scope>/]<pkg>...] -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/prune.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -This command removes "extraneous" packages. If a package name is provided, -then only packages matching one of the supplied names are removed. - -Extraneous packages are those present in the `node_modules` folder that are -not listed as any package's dependency list. - -If the `--production` flag is specified or the `NODE_ENV` environment -variable is set to `production`, this command will remove the packages -specified in your `devDependencies`. Setting `--no-production` will negate -`NODE_ENV` being set to `production`. - -If the `--dry-run` flag is used then no changes will actually be made. - -If the `--json` flag is used, then the changes `npm prune` made (or would -have made with `--dry-run`) are printed as a JSON object. - -In normal operation, extraneous modules are pruned automatically, so you'll -only need this command with the `--production` flag. However, in the real -world, operation is not always "normal". When crashes or mistakes happen, -this command can help clean up any resulting garbage. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `foreground-scripts` - -* Default: false -* Type: Boolean - -Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process. - -Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `install-links` - -* Default: true -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm uninstall](/commands/npm-uninstall) -* [npm folders](/configuring-npm/folders) -* [npm ls](/commands/npm-ls) diff --git a/docs/content/commands/npm-publish.md b/docs/content/commands/npm-publish.md deleted file mode 100644 index 0c1b777c881bb..0000000000000 --- a/docs/content/commands/npm-publish.md +++ /dev/null @@ -1,243 +0,0 @@ ---- -title: npm-publish -section: 1 -description: Publish a package ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/publish.js --> - -```bash -npm publish <package-spec> -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/publish.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -Publishes a package to the registry so that it can be installed by name. - -By default npm will publish to the public registry. This can be -overridden by specifying a different default registry or using a -[`scope`](/using-npm/scope) in the name, combined with a -scope-configured registry (see -[`package.json`](/configuring-npm/package-json)). - - -A `package` is interpreted the same way as other commands (like -`npm install` and can be: - -* a) a folder containing a program described by a - [`package.json`](/configuring-npm/package-json) file -* b) a gzipped tarball containing (a) -* c) a url that resolves to (b) -* d) a `<name>@<version>` that is published on the registry (see - [`registry`](/using-npm/registry)) with (c) -* e) a `<name>@<tag>` (see [`npm dist-tag`](/commands/npm-dist-tag)) that - points to (d) -* f) a `<name>` that has a "latest" tag satisfying (e) -* g) a `<git remote url>` that resolves to (a) - -The publish will fail if the package name and version combination already -exists in the specified registry. - -Once a package is published with a given name and version, that specific -name and version combination can never be used again, even if it is removed -with [`npm unpublish`](/commands/npm-unpublish). - -As of `npm@5`, both a sha1sum and an integrity field with a sha512sum of the -tarball will be submitted to the registry during publication. Subsequent -installs will use the strongest supported algorithm to verify downloads. - -Similar to `--dry-run` see [`npm pack`](/commands/npm-pack), which figures -out the files to be included and packs them into a tarball to be uploaded -to the registry. - -### Files included in package - -To see what will be included in your package, run `npx npm-packlist`. All -files are included by default, with the following exceptions: - -- Certain files that are relevant to package installation and distribution - are always included. For example, `package.json`, `README.md`, - `LICENSE`, and so on. - -- If there is a "files" list in - [`package.json`](/configuring-npm/package-json), then only the files - specified will be included. (If directories are specified, then they - will be walked recursively and their contents included, subject to the - same ignore rules.) - -- If there is a `.gitignore` or `.npmignore` file, then ignored files in - that and all child directories will be excluded from the package. If - _both_ files exist, then the `.gitignore` is ignored, and only the - `.npmignore` is used. - - `.npmignore` files follow the [same pattern - rules](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_ignoring) - as `.gitignore` files - -- If the file matches certain patterns, then it will _never_ be included, - unless explicitly added to the `"files"` list in `package.json`, or - un-ignored with a `!` rule in a `.npmignore` or `.gitignore` file. - -- Symbolic links are never included in npm packages. - - -See [`developers`](/using-npm/developers) for full details on what's -included in the published package, as well as details on how the package is -built. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `tag` - -* Default: "latest" -* Type: String - -If you ask npm to install a package and don't tell it a specific version, -then it will install the specified tag. - -Also the tag that is added to the package@version specified by the `npm tag` -command, if no explicit tag is given. - -When used by the `npm diff` command, this is the tag used to fetch the -tarball that will be compared with the local files by default. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `access` - -* Default: 'public' for new packages, existing packages it will not change the - current level -* Type: null, "restricted", or "public" - -If do not want your scoped package to be publicly viewable (and installable) -set `--access=restricted`. - -Unscoped packages can not be set to `restricted`. - -Note: This defaults to not changing the current access level for existing -packages. Specifying a value of `restricted` or `public` during publish will -change the access for an existing package the same way that `npm access set -status` would. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [package spec](/using-npm/package-spec) -* [npm-packlist package](http://npm.im/npm-packlist) -* [npm registry](/using-npm/registry) -* [npm scope](/using-npm/scope) -* [npm adduser](/commands/npm-adduser) -* [npm owner](/commands/npm-owner) -* [npm deprecate](/commands/npm-deprecate) -* [npm dist-tag](/commands/npm-dist-tag) -* [npm pack](/commands/npm-pack) -* [npm profile](/commands/npm-profile) diff --git a/docs/content/commands/npm-query.md b/docs/content/commands/npm-query.md deleted file mode 100644 index c6303c2eb963d..0000000000000 --- a/docs/content/commands/npm-query.md +++ /dev/null @@ -1,236 +0,0 @@ ---- -title: npm-query -section: 1 -description: Dependency selector query ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/query.js --> - -```bash -npm query <selector> -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/query.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -The `npm query` command allows for usage of css selectors in order to retrieve -an array of dependency objects. - -### Piping npm query to other commands - -```bash -# find all dependencies with postinstall scripts & uninstall them -npm query ":attr(scripts, [postinstall])" | jq 'map(.name)|join("\n")' -r | xargs -I {} npm uninstall {} - -# find all git dependencies & explain who requires them -npm query ":type(git)" | jq 'map(.name)' | xargs -I {} npm why {} -``` - -### Extended Use Cases & Queries - -```stylus -// all deps -* - -// all direct deps -:root > * - -// direct production deps -:root > .prod - -// direct development deps -:root > .dev - -// any peer dep of a direct deps -:root > * > .peer - -// any workspace dep -.workspace - -// all workspaces that depend on another workspace -.workspace > .workspace - -// all workspaces that have peer deps -.workspace:has(.peer) - -// any dep named "lodash" -// equivalent to [name="lodash"] -#lodash - -// any deps named "lodash" & within semver range ^"1.2.3" -#lodash@^1.2.3 -// equivalent to... -[name="lodash"]:semver(^1.2.3) - -// get the hoisted node for a given semver range -#lodash@^1.2.3:not(:deduped) - -// querying deps with a specific version -#lodash@2.1.5 -// equivalent to... -[name="lodash"][version="2.1.5"] - -// has any deps -:has(*) - -// deps with no other deps (ie. "leaf" nodes) -:empty - -// manually querying git dependencies -[repository^=github:], -[repository^=git:], -[repository^=https://github.com], -[repository^=http://github.com], -[repository^=https://github.com], -[repository^=+git:...] - -// querying for all git dependencies -:type(git) - -// get production dependencies that aren't also dev deps -.prod:not(.dev) - -// get dependencies with specific licenses -[license=MIT], [license=ISC] - -// find all packages that have @ruyadorno as a contributor -:attr(contributors, [email=ruyadorno@github.com]) -``` - -### Example Response Output - -- an array of dependency objects is returned which can contain multiple copies of the same package which may or may not have been linked or deduped - -```json -[ - { - "name": "", - "version": "", - "description": "", - "homepage": "", - "bugs": {}, - "author": {}, - "license": {}, - "funding": {}, - "files": [], - "main": "", - "browser": "", - "bin": {}, - "man": [], - "directories": {}, - "repository": {}, - "scripts": {}, - "config": {}, - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "bundledDependencies": {}, - "peerDependencies": {}, - "peerDependenciesMeta": {}, - "engines": {}, - "os": [], - "cpu": [], - "workspaces": {}, - "keywords": [], - ... - }, - ... -``` - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> -## See Also - -* [dependency selectors](/using-npm/dependency-selectors) - diff --git a/docs/content/commands/npm-rebuild.md b/docs/content/commands/npm-rebuild.md deleted file mode 100644 index 6851b4ddff087..0000000000000 --- a/docs/content/commands/npm-rebuild.md +++ /dev/null @@ -1,181 +0,0 @@ ---- -title: npm-rebuild -section: 1 -description: Rebuild a package ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/rebuild.js --> - -```bash -npm rebuild [<package-spec>] ...] - -alias: rb -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/rebuild.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -This command runs the `npm build` command on the matched folders. This is -useful when you install a new version of node, and must recompile all your -C++ addons with the new binary. It is also useful when installing with -`--ignore-scripts` and `--no-bin-links`, to explicitly choose which -packages to build and/or link bins. - -If one or more package specs are provided, then only packages with a -name and version matching one of the specifiers will be rebuilt. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `bin-links` - -* Default: true -* Type: Boolean - -Tells npm to create symlinks (or `.cmd` shims on Windows) for package -executables. - -Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `foreground-scripts` - -* Default: false -* Type: Boolean - -Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process. - -Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `install-links` - -* Default: true -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [package spec](/using-npm/package-spec) -* [npm install](/commands/npm-install) diff --git a/docs/content/commands/npm-repo.md b/docs/content/commands/npm-repo.md deleted file mode 100644 index 4d69a922c63a9..0000000000000 --- a/docs/content/commands/npm-repo.md +++ /dev/null @@ -1,127 +0,0 @@ ---- -title: npm-repo -section: 1 -description: Open package repository page in the browser ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/repo.js --> - -```bash -npm repo [<pkgname> [<pkgname> ...]] -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/repo.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -This command tries to guess at the likely location of a package's -repository URL, and then tries to open it using the -[`--browser` config](/using-npm/config#browser) param. If no package name is -provided, it will search for a `package.json` in the current folder and use the -`repository` property. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `browser` - -* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` -* Type: null, Boolean, or String - -The browser that is called by npm commands to open websites. - -Set to `false` to suppress browser behavior and instead print urls to -terminal. - -Set to `true` to use default system URL opener. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm docs](/commands/npm-docs) -* [npm config](/commands/npm-config) diff --git a/docs/content/commands/npm-restart.md b/docs/content/commands/npm-restart.md deleted file mode 100644 index 048bebb1659bd..0000000000000 --- a/docs/content/commands/npm-restart.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: npm-restart -section: 1 -description: Restart a package ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/restart.js --> - -```bash -npm restart [-- <args>] -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/restart.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -This restarts a project. It is equivalent to running `npm run-script -restart`. - -If the current project has a `"restart"` script specified in -`package.json`, then the following scripts will be run: - -1. prerestart -2. restart -3. postrestart - -If it does _not_ have a `"restart"` script specified, but it does have -`stop` and/or `start` scripts, then the following scripts will be run: - -1. prerestart -2. prestop -3. stop -4. poststop -6. prestart -7. start -8. poststart -9. postrestart - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `script-shell` - -* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows -* Type: null or String - -The shell to use for scripts run with the `npm exec`, `npm run` and `npm -init <package-spec>` commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm run-script](/commands/npm-run-script) -* [npm scripts](/using-npm/scripts) -* [npm test](/commands/npm-test) -* [npm start](/commands/npm-start) -* [npm stop](/commands/npm-stop) -* [npm restart](/commands/npm-restart) diff --git a/docs/content/commands/npm-root.md b/docs/content/commands/npm-root.md deleted file mode 100644 index 40b58e4b33d0b..0000000000000 --- a/docs/content/commands/npm-root.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: npm-root -section: 1 -description: Display npm root ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/root.js --> - -```bash -npm root -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/root.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -Print the effective `node_modules` folder to standard out. - -Useful for using npm in shell scripts that do things with the -`node_modules` folder. For example: - -```bash -#!/bin/bash -global_node_modules="$(npm root --global)" -echo "Global packages installed in: ${global_node_modules}" -``` - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm prefix](/commands/npm-prefix) -* [npm bin](/commands/npm-bin) -* [npm folders](/configuring-npm/folders) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) diff --git a/docs/content/commands/npm-run-script.md b/docs/content/commands/npm-run-script.md deleted file mode 100644 index a68b9b65dcd4f..0000000000000 --- a/docs/content/commands/npm-run-script.md +++ /dev/null @@ -1,282 +0,0 @@ ---- -title: npm-run-script -section: 1 -description: Run arbitrary package scripts ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/run-script.js --> - -```bash -npm run-script <command> [-- <args>] - -aliases: run, rum, urn -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/run-script.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -This runs an arbitrary command from a package's `"scripts"` object. If no -`"command"` is provided, it will list the available scripts. - -`run[-script]` is used by the test, start, restart, and stop commands, but -can be called directly, as well. When the scripts in the package are -printed out, they're separated into lifecycle (test, start, restart) and -directly-run scripts. - -Any positional arguments are passed to the specified script. Use `--` to -pass `-`-prefixed flags and options which would otherwise be parsed by npm. - -For example: - -```bash -npm run test -- --grep="pattern" -``` - -The arguments will only be passed to the script specified after `npm run` -and not to any `pre` or `post` script. - -The `env` script is a special built-in command that can be used to list -environment variables that will be available to the script at runtime. If an -"env" command is defined in your package, it will take precedence over the -built-in. - -In addition to the shell's pre-existing `PATH`, `npm run` adds -`node_modules/.bin` to the `PATH` provided to scripts. Any binaries -provided by locally-installed dependencies can be used without the -`node_modules/.bin` prefix. For example, if there is a `devDependency` on -`tap` in your package, you should write: - -```bash -"scripts": {"test": "tap test/*.js"} -``` - -instead of - -```bash -"scripts": {"test": "node_modules/.bin/tap test/*.js"} -``` - -The actual shell your script is run within is platform dependent. By default, -on Unix-like systems it is the `/bin/sh` command, on Windows it is -`cmd.exe`. -The actual shell referred to by `/bin/sh` also depends on the system. -You can customize the shell with the -[`script-shell` config](/using-npm/config#script-shell). - -Scripts are run from the root of the package folder, regardless of what the -current working directory is when `npm run` is called. If you want your -script to use different behavior based on what subdirectory you're in, you -can use the `INIT_CWD` environment variable, which holds the full path you -were in when you ran `npm run`. - -`npm run` sets the `NODE` environment variable to the `node` executable -with which `npm` is executed. - -If you try to run a script without having a `node_modules` directory and it -fails, you will be given a warning to run `npm install`, just in case you've -forgotten. - -### Workspaces support - -You may use the [`workspace`](/using-npm/config#workspace) or -[`workspaces`](/using-npm/config#workspaces) configs in order to run an -arbitrary command from a package's `"scripts"` object in the context of the -specified workspaces. If no `"command"` is provided, it will list the available -scripts for each of these configured workspaces. - -Given a project with configured workspaces, e.g: - -``` -. -+-- package.json -`-- packages - +-- a - | `-- package.json - +-- b - | `-- package.json - `-- c - `-- package.json -``` - -Assuming the workspace configuration is properly set up at the root level -`package.json` file. e.g: - -``` -{ - "workspaces": [ "./packages/*" ] -} -``` - -And that each of the configured workspaces has a configured `test` script, -we can run tests in all of them using the -[`workspaces` config](/using-npm/config#workspaces): - -``` -npm test --workspaces -``` - -#### Filtering workspaces - -It's also possible to run a script in a single workspace using the `workspace` -config along with a name or directory path: - -``` -npm test --workspace=a -``` - -The `workspace` config can also be specified multiple times in order to run a -specific script in the context of multiple workspaces. When defining values for -the `workspace` config in the command line, it also possible to use `-w` as a -shorthand, e.g: - -``` -npm test -w a -w b -``` - -This last command will run `test` in both `./packages/a` and `./packages/b` -packages. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `if-present` - -* Default: false -* Type: Boolean - -If true, npm will not exit with an error code when `run-script` is invoked -for a script that isn't defined in the `scripts` section of `package.json`. -This option can be used when it's desirable to optionally run a script when -it's present and fail if the script fails. This is useful, for example, when -running scripts that may only apply for some builds in an otherwise generic -CI setup. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `foreground-scripts` - -* Default: false -* Type: Boolean - -Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process. - -Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `script-shell` - -* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows -* Type: null or String - -The shell to use for scripts run with the `npm exec`, `npm run` and `npm -init <package-spec>` commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm scripts](/using-npm/scripts) -* [npm test](/commands/npm-test) -* [npm start](/commands/npm-start) -* [npm restart](/commands/npm-restart) -* [npm stop](/commands/npm-stop) -* [npm config](/commands/npm-config) -* [npm workspaces](/using-npm/workspaces) diff --git a/docs/content/commands/npm-search.md b/docs/content/commands/npm-search.md deleted file mode 100644 index 340dea9684d00..0000000000000 --- a/docs/content/commands/npm-search.md +++ /dev/null @@ -1,184 +0,0 @@ ---- -title: npm-search -section: 1 -description: Search for packages ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/search.js --> - -```bash -npm search [search terms ...] - -aliases: find, s, se -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/search.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -Note: This command is unaware of workspaces. - -### Description - -Search the registry for packages matching the search terms. `npm search` -performs a linear, incremental, lexically-ordered search through package -metadata for all files in the registry. If your terminal has color -support, it will further highlight the matches in the results. This can -be disabled with the config item `color` - -Additionally, using the `--searchopts` and `--searchexclude` options -paired with more search terms will include and exclude further patterns. -The main difference between `--searchopts` and the standard search terms -is that the former does not highlight results in the output and you can -use them more fine-grained filtering. Additionally, you can add both of -these to your config to change default search filtering behavior. - -Search also allows targeting of maintainers in search results, by prefixing -their npm username with `=`. - -If a term starts with `/`, then it's interpreted as a regular expression -and supports standard JavaScript RegExp syntax. In this case search will -ignore a trailing `/` . (Note you must escape or quote many regular -expression characters in most shells.) - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `long` - -* Default: false -* Type: Boolean - -Show extended information in `ls`, `search`, and `help-search`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `color` - -* Default: true unless the NO_COLOR environ is set to something other than '0' -* Type: "always" or Boolean - -If false, never shows colors. If `"always"` then always shows colors. If -true, then only prints color codes for tty file descriptors. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `parseable` - -* Default: false -* Type: Boolean - -Output parseable results from commands that write to standard output. For -`npm search`, this will be tab-separated table format. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `description` - -* Default: true -* Type: Boolean - -Show the description in `npm search` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `searchopts` - -* Default: "" -* Type: String - -Space-separated options that are always passed to search. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `searchexclude` - -* Default: "" -* Type: String - -Space-separated options that limit the results from search. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `prefer-online` - -* Default: false -* Type: Boolean - -If true, staleness checks for cached data will be forced, making the CLI -look for updates immediately even for fresh package data. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `prefer-offline` - -* Default: false -* Type: Boolean - -If true, staleness checks for cached data will be bypassed, but missing data -will be requested from the server. To force full offline mode, use -`--offline`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `offline` - -* Default: false -* Type: Boolean - -Force offline mode: no network requests will be done during install. To -allow the CLI to fill in missing cache data, see `--prefer-offline`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm registry](/using-npm/registry) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [npm view](/commands/npm-view) -* [npm cache](/commands/npm-cache) -* https://npm.im/npm-registry-fetch diff --git a/docs/content/commands/npm-set-script.md b/docs/content/commands/npm-set-script.md deleted file mode 100644 index 8695b43f14423..0000000000000 --- a/docs/content/commands/npm-set-script.md +++ /dev/null @@ -1,114 +0,0 @@ ---- -title: npm-set-script -section: 1 -description: Set tasks in the scripts section of package.json ---- - -### Synopsis -An npm command that lets you create a task in the `scripts` section of the `package.json`. - -Deprecated. - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/set-script.js --> - -```bash -npm set-script [<script>] [<command>] -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/set-script.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - - -**Example:** - -* `npm set-script start "http-server ."` - -```json -{ - "name": "my-project", - "scripts": { - "start": "http-server .", - "test": "some existing value" - } -} -``` - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm run-script](/commands/npm-run-script) -* [npm install](/commands/npm-install) -* [npm test](/commands/npm-test) -* [npm start](/commands/npm-start) diff --git a/docs/content/commands/npm-star.md b/docs/content/commands/npm-star.md deleted file mode 100644 index 3e81c6a55bbb0..0000000000000 --- a/docs/content/commands/npm-star.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: npm-star -section: 1 -description: Mark your favorite packages ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/star.js --> - -```bash -npm star [<package-spec>...] -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/star.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -Note: This command is unaware of workspaces. - -### Description - -"Starring" a package means that you have some interest in it. It's -a vaguely positive way to show that you care. - -It's a boolean thing. Starring repeatedly has no additional effect. - -### More - -There's also these extra commands to help you manage your favorite packages: - -#### Unstar - -You can also "unstar" a package using [`npm unstar`](/commands/npm-unstar) - -"Unstarring" is the same thing, but in reverse. - -#### Listing stars - -You can see all your starred packages using [`npm stars`](/commands/npm-stars) - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `unicode` - -* Default: false on windows, true on mac/unix systems with a unicode locale, - as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables. -* Type: Boolean - -When set to true, npm uses unicode characters in the tree output. When -false, it uses ascii characters instead of unicode glyphs. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [package spec](/using-npm/package-spec) -* [npm unstar](/commands/npm-unstar) -* [npm stars](/commands/npm-stars) -* [npm view](/commands/npm-view) -* [npm whoami](/commands/npm-whoami) -* [npm adduser](/commands/npm-adduser) diff --git a/docs/content/commands/npm-stars.md b/docs/content/commands/npm-stars.md deleted file mode 100644 index b9153831533af..0000000000000 --- a/docs/content/commands/npm-stars.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: npm-stars -section: 1 -description: View packages marked as favorites ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/stars.js --> - -```bash -npm stars [<user>] -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/stars.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -Note: This command is unaware of workspaces. - -### Description - -If you have starred a lot of neat things and want to find them again -quickly this command lets you do just that. - -You may also want to see your friend's favorite packages, in this case -you will most certainly enjoy this command. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm star](/commands/npm-star) -* [npm unstar](/commands/npm-unstar) -* [npm view](/commands/npm-view) -* [npm whoami](/commands/npm-whoami) -* [npm adduser](/commands/npm-adduser) diff --git a/docs/content/commands/npm-start.md b/docs/content/commands/npm-start.md deleted file mode 100644 index 148f92606d83f..0000000000000 --- a/docs/content/commands/npm-start.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: npm-start -section: 1 -description: Start a package ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/start.js --> - -```bash -npm start [-- <args>] -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/start.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -This runs a predefined command specified in the `"start"` property of -a package's `"scripts"` object. - -If the `"scripts"` object does not define a `"start"` property, npm -will run `node server.js`. - -Note that this is different from the default node behavior of running -the file specified in a package's `"main"` attribute when evoking with -`node .` - -As of [`npm@2.0.0`](https://blog.npmjs.org/post/98131109725/npm-2-0-0), you can -use custom arguments when executing scripts. Refer to [`npm run-script`](/commands/npm-run-script) for more details. - -### Example - -```json -{ - "scripts": { - "start": "node foo.js" - } -} -``` - -```bash -npm start - -> npm@x.x.x start -> node foo.js - -(foo.js output would be here) - -``` - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `script-shell` - -* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows -* Type: null or String - -The shell to use for scripts run with the `npm exec`, `npm run` and `npm -init <package-spec>` commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm run-script](/commands/npm-run-script) -* [npm scripts](/using-npm/scripts) -* [npm test](/commands/npm-test) -* [npm restart](/commands/npm-restart) -* [npm stop](/commands/npm-stop) diff --git a/docs/content/commands/npm-stop.md b/docs/content/commands/npm-stop.md deleted file mode 100644 index a3084e8432ba7..0000000000000 --- a/docs/content/commands/npm-stop.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: npm-stop -section: 1 -description: Stop a package ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/stop.js --> - -```bash -npm stop [-- <args>] -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/stop.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -This runs a predefined command specified in the "stop" property of a -package's "scripts" object. - -Unlike with [npm start](/commands/npm-start), there is no default script -that will run if the `"stop"` property is not defined. - -### Example - -```json -{ - "scripts": { - "stop": "node bar.js" - } -} -``` - -```bash -npm stop - -> npm@x.x.x stop -> node bar.js - -(bar.js output would be here) - -``` - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `script-shell` - -* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows -* Type: null or String - -The shell to use for scripts run with the `npm exec`, `npm run` and `npm -init <package-spec>` commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm run-script](/commands/npm-run-script) -* [npm scripts](/using-npm/scripts) -* [npm test](/commands/npm-test) -* [npm start](/commands/npm-start) -* [npm restart](/commands/npm-restart) diff --git a/docs/content/commands/npm-test.md b/docs/content/commands/npm-test.md deleted file mode 100644 index 72bb899d0b916..0000000000000 --- a/docs/content/commands/npm-test.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: npm-test -section: 1 -description: Test a package ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/test.js --> - -```bash -npm test [-- <args>] - -aliases: tst, t -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/test.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -This runs a predefined command specified in the `"test"` property of -a package's `"scripts"` object. - -### Example - -```json -{ - "scripts": { - "test": "node test.js" - } -} -``` - -```bash -npm test -> npm@x.x.x test -> node test.js - -(test.js output would be here) -``` - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `script-shell` - -* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows -* Type: null or String - -The shell to use for scripts run with the `npm exec`, `npm run` and `npm -init <package-spec>` commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm run-script](/commands/npm-run-script) -* [npm scripts](/using-npm/scripts) -* [npm start](/commands/npm-start) -* [npm restart](/commands/npm-restart) -* [npm stop](/commands/npm-stop) diff --git a/docs/content/commands/npm-uninstall.md b/docs/content/commands/npm-uninstall.md deleted file mode 100644 index 83b0aa180c040..0000000000000 --- a/docs/content/commands/npm-uninstall.md +++ /dev/null @@ -1,168 +0,0 @@ ---- -title: npm-uninstall -section: 1 -description: Remove a package ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/uninstall.js --> - -```bash -npm uninstall [<@scope>/]<pkg>... - -aliases: unlink, remove, rm, r, un -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/uninstall.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -This uninstalls a package, completely removing everything npm installed -on its behalf. - -It also removes the package from the `dependencies`, `devDependencies`, -`optionalDependencies`, and `peerDependencies` objects in your -`package.json`. - -Further, if you have an `npm-shrinkwrap.json` or `package-lock.json`, npm -will update those files as well. - -`--no-save` will tell npm not to remove the package from your -`package.json`, `npm-shrinkwrap.json`, or `package-lock.json` files. - -`--save` or `-S` will tell npm to remove the package from your -`package.json`, `npm-shrinkwrap.json`, and `package-lock.json` files. -This is the default, but you may need to use this if you have for -instance `save=false` in your `npmrc` file - -In global mode (ie, with `-g` or `--global` appended to the command), -it uninstalls the current package context as a global package. -`--no-save` is ignored in this case. - -Scope is optional and follows the usual rules for [`scope`](/using-npm/scope). - -### Examples - -```bash -npm uninstall sax -``` - -`sax` will no longer be in your `package.json`, `npm-shrinkwrap.json`, or -`package-lock.json` files. - -```bash -npm uninstall lodash --no-save -``` - -`lodash` will not be removed from your `package.json`, -`npm-shrinkwrap.json`, or `package-lock.json` files. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `save` - -* Default: `true` unless when using `npm update` where it defaults to `false` -* Type: Boolean - -Save installed packages to a `package.json` file as dependencies. - -When used with the `npm rm` command, removes the dependency from -`package.json`. - -Will also prevent writing to `package-lock.json` if set to `false`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `install-links` - -* Default: true -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm prune](/commands/npm-prune) -* [npm install](/commands/npm-install) -* [npm folders](/configuring-npm/folders) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) diff --git a/docs/content/commands/npm-unpublish.md b/docs/content/commands/npm-unpublish.md deleted file mode 100644 index 9ad99e72a5a8e..0000000000000 --- a/docs/content/commands/npm-unpublish.md +++ /dev/null @@ -1,155 +0,0 @@ ---- -title: npm-unpublish -section: 1 -description: Remove a package from the registry ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/unpublish.js --> - -```bash -npm unpublish [<package-spec>] -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/unpublish.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -To learn more about how the npm registry treats unpublish, see our <a -href="https://docs.npmjs.com/policies/unpublish" target="_blank" -rel="noopener noreferrer"> unpublish policies</a> - -### Warning - -Consider using the [`deprecate`](/commands/npm-deprecate) command instead, -if your intent is to encourage users to upgrade, or if you no longer -want to maintain a package. - -### Description - -This removes a package version from the registry, deleting its entry and -removing the tarball. - -The npm registry will return an error if you are not [logged -in](/commands/npm-adduser). - -If you do not specify a version or if you remove all of a package's -versions then the registry will remove the root package entry entirely. - -Even if you unpublish a package version, that specific name and version -combination can never be reused. In order to publish the package again, -you must use a new version number. If you unpublish the entire package, -you may not publish any new versions of that package until 24 hours have -passed. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `force` - -* Default: false -* Type: Boolean - -Removes various protections against unfortunate side effects, common -mistakes, unnecessary performance degradation, and malicious input. - -* Allow clobbering non-npm files in global installs. -* Allow the `npm version` command to work on an unclean git repository. -* Allow deleting the cache folder with `npm cache clean`. -* Allow installing packages that have an `engines` declaration requiring a - different version of npm. -* Allow installing packages that have an `engines` declaration requiring a - different version of `node`, even if `--engine-strict` is enabled. -* Allow `npm audit fix` to install modules outside your stated dependency - range (including SemVer-major changes). -* Allow unpublishing all versions of a published package. -* Allow conflicting peerDependencies to be installed in the root project. -* Implicitly set `--yes` during `npm init`. -* Allow clobbering existing values in `npm pkg` -* Allow unpublishing of entire packages (not just a single version). - -If you don't have a clear idea of what you want to do, it is strongly -recommended that you do not use this option! - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [package spec](/using-npm/package-spec) -* [npm deprecate](/commands/npm-deprecate) -* [npm publish](/commands/npm-publish) -* [npm registry](/using-npm/registry) -* [npm adduser](/commands/npm-adduser) -* [npm owner](/commands/npm-owner) -* [npm login](/commands/npm-adduser) diff --git a/docs/content/commands/npm-unstar.md b/docs/content/commands/npm-unstar.md deleted file mode 100644 index 636e1b6ac0a94..0000000000000 --- a/docs/content/commands/npm-unstar.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: npm-unstar -section: 1 -description: Remove an item from your favorite packages ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/unstar.js --> - -```bash -npm unstar [<package-spec>...] -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/unstar.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -Note: This command is unaware of workspaces. - -### Description - -"Unstarring" a package is the opposite of [`npm star`](/commands/npm-star), -it removes an item from your list of favorite packages. - -### More - -There's also these extra commands to help you manage your favorite packages: - -#### Star - -You can "star" a package using [`npm star`](/commands/npm-star) - -#### Listing stars - -You can see all your starred packages using [`npm stars`](/commands/npm-stars) - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `unicode` - -* Default: false on windows, true on mac/unix systems with a unicode locale, - as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables. -* Type: Boolean - -When set to true, npm uses unicode characters in the tree output. When -false, it uses ascii characters instead of unicode glyphs. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm star](/commands/npm-star) -* [npm stars](/commands/npm-stars) -* [npm view](/commands/npm-view) -* [npm whoami](/commands/npm-whoami) -* [npm adduser](/commands/npm-adduser) - diff --git a/docs/content/commands/npm-update.md b/docs/content/commands/npm-update.md deleted file mode 100644 index 985b1a9eb224e..0000000000000 --- a/docs/content/commands/npm-update.md +++ /dev/null @@ -1,457 +0,0 @@ ---- -title: npm-update -section: 1 -description: Update packages ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/update.js --> - -```bash -npm update [<pkg>...] - -aliases: up, upgrade, udpate -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/update.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Description - -This command will update all the packages listed to the latest version -(specified by the [`tag` config](/using-npm/config#tag)), respecting the semver -constraints of both your package and its dependencies (if they also require the -same package). - -It will also install missing packages. - -If the `-g` flag is specified, this command will update globally installed -packages. - -If no package name is specified, all packages in the specified location (global -or local) will be updated. - -Note that by default `npm update` will not update the semver values of direct -dependencies in your project `package.json`, if you want to also update -values in `package.json` you can run: `npm update --save` (or add the -`save=true` option to a [configuration file](/configuring-npm/npmrc) -to make that the default behavior). - -### Example - -For the examples below, assume that the current package is `app` and it depends -on dependencies, `dep1` (`dep2`, .. etc.). The published versions of `dep1` -are: - -```json -{ - "dist-tags": { "latest": "1.2.2" }, - "versions": [ - "1.2.2", - "1.2.1", - "1.2.0", - "1.1.2", - "1.1.1", - "1.0.0", - "0.4.1", - "0.4.0", - "0.2.0" - ] -} -``` - -#### Caret Dependencies - -If `app`'s `package.json` contains: - -```json -"dependencies": { - "dep1": "^1.1.1" -} -``` - -Then `npm update` will install `dep1@1.2.2`, because `1.2.2` is `latest` and -`1.2.2` satisfies `^1.1.1`. - -#### Tilde Dependencies - -However, if `app`'s `package.json` contains: - -```json -"dependencies": { - "dep1": "~1.1.1" -} -``` - -In this case, running `npm update` will install `dep1@1.1.2`. Even though the -`latest` tag points to `1.2.2`, this version do not satisfy `~1.1.1`, which is -equivalent to `>=1.1.1 <1.2.0`. So the highest-sorting version that satisfies -`~1.1.1` is used, which is `1.1.2`. - -#### Caret Dependencies below 1.0.0 - -Suppose `app` has a caret dependency on a version below `1.0.0`, for example: - -```json -"dependencies": { - "dep1": "^0.2.0" -} -``` - -`npm update` will install `dep1@0.2.0`, because there are no other -versions which satisfy `^0.2.0`. - -If the dependence were on `^0.4.0`: - -```json -"dependencies": { - "dep1": "^0.4.0" -} -``` - -Then `npm update` will install `dep1@0.4.1`, because that is the highest-sorting -version that satisfies `^0.4.0` (`>= 0.4.0 <0.5.0`) - - -#### Subdependencies - -Suppose your app now also has a dependency on `dep2` - -```json -{ - "name": "my-app", - "dependencies": { - "dep1": "^1.0.0", - "dep2": "1.0.0" - } -} -``` - -and `dep2` itself depends on this limited range of `dep1` - -```json -{ -"name": "dep2", - "dependencies": { - "dep1": "~1.1.1" - } -} -``` - -Then `npm update` will install `dep1@1.1.2` because that is the highest -version that `dep2` allows. npm will prioritize having a single version -of `dep1` in your tree rather than two when that single version can -satisfy the semver requirements of multiple dependencies in your tree. -In this case if you really did need your package to use a newer version -you would need to use `npm install`. - - -#### Updating Globally-Installed Packages - -`npm update -g` will apply the `update` action to each globally installed -package that is `outdated` -- that is, has a version that is different from -`wanted`. - -Note: Globally installed packages are treated as if they are installed with a -caret semver range specified. So if you require to update to `latest` you may -need to run `npm install -g [<pkg>...]` - -NOTE: If a package has been upgraded to a version newer than `latest`, it will -be _downgraded_. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `save` - -* Default: `true` unless when using `npm update` where it defaults to `false` -* Type: Boolean - -Save installed packages to a `package.json` file as dependencies. - -When used with the `npm rm` command, removes the dependency from -`package.json`. - -Will also prevent writing to `package-lock.json` if set to `false`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `global-style` - -* Default: false -* Type: Boolean - -Causes npm to install the package into your local `node_modules` folder with -the same layout it uses with the global `node_modules` folder. Only your -direct dependencies will show in `node_modules` and everything they depend -on will be flattened in their `node_modules` folders. This obviously will -eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling` -will be preferred. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `legacy-bundling` - -* Default: false -* Type: Boolean - -Causes npm to install the package such that versions of npm prior to 1.4, -such as the one included with node 0.8, can install the package. This -eliminates all automatic deduping. If used with `global-style` this option -will be preferred. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `strict-peer-deps` - -* Default: false -* Type: Boolean - -If set to `true`, and `--legacy-peer-deps` is not set, then _any_ -conflicting `peerDependencies` will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships. - -By default, conflicting `peerDependencies` deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's `peerDependencies` object. - -When such and override is performed, a warning is printed, explaining the -conflict and the packages involved. If `--strict-peer-deps` is set, then -this warning is treated as a failure. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `package-lock` - -* Default: true -* Type: Boolean - -If set to false, then ignore `package-lock.json` files when installing. This -will also prevent _writing_ `package-lock.json` if `save` is true. - -This configuration does not affect `npm ci`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `foreground-scripts` - -* Default: false -* Type: Boolean - -Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process. - -Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `audit` - -* Default: true -* Type: Boolean - -When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for [`npm audit`](/commands/npm-audit) for details on what is -submitted. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `bin-links` - -* Default: true -* Type: Boolean - -Tells npm to create symlinks (or `.cmd` shims on Windows) for package -executables. - -Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `fund` - -* Default: true -* Type: Boolean - -When "true" displays the message at the end of each `npm install` -acknowledging the number of dependencies looking for funding. See [`npm -fund`](/commands/npm-fund) for details. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `install-links` - -* Default: true -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm install](/commands/npm-install) -* [npm outdated](/commands/npm-outdated) -* [npm shrinkwrap](/commands/npm-shrinkwrap) -* [npm registry](/using-npm/registry) -* [npm folders](/configuring-npm/folders) -* [npm ls](/commands/npm-ls) diff --git a/docs/content/commands/npm-version.md b/docs/content/commands/npm-version.md deleted file mode 100644 index 3c6b24d7d9ad8..0000000000000 --- a/docs/content/commands/npm-version.md +++ /dev/null @@ -1,265 +0,0 @@ ---- -title: npm-version -section: 1 -description: Bump a package version ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/version.js --> - -```bash -npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git] - -alias: verison -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/version.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `allow-same-version` - -* Default: false -* Type: Boolean - -Prevents throwing an error when `npm version` is used to set the new version -to the same value as the current version. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `commit-hooks` - -* Default: true -* Type: Boolean - -Run git commit hooks when using the `npm version` command. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `git-tag-version` - -* Default: true -* Type: Boolean - -Tag the commit when using the `npm version` command. Setting this to false -results in no commit being made at all. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `preid` - -* Default: "" -* Type: String - -The "prerelease identifier" to use as a prefix for the "prerelease" part of -a semver. Like the `rc` in `1.2.0-rc.8`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `sign-git-tag` - -* Default: false -* Type: Boolean - -If set to true, then the `npm version` command will tag the version using -`-s` to add a signature. - -Note that git requires you to have set up GPG keys in your git configs for -this to work properly. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces-update` - -* Default: true -* Type: Boolean - -If set to true, the npm cli will run an update after operations that may -possibly change the workspaces installed to the `node_modules` folder. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### Description - -Run this in a package directory to bump the version and write the new data -back to `package.json`, `package-lock.json`, and, if present, -`npm-shrinkwrap.json`. - -The `newversion` argument should be a valid semver string, a valid second -argument to [semver.inc](https://github.com/npm/node-semver#functions) (one -of `patch`, `minor`, `major`, `prepatch`, `preminor`, `premajor`, -`prerelease`), or `from-git`. In the second case, the existing version will -be incremented by 1 in the specified field. `from-git` will try to read -the latest git tag, and use that as the new npm version. - -If run in a git repo, it will also create a version commit and tag. This -behavior is controlled by `git-tag-version` (see below), and can be -disabled on the command line by running `npm --no-git-tag-version version`. -It will fail if the working directory is not clean, unless the `-f` or -`--force` flag is set. - -If supplied with `-m` or [`--message` config](/using-npm/config#message) option, -npm will use it as a commit message when creating a version commit. If the -`message` config contains `%s` then that will be replaced with the resulting -version number. For example: - -```bash -npm version patch -m "Upgrade to %s for reasons" -``` - -If the [`sign-git-tag` config](/using-npm/config#sign-git-tag) is set, then the -tag will be signed using the `-s` flag to git. Note that you must have a default -GPG key set up in your git config for this to work properly. For example: - -```bash -$ npm config set sign-git-tag true -$ npm version patch - -You need a passphrase to unlock the secret key for -user: "isaacs (http://blog.izs.me/) <i@izs.me>" -2048-bit RSA key, ID 6C481CF6, created 2010-08-31 - -Enter passphrase: -``` - -If `preversion`, `version`, or `postversion` are in the `scripts` property -of the package.json, they will be executed as part of running `npm -version`. - -The exact order of execution is as follows: - -1. Check to make sure the git working directory is clean before we get - started. Your scripts may add files to the commit in future steps. - This step is skipped if the `--force` flag is set. -2. Run the `preversion` script. These scripts have access to the old - `version` in package.json. A typical use would be running your full - test suite before deploying. Any files you want added to the commit - should be explicitly added using `git add`. -3. Bump `version` in `package.json` as requested (`patch`, `minor`, - `major`, etc). -4. Run the `version` script. These scripts have access to the new `version` - in package.json (so they can incorporate it into file headers in - generated files for example). Again, scripts should explicitly add - generated files to the commit using `git add`. -5. Commit and tag. -6. Run the `postversion` script. Use it to clean up the file system or - automatically push the commit and/or tag. - -Take the following example: - -```json -{ - "scripts": { - "preversion": "npm test", - "version": "npm run build && git add -A dist", - "postversion": "git push && git push --tags && rm -rf build/temp" - } -} -``` - -This runs all your tests and proceeds only if they pass. Then runs your -`build` script, and adds everything in the `dist` directory to the commit. -After the commit, it pushes the new commit and tag up to the server, and -deletes the `build/temp` directory. - -### See Also - -* [npm init](/commands/npm-init) -* [npm run-script](/commands/npm-run-script) -* [npm scripts](/using-npm/scripts) -* [package.json](/configuring-npm/package-json) -* [config](/using-npm/config) diff --git a/docs/content/commands/npm-whoami.md b/docs/content/commands/npm-whoami.md deleted file mode 100644 index 18416f633a1d8..0000000000000 --- a/docs/content/commands/npm-whoami.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: npm-whoami -section: 1 -description: Display npm username ---- - -### Synopsis - -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/whoami.js --> - -```bash -npm whoami -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/whoami.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> - -Note: This command is unaware of workspaces. - -### Description - -Display the npm username of the currently logged-in user. - -If logged into a registry that provides token-based authentication, then -connect to the `/-/whoami` registry endpoint to find the username -associated with the token, and print to standard output. - -If logged into a registry that uses Basic Auth, then simply print the -`username` portion of the authentication string. - -### Configuration - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See Also - -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [npm adduser](/commands/npm-adduser) diff --git a/docs/content/using-npm/config.md b/docs/content/using-npm/config.md deleted file mode 100644 index 79fc84d82804b..0000000000000 --- a/docs/content/using-npm/config.md +++ /dev/null @@ -1,2104 +0,0 @@ ---- -title: config -section: 7 -description: More than you probably want to know about npm configuration ---- - -### Description - -npm gets its configuration values from the following sources, sorted by priority: - -#### Command Line Flags - -Putting `--foo bar` on the command line sets the `foo` configuration -parameter to `"bar"`. A `--` argument tells the cli parser to stop -reading flags. Using `--flag` without specifying any value will set -the value to `true`. - -Example: `--flag1 --flag2` will set both configuration parameters -to `true`, while `--flag1 --flag2 bar` will set `flag1` to `true`, -and `flag2` to `bar`. Finally, `--flag1 --flag2 -- bar` will set -both configuration parameters to `true`, and the `bar` is taken -as a command argument. - -#### Environment Variables - -Any environment variables that start with `npm_config_` will be -interpreted as a configuration parameter. For example, putting -`npm_config_foo=bar` in your environment will set the `foo` -configuration parameter to `bar`. Any environment configurations that -are not given a value will be given the value of `true`. Config -values are case-insensitive, so `NPM_CONFIG_FOO=bar` will work the -same. However, please note that inside [`scripts`](/using-npm/scripts) -npm will set its own environment variables and Node will prefer -those lowercase versions over any uppercase ones that you might set. -For details see [this issue](https://github.com/npm/npm/issues/14528). - -Notice that you need to use underscores instead of dashes, so `--allow-same-version` -would become `npm_config_allow_same_version=true`. - -#### npmrc Files - -The four relevant files are: - -* per-project configuration file (`/path/to/my/project/.npmrc`) -* per-user configuration file (defaults to `$HOME/.npmrc`; configurable via CLI - option `--userconfig` or environment variable `$NPM_CONFIG_USERCONFIG`) -* global configuration file (defaults to `$PREFIX/etc/npmrc`; configurable via - CLI option `--globalconfig` or environment variable `$NPM_CONFIG_GLOBALCONFIG`) -* npm's built-in configuration file (`/path/to/npm/npmrc`) - -See [npmrc](/configuring-npm/npmrc) for more details. - -#### Default Configs - -Run `npm config ls -l` to see a set of configuration parameters that are -internal to npm, and are defaults if nothing else is specified. - -### Shorthands and Other CLI Niceties - -The following shorthands are parsed on the command-line: - -<!-- AUTOGENERATED CONFIG SHORTHANDS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -* `-a`: `--all` -* `--enjoy-by`: `--before` -* `-c`: `--call` -* `--desc`: `--description` -* `-f`: `--force` -* `-g`: `--global` -* `--iwr`: `--include-workspace-root` -* `-L`: `--location` -* `-d`: `--loglevel info` -* `-s`: `--loglevel silent` -* `--silent`: `--loglevel silent` -* `--ddd`: `--loglevel silly` -* `--dd`: `--loglevel verbose` -* `--verbose`: `--loglevel verbose` -* `-q`: `--loglevel warn` -* `--quiet`: `--loglevel warn` -* `-l`: `--long` -* `-m`: `--message` -* `--local`: `--no-global` -* `-n`: `--no-yes` -* `--no`: `--no-yes` -* `-p`: `--parseable` -* `--porcelain`: `--parseable` -* `-C`: `--prefix` -* `--readonly`: `--read-only` -* `--reg`: `--registry` -* `-S`: `--save` -* `-B`: `--save-bundle` -* `-D`: `--save-dev` -* `-E`: `--save-exact` -* `-O`: `--save-optional` -* `-P`: `--save-prod` -* `-?`: `--usage` -* `-h`: `--usage` -* `-H`: `--usage` -* `--help`: `--usage` -* `-v`: `--version` -* `-w`: `--workspace` -* `--ws`: `--workspaces` -* `-y`: `--yes` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -<!-- AUTOGENERATED CONFIG SHORTHANDS END --> - -If the specified configuration param resolves unambiguously to a known -configuration parameter, then it is expanded to that configuration -parameter. For example: - -```bash -npm ls --par -# same as: -npm ls --parseable -``` - -If multiple single-character shorthands are strung together, and the -resulting combination is unambiguously not some other configuration -param, then it is expanded to its various component pieces. For -example: - -```bash -npm ls -gpld -# same as: -npm ls --global --parseable --long --loglevel info -``` - -### Config Settings - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `_auth` - -* Default: null -* Type: null or String - -A basic-auth string to use when authenticating against the npm registry. -This will ONLY be used to authenticate against the npm registry. For other -registries you will need to scope it like "//other-registry.tld/:_auth" - -Warning: This should generally not be set via a command-line option. It is -safer to use a registry-provided authentication bearer token stored in the -~/.npmrc file by running `npm login`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `access` - -* Default: 'public' for new packages, existing packages it will not change the - current level -* Type: null, "restricted", or "public" - -If do not want your scoped package to be publicly viewable (and installable) -set `--access=restricted`. - -Unscoped packages can not be set to `restricted`. - -Note: This defaults to not changing the current access level for existing -packages. Specifying a value of `restricted` or `public` during publish will -change the access for an existing package the same way that `npm access set -status` would. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `all` - -* Default: false -* Type: Boolean - -When running `npm outdated` and `npm ls`, setting `--all` will show all -outdated or installed packages, rather than only those directly depended -upon by the current project. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `allow-same-version` - -* Default: false -* Type: Boolean - -Prevents throwing an error when `npm version` is used to set the new version -to the same value as the current version. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `audit` - -* Default: true -* Type: Boolean - -When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for [`npm audit`](/commands/npm-audit) for details on what is -submitted. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `audit-level` - -* Default: null -* Type: null, "info", "low", "moderate", "high", "critical", or "none" - -The minimum level of vulnerability for `npm audit` to exit with a non-zero -exit code. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `auth-type` - -* Default: "web" -* Type: "legacy" or "web" - -What authentication strategy to use with `login`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `before` - -* Default: null -* Type: null or Date - -If passed to `npm install`, will rebuild the npm tree such that only -versions that were available **on or before** the `--before` time get -installed. If there's no versions available for the current set of direct -dependencies, the command will error. - -If the requested version is a `dist-tag` and the given tag does not pass the -`--before` filter, the most recent version less than or equal to that tag -will be used. For example, `foo@latest` might install `foo@1.2` even though -`latest` is `2.0`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `bin-links` - -* Default: true -* Type: Boolean - -Tells npm to create symlinks (or `.cmd` shims on Windows) for package -executables. - -Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `browser` - -* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` -* Type: null, Boolean, or String - -The browser that is called by npm commands to open websites. - -Set to `false` to suppress browser behavior and instead print urls to -terminal. - -Set to `true` to use default system URL opener. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `ca` - -* Default: null -* Type: null or String (can be set multiple times) - -The Certificate Authority signing certificate that is trusted for SSL -connections to the registry. Values should be in PEM format (Windows calls -it "Base-64 encoded X.509 (.CER)") with newlines replaced by the string -"\n". For example: - -```ini -ca="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----" -``` - -Set to `null` to only allow "known" registrars, or to a specific CA cert to -trust only that specific signing authority. - -Multiple CAs can be trusted by specifying an array of certificates: - -```ini -ca[]="..." -ca[]="..." -``` - -See also the `strict-ssl` config. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `cache` - -* Default: Windows: `%LocalAppData%\npm-cache`, Posix: `~/.npm` -* Type: Path - -The location of npm's cache directory. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `cafile` - -* Default: null -* Type: Path - -A path to a file containing one or multiple Certificate Authority signing -certificates. Similar to the `ca` setting, but allows for multiple CA's, as -well as for the CA information to be stored in a file on disk. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `call` - -* Default: "" -* Type: String - -Optional companion option for `npm exec`, `npx` that allows for specifying a -custom command to be run along with the installed packages. - -```bash -npm exec --package yo --package generator-node --call "yo node" -``` - - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `cert` - -* Default: null -* Type: null or String - -A client certificate to pass when accessing the registry. Values should be -in PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with -newlines replaced by the string "\n". For example: - -```ini -cert="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----" -``` - -It is _not_ the path to a certificate file, though you can set a -registry-scoped "certfile" path like -"//other-registry.tld/:certfile=/path/to/cert.pem". - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `ci-name` - -* Default: The name of the current CI system, or `null` when not on a known CI - platform. -* Type: null or String - -The name of a continuous integration system. If not set explicitly, npm will -detect the current CI environment using the -[`@npmcli/ci-detect`](http://npm.im/@npmcli/ci-detect) module. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `cidr` - -* Default: null -* Type: null or String (can be set multiple times) - -This is a list of CIDR address to be used when configuring limited access -tokens with the `npm token create` command. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `color` - -* Default: true unless the NO_COLOR environ is set to something other than '0' -* Type: "always" or Boolean - -If false, never shows colors. If `"always"` then always shows colors. If -true, then only prints color codes for tty file descriptors. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `commit-hooks` - -* Default: true -* Type: Boolean - -Run git commit hooks when using the `npm version` command. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `depth` - -* Default: `Infinity` if `--all` is set, otherwise `1` -* Type: null or Number - -The depth to go when recursing packages for `npm ls`. - -If not set, `npm ls` will show only the immediate dependencies of the root -project. If `--all` is set, then npm will show all dependencies by default. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `description` - -* Default: true -* Type: Boolean - -Show the description in `npm search` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `diff` - -* Default: -* Type: String (can be set multiple times) - -Define arguments to compare in `npm diff`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `diff-dst-prefix` - -* Default: "b/" -* Type: String - -Destination prefix to be used in `npm diff` output. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `diff-ignore-all-space` - -* Default: false -* Type: Boolean - -Ignore whitespace when comparing lines in `npm diff`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `diff-name-only` - -* Default: false -* Type: Boolean - -Prints only filenames when using `npm diff`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `diff-no-prefix` - -* Default: false -* Type: Boolean - -Do not show any source or destination prefix in `npm diff` output. - -Note: this causes `npm diff` to ignore the `--diff-src-prefix` and -`--diff-dst-prefix` configs. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `diff-src-prefix` - -* Default: "a/" -* Type: String - -Source prefix to be used in `npm diff` output. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `diff-text` - -* Default: false -* Type: Boolean - -Treat all files as text in `npm diff`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `diff-unified` - -* Default: 3 -* Type: Number - -The number of lines of context to print in `npm diff`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `editor` - -* Default: The EDITOR or VISUAL environment variables, or 'notepad.exe' on - Windows, or 'vim' on Unix systems -* Type: String - -The command to run for `npm edit` and `npm config edit`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `engine-strict` - -* Default: false -* Type: Boolean - -If set to true, then npm will stubbornly refuse to install (or even consider -installing) any package that claims to not be compatible with the current -Node.js version. - -This can be overridden by setting the `--force` flag. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `fetch-retries` - -* Default: 2 -* Type: Number - -The "retries" config for the `retry` module to use when fetching packages -from the registry. - -npm will retry idempotent read requests to the registry in the case of -network failures or 5xx HTTP errors. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `fetch-retry-factor` - -* Default: 10 -* Type: Number - -The "factor" config for the `retry` module to use when fetching packages. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `fetch-retry-maxtimeout` - -* Default: 60000 (1 minute) -* Type: Number - -The "maxTimeout" config for the `retry` module to use when fetching -packages. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `fetch-retry-mintimeout` - -* Default: 10000 (10 seconds) -* Type: Number - -The "minTimeout" config for the `retry` module to use when fetching -packages. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `fetch-timeout` - -* Default: 300000 (5 minutes) -* Type: Number - -The maximum amount of time to wait for HTTP requests to complete. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `force` - -* Default: false -* Type: Boolean - -Removes various protections against unfortunate side effects, common -mistakes, unnecessary performance degradation, and malicious input. - -* Allow clobbering non-npm files in global installs. -* Allow the `npm version` command to work on an unclean git repository. -* Allow deleting the cache folder with `npm cache clean`. -* Allow installing packages that have an `engines` declaration requiring a - different version of npm. -* Allow installing packages that have an `engines` declaration requiring a - different version of `node`, even if `--engine-strict` is enabled. -* Allow `npm audit fix` to install modules outside your stated dependency - range (including SemVer-major changes). -* Allow unpublishing all versions of a published package. -* Allow conflicting peerDependencies to be installed in the root project. -* Implicitly set `--yes` during `npm init`. -* Allow clobbering existing values in `npm pkg` -* Allow unpublishing of entire packages (not just a single version). - -If you don't have a clear idea of what you want to do, it is strongly -recommended that you do not use this option! - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `foreground-scripts` - -* Default: false -* Type: Boolean - -Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process. - -Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `format-package-lock` - -* Default: true -* Type: Boolean - -Format `package-lock.json` or `npm-shrinkwrap.json` as a human readable -file. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `fund` - -* Default: true -* Type: Boolean - -When "true" displays the message at the end of each `npm install` -acknowledging the number of dependencies looking for funding. See [`npm -fund`](/commands/npm-fund) for details. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `git` - -* Default: "git" -* Type: String - -The command to use for git commands. If git is installed on the computer, -but is not in the `PATH`, then set this to the full path to the git binary. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `git-tag-version` - -* Default: true -* Type: Boolean - -Tag the commit when using the `npm version` command. Setting this to false -results in no commit being made at all. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `global-style` - -* Default: false -* Type: Boolean - -Causes npm to install the package into your local `node_modules` folder with -the same layout it uses with the global `node_modules` folder. Only your -direct dependencies will show in `node_modules` and everything they depend -on will be flattened in their `node_modules` folders. This obviously will -eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling` -will be preferred. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `globalconfig` - -* Default: The global --prefix setting plus 'etc/npmrc'. For example, - '/usr/local/etc/npmrc' -* Type: Path - -The config file to read for global config options. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `heading` - -* Default: "npm" -* Type: String - -The string that starts all the debugging log output. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `https-proxy` - -* Default: null -* Type: null or URL - -A proxy to use for outgoing https requests. If the `HTTPS_PROXY` or -`https_proxy` or `HTTP_PROXY` or `http_proxy` environment variables are set, -proxy settings will be honored by the underlying `make-fetch-happen` -library. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `if-present` - -* Default: false -* Type: Boolean - -If true, npm will not exit with an error code when `run-script` is invoked -for a script that isn't defined in the `scripts` section of `package.json`. -This option can be used when it's desirable to optionally run a script when -it's present and fail if the script fails. This is useful, for example, when -running scripts that may only apply for some builds in an otherwise generic -CI setup. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include` - -* Default: -* Type: "prod", "dev", "optional", or "peer" (can be set multiple times) - -Option that allows for defining which types of dependencies to install. - -This is the inverse of `--omit=<type>`. - -Dependency types specified in `--include` will not be omitted, regardless of -the order in which omit/include are specified on the command-line. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-staged` - -* Default: false -* Type: Boolean - -Allow installing "staged" published packages, as defined by [npm RFC PR -#92](https://github.com/npm/rfcs/pull/92). - -This is experimental, and not implemented by the npm public registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `init-author-email` - -* Default: "" -* Type: String - -The value `npm init` should use by default for the package author's email. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `init-author-name` - -* Default: "" -* Type: String - -The value `npm init` should use by default for the package author's name. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `init-author-url` - -* Default: "" -* Type: "" or URL - -The value `npm init` should use by default for the package author's -homepage. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `init-license` - -* Default: "ISC" -* Type: String - -The value `npm init` should use by default for the package license. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `init-module` - -* Default: "~/.npm-init.js" -* Type: Path - -A module that will be loaded by the `npm init` command. See the -documentation for the -[init-package-json](https://github.com/npm/init-package-json) module for -more information, or [npm init](/commands/npm-init). - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `init-version` - -* Default: "1.0.0" -* Type: SemVer string - -The value that `npm init` should use by default for the package version -number, if not already set in package.json. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `install-links` - -* Default: true -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `key` - -* Default: null -* Type: null or String - -A client key to pass when accessing the registry. Values should be in PEM -format with newlines replaced by the string "\n". For example: - -```ini -key="-----BEGIN PRIVATE KEY-----\nXXXX\nXXXX\n-----END PRIVATE KEY-----" -``` - -It is _not_ the path to a key file, though you can set a registry-scoped -"keyfile" path like "//other-registry.tld/:keyfile=/path/to/key.pem". - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `legacy-bundling` - -* Default: false -* Type: Boolean - -Causes npm to install the package such that versions of npm prior to 1.4, -such as the one included with node 0.8, can install the package. This -eliminates all automatic deduping. If used with `global-style` this option -will be preferred. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `legacy-peer-deps` - -* Default: false -* Type: Boolean - -Causes npm to completely ignore `peerDependencies` when building a package -tree, as in npm versions 3 through 6. - -If a package cannot be installed because of overly strict `peerDependencies` -that collide, it provides a way to move forward resolving the situation. - -This differs from `--omit=peer`, in that `--omit=peer` will avoid unpacking -`peerDependencies` on disk, but will still design a tree such that -`peerDependencies` _could_ be unpacked in a correct place. - -Use of `legacy-peer-deps` is not recommended, as it will not enforce the -`peerDependencies` contract that meta-dependencies may rely on. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `link` - -* Default: false -* Type: Boolean - -Used with `npm ls`, limiting output to only those packages that are linked. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `local-address` - -* Default: null -* Type: IP Address - -The IP address of the local interface to use when making connections to the -npm registry. Must be IPv4 in versions of Node prior to 0.12. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `location` - -* Default: "user" unless `--global` is passed, which will also set this value - to "global" -* Type: "global", "user", or "project" - -When passed to `npm config` this refers to which config file to use. - -When set to "global" mode, packages are installed into the `prefix` folder -instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `lockfile-version` - -* Default: Version 3 if no lockfile, auto-converting v1 lockfiles to v3, - otherwise maintain current lockfile version. -* Type: null, 1, 2, 3, "1", "2", or "3" - -Set the lockfile format version to be used in package-lock.json and -npm-shrinkwrap-json files. Possible options are: - -1: The lockfile version used by npm versions 5 and 6. Lacks some data that -is used during the install, resulting in slower and possibly less -deterministic installs. Prevents lockfile churn when interoperating with -older npm versions. - -2: The default lockfile version used by npm version 7 and 8. Includes both -the version 1 lockfile data and version 3 lockfile data, for maximum -determinism and interoperability, at the expense of more bytes on disk. - -3: Only the new lockfile information introduced in npm version 7. Smaller on -disk than lockfile version 2, but not interoperable with older npm versions. -Ideal if all users are on npm version 7 and higher. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `loglevel` - -* Default: "notice" -* Type: "silent", "error", "warn", "notice", "http", "timing", "info", - "verbose", or "silly" - -What level of logs to report. All logs are written to a debug log, with the -path to that file printed if the execution of a command fails. - -Any logs of a higher level than the setting are shown. The default is -"notice". - -See also the `foreground-scripts` config. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `logs-dir` - -* Default: A directory named `_logs` inside the cache -* Type: null or Path - -The location of npm's log directory. See [`npm logging`](/using-npm/logging) -for more information. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `logs-max` - -* Default: 10 -* Type: Number - -The maximum number of log files to store. - -If set to 0, no log files will be written for the current run. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `long` - -* Default: false -* Type: Boolean - -Show extended information in `ls`, `search`, and `help-search`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `maxsockets` - -* Default: 15 -* Type: Number - -The maximum number of connections to use per origin (protocol/host/port -combination). - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `message` - -* Default: "%s" -* Type: String - -Commit message which is used by `npm version` when creating version commit. - -Any "%s" in the message will be replaced with the version number. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `node-options` - -* Default: null -* Type: null or String - -Options to pass through to Node.js via the `NODE_OPTIONS` environment -variable. This does not impact how npm itself is executed but it does impact -how lifecycle scripts are called. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `node-version` - -* Default: Node.js `process.version` value -* Type: SemVer string - -The node version to use when checking a package's `engines` setting. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `noproxy` - -* Default: The value of the NO_PROXY environment variable -* Type: String (can be set multiple times) - -Domain extensions that should bypass any proxies. - -Also accepts a comma-delimited string. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `npm-version` - -* Default: Output of `npm --version` -* Type: SemVer string - -The npm version to use when checking a package's `engines` setting. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `offline` - -* Default: false -* Type: Boolean - -Force offline mode: no network requests will be done during install. To -allow the CLI to fill in missing cache data, see `--prefer-offline`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `omit-lockfile-registry-resolved` - -* Default: false -* Type: Boolean - -This option causes npm to create lock files without a `resolved` key for -registry dependencies. Subsequent installs will need to resolve tarball -endpoints with the configured registry, likely resulting in a longer install -time. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `pack-destination` - -* Default: "." -* Type: String - -Directory in which `npm pack` will save tarballs. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `package` - -* Default: -* Type: String (can be set multiple times) - -The package or packages to install for [`npm exec`](/commands/npm-exec) - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `package-lock` - -* Default: true -* Type: Boolean - -If set to false, then ignore `package-lock.json` files when installing. This -will also prevent _writing_ `package-lock.json` if `save` is true. - -This configuration does not affect `npm ci`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `package-lock-only` - -* Default: false -* Type: Boolean - -If set to true, the current operation will only use the `package-lock.json`, -ignoring `node_modules`. - -For `update` this means only the `package-lock.json` will be updated, -instead of checking `node_modules` and downloading dependencies. - -For `list` this means the output will be based on the tree described by the -`package-lock.json`, rather than the contents of `node_modules`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `parseable` - -* Default: false -* Type: Boolean - -Output parseable results from commands that write to standard output. For -`npm search`, this will be tab-separated table format. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `prefer-offline` - -* Default: false -* Type: Boolean - -If true, staleness checks for cached data will be bypassed, but missing data -will be requested from the server. To force full offline mode, use -`--offline`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `prefer-online` - -* Default: false -* Type: Boolean - -If true, staleness checks for cached data will be forced, making the CLI -look for updates immediately even for fresh package data. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `prefix` - -* Default: In global mode, the folder where the node executable is installed. - In local mode, the nearest parent folder containing either a package.json - file or a node_modules folder. -* Type: Path - -The location to install global items. If set on the command line, then it -forces non-global commands to run in the specified folder. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `preid` - -* Default: "" -* Type: String - -The "prerelease identifier" to use as a prefix for the "prerelease" part of -a semver. Like the `rc` in `1.2.0-rc.8`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `progress` - -* Default: `true` unless running in a known CI system -* Type: Boolean - -When set to `true`, npm will display a progress bar during time intensive -operations, if `process.stderr` is a TTY. - -Set to `false` to suppress the progress bar. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `proxy` - -* Default: null -* Type: null, false, or URL - -A proxy to use for outgoing http requests. If the `HTTP_PROXY` or -`http_proxy` environment variables are set, proxy settings will be honored -by the underlying `request` library. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `read-only` - -* Default: false -* Type: Boolean - -This is used to mark a token as unable to publish when configuring limited -access tokens with the `npm token create` command. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `rebuild-bundle` - -* Default: true -* Type: Boolean - -Rebuild bundled dependencies after installation. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `replace-registry-host` - -* Default: "npmjs" -* Type: "npmjs", "never", "always", or String - -Defines behavior for replacing the registry host in a lockfile with the -configured registry. - -The default behavior is to replace package dist URLs from the default -registry (https://registry.npmjs.org) to the configured registry. If set to -"never", then use the registry value. If set to "always", then replace the -registry host with the configured host every time. - -You may also specify a bare hostname (e.g., "registry.npmjs.org"). - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `save` - -* Default: `true` unless when using `npm update` where it defaults to `false` -* Type: Boolean - -Save installed packages to a `package.json` file as dependencies. - -When used with the `npm rm` command, removes the dependency from -`package.json`. - -Will also prevent writing to `package-lock.json` if set to `false`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `save-bundle` - -* Default: false -* Type: Boolean - -If a package would be saved at install time by the use of `--save`, -`--save-dev`, or `--save-optional`, then also put it in the -`bundleDependencies` list. - -Ignored if `--save-peer` is set, since peerDependencies cannot be bundled. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `save-dev` - -* Default: false -* Type: Boolean - -Save installed packages to a package.json file as `devDependencies`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `save-exact` - -* Default: false -* Type: Boolean - -Dependencies saved to package.json will be configured with an exact version -rather than using npm's default semver range operator. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `save-optional` - -* Default: false -* Type: Boolean - -Save installed packages to a package.json file as `optionalDependencies`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `save-peer` - -* Default: false -* Type: Boolean - -Save installed packages to a package.json file as `peerDependencies` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `save-prefix` - -* Default: "^" -* Type: String - -Configure how versions of packages installed to a package.json file via -`--save` or `--save-dev` get prefixed. - -For example if a package has version `1.2.3`, by default its version is set -to `^1.2.3` which allows minor upgrades for that package, but after `npm -config set save-prefix='~'` it would be set to `~1.2.3` which only allows -patch upgrades. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `save-prod` - -* Default: false -* Type: Boolean - -Save installed packages into `dependencies` specifically. This is useful if -a package already exists in `devDependencies` or `optionalDependencies`, but -you want to move it to be a non-optional production dependency. - -This is the default behavior if `--save` is true, and neither `--save-dev` -or `--save-optional` are true. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `scope` - -* Default: the scope of the current project, if any, or "" -* Type: String - -Associate an operation with a scope for a scoped registry. - -Useful when logging in to or out of a private registry: - -``` -# log in, linking the scope to the custom registry -npm login --scope=@mycorp --registry=https://registry.mycorp.com - -# log out, removing the link and the auth token -npm logout --scope=@mycorp -``` - -This will cause `@mycorp` to be mapped to the registry for future -installation of packages specified according to the pattern -`@mycorp/package`. - -This will also cause `npm init` to create a scoped package. - -``` -# accept all defaults, and create a package named "@foo/whatever", -# instead of just named "whatever" -npm init --scope=@foo --yes -``` - - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `script-shell` - -* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows -* Type: null or String - -The shell to use for scripts run with the `npm exec`, `npm run` and `npm -init <package-spec>` commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `searchexclude` - -* Default: "" -* Type: String - -Space-separated options that limit the results from search. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `searchlimit` - -* Default: 20 -* Type: Number - -Number of items to limit search results to. Will not apply at all to legacy -searches. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `searchopts` - -* Default: "" -* Type: String - -Space-separated options that are always passed to search. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `searchstaleness` - -* Default: 900 -* Type: Number - -The age of the cache, in seconds, before another registry request is made if -using legacy search endpoint. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `shell` - -* Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on - Windows -* Type: String - -The shell to run for the `npm explore` command. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `sign-git-commit` - -* Default: false -* Type: Boolean - -If set to true, then the `npm version` command will commit the new package -version using `-S` to add a signature. - -Note that git requires you to have set up GPG keys in your git configs for -this to work properly. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `sign-git-tag` - -* Default: false -* Type: Boolean - -If set to true, then the `npm version` command will tag the version using -`-s` to add a signature. - -Note that git requires you to have set up GPG keys in your git configs for -this to work properly. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `strict-peer-deps` - -* Default: false -* Type: Boolean - -If set to `true`, and `--legacy-peer-deps` is not set, then _any_ -conflicting `peerDependencies` will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships. - -By default, conflicting `peerDependencies` deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's `peerDependencies` object. - -When such and override is performed, a warning is printed, explaining the -conflict and the packages involved. If `--strict-peer-deps` is set, then -this warning is treated as a failure. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `strict-ssl` - -* Default: true -* Type: Boolean - -Whether or not to do SSL key validation when making requests to the registry -via https. - -See also the `ca` config. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `tag` - -* Default: "latest" -* Type: String - -If you ask npm to install a package and don't tell it a specific version, -then it will install the specified tag. - -Also the tag that is added to the package@version specified by the `npm tag` -command, if no explicit tag is given. - -When used by the `npm diff` command, this is the tag used to fetch the -tarball that will be compared with the local files by default. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `tag-version-prefix` - -* Default: "v" -* Type: String - -If set, alters the prefix used when tagging a new version when performing a -version increment using `npm-version`. To remove the prefix altogether, set -it to the empty string: `""`. - -Because other tools may rely on the convention that npm version tags look -like `v1.0.0`, _only use this property if it is absolutely necessary_. In -particular, use care when overriding this setting for public packages. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `timing` - -* Default: false -* Type: Boolean - -If true, writes timing information to a process specific json file in the -cache or `logs-dir`. The file name ends with `-timing.json`. - -You can quickly view it with this [json](https://npm.im/json) command line: -`cat ~/.npm/_logs/*-timing.json | npm exec -- json -g`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `umask` - -* Default: 0 -* Type: Octal numeric string in range 0000..0777 (0..511) - -The "umask" value to use when setting the file creation mode on files and -folders. - -Folders and executables are given a mode which is `0o777` masked against -this value. Other files are given a mode which is `0o666` masked against -this value. - -Note that the underlying system will _also_ apply its own umask value to -files and folders that are created, and npm does not circumvent this, but -rather adds the `--umask` config to it. - -Thus, the effective default umask value on most POSIX systems is 0o22, -meaning that folders and executables are created with a mode of 0o755 and -other files are created with a mode of 0o644. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `unicode` - -* Default: false on windows, true on mac/unix systems with a unicode locale, - as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables. -* Type: Boolean - -When set to true, npm uses unicode characters in the tree output. When -false, it uses ascii characters instead of unicode glyphs. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `update-notifier` - -* Default: true -* Type: Boolean - -Set to false to suppress the update notification when using an older version -of npm than the latest. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `usage` - -* Default: false -* Type: Boolean - -Show short usage output about the command specified. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `user-agent` - -* Default: "npm/{npm-version} node/{node-version} {platform} {arch} - workspaces/{workspaces} {ci}" -* Type: String - -Sets the User-Agent request header. The following fields are replaced with -their actual counterparts: - -* `{npm-version}` - The npm version in use -* `{node-version}` - The Node.js version in use -* `{platform}` - The value of `process.platform` -* `{arch}` - The value of `process.arch` -* `{workspaces}` - Set to `true` if the `workspaces` or `workspace` options - are set. -* `{ci}` - The value of the `ci-name` config, if set, prefixed with `ci/`, or - an empty string if `ci-name` is empty. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `userconfig` - -* Default: "~/.npmrc" -* Type: Path - -The location of user-level configuration settings. - -This may be overridden by the `npm_config_userconfig` environment variable -or the `--userconfig` command line option, but may _not_ be overridden by -settings in the `globalconfig` file. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `version` - -* Default: false -* Type: Boolean - -If true, output the npm version and exit successfully. - -Only relevant when specified explicitly on the command line. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `versions` - -* Default: false -* Type: Boolean - -If true, output the npm version as well as node's `process.versions` map and -the version in the current working directory's `package.json` file if one -exists, and exit successfully. - -Only relevant when specified explicitly on the command line. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `viewer` - -* Default: "man" on Posix, "browser" on Windows -* Type: String - -The program to use to view help content. - -Set to `"browser"` to view html help content in the default web browser. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `which` - -* Default: null -* Type: null or Number - -If there are multiple funding sources, which 1-indexed source URL to open. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces-update` - -* Default: true -* Type: Boolean - -If set to true, the npm cli will run an update after operations that may -possibly change the workspaces installed to the `node_modules` folder. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `yes` - -* Default: null -* Type: null or Boolean - -Automatically answer "yes" to any prompts that npm might print on the -command line. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `also` - -* Default: null -* Type: null, "dev", or "development" -* DEPRECATED: Please use --include=dev instead. - -When set to `dev` or `development`, this is an alias for `--include=dev`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `cache-max` - -* Default: Infinity -* Type: Number -* DEPRECATED: This option has been deprecated in favor of `--prefer-online` - -`--cache-max=0` is an alias for `--prefer-online` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `cache-min` - -* Default: 0 -* Type: Number -* DEPRECATED: This option has been deprecated in favor of `--prefer-offline`. - -`--cache-min=9999 (or bigger)` is an alias for `--prefer-offline`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `dev` - -* Default: false -* Type: Boolean -* DEPRECATED: Please use --include=dev instead. - -Alias for `--include=dev`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `init.author.email` - -* Default: "" -* Type: String -* DEPRECATED: Use `--init-author-email` instead. - -Alias for `--init-author-email` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `init.author.name` - -* Default: "" -* Type: String -* DEPRECATED: Use `--init-author-name` instead. - -Alias for `--init-author-name` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `init.author.url` - -* Default: "" -* Type: "" or URL -* DEPRECATED: Use `--init-author-url` instead. - -Alias for `--init-author-url` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `init.license` - -* Default: "ISC" -* Type: String -* DEPRECATED: Use `--init-license` instead. - -Alias for `--init-license` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `init.module` - -* Default: "~/.npm-init.js" -* Type: Path -* DEPRECATED: Use `--init-module` instead. - -Alias for `--init-module` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `init.version` - -* Default: "1.0.0" -* Type: SemVer string -* DEPRECATED: Use `--init-version` instead. - -Alias for `--init-version` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `only` - -* Default: null -* Type: null, "prod", or "production" -* DEPRECATED: Use `--omit=dev` to omit dev dependencies from the install. - -When set to `prod` or `production`, this is an alias for `--omit=dev`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `optional` - -* Default: null -* Type: null or Boolean -* DEPRECATED: Use `--omit=optional` to exclude optional dependencies, or - `--include=optional` to include them. - -Default value does install optional deps unless otherwise omitted. - -Alias for --include=optional or --omit=optional - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `production` - -* Default: null -* Type: null or Boolean -* DEPRECATED: Use `--omit=dev` instead. - -Alias for `--omit=dev` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `shrinkwrap` - -* Default: true -* Type: Boolean -* DEPRECATED: Use the --package-lock setting instead. - -Alias for --package-lock - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `tmp` - -* Default: The value returned by the Node.js `os.tmpdir()` method - <https://nodejs.org/api/os.html#os_os_tmpdir> -* Type: Path -* DEPRECATED: This setting is no longer used. npm stores temporary files in a - special location in the cache, and they are managed by - [`cacache`](http://npm.im/cacache). - -Historically, the location where temporary files were stored. No longer -relevant. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> - -### See also - -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [npm scripts](/using-npm/scripts) -* [npm folders](/configuring-npm/folders) -* [npm](/commands/npm) diff --git a/docs/lib/build.js b/docs/lib/build.js new file mode 100644 index 0000000000000..ecde55ab14755 --- /dev/null +++ b/docs/lib/build.js @@ -0,0 +1,128 @@ +const { join, dirname, basename, extname, sep, posix } = require('path') +const fs = require('fs/promises') +const ignoreWalk = require('ignore-walk') +const yaml = require('yaml') +const parseFrontMatter = require('front-matter') +const mdx = require('@mdx-js/mdx') + +const checkNav = require('./check-nav.js') +const { DOC_EXT, ...transform } = require('./index.js') + +const mkDirs = async (paths) => { + const uniqDirs = [...new Set(paths.map((p) => dirname(p)))] + return Promise.all(uniqDirs.map((d) => fs.mkdir(d, { recursive: true }))) +} + +const rmAll = (...dirs) => Promise.all(dirs.map((d) => fs.rm(d, { recursive: true, force: true }))) +const readDocs = (path) => ignoreWalk({ path }).then(ps => ps.filter(p => extname(p) === DOC_EXT)) +const readMd = (path) => fs.readFile(path, 'utf-8').then(parseFrontMatter) +const readHtml = (path) => fs.readFile(path, 'utf-8') +const readYaml = (path) => fs.readFile(path, 'utf-8').then(yaml.parse) +const makeTransforms = (...args) => (src, trs) => trs.reduce((acc, tr) => tr(acc, ...args), src) + +const run = async ({ content, verify, template, nav, man, html, md }) => { + const [contentPaths, templateFile, navFile] = await Promise.all([ + readDocs(content), + readHtml(template), + readYaml(nav), + rmAll(man, html, md), + ]) + + const sources = await Promise.all(contentPaths.map(async (childPath) => { + const name = basename(childPath, DOC_EXT) + const fullPath = join(content, childPath) + const fullName = join(dirname(childPath), name).split(sep).join(posix.sep) + + const { body, attributes: data, frontmatter } = await readMd(fullPath) + + return { + body, + data, + frontmatter, + name, + fullName, + childPath, + } + })) + + const entriesByType = sources.reduce((acc, { + body, + data, + frontmatter, + name, + childPath, + fullName, + }) => { + const applyTransforms = makeTransforms({ + path: childPath, + data: { + ...data, + github_repo: 'npm/cli', + github_branch: 'latest', + github_path: 'docs/content', + }, + frontmatter, + template: templateFile, + }) + + const transformedSrc = applyTransforms(body, [ + transform.version, + ...(fullName.startsWith('commands/') + ? [transform.usage, transform.params] + : []), + ...(fullName === 'using-npm/config' + ? [transform.shorthands, transform.config] + : []), + ]) + + if (data.section) { + const manSrc = applyTransforms(transformedSrc, [ + transform.helpLinks, + transform.man, + ]) + const manPaths = [ + name, + fullName === 'configuring-npm/package-json' && 'npm-json', + fullName === 'configuring-npm/folders' && 'npm-global', + ].filter(Boolean).map(p => applyTransforms(p, [transform.manPath])) + + acc.man.push(...manPaths.map((manPath) => ({ + path: manPath, + fullPath: join(man, manPath), + src: manSrc, + }))) + } + + acc.html.push({ + path: `${fullName}.html`, + fullPath: join(html, `${fullName}.html`), + src: applyTransforms(transformedSrc, [transform.html]), + }) + + acc.md.push({ + path: childPath, + fullPath: join(md, childPath), + src: applyTransforms(transformedSrc, [transform.md]), + }) + return acc + }, { man: [], html: [], md: [] }) + + const docEntries = Object.values(entriesByType).flat() + await mkDirs(docEntries.map(({ fullPath }) => fullPath)) + await Promise.all(docEntries.map(({ fullPath, src }) => fs.writeFile(fullPath, src, 'utf-8'))) + + checkNav(navFile, entriesByType.md.map(({ path }) => path), DOC_EXT) + + if (verify) { + await Promise.all(entriesByType.md.map(async ({ src }) => { + // Test that mdx can parse this markdown file. We don't actually + // use the output, it's just to ensure that the upstream docs + // site (docs.npmjs.com) can parse it when this file gets there. + await mdx(src, { skipExport: true }) + })) + } + + return docEntries +} + +module.exports = run diff --git a/docs/lib/check-nav.js b/docs/lib/check-nav.js new file mode 100644 index 0000000000000..ac2c01038f438 --- /dev/null +++ b/docs/lib/check-nav.js @@ -0,0 +1,62 @@ +const { basename, join, dirname, sep, posix } = require('path') + +function ensureNavigationComplete (nav, fsPaths, ext) { + const navPaths = getNavigationPaths(nav) + const unmatchedNav = {} + const unmatchedFs = {} + + for (const navPath of navPaths) { + // every nav path starts as an unmatched fs path + unmatchedFs[navPath] = true + } + + for (const path of fsPaths) { + const key = posix.sep + join(dirname(path), basename(path, ext)).split(sep).join(posix.sep) + // for each fs path, if it exists in the nav we + // unmark it as unmatched on the filesystem. + // otherwise its unmarked in the nav + if (unmatchedFs[key]) { + delete unmatchedFs[key] + } else { + unmatchedNav[key] = true + } + } + + const toKeys = (v) => Object.keys(v).sort().map((p) => p.split(posix.sep).join(sep)) + const missingNav = toKeys(unmatchedNav) + const missingFs = toKeys(unmatchedFs) + + const errors = [] + + if (missingNav.length) { + errors.push('The following path(s) exist on disk but are not present in nav.yml:') + errors.push(...missingNav.map(n => ` ${n}`)) + } + + if (missingFs.length) { + errors.push('The following path(s) exist in nav.yml but are not present on disk:') + errors.push(...missingFs.map(n => ` ${n}`)) + } + + if (errors.length) { + errors.unshift('Documentation navigation (nav.yml) does not match filesystem.') + errors.push('Update nav.yml to ensure that all files are listed in the appropriate place.') + throw new Error(errors.join('\n')) + } +} + +function getNavigationPaths (entries) { + const paths = [] + + for (const entry of entries) { + if (entry.children) { + paths.push(...getNavigationPaths(entry.children)) + } else { + paths.push(entry.url) + } + } + + return paths +} + +module.exports = ensureNavigationComplete diff --git a/docs/lib/config.json b/docs/lib/config.json deleted file mode 100644 index c9f183e4e787c..0000000000000 --- a/docs/lib/config.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "github_repo": "npm/cli", - "github_branch": "latest", - "github_path": "docs/content" -} diff --git a/docs/content/commands/npm-access.md b/docs/lib/content/commands/npm-access.md similarity index 57% rename from docs/content/commands/npm-access.md rename to docs/lib/content/commands/npm-access.md index bc481eac16336..819fe9ad323bb 100644 --- a/docs/content/commands/npm-access.md +++ b/docs/lib/content/commands/npm-access.md @@ -6,24 +6,7 @@ description: Set access level on published packages ### Synopsis -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/access.js --> - -```bash -npm access list packages [<user>|<scope>|<scope:team> [<package>] -npm access list collaborators [<package> [<user>]] -npm access get status [<package>] -npm access set status=public|private [<package>] -npm access set mfa=none|publish|automation [<package>] -npm access grant <read-only|read-write> <scope:team> [<package>] -npm access revoke <scope:team> [<package>] -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/access.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> ### Description @@ -86,49 +69,7 @@ Management of teams and team memberships is done with the `npm team` command. ### Configuration -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> ### See Also diff --git a/docs/lib/content/commands/npm-adduser.md b/docs/lib/content/commands/npm-adduser.md new file mode 100644 index 0000000000000..fa957cba47d02 --- /dev/null +++ b/docs/lib/content/commands/npm-adduser.md @@ -0,0 +1,34 @@ +--- +title: npm-adduser +section: 1 +description: Add a registry user account +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +Note: This command is unaware of workspaces. + +### Description + +Create a new user in the specified registry, and save the credentials to +the `.npmrc` file. If no registry is specified, the default registry +will be used (see [`registry`](/using-npm/registry)). + +When using `legacy` for your `auth-type`, the username, password, and +email are read in from prompts. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm registry](/using-npm/registry) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) +* [npm owner](/commands/npm-owner) +* [npm whoami](/commands/npm-whoami) +* [npm token](/commands/npm-token) +* [npm profile](/commands/npm-profile) diff --git a/docs/content/commands/npm-audit.md b/docs/lib/content/commands/npm-audit.md similarity index 52% rename from docs/content/commands/npm-audit.md rename to docs/lib/content/commands/npm-audit.md index e08aace0163c1..7a39b34d875be 100644 --- a/docs/content/commands/npm-audit.md +++ b/docs/lib/content/commands/npm-audit.md @@ -6,18 +6,7 @@ description: Run a security audit ### Synopsis -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/audit.js --> - -```bash -npm audit [fix|signatures] -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/audit.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> ### Description @@ -247,223 +236,7 @@ $ npm audit --audit-level=moderate ### Configuration -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `audit-level` - -* Default: null -* Type: null, "info", "low", "moderate", "high", "critical", or "none" - -The minimum level of vulnerability for `npm audit` to exit with a non-zero -exit code. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `force` - -* Default: false -* Type: Boolean - -Removes various protections against unfortunate side effects, common -mistakes, unnecessary performance degradation, and malicious input. - -* Allow clobbering non-npm files in global installs. -* Allow the `npm version` command to work on an unclean git repository. -* Allow deleting the cache folder with `npm cache clean`. -* Allow installing packages that have an `engines` declaration requiring a - different version of npm. -* Allow installing packages that have an `engines` declaration requiring a - different version of `node`, even if `--engine-strict` is enabled. -* Allow `npm audit fix` to install modules outside your stated dependency - range (including SemVer-major changes). -* Allow unpublishing all versions of a published package. -* Allow conflicting peerDependencies to be installed in the root project. -* Implicitly set `--yes` during `npm init`. -* Allow clobbering existing values in `npm pkg` -* Allow unpublishing of entire packages (not just a single version). - -If you don't have a clear idea of what you want to do, it is strongly -recommended that you do not use this option! - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `package-lock-only` - -* Default: false -* Type: Boolean - -If set to true, the current operation will only use the `package-lock.json`, -ignoring `node_modules`. - -For `update` this means only the `package-lock.json` will be updated, -instead of checking `node_modules` and downloading dependencies. - -For `list` this means the output will be based on the tree described by the -`package-lock.json`, rather than the contents of `node_modules`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `foreground-scripts` - -* Default: false -* Type: Boolean - -Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process. - -Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `install-links` - -* Default: true -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> ### See Also diff --git a/docs/lib/content/commands/npm-bugs.md b/docs/lib/content/commands/npm-bugs.md new file mode 100644 index 0000000000000..4cf90510d7124 --- /dev/null +++ b/docs/lib/content/commands/npm-bugs.md @@ -0,0 +1,31 @@ +--- +title: npm-bugs +section: 1 +description: Report bugs for a package in a web browser +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +This command tries to guess at the likely location of a package's bug +tracker URL or the `mailto` URL of the support email, and then tries to +open it using the [`--browser` config](/using-npm/config#browser) param. If no +package name is provided, it will search for a `package.json` in the current +folder and use the `name` property. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm docs](/commands/npm-docs) +* [npm view](/commands/npm-view) +* [npm publish](/commands/npm-publish) +* [npm registry](/using-npm/registry) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) +* [package.json](/configuring-npm/package-json) diff --git a/docs/content/commands/npm-cache.md b/docs/lib/content/commands/npm-cache.md similarity index 76% rename from docs/content/commands/npm-cache.md rename to docs/lib/content/commands/npm-cache.md index 68c4faff57582..2aedc546b64a7 100644 --- a/docs/content/commands/npm-cache.md +++ b/docs/lib/content/commands/npm-cache.md @@ -6,21 +6,7 @@ description: Manipulates packages cache ### Synopsis -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/cache.js --> - -```bash -npm cache add <package-spec> -npm cache clean [<key>] -npm cache ls [<name>@<version>] -npm cache verify -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/cache.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> Note: This command is unaware of workspaces. @@ -79,20 +65,7 @@ verify`. ### Configuration -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `cache` - -* Default: Windows: `%LocalAppData%\npm-cache`, Posix: `~/.npm` -* Type: Path - -The location of npm's cache directory. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> ### See Also diff --git a/docs/lib/content/commands/npm-ci.md b/docs/lib/content/commands/npm-ci.md new file mode 100644 index 0000000000000..d26691c3c29c6 --- /dev/null +++ b/docs/lib/content/commands/npm-ci.md @@ -0,0 +1,76 @@ +--- +title: npm-ci +section: 1 +description: Clean install a project +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +This command is similar to [`npm install`](/commands/npm-install), except +it's meant to be used in automated environments such as test platforms, +continuous integration, and deployment -- or any situation where you want +to make sure you're doing a clean install of your dependencies. + +The main differences between using `npm install` and `npm ci` are: + +* The project **must** have an existing `package-lock.json` or + `npm-shrinkwrap.json`. +* If dependencies in the package lock do not match those in `package.json`, + `npm ci` will exit with an error, instead of updating the package lock. +* `npm ci` can only install entire projects at a time: individual + dependencies cannot be added with this command. +* If a `node_modules` is already present, it will be automatically removed + before `npm ci` begins its install. +* It will never write to `package.json` or any of the package-locks: + installs are essentially frozen. + +NOTE: If you create your `package-lock.json` file by running `npm install` +with flags that can affect the shape of your dependency tree, such as +`--legacy-peer-deps` or `--install-links`, you _must_ provide the same +flags to `npm ci` or you are likely to encounter errors. An easy way to do +this is to run, for example, +`npm config set legacy-peer-deps=true --location=project` and commit the +`.npmrc` file to your repo. + +### Example + +Make sure you have a package-lock and an up-to-date install: + +```bash +$ cd ./my/npm/project +$ npm install +added 154 packages in 10s +$ ls | grep package-lock +``` + +Run `npm ci` in that project + +```bash +$ npm ci +added 154 packages in 5s +``` + +Configure Travis CI to build using `npm ci` instead of `npm install`: + +```bash +# .travis.yml +install: +- npm ci +# keep the npm cache around to speed up installs +cache: + directories: + - "$HOME/.npm" +``` + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm install](/commands/npm-install) +* [package-lock.json](/configuring-npm/package-lock-json) diff --git a/docs/content/commands/npm-completion.md b/docs/lib/content/commands/npm-completion.md similarity index 73% rename from docs/content/commands/npm-completion.md rename to docs/lib/content/commands/npm-completion.md index d73a98f2e50f7..3a5bae3bc9a3a 100644 --- a/docs/content/commands/npm-completion.md +++ b/docs/lib/content/commands/npm-completion.md @@ -6,18 +6,7 @@ description: Tab Completion for npm ### Synopsis -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/completion.js --> - -```bash -npm completion -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/completion.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> Note: This command is unaware of workspaces. diff --git a/docs/lib/content/commands/npm-config.md b/docs/lib/content/commands/npm-config.md new file mode 100644 index 0000000000000..270858f8bff8f --- /dev/null +++ b/docs/lib/content/commands/npm-config.md @@ -0,0 +1,96 @@ +--- +title: npm-config +section: 1 +description: Manage the npm configuration files +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +Note: This command is unaware of workspaces. + +### Description + +npm gets its config settings from the command line, environment +variables, `npmrc` files, and in some cases, the `package.json` file. + +See [npmrc](/configuring-npm/npmrc) for more information about the npmrc +files. + +See [config](/using-npm/config) for a more thorough explanation of the +mechanisms involved, and a full list of config options available. + +The `npm config` command can be used to update and edit the contents +of the user and global npmrc files. + +### Sub-commands + +Config supports the following sub-commands: + +#### set + +```bash +npm config set key=value [key=value...] +npm set key=value [key=value...] +``` + +Sets each of the config keys to the value provided. + +If value is omitted, then it sets it to an empty string. + +Note: for backwards compatibility, `npm config set key value` is supported +as an alias for `npm config set key=value`. + +#### get + +```bash +npm config get [key ...] +npm get [key ...] +``` + +Echo the config value(s) to stdout. + +If multiple keys are provided, then the values will be prefixed with the +key names. + +If no keys are provided, then this command behaves the same as `npm config +list`. + +#### list + +```bash +npm config list +``` + +Show all the config settings. Use `-l` to also show defaults. Use `--json` +to show the settings in json format. + +#### delete + +```bash +npm config delete key [key ...] +``` + +Deletes the specified keys from all configuration files. + +#### edit + +```bash +npm config edit +``` + +Opens the config file in an editor. Use the `--global` flag to edit the +global config. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm folders](/configuring-npm/folders) +* [npm config](/commands/npm-config) +* [package.json](/configuring-npm/package-json) +* [npmrc](/configuring-npm/npmrc) +* [npm](/commands/npm) diff --git a/docs/lib/content/commands/npm-dedupe.md b/docs/lib/content/commands/npm-dedupe.md new file mode 100644 index 0000000000000..877a130c1431c --- /dev/null +++ b/docs/lib/content/commands/npm-dedupe.md @@ -0,0 +1,83 @@ +--- +title: npm-dedupe +section: 1 +description: Reduce duplication in the package tree +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +Searches the local package tree and attempts to simplify the overall +structure by moving dependencies further up the tree, where they can +be more effectively shared by multiple dependent packages. + +For example, consider this dependency graph: + +``` +a ++-- b <-- depends on c@1.0.x +| `-- c@1.0.3 +`-- d <-- depends on c@~1.0.9 + `-- c@1.0.10 +``` + +In this case, `npm dedupe` will transform the tree to: + +```bash +a ++-- b ++-- d +`-- c@1.0.10 +``` + +Because of the hierarchical nature of node's module lookup, b and d +will both get their dependency met by the single c package at the root +level of the tree. + +In some cases, you may have a dependency graph like this: + +``` +a ++-- b <-- depends on c@1.0.x ++-- c@1.0.3 +`-- d <-- depends on c@1.x + `-- c@1.9.9 +``` + +During the installation process, the `c@1.0.3` dependency for `b` was +placed in the root of the tree. Though `d`'s dependency on `c@1.x` could +have been satisfied by `c@1.0.3`, the newer `c@1.9.0` dependency was used, +because npm favors updates by default, even when doing so causes +duplication. + +Running `npm dedupe` will cause npm to note the duplication and +re-evaluate, deleting the nested `c` module, because the one in the root is +sufficient. + +To prefer deduplication over novelty during the installation process, run +`npm install --prefer-dedupe` or `npm config set prefer-dedupe true`. + +Arguments are ignored. Dedupe always acts on the entire tree. + +Note that this operation transforms the dependency tree, but will never +result in new modules being installed. + +Using `npm find-dupes` will run the command in `--dry-run` mode. + +Note: `npm dedupe` will never update the semver values of direct +dependencies in your project `package.json`, if you want to update +values in `package.json` you can run: `npm update --save` instead. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm find-dupes](/commands/npm-find-dupes) +* [npm ls](/commands/npm-ls) +* [npm update](/commands/npm-update) +* [npm install](/commands/npm-install) diff --git a/docs/content/commands/npm-deprecate.md b/docs/lib/content/commands/npm-deprecate.md similarity index 51% rename from docs/content/commands/npm-deprecate.md rename to docs/lib/content/commands/npm-deprecate.md index 20f65140fc735..3cf02acb7f05a 100644 --- a/docs/content/commands/npm-deprecate.md +++ b/docs/lib/content/commands/npm-deprecate.md @@ -6,18 +6,7 @@ description: Deprecate a version of a package ### Synopsis -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/deprecate.js --> - -```bash -npm deprecate <package-spec> <message> -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/deprecate.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> Note: This command is unaware of workspaces. @@ -51,34 +40,7 @@ format an empty string. ### Configuration -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> ### See Also diff --git a/docs/lib/content/commands/npm-diff.md b/docs/lib/content/commands/npm-diff.md new file mode 100644 index 0000000000000..5a10841a9c2d8 --- /dev/null +++ b/docs/lib/content/commands/npm-diff.md @@ -0,0 +1,156 @@ +--- +title: npm-diff +section: 1 +description: The registry diff command +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +Similar to its `git diff` counterpart, this command will print diff patches +of files for packages published to the npm registry. + +* `npm diff --diff=<spec-a> --diff=<spec-b>` + + Compares two package versions using their registry specifiers, e.g: + `npm diff --diff=pkg@1.0.0 --diff=pkg@^2.0.0`. It's also possible to + compare across forks of any package, + e.g: `npm diff --diff=pkg@1.0.0 --diff=pkg-fork@1.0.0`. + + Any valid spec can be used, so that it's also possible to compare + directories or git repositories, + e.g: `npm diff --diff=pkg@latest --diff=./packages/pkg` + + Here's an example comparing two different versions of a package named + `abbrev` from the registry: + + ```bash + npm diff --diff=abbrev@1.1.0 --diff=abbrev@1.1.1 + ``` + + On success, output looks like: + + ```bash + diff --git a/package.json b/package.json + index v1.1.0..v1.1.1 100644 + --- a/package.json + +++ b/package.json + @@ -1,6 +1,6 @@ + { + "name": "abbrev", + - "version": "1.1.0", + + "version": "1.1.1", + "description": "Like ruby's abbrev module, but in js", + "author": "Isaac Z. Schlueter <i@izs.me>", + "main": "abbrev.js", + ``` + + Given the flexible nature of npm specs, you can also target local + directories or git repos just like when using `npm install`: + + ```bash + npm diff --diff=https://github.com/npm/libnpmdiff --diff=./local-path + ``` + + In the example above we can compare the contents from the package installed + from the git repo at `github.com/npm/libnpmdiff` with the contents of the + `./local-path` that contains a valid package, such as a modified copy of + the original. + +* `npm diff` (in a package directory, no arguments): + + If the package is published to the registry, `npm diff` will fetch the + tarball version tagged as `latest` (this value can be configured using the + `tag` option) and proceed to compare the contents of files present in that + tarball, with the current files in your local file system. + + This workflow provides a handy way for package authors to see what + package-tracked files have been changed in comparison with the latest + published version of that package. + +* `npm diff --diff=<pkg-name>` (in a package directory): + + When using a single package name (with no version or tag specifier) as an + argument, `npm diff` will work in a similar way to + [`npm-outdated`](npm-outdated) and reach for the registry to figure out + what current published version of the package named `<pkg-name>` + will satisfy its dependent declared semver-range. Once that specific + version is known `npm diff` will print diff patches comparing the + current version of `<pkg-name>` found in the local file system with + that specific version returned by the registry. + + Given a package named `abbrev` that is currently installed: + + ```bash + npm diff --diff=abbrev + ``` + + That will request from the registry its most up to date version and + will print a diff output comparing the currently installed version to this + newer one if the version numbers are not the same. + +* `npm diff --diff=<spec-a>` (in a package directory): + + Similar to using only a single package name, it's also possible to declare + a full registry specifier version if you wish to compare the local version + of an installed package with the specific version/tag/semver-range provided + in `<spec-a>`. + + An example: assuming `pkg@1.0.0` is installed in the current `node_modules` + folder, running: + + ```bash + npm diff --diff=pkg@2.0.0 + ``` + + It will effectively be an alias to + `npm diff --diff=pkg@1.0.0 --diff=pkg@2.0.0`. + +* `npm diff --diff=<semver-a> [--diff=<semver-b>]` (in a package directory): + + Using `npm diff` along with semver-valid version numbers is a shorthand + to compare different versions of the current package. + + It needs to be run from a package directory, such that for a package named + `pkg` running `npm diff --diff=1.0.0 --diff=1.0.1` is the same as running + `npm diff --diff=pkg@1.0.0 --diff=pkg@1.0.1`. + + If only a single argument `<version-a>` is provided, then the current local + file system is going to be compared against that version. + + Here's an example comparing two specific versions (published to the + configured registry) of the current project directory: + + ```bash + npm diff --diff=1.0.0 --diff=1.1.0 + ``` + +Note that tag names are not valid `--diff` argument values, if you wish to +compare to a published tag, you must use the `pkg@tagname` syntax. + +#### Filtering files + +It's possible to also specify positional arguments using file names or globs +pattern matching in order to limit the result of diff patches to only a subset +of files for a given package, e.g: + + ```bash + npm diff --diff=pkg@2 ./lib/ CHANGELOG.md + ``` + +In the example above the diff output is only going to print contents of files +located within the folder `./lib/` and changed lines of code within the +`CHANGELOG.md` file. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> +## See Also + +* [npm outdated](/commands/npm-outdated) +* [npm install](/commands/npm-install) +* [npm config](/commands/npm-config) +* [npm registry](/using-npm/registry) diff --git a/docs/content/commands/npm-dist-tag.md b/docs/lib/content/commands/npm-dist-tag.md similarity index 54% rename from docs/content/commands/npm-dist-tag.md rename to docs/lib/content/commands/npm-dist-tag.md index e505fba36414b..34781ebe6777d 100644 --- a/docs/content/commands/npm-dist-tag.md +++ b/docs/lib/content/commands/npm-dist-tag.md @@ -6,22 +6,7 @@ description: Modify package distribution tags ### Synopsis -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/dist-tag.js --> - -```bash -npm dist-tag add <package-spec (with version)> [<tag>] -npm dist-tag rm <package-spec> <tag> -npm dist-tag ls [<package-spec>] - -alias: dist-tags -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/dist-tag.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> ### Description @@ -99,72 +84,7 @@ not begin with a number or the letter `v`. ### Configuration -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> ### See Also diff --git a/docs/lib/content/commands/npm-docs.md b/docs/lib/content/commands/npm-docs.md new file mode 100644 index 0000000000000..140d23dfa7e86 --- /dev/null +++ b/docs/lib/content/commands/npm-docs.md @@ -0,0 +1,30 @@ +--- +title: npm-docs +section: 1 +description: Open documentation for a package in a web browser +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +This command tries to guess at the likely location of a package's +documentation URL, and then tries to open it using the +[`--browser` config](/using-npm/config#browser) param. You can pass multiple +package names at once. If no package name is provided, it will search for a +`package.json` in the current folder and use the `name` property. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm view](/commands/npm-view) +* [npm publish](/commands/npm-publish) +* [npm registry](/using-npm/registry) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) +* [package.json](/configuring-npm/package-json) diff --git a/docs/content/commands/npm-doctor.md b/docs/lib/content/commands/npm-doctor.md similarity index 86% rename from docs/content/commands/npm-doctor.md rename to docs/lib/content/commands/npm-doctor.md index 7fb63bab16e83..3abb1e29a24e2 100644 --- a/docs/content/commands/npm-doctor.md +++ b/docs/lib/content/commands/npm-doctor.md @@ -6,18 +6,7 @@ description: Check your npm environment ### Synopsis -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/doctor.js --> - -```bash -npm doctor -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/doctor.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> Note: This command is unaware of workspaces. @@ -113,20 +102,7 @@ reset the cache. ### Configuration -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> ### See Also diff --git a/docs/content/commands/npm-edit.md b/docs/lib/content/commands/npm-edit.md similarity index 50% rename from docs/content/commands/npm-edit.md rename to docs/lib/content/commands/npm-edit.md index 39fc49592c571..6de2b6e8542e1 100644 --- a/docs/content/commands/npm-edit.md +++ b/docs/lib/content/commands/npm-edit.md @@ -6,18 +6,7 @@ description: Edit an installed package ### Synopsis -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/edit.js --> - -```bash -npm edit <pkg>[/<subpkg>...] -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/edit.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> Note: This command is unaware of workspaces. @@ -36,21 +25,7 @@ changes to your locally installed copy. ### Configuration -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `editor` - -* Default: The EDITOR or VISUAL environment variables, or 'notepad.exe' on - Windows, or 'vim' on Unix systems -* Type: String - -The command to run for `npm edit` and `npm config edit`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> ### See Also diff --git a/docs/content/commands/npm-exec.md b/docs/lib/content/commands/npm-exec.md similarity index 72% rename from docs/content/commands/npm-exec.md rename to docs/lib/content/commands/npm-exec.md index 7a66fbc27eb08..f156a9c8382ee 100644 --- a/docs/content/commands/npm-exec.md +++ b/docs/lib/content/commands/npm-exec.md @@ -6,23 +6,7 @@ description: Run a command from a local or remote npm package ### Synopsis -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/exec.js --> - -```bash -npm exec -- <pkg>[@<version>] [args...] -npm exec --package=<pkg>[@<version>] -- <cmd> [args...] -npm exec -c '<cmd> [args...]' -npm exec --package=foo -c '<cmd> [args...]' - -alias: x -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/exec.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> ### Description @@ -119,98 +103,7 @@ $ npm exec -- foo@latest bar --package=@npmcli/foo ### Configuration -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `package` - -* Default: -* Type: String (can be set multiple times) - -The package or packages to install for [`npm exec`](/commands/npm-exec) - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `call` - -* Default: "" -* Type: String - -Optional companion option for `npm exec`, `npx` that allows for specifying a -custom command to be run along with the installed packages. - -```bash -npm exec --package yo --package generator-node --call "yo node" -``` - - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> ### Examples diff --git a/docs/content/commands/npm-explain.md b/docs/lib/content/commands/npm-explain.md similarity index 50% rename from docs/content/commands/npm-explain.md rename to docs/lib/content/commands/npm-explain.md index 5ba2fe8206ba1..8de05c92f8b2c 100644 --- a/docs/content/commands/npm-explain.md +++ b/docs/lib/content/commands/npm-explain.md @@ -6,20 +6,7 @@ description: Explain installed packages ### Synopsis -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/explain.js --> - -```bash -npm explain <package-spec> - -alias: why -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/explain.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> ### Description @@ -64,50 +51,7 @@ node_modules/nyc/node_modules/find-up ``` ### Configuration -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> ### See Also diff --git a/docs/content/commands/npm-explore.md b/docs/lib/content/commands/npm-explore.md similarity index 50% rename from docs/content/commands/npm-explore.md rename to docs/lib/content/commands/npm-explore.md index 90753c7e09199..7557d9ae74adb 100644 --- a/docs/content/commands/npm-explore.md +++ b/docs/lib/content/commands/npm-explore.md @@ -6,18 +6,7 @@ description: Browse an installed package ### Synopsis -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/explore.js --> - -```bash -npm explore <pkg> [ -- <command>] -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/explore.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> Note: This command is unaware of workspaces. @@ -40,21 +29,7 @@ sure to use `npm rebuild <pkg>` if you make any changes. ### Configuration -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `shell` - -* Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on - Windows -* Type: String - -The shell to run for the `npm explore` command. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> ### See Also diff --git a/docs/lib/content/commands/npm-find-dupes.md b/docs/lib/content/commands/npm-find-dupes.md new file mode 100644 index 0000000000000..1e0e8df3d21d0 --- /dev/null +++ b/docs/lib/content/commands/npm-find-dupes.md @@ -0,0 +1,26 @@ +--- +title: npm-find-dupes +section: 1 +description: Find duplication in the package tree +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +Runs `npm dedupe` in `--dry-run` mode, making npm only output the +duplications, without actually changing the package tree. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm dedupe](/commands/npm-dedupe) +* [npm ls](/commands/npm-ls) +* [npm update](/commands/npm-update) +* [npm install](/commands/npm-install) + diff --git a/docs/lib/content/commands/npm-fund.md b/docs/lib/content/commands/npm-fund.md new file mode 100644 index 0000000000000..f200aafc3e828 --- /dev/null +++ b/docs/lib/content/commands/npm-fund.md @@ -0,0 +1,75 @@ +--- +title: npm-fund +section: 1 +description: Retrieve funding information +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +This command retrieves information on how to fund the dependencies of a +given project. If no package name is provided, it will list all +dependencies that are looking for funding in a tree structure, listing +the type of funding and the url to visit. If a package name is provided +then it tries to open its funding url using the +[`--browser` config](/using-npm/config#browser) param; if there are multiple +funding sources for the package, the user will be instructed to pass the +`--which` option to disambiguate. + +The list will avoid duplicated entries and will stack all packages that +share the same url as a single entry. Thus, the list does not have the +same shape of the output from `npm ls`. + +#### Example + +### Workspaces support + +It's possible to filter the results to only include a single workspace +and its dependencies using the +[`workspace` config](/using-npm/config#workspace) option. + +#### Example: + +Here's an example running `npm fund` in a project with a configured +workspace `a`: + +```bash +$ npm fund +test-workspaces-fund@1.0.0 ++-- https://example.com/a +| | `-- a@1.0.0 +| `-- https://example.com/maintainer +| `-- foo@1.0.0 ++-- https://example.com/npmcli-funding +| `-- @npmcli/test-funding +`-- https://example.com/org + `-- bar@2.0.0 +``` + +And here is an example of the expected result when filtering only by a +specific workspace `a` in the same project: + +```bash +$ npm fund -w a +test-workspaces-fund@1.0.0 +`-- https://example.com/a + | `-- a@1.0.0 + `-- https://example.com/maintainer + `-- foo@2.0.0 +``` + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +## See Also + +* [package spec](/using-npm/package-spec) +* [npm install](/commands/npm-install) +* [npm docs](/commands/npm-docs) +* [npm ls](/commands/npm-ls) +* [npm config](/commands/npm-config) +* [npm workspaces](/using-npm/workspaces) diff --git a/docs/lib/content/commands/npm-help-search.md b/docs/lib/content/commands/npm-help-search.md new file mode 100644 index 0000000000000..fb37036364f49 --- /dev/null +++ b/docs/lib/content/commands/npm-help-search.md @@ -0,0 +1,31 @@ +--- +title: npm-help-search +section: 1 +description: Search npm help documentation +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +Note: This command is unaware of workspaces. + +### Description + +This command will search the npm markdown documentation files for the terms +provided, and then list the results, sorted by relevance. + +If only one result is found, then it will show that help topic. + +If the argument to `npm help` is not a known help topic, then it will call +`help-search`. It is rarely if ever necessary to call this command +directly. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm](/commands/npm) +* [npm help](/commands/npm-help) diff --git a/docs/lib/content/commands/npm-help.md b/docs/lib/content/commands/npm-help.md new file mode 100644 index 0000000000000..717092cb92788 --- /dev/null +++ b/docs/lib/content/commands/npm-help.md @@ -0,0 +1,33 @@ +--- +title: npm-help +section: 1 +description: Get help on npm +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +Note: This command is unaware of workspaces. + +### Description + +If supplied a topic, then show the appropriate documentation page. + +If the topic does not exist, or if multiple terms are provided, then npm +will run the `help-search` command to find a match. Note that, if +`help-search` finds a single subject, then it will run `help` on that +topic, so unique matches are equivalent to specifying a topic name. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm](/commands/npm) +* [npm folders](/configuring-npm/folders) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) +* [package.json](/configuring-npm/package-json) +* [npm help-search](/commands/npm-help-search) diff --git a/docs/content/commands/npm-hook.md b/docs/lib/content/commands/npm-hook.md similarity index 59% rename from docs/content/commands/npm-hook.md rename to docs/lib/content/commands/npm-hook.md index 4a9805d02f9d4..75e7fcc44dbcd 100644 --- a/docs/content/commands/npm-hook.md +++ b/docs/lib/content/commands/npm-hook.md @@ -6,21 +6,7 @@ description: Manage registry hooks ### Synopsis -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/hook.js --> - -```bash -npm hook add <pkg> <url> <secret> [--type=<type>] -npm hook ls [pkg] -npm hook rm <id> -npm hook update <id> <url> <secret> -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/hook.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> Note: This command is unaware of workspaces. @@ -94,34 +80,7 @@ $ npm hook rm id-deadbeef ### Configuration -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> ### See Also diff --git a/docs/lib/content/commands/npm-init.md b/docs/lib/content/commands/npm-init.md new file mode 100644 index 0000000000000..832d786e66853 --- /dev/null +++ b/docs/lib/content/commands/npm-init.md @@ -0,0 +1,164 @@ +--- +title: npm-init +section: 1 +description: Create a package.json file +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +`npm init <initializer>` can be used to set up a new or existing npm +package. + +`initializer` in this case is an npm package named `create-<initializer>`, +which will be installed by [`npm-exec`](/commands/npm-exec), and then have its +main bin executed -- presumably creating or updating `package.json` and +running any other initialization-related operations. + +The init command is transformed to a corresponding `npm exec` operation as +follows: + +* `npm init foo` -> `npm exec create-foo` +* `npm init @usr/foo` -> `npm exec @usr/create-foo` +* `npm init @usr` -> `npm exec @usr/create` +* `npm init @usr@2.0.0` -> `npm exec @usr/create@2.0.0` +* `npm init @usr/foo@2.0.0` -> `npm exec @usr/create-foo@2.0.0` + +If the initializer is omitted (by just calling `npm init`), init will fall +back to legacy init behavior. It will ask you a bunch of questions, and +then write a package.json for you. It will attempt to make reasonable +guesses based on existing fields, dependencies, and options selected. It is +strictly additive, so it will keep any fields and values that were already +set. You can also use `-y`/`--yes` to skip the questionnaire altogether. If +you pass `--scope`, it will create a scoped package. + +*Note:* if a user already has the `create-<initializer>` package +globally installed, that will be what `npm init` uses. If you want npm +to use the latest version, or another specific version you must specify +it: + +* `npm init foo@latest` # fetches and runs the latest `create-foo` from + the registry +* `npm init foo@1.2.3` # runs `create-foo@1.2.3` specifically + +#### Forwarding additional options + +Any additional options will be passed directly to the command, so `npm init +foo -- --hello` will map to `npm exec -- create-foo --hello`. + +To better illustrate how options are forwarded, here's a more evolved +example showing options passed to both the **npm cli** and a create package, +both following commands are equivalent: + +- `npm init foo -y --registry=<url> -- --hello -a` +- `npm exec -y --registry=<url> -- create-foo --hello -a` + +### Examples + +Create a new React-based project using +[`create-react-app`](https://npm.im/create-react-app): + +```bash +$ npm init react-app ./my-react-app +``` + +Create a new `esm`-compatible package using +[`create-esm`](https://npm.im/create-esm): + +```bash +$ mkdir my-esm-lib && cd my-esm-lib +$ npm init esm --yes +``` + +Generate a plain old package.json using legacy init: + +```bash +$ mkdir my-npm-pkg && cd my-npm-pkg +$ git init +$ npm init +``` + +Generate it without having it ask any questions: + +```bash +$ npm init -y +``` + +### Workspaces support + +It's possible to create a new workspace within your project by using the +`workspace` config option. When using `npm init -w <dir>` the cli will +create the folders and boilerplate expected while also adding a reference +to your project `package.json` `"workspaces": []` property in order to make +sure that new generated **workspace** is properly set up as such. + +Given a project with no workspaces, e.g: + +``` +. ++-- package.json +``` + +You may generate a new workspace using the legacy init: + +```bash +$ npm init -w packages/a +``` + +That will generate a new folder and `package.json` file, while also updating +your top-level `package.json` to add the reference to this new workspace: + +``` +. ++-- package.json +`-- packages + `-- a + `-- package.json +``` + +The workspaces init also supports the `npm init <initializer> -w <dir>` +syntax, following the same set of rules explained earlier in the initial +**Description** section of this page. Similar to the previous example of +creating a new React-based project using +[`create-react-app`](https://npm.im/create-react-app), the following syntax +will make sure to create the new react app as a nested **workspace** within your +project and configure your `package.json` to recognize it as such: + +```bash +npm init -w packages/my-react-app react-app . +``` + +This will make sure to generate your react app as expected, one important +consideration to have in mind is that `npm exec` is going to be run in the +context of the newly created folder for that workspace, and that's the reason +why in this example the initializer uses the initializer name followed with a +dot to represent the current directory in that context, e.g: `react-app .`: + +``` +. ++-- package.json +`-- packages + +-- a + | `-- package.json + `-- my-react-app + +-- README + +-- package.json + `-- ... +``` + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [package spec](/using-npm/package-spec) +* [init-package-json module](http://npm.im/init-package-json) +* [package.json](/configuring-npm/package-json) +* [npm version](/commands/npm-version) +* [npm scope](/using-npm/scope) +* [npm exec](/commands/npm-exec) +* [npm workspaces](/using-npm/workspaces) diff --git a/docs/lib/content/commands/npm-install-ci-test.md b/docs/lib/content/commands/npm-install-ci-test.md new file mode 100644 index 0000000000000..9685eaaa1aa91 --- /dev/null +++ b/docs/lib/content/commands/npm-install-ci-test.md @@ -0,0 +1,23 @@ +--- +title: npm-install-ci-test +section: 1 +description: Install a project with a clean slate and run tests +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +This command runs `npm ci` followed immediately by `npm test`. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm install-test](/commands/npm-install-test) +* [npm ci](/commands/npm-ci) +* [npm test](/commands/npm-test) diff --git a/docs/lib/content/commands/npm-install-test.md b/docs/lib/content/commands/npm-install-test.md new file mode 100644 index 0000000000000..4a2798b41be29 --- /dev/null +++ b/docs/lib/content/commands/npm-install-test.md @@ -0,0 +1,24 @@ +--- +title: npm-install-test +section: 1 +description: Install package(s) and run tests +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +This command runs an `npm install` followed immediately by an `npm test`. It +takes exactly the same arguments as `npm install`. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm install](/commands/npm-install) +* [npm install-ci-test](/commands/npm-install-ci-test) +* [npm test](/commands/npm-test) diff --git a/docs/content/commands/npm-install.md b/docs/lib/content/commands/npm-install.md similarity index 61% rename from docs/content/commands/npm-install.md rename to docs/lib/content/commands/npm-install.md index f9d14fb338c9a..a705da2cb32d3 100644 --- a/docs/content/commands/npm-install.md +++ b/docs/lib/content/commands/npm-install.md @@ -6,20 +6,7 @@ description: Install a package ### Synopsis -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/install.js --> - -```bash -npm install [<package-spec> ...] - -aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/install.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> ### Description @@ -418,297 +405,7 @@ does. These are some of the most common options related to installation. -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `save` - -* Default: `true` unless when using `npm update` where it defaults to `false` -* Type: Boolean - -Save installed packages to a `package.json` file as dependencies. - -When used with the `npm rm` command, removes the dependency from -`package.json`. - -Will also prevent writing to `package-lock.json` if set to `false`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `save-exact` - -* Default: false -* Type: Boolean - -Dependencies saved to package.json will be configured with an exact version -rather than using npm's default semver range operator. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `global-style` - -* Default: false -* Type: Boolean - -Causes npm to install the package into your local `node_modules` folder with -the same layout it uses with the global `node_modules` folder. Only your -direct dependencies will show in `node_modules` and everything they depend -on will be flattened in their `node_modules` folders. This obviously will -eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling` -will be preferred. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `legacy-bundling` - -* Default: false -* Type: Boolean - -Causes npm to install the package such that versions of npm prior to 1.4, -such as the one included with node 0.8, can install the package. This -eliminates all automatic deduping. If used with `global-style` this option -will be preferred. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `strict-peer-deps` - -* Default: false -* Type: Boolean - -If set to `true`, and `--legacy-peer-deps` is not set, then _any_ -conflicting `peerDependencies` will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships. - -By default, conflicting `peerDependencies` deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's `peerDependencies` object. - -When such and override is performed, a warning is printed, explaining the -conflict and the packages involved. If `--strict-peer-deps` is set, then -this warning is treated as a failure. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `package-lock` - -* Default: true -* Type: Boolean - -If set to false, then ignore `package-lock.json` files when installing. This -will also prevent _writing_ `package-lock.json` if `save` is true. - -This configuration does not affect `npm ci`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `foreground-scripts` - -* Default: false -* Type: Boolean - -Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process. - -Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `audit` - -* Default: true -* Type: Boolean - -When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for [`npm audit`](/commands/npm-audit) for details on what is -submitted. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `bin-links` - -* Default: true -* Type: Boolean - -Tells npm to create symlinks (or `.cmd` shims on Windows) for package -executables. - -Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `fund` - -* Default: true -* Type: Boolean - -When "true" displays the message at the end of each `npm install` -acknowledging the number of dependencies looking for funding. See [`npm -fund`](/commands/npm-fund) for details. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `install-links` - -* Default: true -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> ### Algorithm diff --git a/docs/lib/content/commands/npm-link.md b/docs/lib/content/commands/npm-link.md new file mode 100644 index 0000000000000..232e55ff9fcd9 --- /dev/null +++ b/docs/lib/content/commands/npm-link.md @@ -0,0 +1,119 @@ +--- +title: npm-link +section: 1 +description: Symlink a package folder +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +This is handy for installing your own stuff, so that you can work on it and +test iteratively without having to continually rebuild. + +Package linking is a two-step process. + +First, `npm link` in a package folder with no arguments will create a +symlink in the global folder `{prefix}/lib/node_modules/<package>` that +links to the package where the `npm link` command was executed. It will +also link any bins in the package to `{prefix}/bin/{name}`. Note that +`npm link` uses the global prefix (see `npm prefix -g` for its value). + +Next, in some other location, `npm link package-name` will create a +symbolic link from globally-installed `package-name` to `node_modules/` of +the current folder. + +Note that `package-name` is taken from `package.json`, _not_ from the +directory name. + +The package name can be optionally prefixed with a scope. See +[`scope`](/using-npm/scope). The scope must be preceded by an @-symbol and +followed by a slash. + +When creating tarballs for `npm publish`, the linked packages are +"snapshotted" to their current state by resolving the symbolic links, if +they are included in `bundleDependencies`. + +For example: + +```bash +cd ~/projects/node-redis # go into the package directory +npm link # creates global link +cd ~/projects/node-bloggy # go into some other package directory. +npm link redis # link-install the package +``` + +Now, any changes to `~/projects/node-redis` will be reflected in +`~/projects/node-bloggy/node_modules/node-redis/`. Note that the link +should be to the package name, not the directory name for that package. + +You may also shortcut the two steps in one. For example, to do the +above use-case in a shorter way: + +```bash +cd ~/projects/node-bloggy # go into the dir of your main project +npm link ../node-redis # link the dir of your dependency +``` + +The second line is the equivalent of doing: + +```bash +(cd ../node-redis; npm link) +npm link redis +``` + +That is, it first creates a global link, and then links the global +installation target into your project's `node_modules` folder. + +Note that in this case, you are referring to the directory name, +`node-redis`, rather than the package name `redis`. + +If your linked package is scoped (see [`scope`](/using-npm/scope)) your +link command must include that scope, e.g. + +```bash +npm link @myorg/privatepackage +``` + +### Caveat + +Note that package dependencies linked in this way are _not_ saved to +`package.json` by default, on the assumption that the intention is to have +a link stand in for a regular non-link dependency. Otherwise, for example, +if you depend on `redis@^3.0.1`, and ran `npm link redis`, it would replace +the `^3.0.1` dependency with `file:../path/to/node-redis`, which you +probably don't want! Additionally, other users or developers on your +project would run into issues if they do not have their folders set up +exactly the same as yours. + +If you are adding a _new_ dependency as a link, you should add it to the +relevant metadata by running `npm install <dep> --package-lock-only`. + +If you _want_ to save the `file:` reference in your `package.json` and +`package-lock.json` files, you can use `npm link <dep> --save` to do so. + +### Workspace Usage + +`npm link <pkg> --workspace <name>` will link the relevant package as a +dependency of the specified workspace(s). Note that It may actually be +linked into the parent project's `node_modules` folder, if there are no +conflicting dependencies. + +`npm link --workspace <name>` will create a global link to the specified +workspace(s). + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [package spec](/using-npm/package-spec) +* [npm developers](/using-npm/developers) +* [package.json](/configuring-npm/package-json) +* [npm install](/commands/npm-install) +* [npm folders](/configuring-npm/folders) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) diff --git a/docs/lib/content/commands/npm-login.md b/docs/lib/content/commands/npm-login.md new file mode 100644 index 0000000000000..f1dd29dfbe1c5 --- /dev/null +++ b/docs/lib/content/commands/npm-login.md @@ -0,0 +1,43 @@ +--- +title: npm-login +section: 1 +description: Login to a registry user account +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +Note: This command is unaware of workspaces. + +### Description + +Verify a user in the specified registry, and save the credentials to the +`.npmrc` file. If no registry is specified, the default registry will be +used (see [`config`](/using-npm/config)). + +When using `legacy` for your `auth-type`, the username and password, are +read in from prompts. + +To reset your password, go to <https://www.npmjs.com/forgot> + +To change your email address, go to <https://www.npmjs.com/email-edit> + +You may use this command multiple times with the same user account to +authorize on a new machine. When authenticating on a new machine, +the username, password and email address must all match with +your existing record. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm registry](/using-npm/registry) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) +* [npm owner](/commands/npm-owner) +* [npm whoami](/commands/npm-whoami) +* [npm token](/commands/npm-token) +* [npm profile](/commands/npm-profile) diff --git a/docs/lib/content/commands/npm-logout.md b/docs/lib/content/commands/npm-logout.md new file mode 100644 index 0000000000000..df58af14289af --- /dev/null +++ b/docs/lib/content/commands/npm-logout.md @@ -0,0 +1,35 @@ +--- +title: npm-logout +section: 1 +description: Log out of the registry +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +Note: This command is unaware of workspaces. + +### Description + +When logged into a registry that supports token-based authentication, tell +the server to end this token's session. This will invalidate the token +everywhere you're using it, not just for the current environment. + +When logged into a legacy registry that uses username and password +authentication, this will clear the credentials in your user configuration. +In this case, it will _only_ affect the current environment. + +If `--scope` is provided, this will find the credentials for the registry +connected to that scope, if set. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm adduser](/commands/npm-adduser) +* [npm registry](/using-npm/registry) +* [npm config](/commands/npm-config) +* [npm whoami](/commands/npm-whoami) diff --git a/docs/lib/content/commands/npm-ls.md b/docs/lib/content/commands/npm-ls.md new file mode 100644 index 0000000000000..04c4f2cb6f1e2 --- /dev/null +++ b/docs/lib/content/commands/npm-ls.md @@ -0,0 +1,86 @@ +--- +title: npm-ls +section: 1 +description: List installed packages +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +This command will print to stdout all the versions of packages that are +installed, as well as their dependencies when `--all` is specified, in a +tree structure. + +Note: to get a "bottoms up" view of why a given package is included in the +tree at all, use [`npm explain`](/commands/npm-explain). + +Positional arguments are `name@version-range` identifiers, which will limit +the results to only the paths to the packages named. Note that nested +packages will *also* show the paths to the specified packages. For +example, running `npm ls promzard` in npm's source tree will show: + +```bash +npm@@VERSION@ /path/to/npm +└─┬ init-package-json@0.0.4 + └── promzard@0.1.5 +``` + +It will print out extraneous, missing, and invalid packages. + +If a project specifies git urls for dependencies these are shown +in parentheses after the `name@version` to make it easier for users to +recognize potential forks of a project. + +The tree shown is the logical dependency tree, based on package +dependencies, not the physical layout of your `node_modules` folder. + +When run as `ll` or `la`, it shows extended information by default. + +### Note: Design Changes Pending + +The `npm ls` command's output and behavior made a _ton_ of sense when npm +created a `node_modules` folder that naively nested every dependency. In +such a case, the logical dependency graph and physical tree of packages on +disk would be roughly identical. + +With the advent of automatic install-time deduplication of dependencies in +npm v3, the `ls` output was modified to display the logical dependency +graph as a tree structure, since this was more useful to most users. +However, without using `npm ls -l`, it became impossible to show _where_ a +package was actually installed much of the time! + +With the advent of automatic installation of `peerDependencies` in npm v7, +this gets even more curious, as `peerDependencies` are logically +"underneath" their dependents in the dependency graph, but are always +physically at or above their location on disk. + +Also, in the years since npm got an `ls` command (in version 0.0.2!), +dependency graphs have gotten much larger as a general rule. Therefore, in +order to avoid dumping an excessive amount of content to the terminal, `npm +ls` now only shows the _top_ level dependencies, unless `--all` is +provided. + +A thorough re-examination of the use cases, intention, behavior, and output +of this command, is currently underway. Expect significant changes to at +least the default human-readable `npm ls` output in npm v8. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [package spec](/using-npm/package-spec) +* [npm explain](/commands/npm-explain) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) +* [npm folders](/configuring-npm/folders) +* [npm explain](/commands/npm-explain) +* [npm install](/commands/npm-install) +* [npm link](/commands/npm-link) +* [npm prune](/commands/npm-prune) +* [npm outdated](/commands/npm-outdated) +* [npm update](/commands/npm-update) diff --git a/docs/lib/content/commands/npm-org.md b/docs/lib/content/commands/npm-org.md new file mode 100644 index 0000000000000..ca4d887de3cbd --- /dev/null +++ b/docs/lib/content/commands/npm-org.md @@ -0,0 +1,64 @@ +--- +title: npm-org +section: 1 +description: Manage orgs +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +Note: This command is unaware of workspaces. + +### Example + +Add a new developer to an org: + +```bash +$ npm org set my-org @mx-smith +``` + +Add a new admin to an org (or change a developer to an admin): + +```bash +$ npm org set my-org @mx-santos admin +``` + +Remove a user from an org: + +```bash +$ npm org rm my-org mx-santos +``` + +List all users in an org: + +```bash +$ npm org ls my-org +``` + +List all users in JSON format: + +```bash +$ npm org ls my-org --json +``` + +See what role a user has in an org: + +```bash +$ npm org ls my-org @mx-santos +``` + +### Description + +You can use the `npm org` commands to manage and view users of an +organization. It supports adding and removing users, changing their roles, +listing them, and finding specific ones and their roles. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [using orgs](/using-npm/orgs) +* [Documentation on npm Orgs](https://docs.npmjs.com/orgs/) diff --git a/docs/content/commands/npm-outdated.md b/docs/lib/content/commands/npm-outdated.md similarity index 55% rename from docs/content/commands/npm-outdated.md rename to docs/lib/content/commands/npm-outdated.md index c4e07a0cd36f0..c4d39a64f38b4 100644 --- a/docs/content/commands/npm-outdated.md +++ b/docs/lib/content/commands/npm-outdated.md @@ -6,18 +6,7 @@ description: Check for outdated packages ### Synopsis -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/outdated.js --> - -```bash -npm outdated [<package-spec> ...] -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/outdated.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> ### Description @@ -95,100 +84,7 @@ A few things to note: ### Configuration -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `all` - -* Default: false -* Type: Boolean - -When running `npm outdated` and `npm ls`, setting `--all` will show all -outdated or installed packages, rather than only those directly depended -upon by the current project. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `long` - -* Default: false -* Type: Boolean - -Show extended information in `ls`, `search`, and `help-search`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `parseable` - -* Default: false -* Type: Boolean - -Output parseable results from commands that write to standard output. For -`npm search`, this will be tab-separated table format. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> ### See Also diff --git a/docs/lib/content/commands/npm-owner.md b/docs/lib/content/commands/npm-owner.md new file mode 100644 index 0000000000000..c35b369ab2da3 --- /dev/null +++ b/docs/lib/content/commands/npm-owner.md @@ -0,0 +1,42 @@ +--- +title: npm-owner +section: 1 +description: Manage package owners +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +Note: This command is unaware of workspaces. + +### Description + +Manage ownership of published packages. + +* ls: List all the users who have access to modify a package and push new + versions. Handy when you need to know who to bug for help. +* add: Add a new user as a maintainer of a package. This user is enabled + to modify metadata, publish new versions, and add other owners. +* rm: Remove a user from the package owner list. This immediately revokes + their privileges. + +Note that there is only one level of access. Either you can modify a package, +or you can't. Future versions may contain more fine-grained access levels, but +that is not implemented at this time. + +If you have two-factor authentication enabled with `auth-and-writes` (see +[`npm-profile`](/commands/npm-profile)) then you'll need to include an otp +on the command line when changing ownership with `--otp`. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [package spec](/using-npm/package-spec) +* [npm profile](/commands/npm-profile) +* [npm publish](/commands/npm-publish) +* [npm registry](/using-npm/registry) +* [npm adduser](/commands/npm-adduser) diff --git a/docs/lib/content/commands/npm-pack.md b/docs/lib/content/commands/npm-pack.md new file mode 100644 index 0000000000000..0793ee2d39217 --- /dev/null +++ b/docs/lib/content/commands/npm-pack.md @@ -0,0 +1,35 @@ +--- +title: npm-pack +section: 1 +description: Create a tarball from a package +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### Description + +For anything that's installable (that is, a package folder, tarball, +tarball url, git url, name@tag, name@version, name, or scoped name), this +command will fetch it to the cache, copy the tarball to the current working +directory as `<name>-<version>.tgz`, and then write the filenames out to +stdout. + +If the same package is specified multiple times, then the file will be +overwritten the second time. + +If no arguments are supplied, then npm packs the current package folder. + +### See Also + +* [package spec](/using-npm/package-spec) +* [npm-packlist package](http://npm.im/npm-packlist) +* [npm cache](/commands/npm-cache) +* [npm publish](/commands/npm-publish) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) diff --git a/docs/lib/content/commands/npm-ping.md b/docs/lib/content/commands/npm-ping.md new file mode 100644 index 0000000000000..2bf16b2bc8114 --- /dev/null +++ b/docs/lib/content/commands/npm-ping.md @@ -0,0 +1,37 @@ +--- +title: npm-ping +section: 1 +description: Ping npm registry +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +Note: This command is unaware of workspaces. + +### Description + +Ping the configured or given npm registry and verify authentication. +If it works it will output something like: + +```bash +npm notice PING https://registry.npmjs.org/ +npm notice PONG 255ms +``` +otherwise you will get an error: +```bash +npm notice PING http://foo.com/ +npm ERR! code E404 +npm ERR! 404 Not Found - GET http://www.foo.com/-/ping?write=true +``` + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm doctor](/commands/npm-doctor) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) diff --git a/docs/content/commands/npm-pkg.md b/docs/lib/content/commands/npm-pkg.md similarity index 56% rename from docs/content/commands/npm-pkg.md rename to docs/lib/content/commands/npm-pkg.md index 32772ae080a8b..dbb2f27e5c9aa 100644 --- a/docs/content/commands/npm-pkg.md +++ b/docs/lib/content/commands/npm-pkg.md @@ -6,22 +6,7 @@ description: Manages your package.json ### Synopsis -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/pkg.js --> - -```bash -npm pkg set <key>=<value> [<key>=<value> ...] -npm pkg get [<key> [<key> ...]] -npm pkg delete <key> [<key> ...] -npm pkg set [<array>[<index>].<key>=<value> ...] -npm pkg set [<array>[].<key>=<value> ...] -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/pkg.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> ### Description @@ -184,100 +169,7 @@ npm pkg get name version --ws ### Configuration -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `force` - -* Default: false -* Type: Boolean - -Removes various protections against unfortunate side effects, common -mistakes, unnecessary performance degradation, and malicious input. - -* Allow clobbering non-npm files in global installs. -* Allow the `npm version` command to work on an unclean git repository. -* Allow deleting the cache folder with `npm cache clean`. -* Allow installing packages that have an `engines` declaration requiring a - different version of npm. -* Allow installing packages that have an `engines` declaration requiring a - different version of `node`, even if `--engine-strict` is enabled. -* Allow `npm audit fix` to install modules outside your stated dependency - range (including SemVer-major changes). -* Allow unpublishing all versions of a published package. -* Allow conflicting peerDependencies to be installed in the root project. -* Implicitly set `--yes` during `npm init`. -* Allow clobbering existing values in `npm pkg` -* Allow unpublishing of entire packages (not just a single version). - -If you don't have a clear idea of what you want to do, it is strongly -recommended that you do not use this option! - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> ## See Also * [npm install](/commands/npm-install) diff --git a/docs/lib/content/commands/npm-prefix.md b/docs/lib/content/commands/npm-prefix.md new file mode 100644 index 0000000000000..3da516f52a0dc --- /dev/null +++ b/docs/lib/content/commands/npm-prefix.md @@ -0,0 +1,44 @@ +--- +title: npm-prefix +section: 1 +description: Display prefix +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +Note: This command is unaware of workspaces. + +### Description + +Print the local prefix to standard output. This is the closest parent directory +to contain a `package.json` file or `node_modules` directory, unless `-g` is +also specified. + +If `-g` is specified, this will be the value of the global prefix. See +[`npm config`](/commands/npm-config) for more detail. + +### Example + +```bash +npm prefix +/usr/local/projects/foo +``` + +```bash +npm prefix -g +/usr/local +``` + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm root](/commands/npm-root) +* [npm bin](/commands/npm-bin) +* [npm folders](/configuring-npm/folders) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) diff --git a/docs/content/commands/npm-profile.md b/docs/lib/content/commands/npm-profile.md similarity index 60% rename from docs/content/commands/npm-profile.md rename to docs/lib/content/commands/npm-profile.md index af1f9d8aa1063..36eb3fb5f0ff9 100644 --- a/docs/content/commands/npm-profile.md +++ b/docs/lib/content/commands/npm-profile.md @@ -6,21 +6,7 @@ description: Change settings on your registry profile ### Synopsis -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/profile.js --> - -```bash -npm profile enable-2fa [auth-only|auth-and-writes] -npm profile disable-2fa -npm profile get [<key>] -npm profile set <key> <value> -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/profile.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> Note: This command is unaware of workspaces. @@ -83,60 +69,7 @@ Some of these commands may not be available on non npmjs.com registries. ### Configuration -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `parseable` - -* Default: false -* Type: Boolean - -Output parseable results from commands that write to standard output. For -`npm search`, this will be tab-separated table format. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> ### See Also diff --git a/docs/lib/content/commands/npm-prune.md b/docs/lib/content/commands/npm-prune.md new file mode 100644 index 0000000000000..d0871c55e8054 --- /dev/null +++ b/docs/lib/content/commands/npm-prune.md @@ -0,0 +1,42 @@ +--- +title: npm-prune +section: 1 +description: Remove extraneous packages +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +This command removes "extraneous" packages. If a package name is provided, +then only packages matching one of the supplied names are removed. + +Extraneous packages are those present in the `node_modules` folder that are +not listed as any package's dependency list. + +If the `--production` flag is specified or the `NODE_ENV` environment +variable is set to `production`, this command will remove the packages +specified in your `devDependencies`. Setting `--no-production` will negate +`NODE_ENV` being set to `production`. + +If the `--dry-run` flag is used then no changes will actually be made. + +If the `--json` flag is used, then the changes `npm prune` made (or would +have made with `--dry-run`) are printed as a JSON object. + +In normal operation, extraneous modules are pruned automatically, so you'll +only need this command with the `--production` flag. However, in the real +world, operation is not always "normal". When crashes or mistakes happen, +this command can help clean up any resulting garbage. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm uninstall](/commands/npm-uninstall) +* [npm folders](/configuring-npm/folders) +* [npm ls](/commands/npm-ls) diff --git a/docs/lib/content/commands/npm-publish.md b/docs/lib/content/commands/npm-publish.md new file mode 100644 index 0000000000000..f8481a99b4401 --- /dev/null +++ b/docs/lib/content/commands/npm-publish.md @@ -0,0 +1,101 @@ +--- +title: npm-publish +section: 1 +description: Publish a package +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +Publishes a package to the registry so that it can be installed by name. + +By default npm will publish to the public registry. This can be +overridden by specifying a different default registry or using a +[`scope`](/using-npm/scope) in the name, combined with a +scope-configured registry (see +[`package.json`](/configuring-npm/package-json)). + + +A `package` is interpreted the same way as other commands (like +`npm install` and can be: + +* a) a folder containing a program described by a + [`package.json`](/configuring-npm/package-json) file +* b) a gzipped tarball containing (a) +* c) a url that resolves to (b) +* d) a `<name>@<version>` that is published on the registry (see + [`registry`](/using-npm/registry)) with (c) +* e) a `<name>@<tag>` (see [`npm dist-tag`](/commands/npm-dist-tag)) that + points to (d) +* f) a `<name>` that has a "latest" tag satisfying (e) +* g) a `<git remote url>` that resolves to (a) + +The publish will fail if the package name and version combination already +exists in the specified registry. + +Once a package is published with a given name and version, that specific +name and version combination can never be used again, even if it is removed +with [`npm unpublish`](/commands/npm-unpublish). + +As of `npm@5`, both a sha1sum and an integrity field with a sha512sum of the +tarball will be submitted to the registry during publication. Subsequent +installs will use the strongest supported algorithm to verify downloads. + +Similar to `--dry-run` see [`npm pack`](/commands/npm-pack), which figures +out the files to be included and packs them into a tarball to be uploaded +to the registry. + +### Files included in package + +To see what will be included in your package, run `npx npm-packlist`. All +files are included by default, with the following exceptions: + +- Certain files that are relevant to package installation and distribution + are always included. For example, `package.json`, `README.md`, + `LICENSE`, and so on. + +- If there is a "files" list in + [`package.json`](/configuring-npm/package-json), then only the files + specified will be included. (If directories are specified, then they + will be walked recursively and their contents included, subject to the + same ignore rules.) + +- If there is a `.gitignore` or `.npmignore` file, then ignored files in + that and all child directories will be excluded from the package. If + _both_ files exist, then the `.gitignore` is ignored, and only the + `.npmignore` is used. + + `.npmignore` files follow the [same pattern + rules](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_ignoring) + as `.gitignore` files + +- If the file matches certain patterns, then it will _never_ be included, + unless explicitly added to the `"files"` list in `package.json`, or + un-ignored with a `!` rule in a `.npmignore` or `.gitignore` file. + +- Symbolic links are never included in npm packages. + + +See [`developers`](/using-npm/developers) for full details on what's +included in the published package, as well as details on how the package is +built. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [package spec](/using-npm/package-spec) +* [npm-packlist package](http://npm.im/npm-packlist) +* [npm registry](/using-npm/registry) +* [npm scope](/using-npm/scope) +* [npm adduser](/commands/npm-adduser) +* [npm owner](/commands/npm-owner) +* [npm deprecate](/commands/npm-deprecate) +* [npm dist-tag](/commands/npm-dist-tag) +* [npm pack](/commands/npm-pack) +* [npm profile](/commands/npm-profile) diff --git a/docs/lib/content/commands/npm-query.md b/docs/lib/content/commands/npm-query.md new file mode 100644 index 0000000000000..e6bf53f3de614 --- /dev/null +++ b/docs/lib/content/commands/npm-query.md @@ -0,0 +1,143 @@ +--- +title: npm-query +section: 1 +description: Dependency selector query +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +The `npm query` command allows for usage of css selectors in order to retrieve +an array of dependency objects. + +### Piping npm query to other commands + +```bash +# find all dependencies with postinstall scripts & uninstall them +npm query ":attr(scripts, [postinstall])" | jq 'map(.name)|join("\n")' -r | xargs -I {} npm uninstall {} + +# find all git dependencies & explain who requires them +npm query ":type(git)" | jq 'map(.name)' | xargs -I {} npm why {} +``` + +### Extended Use Cases & Queries + +```stylus +// all deps +* + +// all direct deps +:root > * + +// direct production deps +:root > .prod + +// direct development deps +:root > .dev + +// any peer dep of a direct deps +:root > * > .peer + +// any workspace dep +.workspace + +// all workspaces that depend on another workspace +.workspace > .workspace + +// all workspaces that have peer deps +.workspace:has(.peer) + +// any dep named "lodash" +// equivalent to [name="lodash"] +#lodash + +// any deps named "lodash" & within semver range ^"1.2.3" +#lodash@^1.2.3 +// equivalent to... +[name="lodash"]:semver(^1.2.3) + +// get the hoisted node for a given semver range +#lodash@^1.2.3:not(:deduped) + +// querying deps with a specific version +#lodash@2.1.5 +// equivalent to... +[name="lodash"][version="2.1.5"] + +// has any deps +:has(*) + +// deps with no other deps (ie. "leaf" nodes) +:empty + +// manually querying git dependencies +[repository^=github:], +[repository^=git:], +[repository^=https://github.com], +[repository^=http://github.com], +[repository^=https://github.com], +[repository^=+git:...] + +// querying for all git dependencies +:type(git) + +// get production dependencies that aren't also dev deps +.prod:not(.dev) + +// get dependencies with specific licenses +[license=MIT], [license=ISC] + +// find all packages that have @ruyadorno as a contributor +:attr(contributors, [email=ruyadorno@github.com]) +``` + +### Example Response Output + +- an array of dependency objects is returned which can contain multiple copies of the same package which may or may not have been linked or deduped + +```json +[ + { + "name": "", + "version": "", + "description": "", + "homepage": "", + "bugs": {}, + "author": {}, + "license": {}, + "funding": {}, + "files": [], + "main": "", + "browser": "", + "bin": {}, + "man": [], + "directories": {}, + "repository": {}, + "scripts": {}, + "config": {}, + "dependencies": {}, + "devDependencies": {}, + "optionalDependencies": {}, + "bundledDependencies": {}, + "peerDependencies": {}, + "peerDependenciesMeta": {}, + "engines": {}, + "os": [], + "cpu": [], + "workspaces": {}, + "keywords": [], + ... + }, + ... +``` + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> +## See Also + +* [dependency selectors](/using-npm/dependency-selectors) + diff --git a/docs/lib/content/commands/npm-rebuild.md b/docs/lib/content/commands/npm-rebuild.md new file mode 100644 index 0000000000000..da3a088ac7689 --- /dev/null +++ b/docs/lib/content/commands/npm-rebuild.md @@ -0,0 +1,29 @@ +--- +title: npm-rebuild +section: 1 +description: Rebuild a package +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +This command runs the `npm build` command on the matched folders. This is +useful when you install a new version of node, and must recompile all your +C++ addons with the new binary. It is also useful when installing with +`--ignore-scripts` and `--no-bin-links`, to explicitly choose which +packages to build and/or link bins. + +If one or more package specs are provided, then only packages with a +name and version matching one of the specifiers will be rebuilt. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [package spec](/using-npm/package-spec) +* [npm install](/commands/npm-install) diff --git a/docs/lib/content/commands/npm-repo.md b/docs/lib/content/commands/npm-repo.md new file mode 100644 index 0000000000000..e5968b3378fac --- /dev/null +++ b/docs/lib/content/commands/npm-repo.md @@ -0,0 +1,26 @@ +--- +title: npm-repo +section: 1 +description: Open package repository page in the browser +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +This command tries to guess at the likely location of a package's +repository URL, and then tries to open it using the +[`--browser` config](/using-npm/config#browser) param. If no package name is +provided, it will search for a `package.json` in the current folder and use the +`repository` property. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm docs](/commands/npm-docs) +* [npm config](/commands/npm-config) diff --git a/docs/lib/content/commands/npm-restart.md b/docs/lib/content/commands/npm-restart.md new file mode 100644 index 0000000000000..c337ed6456b95 --- /dev/null +++ b/docs/lib/content/commands/npm-restart.md @@ -0,0 +1,46 @@ +--- +title: npm-restart +section: 1 +description: Restart a package +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +This restarts a project. It is equivalent to running `npm run-script +restart`. + +If the current project has a `"restart"` script specified in +`package.json`, then the following scripts will be run: + +1. prerestart +2. restart +3. postrestart + +If it does _not_ have a `"restart"` script specified, but it does have +`stop` and/or `start` scripts, then the following scripts will be run: + +1. prerestart +2. prestop +3. stop +4. poststop +6. prestart +7. start +8. poststart +9. postrestart + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm run-script](/commands/npm-run-script) +* [npm scripts](/using-npm/scripts) +* [npm test](/commands/npm-test) +* [npm start](/commands/npm-start) +* [npm stop](/commands/npm-stop) +* [npm restart](/commands/npm-restart) diff --git a/docs/lib/content/commands/npm-root.md b/docs/lib/content/commands/npm-root.md new file mode 100644 index 0000000000000..6bf6c3ee811ac --- /dev/null +++ b/docs/lib/content/commands/npm-root.md @@ -0,0 +1,34 @@ +--- +title: npm-root +section: 1 +description: Display npm root +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +Print the effective `node_modules` folder to standard out. + +Useful for using npm in shell scripts that do things with the +`node_modules` folder. For example: + +```bash +#!/bin/bash +global_node_modules="$(npm root --global)" +echo "Global packages installed in: ${global_node_modules}" +``` + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm prefix](/commands/npm-prefix) +* [npm bin](/commands/npm-bin) +* [npm folders](/configuring-npm/folders) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) diff --git a/docs/lib/content/commands/npm-run-script.md b/docs/lib/content/commands/npm-run-script.md new file mode 100644 index 0000000000000..3c35a4778d687 --- /dev/null +++ b/docs/lib/content/commands/npm-run-script.md @@ -0,0 +1,146 @@ +--- +title: npm-run-script +section: 1 +description: Run arbitrary package scripts +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +This runs an arbitrary command from a package's `"scripts"` object. If no +`"command"` is provided, it will list the available scripts. + +`run[-script]` is used by the test, start, restart, and stop commands, but +can be called directly, as well. When the scripts in the package are +printed out, they're separated into lifecycle (test, start, restart) and +directly-run scripts. + +Any positional arguments are passed to the specified script. Use `--` to +pass `-`-prefixed flags and options which would otherwise be parsed by npm. + +For example: + +```bash +npm run test -- --grep="pattern" +``` + +The arguments will only be passed to the script specified after `npm run` +and not to any `pre` or `post` script. + +The `env` script is a special built-in command that can be used to list +environment variables that will be available to the script at runtime. If an +"env" command is defined in your package, it will take precedence over the +built-in. + +In addition to the shell's pre-existing `PATH`, `npm run` adds +`node_modules/.bin` to the `PATH` provided to scripts. Any binaries +provided by locally-installed dependencies can be used without the +`node_modules/.bin` prefix. For example, if there is a `devDependency` on +`tap` in your package, you should write: + +```bash +"scripts": {"test": "tap test/*.js"} +``` + +instead of + +```bash +"scripts": {"test": "node_modules/.bin/tap test/*.js"} +``` + +The actual shell your script is run within is platform dependent. By default, +on Unix-like systems it is the `/bin/sh` command, on Windows it is +`cmd.exe`. +The actual shell referred to by `/bin/sh` also depends on the system. +You can customize the shell with the +[`script-shell` config](/using-npm/config#script-shell). + +Scripts are run from the root of the package folder, regardless of what the +current working directory is when `npm run` is called. If you want your +script to use different behavior based on what subdirectory you're in, you +can use the `INIT_CWD` environment variable, which holds the full path you +were in when you ran `npm run`. + +`npm run` sets the `NODE` environment variable to the `node` executable +with which `npm` is executed. + +If you try to run a script without having a `node_modules` directory and it +fails, you will be given a warning to run `npm install`, just in case you've +forgotten. + +### Workspaces support + +You may use the [`workspace`](/using-npm/config#workspace) or +[`workspaces`](/using-npm/config#workspaces) configs in order to run an +arbitrary command from a package's `"scripts"` object in the context of the +specified workspaces. If no `"command"` is provided, it will list the available +scripts for each of these configured workspaces. + +Given a project with configured workspaces, e.g: + +``` +. ++-- package.json +`-- packages + +-- a + | `-- package.json + +-- b + | `-- package.json + `-- c + `-- package.json +``` + +Assuming the workspace configuration is properly set up at the root level +`package.json` file. e.g: + +``` +{ + "workspaces": [ "./packages/*" ] +} +``` + +And that each of the configured workspaces has a configured `test` script, +we can run tests in all of them using the +[`workspaces` config](/using-npm/config#workspaces): + +``` +npm test --workspaces +``` + +#### Filtering workspaces + +It's also possible to run a script in a single workspace using the `workspace` +config along with a name or directory path: + +``` +npm test --workspace=a +``` + +The `workspace` config can also be specified multiple times in order to run a +specific script in the context of multiple workspaces. When defining values for +the `workspace` config in the command line, it also possible to use `-w` as a +shorthand, e.g: + +``` +npm test -w a -w b +``` + +This last command will run `test` in both `./packages/a` and `./packages/b` +packages. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm scripts](/using-npm/scripts) +* [npm test](/commands/npm-test) +* [npm start](/commands/npm-start) +* [npm restart](/commands/npm-restart) +* [npm stop](/commands/npm-stop) +* [npm config](/commands/npm-config) +* [npm workspaces](/using-npm/workspaces) diff --git a/docs/lib/content/commands/npm-search.md b/docs/lib/content/commands/npm-search.md new file mode 100644 index 0000000000000..7cf2cf4ae2554 --- /dev/null +++ b/docs/lib/content/commands/npm-search.md @@ -0,0 +1,47 @@ +--- +title: npm-search +section: 1 +description: Search for packages +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +Note: This command is unaware of workspaces. + +### Description + +Search the registry for packages matching the search terms. `npm search` +performs a linear, incremental, lexically-ordered search through package +metadata for all files in the registry. If your terminal has color +support, it will further highlight the matches in the results. This can +be disabled with the config item `color` + +Additionally, using the `--searchopts` and `--searchexclude` options +paired with more search terms will include and exclude further patterns. +The main difference between `--searchopts` and the standard search terms +is that the former does not highlight results in the output and you can +use them more fine-grained filtering. Additionally, you can add both of +these to your config to change default search filtering behavior. + +Search also allows targeting of maintainers in search results, by prefixing +their npm username with `=`. + +If a term starts with `/`, then it's interpreted as a regular expression +and supports standard JavaScript RegExp syntax. In this case search will +ignore a trailing `/` . (Note you must escape or quote many regular +expression characters in most shells.) + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm registry](/using-npm/registry) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) +* [npm view](/commands/npm-view) +* [npm cache](/commands/npm-cache) +* https://npm.im/npm-registry-fetch diff --git a/docs/content/commands/npm-shrinkwrap.md b/docs/lib/content/commands/npm-shrinkwrap.md similarity index 74% rename from docs/content/commands/npm-shrinkwrap.md rename to docs/lib/content/commands/npm-shrinkwrap.md index 043b4ad1b1bb4..0a4f22074e54e 100644 --- a/docs/content/commands/npm-shrinkwrap.md +++ b/docs/lib/content/commands/npm-shrinkwrap.md @@ -6,18 +6,7 @@ description: Lock down dependency versions for publication ### Synopsis -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/shrinkwrap.js --> - -```bash -npm shrinkwrap -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/shrinkwrap.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> Note: This command is unaware of workspaces. diff --git a/docs/lib/content/commands/npm-star.md b/docs/lib/content/commands/npm-star.md new file mode 100644 index 0000000000000..1e7bbce212a02 --- /dev/null +++ b/docs/lib/content/commands/npm-star.md @@ -0,0 +1,45 @@ +--- +title: npm-star +section: 1 +description: Mark your favorite packages +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +Note: This command is unaware of workspaces. + +### Description + +"Starring" a package means that you have some interest in it. It's +a vaguely positive way to show that you care. + +It's a boolean thing. Starring repeatedly has no additional effect. + +### More + +There's also these extra commands to help you manage your favorite packages: + +#### Unstar + +You can also "unstar" a package using [`npm unstar`](/commands/npm-unstar) + +"Unstarring" is the same thing, but in reverse. + +#### Listing stars + +You can see all your starred packages using [`npm stars`](/commands/npm-stars) + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [package spec](/using-npm/package-spec) +* [npm unstar](/commands/npm-unstar) +* [npm stars](/commands/npm-stars) +* [npm view](/commands/npm-view) +* [npm whoami](/commands/npm-whoami) +* [npm adduser](/commands/npm-adduser) diff --git a/docs/lib/content/commands/npm-stars.md b/docs/lib/content/commands/npm-stars.md new file mode 100644 index 0000000000000..c1d33596bf318 --- /dev/null +++ b/docs/lib/content/commands/npm-stars.md @@ -0,0 +1,31 @@ +--- +title: npm-stars +section: 1 +description: View packages marked as favorites +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +Note: This command is unaware of workspaces. + +### Description + +If you have starred a lot of neat things and want to find them again +quickly this command lets you do just that. + +You may also want to see your friend's favorite packages, in this case +you will most certainly enjoy this command. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm star](/commands/npm-star) +* [npm unstar](/commands/npm-unstar) +* [npm view](/commands/npm-view) +* [npm whoami](/commands/npm-whoami) +* [npm adduser](/commands/npm-adduser) diff --git a/docs/lib/content/commands/npm-start.md b/docs/lib/content/commands/npm-start.md new file mode 100644 index 0000000000000..c30dda963e9d6 --- /dev/null +++ b/docs/lib/content/commands/npm-start.md @@ -0,0 +1,56 @@ +--- +title: npm-start +section: 1 +description: Start a package +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +This runs a predefined command specified in the `"start"` property of +a package's `"scripts"` object. + +If the `"scripts"` object does not define a `"start"` property, npm +will run `node server.js`. + +Note that this is different from the default node behavior of running +the file specified in a package's `"main"` attribute when evoking with +`node .` + +As of [`npm@2.0.0`](https://blog.npmjs.org/post/98131109725/npm-2-0-0), you can +use custom arguments when executing scripts. Refer to [`npm run-script`](/commands/npm-run-script) for more details. + +### Example + +```json +{ + "scripts": { + "start": "node foo.js" + } +} +``` + +```bash +npm start + +> npm@x.x.x start +> node foo.js + +(foo.js output would be here) + +``` + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm run-script](/commands/npm-run-script) +* [npm scripts](/using-npm/scripts) +* [npm test](/commands/npm-test) +* [npm restart](/commands/npm-restart) +* [npm stop](/commands/npm-stop) diff --git a/docs/lib/content/commands/npm-stop.md b/docs/lib/content/commands/npm-stop.md new file mode 100644 index 0000000000000..e4924d44821ea --- /dev/null +++ b/docs/lib/content/commands/npm-stop.md @@ -0,0 +1,49 @@ +--- +title: npm-stop +section: 1 +description: Stop a package +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +This runs a predefined command specified in the "stop" property of a +package's "scripts" object. + +Unlike with [npm start](/commands/npm-start), there is no default script +that will run if the `"stop"` property is not defined. + +### Example + +```json +{ + "scripts": { + "stop": "node bar.js" + } +} +``` + +```bash +npm stop + +> npm@x.x.x stop +> node bar.js + +(bar.js output would be here) + +``` + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm run-script](/commands/npm-run-script) +* [npm scripts](/using-npm/scripts) +* [npm test](/commands/npm-test) +* [npm start](/commands/npm-start) +* [npm restart](/commands/npm-restart) diff --git a/docs/content/commands/npm-team.md b/docs/lib/content/commands/npm-team.md similarity index 59% rename from docs/content/commands/npm-team.md rename to docs/lib/content/commands/npm-team.md index dc26fb53aaff1..f82e8cf30142c 100644 --- a/docs/content/commands/npm-team.md +++ b/docs/lib/content/commands/npm-team.md @@ -6,22 +6,7 @@ description: Manage organization teams and team memberships ### Synopsis -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/team.js --> - -```bash -npm team create <scope:team> [--otp <otpcode>] -npm team destroy <scope:team> [--otp <otpcode>] -npm team add <scope:team> <user> [--otp <otpcode>] -npm team rm <scope:team> <user> [--otp <otpcode>] -npm team ls <scope>|<scope:team> -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/team.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> Note: This command is unaware of workspaces. @@ -110,60 +95,7 @@ use the `npm access` command to grant or revoke the appropriate permissions. ### Configuration -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `parseable` - -* Default: false -* Type: Boolean - -Output parseable results from commands that write to standard output. For -`npm search`, this will be tab-separated table format. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> ### See Also diff --git a/docs/lib/content/commands/npm-test.md b/docs/lib/content/commands/npm-test.md new file mode 100644 index 0000000000000..11a4d793aa8da --- /dev/null +++ b/docs/lib/content/commands/npm-test.md @@ -0,0 +1,44 @@ +--- +title: npm-test +section: 1 +description: Test a package +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +This runs a predefined command specified in the `"test"` property of +a package's `"scripts"` object. + +### Example + +```json +{ + "scripts": { + "test": "node test.js" + } +} +``` + +```bash +npm test +> npm@x.x.x test +> node test.js + +(test.js output would be here) +``` + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm run-script](/commands/npm-run-script) +* [npm scripts](/using-npm/scripts) +* [npm start](/commands/npm-start) +* [npm restart](/commands/npm-restart) +* [npm stop](/commands/npm-stop) diff --git a/docs/content/commands/npm-token.md b/docs/lib/content/commands/npm-token.md similarity index 64% rename from docs/content/commands/npm-token.md rename to docs/lib/content/commands/npm-token.md index 856ad68c9c94f..85b60105d7cc4 100644 --- a/docs/content/commands/npm-token.md +++ b/docs/lib/content/commands/npm-token.md @@ -6,20 +6,7 @@ description: Manage your authentication tokens ### Synopsis -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/token.js --> - -```bash -npm token list -npm token revoke <id|token> -npm token create [--read-only] [--cidr=list] -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/token.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> Note: This command is unaware of workspaces. @@ -86,56 +73,7 @@ This lets you list, create and revoke authentication tokens. ### Configuration -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `read-only` - -* Default: false -* Type: Boolean - -This is used to mark a token as unable to publish when configuring limited -access tokens with the `npm token create` command. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `cidr` - -* Default: null -* Type: null or String (can be set multiple times) - -This is a list of CIDR address to be used when configuring limited access -tokens with the `npm token create` command. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> ### See Also diff --git a/docs/lib/content/commands/npm-uninstall.md b/docs/lib/content/commands/npm-uninstall.md new file mode 100644 index 0000000000000..46e5af073e959 --- /dev/null +++ b/docs/lib/content/commands/npm-uninstall.md @@ -0,0 +1,63 @@ +--- +title: npm-uninstall +section: 1 +description: Remove a package +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +This uninstalls a package, completely removing everything npm installed +on its behalf. + +It also removes the package from the `dependencies`, `devDependencies`, +`optionalDependencies`, and `peerDependencies` objects in your +`package.json`. + +Further, if you have an `npm-shrinkwrap.json` or `package-lock.json`, npm +will update those files as well. + +`--no-save` will tell npm not to remove the package from your +`package.json`, `npm-shrinkwrap.json`, or `package-lock.json` files. + +`--save` or `-S` will tell npm to remove the package from your +`package.json`, `npm-shrinkwrap.json`, and `package-lock.json` files. +This is the default, but you may need to use this if you have for +instance `save=false` in your `npmrc` file + +In global mode (ie, with `-g` or `--global` appended to the command), +it uninstalls the current package context as a global package. +`--no-save` is ignored in this case. + +Scope is optional and follows the usual rules for [`scope`](/using-npm/scope). + +### Examples + +```bash +npm uninstall sax +``` + +`sax` will no longer be in your `package.json`, `npm-shrinkwrap.json`, or +`package-lock.json` files. + +```bash +npm uninstall lodash --no-save +``` + +`lodash` will not be removed from your `package.json`, +`npm-shrinkwrap.json`, or `package-lock.json` files. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm prune](/commands/npm-prune) +* [npm install](/commands/npm-install) +* [npm folders](/configuring-npm/folders) +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) diff --git a/docs/lib/content/commands/npm-unpublish.md b/docs/lib/content/commands/npm-unpublish.md new file mode 100644 index 0000000000000..76f4cd00bf061 --- /dev/null +++ b/docs/lib/content/commands/npm-unpublish.md @@ -0,0 +1,50 @@ +--- +title: npm-unpublish +section: 1 +description: Remove a package from the registry +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +To learn more about how the npm registry treats unpublish, see our <a +href="https://docs.npmjs.com/policies/unpublish" target="_blank" +rel="noopener noreferrer"> unpublish policies</a> + +### Warning + +Consider using the [`deprecate`](/commands/npm-deprecate) command instead, +if your intent is to encourage users to upgrade, or if you no longer +want to maintain a package. + +### Description + +This removes a package version from the registry, deleting its entry and +removing the tarball. + +The npm registry will return an error if you are not [logged +in](/commands/npm-adduser). + +If you do not specify a version or if you remove all of a package's +versions then the registry will remove the root package entry entirely. + +Even if you unpublish a package version, that specific name and version +combination can never be reused. In order to publish the package again, +you must use a new version number. If you unpublish the entire package, +you may not publish any new versions of that package until 24 hours have +passed. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [package spec](/using-npm/package-spec) +* [npm deprecate](/commands/npm-deprecate) +* [npm publish](/commands/npm-publish) +* [npm registry](/using-npm/registry) +* [npm adduser](/commands/npm-adduser) +* [npm owner](/commands/npm-owner) +* [npm login](/commands/npm-adduser) diff --git a/docs/lib/content/commands/npm-unstar.md b/docs/lib/content/commands/npm-unstar.md new file mode 100644 index 0000000000000..8891ece5a8892 --- /dev/null +++ b/docs/lib/content/commands/npm-unstar.md @@ -0,0 +1,41 @@ +--- +title: npm-unstar +section: 1 +description: Remove an item from your favorite packages +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +Note: This command is unaware of workspaces. + +### Description + +"Unstarring" a package is the opposite of [`npm star`](/commands/npm-star), +it removes an item from your list of favorite packages. + +### More + +There's also these extra commands to help you manage your favorite packages: + +#### Star + +You can "star" a package using [`npm star`](/commands/npm-star) + +#### Listing stars + +You can see all your starred packages using [`npm stars`](/commands/npm-stars) + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm star](/commands/npm-star) +* [npm stars](/commands/npm-stars) +* [npm view](/commands/npm-view) +* [npm whoami](/commands/npm-whoami) +* [npm adduser](/commands/npm-adduser) + diff --git a/docs/lib/content/commands/npm-update.md b/docs/lib/content/commands/npm-update.md new file mode 100644 index 0000000000000..7e4f0564d17d7 --- /dev/null +++ b/docs/lib/content/commands/npm-update.md @@ -0,0 +1,165 @@ +--- +title: npm-update +section: 1 +description: Update packages +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Description + +This command will update all the packages listed to the latest version +(specified by the [`tag` config](/using-npm/config#tag)), respecting the semver +constraints of both your package and its dependencies (if they also require the +same package). + +It will also install missing packages. + +If the `-g` flag is specified, this command will update globally installed +packages. + +If no package name is specified, all packages in the specified location (global +or local) will be updated. + +Note that by default `npm update` will not update the semver values of direct +dependencies in your project `package.json`, if you want to also update +values in `package.json` you can run: `npm update --save` (or add the +`save=true` option to a [configuration file](/configuring-npm/npmrc) +to make that the default behavior). + +### Example + +For the examples below, assume that the current package is `app` and it depends +on dependencies, `dep1` (`dep2`, .. etc.). The published versions of `dep1` +are: + +```json +{ + "dist-tags": { "latest": "1.2.2" }, + "versions": [ + "1.2.2", + "1.2.1", + "1.2.0", + "1.1.2", + "1.1.1", + "1.0.0", + "0.4.1", + "0.4.0", + "0.2.0" + ] +} +``` + +#### Caret Dependencies + +If `app`'s `package.json` contains: + +```json +"dependencies": { + "dep1": "^1.1.1" +} +``` + +Then `npm update` will install `dep1@1.2.2`, because `1.2.2` is `latest` and +`1.2.2` satisfies `^1.1.1`. + +#### Tilde Dependencies + +However, if `app`'s `package.json` contains: + +```json +"dependencies": { + "dep1": "~1.1.1" +} +``` + +In this case, running `npm update` will install `dep1@1.1.2`. Even though the +`latest` tag points to `1.2.2`, this version do not satisfy `~1.1.1`, which is +equivalent to `>=1.1.1 <1.2.0`. So the highest-sorting version that satisfies +`~1.1.1` is used, which is `1.1.2`. + +#### Caret Dependencies below 1.0.0 + +Suppose `app` has a caret dependency on a version below `1.0.0`, for example: + +```json +"dependencies": { + "dep1": "^0.2.0" +} +``` + +`npm update` will install `dep1@0.2.0`, because there are no other +versions which satisfy `^0.2.0`. + +If the dependence were on `^0.4.0`: + +```json +"dependencies": { + "dep1": "^0.4.0" +} +``` + +Then `npm update` will install `dep1@0.4.1`, because that is the highest-sorting +version that satisfies `^0.4.0` (`>= 0.4.0 <0.5.0`) + + +#### Subdependencies + +Suppose your app now also has a dependency on `dep2` + +```json +{ + "name": "my-app", + "dependencies": { + "dep1": "^1.0.0", + "dep2": "1.0.0" + } +} +``` + +and `dep2` itself depends on this limited range of `dep1` + +```json +{ +"name": "dep2", + "dependencies": { + "dep1": "~1.1.1" + } +} +``` + +Then `npm update` will install `dep1@1.1.2` because that is the highest +version that `dep2` allows. npm will prioritize having a single version +of `dep1` in your tree rather than two when that single version can +satisfy the semver requirements of multiple dependencies in your tree. +In this case if you really did need your package to use a newer version +you would need to use `npm install`. + + +#### Updating Globally-Installed Packages + +`npm update -g` will apply the `update` action to each globally installed +package that is `outdated` -- that is, has a version that is different from +`wanted`. + +Note: Globally installed packages are treated as if they are installed with a +caret semver range specified. So if you require to update to `latest` you may +need to run `npm install -g [<pkg>...]` + +NOTE: If a package has been upgraded to a version newer than `latest`, it will +be _downgraded_. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm install](/commands/npm-install) +* [npm outdated](/commands/npm-outdated) +* [npm shrinkwrap](/commands/npm-shrinkwrap) +* [npm registry](/using-npm/registry) +* [npm folders](/configuring-npm/folders) +* [npm ls](/commands/npm-ls) diff --git a/docs/lib/content/commands/npm-version.md b/docs/lib/content/commands/npm-version.md new file mode 100644 index 0000000000000..08e74ef307afd --- /dev/null +++ b/docs/lib/content/commands/npm-version.md @@ -0,0 +1,104 @@ +--- +title: npm-version +section: 1 +description: Bump a package version +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### Description + +Run this in a package directory to bump the version and write the new data +back to `package.json`, `package-lock.json`, and, if present, +`npm-shrinkwrap.json`. + +The `newversion` argument should be a valid semver string, a valid second +argument to [semver.inc](https://github.com/npm/node-semver#functions) (one +of `patch`, `minor`, `major`, `prepatch`, `preminor`, `premajor`, +`prerelease`), or `from-git`. In the second case, the existing version will +be incremented by 1 in the specified field. `from-git` will try to read +the latest git tag, and use that as the new npm version. + +If run in a git repo, it will also create a version commit and tag. This +behavior is controlled by `git-tag-version` (see below), and can be +disabled on the command line by running `npm --no-git-tag-version version`. +It will fail if the working directory is not clean, unless the `-f` or +`--force` flag is set. + +If supplied with `-m` or [`--message` config](/using-npm/config#message) option, +npm will use it as a commit message when creating a version commit. If the +`message` config contains `%s` then that will be replaced with the resulting +version number. For example: + +```bash +npm version patch -m "Upgrade to %s for reasons" +``` + +If the [`sign-git-tag` config](/using-npm/config#sign-git-tag) is set, then the +tag will be signed using the `-s` flag to git. Note that you must have a default +GPG key set up in your git config for this to work properly. For example: + +```bash +$ npm config set sign-git-tag true +$ npm version patch + +You need a passphrase to unlock the secret key for +user: "isaacs (http://blog.izs.me/) <i@izs.me>" +2048-bit RSA key, ID 6C481CF6, created 2010-08-31 + +Enter passphrase: +``` + +If `preversion`, `version`, or `postversion` are in the `scripts` property +of the package.json, they will be executed as part of running `npm +version`. + +The exact order of execution is as follows: + +1. Check to make sure the git working directory is clean before we get + started. Your scripts may add files to the commit in future steps. + This step is skipped if the `--force` flag is set. +2. Run the `preversion` script. These scripts have access to the old + `version` in package.json. A typical use would be running your full + test suite before deploying. Any files you want added to the commit + should be explicitly added using `git add`. +3. Bump `version` in `package.json` as requested (`patch`, `minor`, + `major`, etc). +4. Run the `version` script. These scripts have access to the new `version` + in package.json (so they can incorporate it into file headers in + generated files for example). Again, scripts should explicitly add + generated files to the commit using `git add`. +5. Commit and tag. +6. Run the `postversion` script. Use it to clean up the file system or + automatically push the commit and/or tag. + +Take the following example: + +```json +{ + "scripts": { + "preversion": "npm test", + "version": "npm run build && git add -A dist", + "postversion": "git push && git push --tags && rm -rf build/temp" + } +} +``` + +This runs all your tests and proceeds only if they pass. Then runs your +`build` script, and adds everything in the `dist` directory to the commit. +After the commit, it pushes the new commit and tag up to the server, and +deletes the `build/temp` directory. + +### See Also + +* [npm init](/commands/npm-init) +* [npm run-script](/commands/npm-run-script) +* [npm scripts](/using-npm/scripts) +* [package.json](/configuring-npm/package-json) +* [config](/using-npm/config) diff --git a/docs/content/commands/npm-view.md b/docs/lib/content/commands/npm-view.md similarity index 52% rename from docs/content/commands/npm-view.md rename to docs/lib/content/commands/npm-view.md index 9e07619c204cf..a74427f32a0e6 100644 --- a/docs/content/commands/npm-view.md +++ b/docs/lib/content/commands/npm-view.md @@ -6,20 +6,7 @@ description: View registry info ### Synopsis -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/view.js --> - -```bash -npm view [<package-spec>] [<field>[.subfield]...] - -aliases: info, show, v -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/view.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> ### Description @@ -111,87 +98,7 @@ npm view connect versions ### Configuration -<!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -<!-- AUTOGENERATED CONFIG DESCRIPTIONS END --> +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> ### Output diff --git a/docs/lib/content/commands/npm-whoami.md b/docs/lib/content/commands/npm-whoami.md new file mode 100644 index 0000000000000..5dfae1781428b --- /dev/null +++ b/docs/lib/content/commands/npm-whoami.md @@ -0,0 +1,32 @@ +--- +title: npm-whoami +section: 1 +description: Display npm username +--- + +### Synopsis + +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> + +Note: This command is unaware of workspaces. + +### Description + +Display the npm username of the currently logged-in user. + +If logged into a registry that provides token-based authentication, then +connect to the `/-/whoami` registry endpoint to find the username +associated with the token, and print to standard output. + +If logged into a registry that uses Basic Auth, then simply print the +`username` portion of the authentication string. + +### Configuration + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See Also + +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) +* [npm adduser](/commands/npm-adduser) diff --git a/docs/content/commands/npm.md b/docs/lib/content/commands/npm.md similarity index 98% rename from docs/content/commands/npm.md rename to docs/lib/content/commands/npm.md index 18a68d03cd44f..d47a34e74eaf2 100644 --- a/docs/content/commands/npm.md +++ b/docs/lib/content/commands/npm.md @@ -6,8 +6,7 @@ description: javascript package manager ### Synopsis -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> ### Version diff --git a/docs/content/commands/npx.md b/docs/lib/content/commands/npx.md similarity index 92% rename from docs/content/commands/npx.md rename to docs/lib/content/commands/npx.md index e7e59d00d84c1..6d6aed6be2979 100644 --- a/docs/content/commands/npx.md +++ b/docs/lib/content/commands/npx.md @@ -6,21 +6,7 @@ description: Run a command from a local or remote npm package ### Synopsis -<!-- AUTOGENERATED USAGE DESCRIPTIONS START --> -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/exec.js --> - -```bash -npx -- <pkg>[@<version>] [args...] -npx --package=<pkg>[@<version>] -- <cmd> [args...] -npx -c '<cmd> [args...]' -npx --package=foo -c '<cmd> [args...]' -``` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/commands/exec.js --> - -<!-- AUTOGENERATED USAGE DESCRIPTIONS END --> +<!-- AUTOGENERATED USAGE DESCRIPTIONS --> ### Description diff --git a/docs/content/configuring-npm/folders.md b/docs/lib/content/configuring-npm/folders.md similarity index 89% rename from docs/content/configuring-npm/folders.md rename to docs/lib/content/configuring-npm/folders.md index aa1c5738e3a4e..6295fd7e65d61 100644 --- a/docs/content/configuring-npm/folders.md +++ b/docs/lib/content/configuring-npm/folders.md @@ -128,8 +128,8 @@ Consider the case above, where `foo -> bar -> baz`. Imagine if, in addition to that, baz depended on bar, so you'd have: `foo -> bar -> baz -> bar -> baz ...`. However, since the folder structure is: `foo/node_modules/bar/node_modules/baz`, there's no need to -put another copy of bar into `.../baz/node_modules`, since when it calls -require("bar"), it will get the copy that is installed in +put another copy of bar into `.../baz/node_modules`, since when baz calls +`require("bar")`, it will get the copy that is installed in `foo/node_modules/bar`. This shortcut is only used if the exact same @@ -140,7 +140,8 @@ exact same package multiple times, an infinite regress will always be prevented. Another optimization can be made by installing dependencies at the -highest level possible, below the localized "target" folder. +highest level possible, below the localized "target" folder (hoisting). +Since version 3, npm hoists dependencies by default. #### Example @@ -160,21 +161,19 @@ foo `-- bar ``` -In this case, we might expect a folder structure like this: +In this case, we might expect a folder structure like this +(with all dependencies hoisted to the highest level possible): ```bash foo +-- node_modules +-- blerg (1.2.5) <---[A] +-- bar (1.2.3) <---[B] - | `-- node_modules + | +-- node_modules | +-- baz (2.0.2) <---[C] - | | `-- node_modules - | | `-- quux (3.2.0) - | `-- asdf (2.3.4) - `-- baz (1.2.3) <---[D] - `-- node_modules - `-- quux (3.2.0) <---[E] + +-- asdf (2.3.4) + +-- baz (1.2.3) <---[D] + +-- quux (3.2.0) <---[E] ``` Since foo depends directly on `bar@1.2.3` and `baz@1.2.3`, those are @@ -185,17 +184,16 @@ dependency on version 1.2.5. So, that gets installed at [A]. Since the parent installation of blerg satisfies bar's dependency on `blerg@1.x`, it does not install another copy under [B]. -Bar [B] also has dependencies on baz and asdf, so those are installed in -bar's `node_modules` folder. Because it depends on `baz@2.x`, it cannot +Bar [B] also has dependencies on baz and asdf. Because it depends on `baz@2.x`, it cannot re-use the `baz@1.2.3` installed in the parent `node_modules` folder [D], -and must install its own copy [C]. +and must install its own copy [C]. In order to minimize duplication, npm hoists +dependencies to the top level by default, so asdf is installed under [A]. Underneath bar, the `baz -> quux -> bar` dependency creates a cycle. However, because bar is already in quux's ancestry [B], it does not -unpack another copy of bar into that folder. - -Underneath `foo -> baz` [D], quux's [E] folder tree is empty, because its -dependency on bar is satisfied by the parent folder copy installed at [B]. +unpack another copy of bar into that folder. Likewise, quux's [E] +folder tree is empty, because its dependency on bar is satisfied +by the parent folder copy installed at [B]. For a graphical breakdown of what is installed where, use `npm ls`. diff --git a/docs/content/configuring-npm/install.md b/docs/lib/content/configuring-npm/install.md similarity index 100% rename from docs/content/configuring-npm/install.md rename to docs/lib/content/configuring-npm/install.md diff --git a/docs/content/configuring-npm/npm-shrinkwrap-json.md b/docs/lib/content/configuring-npm/npm-shrinkwrap-json.md similarity index 100% rename from docs/content/configuring-npm/npm-shrinkwrap-json.md rename to docs/lib/content/configuring-npm/npm-shrinkwrap-json.md diff --git a/docs/content/configuring-npm/npmrc.md b/docs/lib/content/configuring-npm/npmrc.md similarity index 94% rename from docs/content/configuring-npm/npmrc.md rename to docs/lib/content/configuring-npm/npmrc.md index d252f09b81a68..8cd532abc1c2d 100644 --- a/docs/content/configuring-npm/npmrc.md +++ b/docs/lib/content/configuring-npm/npmrc.md @@ -97,6 +97,15 @@ The settings `_auth`, `_authToken`, `username` and `_password` must all be scoped to a specific registry. This ensures that `npm` will never send credentials to the wrong host. +The full list is: + - `_auth` (base64 authentication string) + - `_authToken` (authentication token) + - `username` + - `_password` + - `email` + - `certfile` (path to certificate file) + - `keyfile` (path to key file) + In order to scope these values, they must be prefixed by a URI fragment. If the credential is meant for any request to a registry on a single host, the scope may look like `//registry.npmjs.org/:`. If it must be scoped to a diff --git a/docs/content/configuring-npm/package-json.md b/docs/lib/content/configuring-npm/package-json.md similarity index 100% rename from docs/content/configuring-npm/package-json.md rename to docs/lib/content/configuring-npm/package-json.md diff --git a/docs/content/configuring-npm/package-lock-json.md b/docs/lib/content/configuring-npm/package-lock-json.md similarity index 100% rename from docs/content/configuring-npm/package-lock-json.md rename to docs/lib/content/configuring-npm/package-lock-json.md diff --git a/docs/nav.yml b/docs/lib/content/nav.yml similarity index 97% rename from docs/nav.yml rename to docs/lib/content/nav.yml index 43051e4e9c3f1..00e62eaaf94e9 100644 --- a/docs/nav.yml +++ b/docs/lib/content/nav.yml @@ -18,9 +18,6 @@ - title: npm audit url: /commands/npm-audit description: Run a security audit - - title: npm bin - url: /commands/npm-bin - description: Display npm bin folder - title: npm bugs url: /commands/npm-bugs description: Bugs for a package in a web browser maybe @@ -156,9 +153,6 @@ - title: npm search url: /commands/npm-search description: Search for packages - - title: npm set-script - url: /commands/npm-set-script - description: Set tasks in the scripts section of package.json - title: npm shrinkwrap url: /commands/npm-shrinkwrap description: Lock down dependency versions for publication diff --git a/docs/lib/content/using-npm/config.md b/docs/lib/content/using-npm/config.md new file mode 100644 index 0000000000000..14972ea2fbaa1 --- /dev/null +++ b/docs/lib/content/using-npm/config.md @@ -0,0 +1,95 @@ +--- +title: config +section: 7 +description: More than you probably want to know about npm configuration +--- + +### Description + +npm gets its configuration values from the following sources, sorted by priority: + +#### Command Line Flags + +Putting `--foo bar` on the command line sets the `foo` configuration +parameter to `"bar"`. A `--` argument tells the cli parser to stop +reading flags. Using `--flag` without specifying any value will set +the value to `true`. + +Example: `--flag1 --flag2` will set both configuration parameters +to `true`, while `--flag1 --flag2 bar` will set `flag1` to `true`, +and `flag2` to `bar`. Finally, `--flag1 --flag2 -- bar` will set +both configuration parameters to `true`, and the `bar` is taken +as a command argument. + +#### Environment Variables + +Any environment variables that start with `npm_config_` will be +interpreted as a configuration parameter. For example, putting +`npm_config_foo=bar` in your environment will set the `foo` +configuration parameter to `bar`. Any environment configurations that +are not given a value will be given the value of `true`. Config +values are case-insensitive, so `NPM_CONFIG_FOO=bar` will work the +same. However, please note that inside [`scripts`](/using-npm/scripts) +npm will set its own environment variables and Node will prefer +those lowercase versions over any uppercase ones that you might set. +For details see [this issue](https://github.com/npm/npm/issues/14528). + +Notice that you need to use underscores instead of dashes, so `--allow-same-version` +would become `npm_config_allow_same_version=true`. + +#### npmrc Files + +The four relevant files are: + +* per-project configuration file (`/path/to/my/project/.npmrc`) +* per-user configuration file (defaults to `$HOME/.npmrc`; configurable via CLI + option `--userconfig` or environment variable `$NPM_CONFIG_USERCONFIG`) +* global configuration file (defaults to `$PREFIX/etc/npmrc`; configurable via + CLI option `--globalconfig` or environment variable `$NPM_CONFIG_GLOBALCONFIG`) +* npm's built-in configuration file (`/path/to/npm/npmrc`) + +See [npmrc](/configuring-npm/npmrc) for more details. + +#### Default Configs + +Run `npm config ls -l` to see a set of configuration parameters that are +internal to npm, and are defaults if nothing else is specified. + +### Shorthands and Other CLI Niceties + +The following shorthands are parsed on the command-line: + +<!-- AUTOGENERATED CONFIG SHORTHANDS --> + +If the specified configuration param resolves unambiguously to a known +configuration parameter, then it is expanded to that configuration +parameter. For example: + +```bash +npm ls --par +# same as: +npm ls --parseable +``` + +If multiple single-character shorthands are strung together, and the +resulting combination is unambiguously not some other configuration +param, then it is expanded to its various component pieces. For +example: + +```bash +npm ls -gpld +# same as: +npm ls --global --parseable --long --loglevel info +``` + +### Config Settings + +<!-- AUTOGENERATED CONFIG DESCRIPTIONS --> + +### See also + +* [npm config](/commands/npm-config) +* [npmrc](/configuring-npm/npmrc) +* [npm scripts](/using-npm/scripts) +* [npm folders](/configuring-npm/folders) +* [npm](/commands/npm) diff --git a/docs/content/using-npm/dependency-selectors.md b/docs/lib/content/using-npm/dependency-selectors.md similarity index 100% rename from docs/content/using-npm/dependency-selectors.md rename to docs/lib/content/using-npm/dependency-selectors.md diff --git a/docs/content/using-npm/developers.md b/docs/lib/content/using-npm/developers.md similarity index 100% rename from docs/content/using-npm/developers.md rename to docs/lib/content/using-npm/developers.md diff --git a/docs/content/using-npm/logging.md b/docs/lib/content/using-npm/logging.md similarity index 82% rename from docs/content/using-npm/logging.md rename to docs/lib/content/using-npm/logging.md index e52c19004d542..4470d5d155acd 100644 --- a/docs/content/using-npm/logging.md +++ b/docs/lib/content/using-npm/logging.md @@ -14,6 +14,9 @@ All logs are written to a debug log, with the path to that file printed if the e The default location of the logs directory is a directory named `_logs` inside the npm cache. This can be changed with the `logs-dir` config option. +For example, if you wanted to write all your logs to the current working directory, you could run: `npm install --logs-dir=.`. This is especially helpful in debugging a specific `npm` issue as you can run +a command multiple times with different config values and then diff all the log files. + Log files will be removed from the `logs-dir` when the number of log files exceeds `logs-max`, with the oldest logs being deleted first. To turn off logs completely set `--logs-max=0`. @@ -31,7 +34,6 @@ The default value of `loglevel` is `"notice"` but there are several levels/types - `"warn"` - `"notice"` - `"http"` -- `"timing"` - `"info"` - `"verbose"` - `"silly"` @@ -57,15 +59,21 @@ The `npm` CLI began hiding the output of lifecycle scripts for `npm install` as ### Timing Information -The [`--timing` config](/using-npm/config#timing) can be set which does two +The [`--timing` config](/using-npm/config#timing) can be set which does a few things: 1. Always shows the full path to the debug log regardless of command exit status 1. Write timing information to a process specific timing file in the cache or `logs-dir` +1. Output timing information to the terminal This file contains a `timers` object where the keys are an identifier for the portion of the process being timed and the value is the number of milliseconds it took to complete. +Sometimes it is helpful to get timing information without outputting anything to the terminal. For +example, the performance might be affected by writing to the terminal. In this case you can use +`--timing --silent` which will still write the timing file, but not output anything to the terminal +while running. + ### Registry Response Headers #### `npm-notice` diff --git a/docs/content/using-npm/orgs.md b/docs/lib/content/using-npm/orgs.md similarity index 100% rename from docs/content/using-npm/orgs.md rename to docs/lib/content/using-npm/orgs.md diff --git a/docs/content/using-npm/package-spec.md b/docs/lib/content/using-npm/package-spec.md similarity index 100% rename from docs/content/using-npm/package-spec.md rename to docs/lib/content/using-npm/package-spec.md diff --git a/docs/content/using-npm/registry.md b/docs/lib/content/using-npm/registry.md similarity index 94% rename from docs/content/using-npm/registry.md rename to docs/lib/content/using-npm/registry.md index 5fab60ff4d49c..8d5ac94160b33 100644 --- a/docs/content/using-npm/registry.md +++ b/docs/lib/content/using-npm/registry.md @@ -31,6 +31,9 @@ used, which is supplied by the [`registry` config](/using-npm/config#registry) parameter. See [`npm config`](/commands/npm-config), [`npmrc`](/configuring-npm/npmrc), and [`config`](/using-npm/config) for more on managing npm's configuration. +Authentication configuration such as auth tokens and certificates are configured +specifically scoped to an individual registry. See +[Auth Related Configuration](/configuring-npm/npmrc#auth-related-configuration) When the default registry is used in a package-lock or shrinkwrap is has the special meaning of "the currently configured registry". If you create a lock diff --git a/docs/content/using-npm/removal.md b/docs/lib/content/using-npm/removal.md similarity index 100% rename from docs/content/using-npm/removal.md rename to docs/lib/content/using-npm/removal.md diff --git a/docs/content/using-npm/scope.md b/docs/lib/content/using-npm/scope.md similarity index 100% rename from docs/content/using-npm/scope.md rename to docs/lib/content/using-npm/scope.md diff --git a/docs/content/using-npm/scripts.md b/docs/lib/content/using-npm/scripts.md similarity index 100% rename from docs/content/using-npm/scripts.md rename to docs/lib/content/using-npm/scripts.md diff --git a/docs/content/using-npm/workspaces.md b/docs/lib/content/using-npm/workspaces.md similarity index 100% rename from docs/content/using-npm/workspaces.md rename to docs/lib/content/using-npm/workspaces.md diff --git a/docs/lib/index.js b/docs/lib/index.js new file mode 100644 index 0000000000000..a3270f00a87cb --- /dev/null +++ b/docs/lib/index.js @@ -0,0 +1,173 @@ +const marked = require('marked-man') +const localeCompare = require('@isaacs/string-locale-compare')('en') +const { join, basename, resolve } = require('path') +const transformHTML = require('./transform-html.js') +const { version } = require('../../lib/npm.js') +const { aliases } = require('../../lib/utils/cmd-list') +const { shorthands, definitions } = require('../../lib/utils/config/index.js') + +const DOC_EXT = '.md' + +const TAGS = { + CONFIG: '<!-- AUTOGENERATED CONFIG DESCRIPTIONS -->', + USAGE: '<!-- AUTOGENERATED USAGE DESCRIPTIONS -->', + SHORTHANDS: '<!-- AUTOGENERATED CONFIG SHORTHANDS -->', +} + +const assertPlaceholder = (src, path, placeholder) => { + if (!src.includes(placeholder)) { + throw new Error( + `Cannot replace ${placeholder} in ${path} due to missing placeholder` + ) + } + return placeholder +} + +const getCommandByDoc = (docFile, docExt) => { + // Grab the command name from the *.md filename + // NOTE: We cannot use the name property command file because in the case of + // `npx` the file being used is `lib/commands/exec.js` + const name = basename(docFile, docExt).replace('npm-', '') + + if (name === 'npm') { + return { + name, + params: null, + usage: 'npm', + } + } + + // special case for `npx`: + // `npx` is not technically a command in and of itself, + // so it just needs the usage of npm exex + const srcName = name === 'npx' ? 'exec' : name + const { params, usage = [''] } = require(`../../lib/commands/${srcName}`) + const usagePrefix = name === 'npx' ? 'npx' : `npm ${name}` + + return { + name, + params: name === 'npx' ? null : params, + usage: usage.map(u => `${usagePrefix} ${u}`.trim()).join('\n'), + } +} + +const replaceVersion = (src) => src.replace(/@VERSION@/g, version) + +const replaceUsage = (src, { path }) => { + const replacer = assertPlaceholder(src, path, TAGS.USAGE) + const { usage, name } = getCommandByDoc(path, DOC_EXT) + + const synopsis = ['```bash', usage] + + const cmdAliases = Object.keys(aliases).reduce((p, c) => { + if (aliases[c] === name) { + p.push(c) + } + return p + }, []) + + if (cmdAliases.length === 1) { + synopsis.push('') + synopsis.push(`alias: ${cmdAliases[0]}`) + } else if (cmdAliases.length > 1) { + synopsis.push('') + synopsis.push(`aliases: ${cmdAliases.join(', ')}`) + } + + synopsis.push('```') + + return src.replace(replacer, synopsis.join('\n')) +} + +const replaceParams = (src, { path }) => { + const { params } = getCommandByDoc(path, DOC_EXT) + const replacer = params && assertPlaceholder(src, path, TAGS.CONFIG) + + if (!params) { + return src + } + + const paramsConfig = params.map((n) => definitions[n].describe()) + + return src.replace(replacer, paramsConfig.join('\n\n')) +} + +const replaceConfig = (src, { path }) => { + const replacer = assertPlaceholder(src, path, TAGS.CONFIG) + + // sort not-deprecated ones to the top + /* istanbul ignore next - typically already sorted in the definitions file, + * but this is here so that our help doc will stay consistent if we decide + * to move them around. */ + const sort = ([keya, { deprecated: depa }], [keyb, { deprecated: depb }]) => { + return depa && !depb ? 1 + : !depa && depb ? -1 + : localeCompare(keya, keyb) + } + + const allConfig = Object.entries(definitions).sort(sort) + .map(([_, def]) => def.describe()) + .join('\n\n') + + return src.replace(replacer, allConfig) +} + +const replaceShorthands = (src, { path }) => { + const replacer = assertPlaceholder(src, path, TAGS.SHORTHANDS) + + const sh = Object.entries(shorthands) + .sort(([shorta, expansiona], [shortb, expansionb]) => + // sort by what they're short FOR + localeCompare(expansiona.join(' '), expansionb.join(' ')) || localeCompare(shorta, shortb) + ) + .map(([short, expansion]) => { + // XXX: this is incorrect. we have multicharacter flags like `-iwr` that + // can only be set with a single dash + const dash = short.length === 1 ? '-' : '--' + return `* \`${dash}${short}\`: \`${expansion.join(' ')}\`` + }) + + return src.replace(replacer, sh.join('\n')) +} + +const replaceHelpLinks = (src) => { + // replaces markdown links with equivalent-ish npm help commands + return src.replace( + /\[`?([\w\s-]+)`?\]\(\/(?:commands|configuring-npm|using-npm)\/(?:[\w\s-]+)\)/g, + (_, p1) => { + const term = p1.replace(/npm\s/g, '').replace(/\s+/g, ' ').trim() + const help = `npm help ${term.includes(' ') ? `"${term}"` : term}` + return help + } + ) +} + +const transformMan = (src, { data }) => + marked(`# ${data.title}(${data.section}) - ${data.description}\n\n${src}`) + +const manPath = (name, { data }) => join(`man${data.section}`, `${name}.${data.section}`) + +const transformMd = (src, { frontmatter }) => ['---', frontmatter, '---', '', src].join('\n') + +module.exports = { + DOC_EXT, + TAGS, + paths: { + content: resolve(__dirname, 'content'), + nav: resolve(__dirname, 'content', 'nav.yml'), + template: resolve(__dirname, 'template.html'), + man: resolve(__dirname, '..', '..', 'man'), + html: resolve(__dirname, '..', 'output'), + md: resolve(__dirname, '..', 'content'), + }, + usage: replaceUsage, + params: replaceParams, + config: replaceConfig, + shorthands: replaceShorthands, + version: replaceVersion, + helpLinks: replaceHelpLinks, + man: transformMan, + manPath: manPath, + md: transformMd, + html: transformHTML, +} diff --git a/docs/lib/npm.js b/docs/lib/npm.js deleted file mode 100644 index fb801a17bea46..0000000000000 --- a/docs/lib/npm.js +++ /dev/null @@ -1,14 +0,0 @@ -const { definitions, shorthands, describeAll } = require('../../lib/utils/config/index.js') -const { aliases } = require('../../lib/utils/cmd-list') -const Npm = require('../../lib/npm.js') - -// These are all the npm internals depended on by the docs scripts. If these change -// the associated targets should also be updated in the Makefile. - -module.exports = { - definitions, - shorthands, - describeAll, - aliases, - version: Npm.version, -} diff --git a/docs/lib/transform-html.js b/docs/lib/transform-html.js new file mode 100644 index 0000000000000..8d13968a40fbd --- /dev/null +++ b/docs/lib/transform-html.js @@ -0,0 +1,161 @@ +const cmark = require('cmark-gfm') +const jsdom = require('jsdom') + +function transformHTML (src, { path, template, data }) { + // Render the markdown into an HTML snippet using a GFM renderer. + // This has to use the sync API due to a bug where the promise method + // doesn't properly apply the extensions so links dont get autolinked. + const content = cmark.renderHtmlSync(src, { + smart: false, + githubPreLang: true, + strikethroughDoubleTilde: true, + unsafe: false, + extensions: { + table: true, + strikethrough: true, + tagfilter: true, + autolink: true, + }, + }) + + // Inject this data into the template, using a mustache-like + // replacement scheme. + const html = template.replace(/{{\s*([\w.]+)\s*}}/g, (token, key) => { + switch (key) { + case 'content': + return `<div id="_content">${content}</div>` + case 'url_path': + return encodeURI(path) + + case 'toc': + return '<div id="_table_of_contents"></div>' + + case 'title': + case 'section': + case 'description': + return data[key] + + case 'config.github_repo': + case 'config.github_branch': + case 'config.github_path': + return data[key.replace(/^config\./, '')] + + default: + throw new Error(`warning: unknown token '${token}' in ${path}`) + } + }) + + const dom = new jsdom.JSDOM(html) + const document = dom.window.document + + // Rewrite relative URLs in links and image sources to be relative to + // this file; this is for supporting `file://` links. HTML pages need + // suffix appended. + const links = [ + { tag: 'a', attr: 'href', suffix: '.html' }, + { tag: 'img', attr: 'src' }, + ] + + for (const linktype of links) { + for (const tag of document.querySelectorAll(linktype.tag)) { + let url = tag.getAttribute(linktype.attr) + + if (url.startsWith('/')) { + const childDepth = path.split('/').length - 1 + const prefix = childDepth > 0 ? '../'.repeat(childDepth) : './' + + url = url.replace(/^\//, prefix) + + if (linktype.suffix) { + url += linktype.suffix + } + + tag.setAttribute(linktype.attr, url) + } + } + } + + // Give headers a unique id so that they can be linked within the doc + const headerIds = [] + for (const header of document.querySelectorAll('h1, h2, h3, h4, h5, h6')) { + const headerText = header.textContent + .replace(/[A-Z]/g, x => x.toLowerCase()) + .replace(/ /g, '-') + .replace(/[^a-z0-9-]/g, '') + let headerId = headerText + let headerIncrement = 1 + + while (document.getElementById(headerId) !== null) { + headerId = headerText + ++headerIncrement + } + + headerIds.push(headerId) + header.setAttribute('id', headerId) + } + + // Walk the dom and build a table of contents + const tocEl = document.getElementById('_table_of_contents') + if (tocEl) { + const toc = generateTableOfContents(document) + if (toc) { + tocEl.appendChild(toc) + } + } + + return dom.serialize() +} + +function generateTableOfContents (document) { + const headers = walkHeaders(document.getElementById('_content')) + + // The nesting depth of headers are not necessarily the header level. + // (eg, h1 > h3 > h5 is a depth of three even though there's an h5.) + const hierarchy = [] + for (const header of headers) { + const level = headerLevel(header) + + while (hierarchy.length && hierarchy[hierarchy.length - 1].headerLevel > level) { + hierarchy.pop() + } + + if (!hierarchy.length || hierarchy[hierarchy.length - 1].headerLevel < level) { + const newList = document.createElement('ul') + newList.headerLevel = level + + if (hierarchy.length) { + hierarchy[hierarchy.length - 1].appendChild(newList) + } + + hierarchy.push(newList) + } + + const element = document.createElement('li') + + const link = document.createElement('a') + link.setAttribute('href', `#${header.getAttribute('id')}`) + link.innerHTML = header.innerHTML + element.appendChild(link) + + hierarchy[hierarchy.length - 1].appendChild(element) + } + + return hierarchy[0] +} + +function walkHeaders (element, headers = []) { + for (const child of element.childNodes) { + if (headerLevel(child)) { + headers.push(child) + } + + walkHeaders(child, headers) + } + return headers +} + +function headerLevel (node) { + const level = node.tagName ? node.tagName.match(/^[Hh]([123456])$/) : null + return level ? level[1] : 0 +} + +module.exports = transformHTML diff --git a/docs/package.json b/docs/package.json index eb5e16576eaab..18220d139402f 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,8 +1,9 @@ { - "name": "docs", + "name": "@npmcli/docs", "description": "The npm cli documentation", "version": "1.0.0", "private": true, + "main": "lib/index.js", "scripts": { "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", @@ -10,7 +11,8 @@ "lintfix": "node .. run lint -- --fix", "snap": "tap", "test": "tap", - "posttest": "node .. run lint" + "posttest": "node .. run lint", + "build": "node bin/build.js" }, "repository": { "type": "git", @@ -18,37 +20,31 @@ "directory": "docs" }, "dependencies": { + "@isaacs/string-locale-compare": "^1.1.0", "@mdx-js/mdx": "^1.6.22", "cmark-gfm": "^0.9.0", - "jsdom": "^18.1.0", + "front-matter": "^4.0.2", + "ignore-walk": "^6.0.0", + "jsdom": "^20.0.1", "marked-man": "^0.7.0", "mkdirp": "^1.0.4", - "yaml": "^1.10.2" + "yaml": "^2.1.3" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/fs": "^2.1.0", - "@npmcli/promise-spawn": "^3.0.0", - "@npmcli/template-oss": "4.5.0", - "tap": "^16.0.1", - "which": "^2.0.2" + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", + "tap": "^16.0.1" }, "author": "GitHub Inc.", "license": "ISC", "files": [ "bin/", - "lib/", - "content/", - "nav.yml" + "lib/" ], "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "tap": { - "statements": 81, - "branches": 72, - "functions": 75, - "lines": 81, "timeout": 600, "nyc-arg": [ "--exclude", @@ -57,17 +53,9 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "distPaths": [ - "content/", - "nav.yml" - ], - "allowPaths": [ - "/content/", - "/nav.yml" - ], "ciVersions": "latest", "engines": "^14.17.0 || ^16.13.0 || >=18.0.0", - "version": "4.5.0", + "version": "4.6.2", "content": "../scripts/template-oss/index.js" } } diff --git a/docs/test/index.js b/docs/test/index.js index 17710c00a0339..8452428212519 100644 --- a/docs/test/index.js +++ b/docs/test/index.js @@ -1,29 +1,111 @@ const t = require('tap') -const spawn = require('@npmcli/promise-spawn') -const fs = require('@npmcli/fs') -const { resolve, join } = require('path') -const which = require('which').sync +const { join } = require('path') +const walk = require('ignore-walk') +const { paths: { content: CONTENT_DIR, nav: NAV, template: TEMPLATE } } = require('../lib/index.js') -const cwd = resolve(__dirname, '..') -const output = join(cwd, 'output') +const testBuildDocs = async (t, { verify, ...opts } = {}) => { + const mockedBuild = require('../lib/build.js') -const rmOutput = () => fs.rm(output, { recursive: true, force: true }).catch(() => {}) + const fixtures = { + man: {}, + html: {}, + md: {}, + ...opts, + } -const spawnNpm = (cmd, ...args) => spawn(which(cmd), args, { - stdioString: true, - cwd, + const root = t.testdir(fixtures) + + const paths = { + content: fixtures.content ? join(root, 'content') : CONTENT_DIR, + template: fixtures.template ? join(root, 'template') : TEMPLATE, + nav: fixtures.nav ? join(root, 'nav') : NAV, + man: join(root, 'man'), + html: join(root, 'html'), + md: join(root, 'md'), + } + + return { + results: await mockedBuild({ ...paths, verify }), + root, + ...paths, + } +} + +t.test('builds and verifies the real docs', async (t) => { + const { man, html, md, results } = await testBuildDocs(t, { verify: true }) + + const allFiles = (await Promise.all([ + walk({ path: man }).then(r => r.length), + walk({ path: html }).then(r => r.length), + walk({ path: md }).then(r => r.length), + ])).reduce((a, b) => a + b, 0) + + t.equal(allFiles, results.length) }) -t.beforeEach(() => rmOutput()) +t.test('fails on mismatched nav', async t => { + await t.rejects(() => testBuildDocs(t, { + content: { 'test.md': '' }, + nav: '- url: /test2', + }), 'Documentation navigation (nav.yml) does not match filesystem') +}) + +t.test('missing placeholders', async t => { + t.test('command', async t => { + await t.rejects(testBuildDocs(t, { + content: { + commands: { 'npm-access.md': '<!-- AUTOGENERATED USAGE DESCRIPTIONS -->' }, + }, + }), /npm-access\.md/) + await t.rejects(testBuildDocs(t, { + content: { + commands: { 'npm-access.md': '<!-- AUTOGENERATED CONFIG DESCRIPTIONS -->' }, + }, + }), /npm-access\.md/) + }) -t.test('docs', async (t) => { - t.rejects(() => fs.stat(output)) - const docs = await spawnNpm('node', join('bin', 'dockhand')) - t.equal(docs.code, 0) - t.ok((await fs.stat(output)).isDirectory()) + t.test('definitions', async t => { + await t.rejects(testBuildDocs(t, { + content: { + 'using-npm': { 'config.md': '<!-- AUTOGENERATED CONFIG SHORTHANDS -->' }, + }, + }), /config\.md/) + await t.rejects(testBuildDocs(t, { + content: { + 'using-npm': { 'config.md': '<!-- AUTOGENERATED CONFIG DESCRIPTIONS -->' }, + }, + }), /config\.md/) + }) }) -t.test('files used by documention repo', async (t) => { - t.ok((await fs.stat(join(cwd, 'content'))).isDirectory()) - t.ok((await fs.stat(join(cwd, 'nav.yml'))).isFile()) +t.test('html', async t => { + // these don't happen anywhere in the docs so test this for coverage + // but we test for coverage + t.test('files can link to root pages', async t => { + await testBuildDocs(t, { + content: { 'test.md': '[link](/test)' }, + nav: '- url: /test', + }) + }) + + t.test('succeeds with empty content', async t => { + await testBuildDocs(t, { + content: { 'test.md': '' }, + nav: '- url: /test', + template: '{{ content }}', + }) + }) + + t.test('fails on missing vars in template', async t => { + await t.rejects(() => testBuildDocs(t, { + template: '{{ hello }}', + }), /\{\{ hello \}\}/) + }) + + t.test('rewrites img src', async t => { + await testBuildDocs(t, { + content: { 'test.md': '![](/src)' }, + nav: '- url: /test', + }) + }) }) diff --git a/lib/base-command.js b/lib/base-command.js index 3ab800adbfd98..b57b7474a5efb 100644 --- a/lib/base-command.js +++ b/lib/base-command.js @@ -11,6 +11,10 @@ class BaseCommand { constructor (npm) { this.wrapWidth = 80 this.npm = npm + + if (!this.skipConfigValidation) { + this.npm.config.validate() + } } get name () { @@ -25,6 +29,10 @@ class BaseCommand { return this.constructor.ignoreImplicitWorkspace } + get skipConfigValidation () { + return this.constructor.skipConfigValidation + } + get usage () { const usage = [ `${this.constructor.description}`, diff --git a/lib/commands/completion.js b/lib/commands/completion.js index c24fb050dcb34..3fc27c52414bb 100644 --- a/lib/commands/completion.js +++ b/lib/commands/completion.js @@ -29,13 +29,13 @@ // as an array. // -const fs = require('@npmcli/fs') +const fs = require('fs/promises') const nopt = require('nopt') const { definitions, shorthands } = require('../utils/config/index.js') -const { aliases, cmdList, plumbing } = require('../utils/cmd-list.js') +const { aliases, commands, plumbing } = require('../utils/cmd-list.js') const aliasNames = Object.keys(aliases) -const fullList = cmdList.concat(aliasNames).filter(c => !plumbing.includes(c)) +const fullList = commands.concat(aliasNames).filter(c => !plumbing.includes(c)) const configNames = Object.keys(definitions) const shorthandNames = Object.keys(shorthands) const allConfs = configNames.concat(shorthandNames) diff --git a/lib/commands/config.js b/lib/commands/config.js index 96dd4abcaf4af..103fbb554e5d1 100644 --- a/lib/commands/config.js +++ b/lib/commands/config.js @@ -1,12 +1,8 @@ // don't expand so that we only assemble the set of defaults when needed const configDefs = require('../utils/config/index.js') -const mkdirp = require('mkdirp-infer-owner') +const { mkdir, readFile, writeFile } = require('fs/promises') const { dirname, resolve } = require('path') -const { promisify } = require('util') -const fs = require('fs') -const readFile = promisify(fs.readFile) -const writeFile = promisify(fs.writeFile) const { spawn } = require('child_process') const { EOL } = require('os') const ini = require('ini') @@ -14,6 +10,18 @@ const localeCompare = require('@isaacs/string-locale-compare')('en') const rpj = require('read-package-json-fast') const log = require('../utils/log-shim.js') +// These are the configs that we can nerf-dart. Not all of them currently even +// *have* config definitions so we have to explicitly validate them here +const nerfDarts = [ + '_auth', + '_authToken', + 'username', + '_password', + 'email', + 'certfile', + 'keyfile', +] + // take an array of `[key, value, k2=v2, k3, v3, ...]` and turn into // { key: value, k2: v2, k3: v3 } const keyValues = args => { @@ -51,6 +59,7 @@ class Config extends BaseCommand { 'delete <key> [<key> ...]', 'list [--json]', 'edit', + 'fix', ] static params = [ @@ -63,6 +72,8 @@ class Config extends BaseCommand { static ignoreImplicitWorkspace = false + static skipConfigValidation = true + async completion (opts) { const argv = opts.conf.argv.remain if (argv[1] !== 'config') { @@ -70,7 +81,7 @@ class Config extends BaseCommand { } if (argv.length === 2) { - const cmds = ['get', 'set', 'delete', 'ls', 'rm', 'edit'] + const cmds = ['get', 'set', 'delete', 'ls', 'rm', 'edit', 'fix'] if (opts.partialWord !== 'l') { cmds.push('list') } @@ -95,6 +106,7 @@ class Config extends BaseCommand { case 'edit': case 'list': case 'ls': + case 'fix': default: return [] } @@ -127,6 +139,9 @@ class Config extends BaseCommand { case 'edit': await this.edit() break + case 'fix': + await this.fix() + break default: throw this.usageError() } @@ -143,6 +158,16 @@ class Config extends BaseCommand { const where = this.npm.flatOptions.location for (const [key, val] of Object.entries(keyValues(args))) { log.info('config', 'set %j %j', key, val) + const baseKey = key.split(':').pop() + if (!this.npm.config.definitions[baseKey] && !nerfDarts.includes(baseKey)) { + throw new Error(`\`${baseKey}\` is not a valid npm option`) + } + const deprecated = this.npm.config.definitions[baseKey]?.deprecated + if (deprecated) { + throw new Error( + `The \`${baseKey}\` option is deprecated, and can not be set in this way${deprecated}` + ) + } this.npm.config.set(key, val || '', where) if (!this.npm.config.validate(where)) { log.warn('config', 'omitting invalid config values') @@ -160,7 +185,7 @@ class Config extends BaseCommand { const out = [] for (const key of keys) { if (!publicVar(key)) { - throw new Error(`The ${key} option is protected, and cannot be retrieved in this way`) + throw new Error(`The ${key} option is protected, and can not be retrieved in this way`) } const pref = keys.length > 1 ? `${key}=` : '' @@ -224,7 +249,7 @@ ${data.split('\n').sort(localeCompare).join('\n').trim()} ${defData} `.split('\n').join(EOL) - await mkdirp(dirname(file)) + await mkdir(dirname(file), { recursive: true }) await writeFile(file, tmpData, 'utf8') await new Promise((resolve, reject) => { const [bin, ...args] = e.split(/\s+/) @@ -238,6 +263,49 @@ ${defData} }) } + async fix () { + let problems + + try { + this.npm.config.validate() + return // if validate doesn't throw we have nothing to do + } catch (err) { + // coverage skipped because we don't need to test rethrowing errors + // istanbul ignore next + if (err.code !== 'ERR_INVALID_AUTH') { + throw err + } + + problems = err.problems + } + + if (!this.npm.config.isDefault('location')) { + problems = problems.filter((problem) => { + return problem.where === this.npm.config.get('location') + }) + } + + this.npm.config.repair(problems) + const locations = [] + + this.npm.output('The following configuration problems have been repaired:\n') + const summary = problems.map(({ action, from, to, key, where }) => { + // coverage disabled for else branch because it is intentionally omitted + // istanbul ignore else + if (action === 'rename') { + // we keep track of which configs were modified here so we know what to save later + locations.push(where) + return `~ \`${from}\` renamed to \`${to}\` in ${where} config` + } else if (action === 'delete') { + locations.push(where) + return `- \`${key}\` deleted from ${where} config` + } + }).join('\n') + this.npm.output(summary) + + return await Promise.all(locations.map((location) => this.npm.config.save(location))) + } + async list () { const msg = [] // long does not have a flattener diff --git a/lib/commands/dedupe.js b/lib/commands/dedupe.js index 2cc44b2a9fb2f..0cc0e80709883 100644 --- a/lib/commands/dedupe.js +++ b/lib/commands/dedupe.js @@ -8,8 +8,9 @@ class Dedupe extends ArboristWorkspaceCmd { static description = 'Reduce duplication in the package tree' static name = 'dedupe' static params = [ - 'global-style', + 'install-strategy', 'legacy-bundling', + 'global-style', 'strict-peer-deps', 'package-lock', 'omit', diff --git a/lib/commands/deprecate.js b/lib/commands/deprecate.js index c41546eb1b85e..1e1b8994c55a3 100644 --- a/lib/commands/deprecate.js +++ b/lib/commands/deprecate.js @@ -39,9 +39,7 @@ class Deprecate extends BaseCommand { // fetch the data and make sure it exists. const p = npa(pkg) - // npa makes the default spec "latest", but for deprecation - // "*" is the appropriate default. - const spec = p.rawSpec === '' ? '*' : p.fetchSpec + const spec = p.rawSpec === '*' ? '*' : p.fetchSpec if (semver.validRange(spec, true) === null) { throw new Error(`invalid version range: ${spec}`) diff --git a/lib/commands/diff.js b/lib/commands/diff.js index bbd6fae6680ca..c8fd734918d75 100644 --- a/lib/commands/diff.js +++ b/lib/commands/diff.js @@ -185,7 +185,7 @@ class Diff extends BaseCommand { // work from the top of the arborist tree to find the original semver // range declared in the package that depends on the package. let bSpec - if (spec.rawSpec) { + if (spec.rawSpec !== '*') { bSpec = spec.rawSpec } else { const bTargetVersion = @@ -269,7 +269,7 @@ class Diff extends BaseCommand { return specs.map(i => { const spec = npa(i) - if (spec.rawSpec) { + if (spec.rawSpec !== '*') { return i } diff --git a/lib/commands/find-dupes.js b/lib/commands/find-dupes.js index a9de2410ec0d7..b99ea7a14eb21 100644 --- a/lib/commands/find-dupes.js +++ b/lib/commands/find-dupes.js @@ -5,8 +5,9 @@ class FindDupes extends ArboristWorkspaceCmd { static description = 'Find duplication in the package tree' static name = 'find-dupes' static params = [ - 'global-style', + 'install-strategy', 'legacy-bundling', + 'global-style', 'strict-peer-deps', 'package-lock', 'omit', diff --git a/lib/commands/hook.js b/lib/commands/hook.js index bb3a34b8d2d1b..084741c0c5eea 100644 --- a/lib/commands/hook.js +++ b/lib/commands/hook.js @@ -126,9 +126,6 @@ class Hook extends BaseCommand { hookName (hook) { let target = hook.name - if (hook.type === 'scope') { - target = '@' + target - } if (hook.type === 'owner') { target = '~' + target } diff --git a/lib/commands/init.js b/lib/commands/init.js index 039f08e06059e..4822766908715 100644 --- a/lib/commands/init.js +++ b/lib/commands/init.js @@ -1,6 +1,6 @@ const fs = require('fs') const { relative, resolve } = require('path') -const mkdirp = require('mkdirp-infer-owner') +const { mkdir } = require('fs/promises') const initJson = require('init-package-json') const npa = require('npm-package-arg') const rpj = require('read-package-json-fast') @@ -59,7 +59,7 @@ class Init extends BaseCommand { if (args.length) { for (const filterArg of filters) { const path = wPath(filterArg) - await mkdirp(path) + await mkdir(path, { recursive: true }) workspacesPaths.push(path) await this.execCreate({ args, path }) await this.setWorkspace({ pkg, workspacePath: path }) @@ -70,7 +70,7 @@ class Init extends BaseCommand { // no args, uses classic init-package-json boilerplate for (const filterArg of filters) { const path = wPath(filterArg) - await mkdirp(path) + await mkdir(path, { recursive: true }) workspacesPaths.push(path) await this.template(path) await this.setWorkspace({ pkg, workspacePath: path }) @@ -98,10 +98,7 @@ class Init extends BaseCommand { packageName = initerName .replace(user + '/' + project, user + '/create-' + project) } else if (req.registry) { - packageName = req.name.replace(/^(@[^/]+\/)?/, '$1create-') - if (req.rawSpec) { - packageName += '@' + req.rawSpec - } + packageName = `${req.name.replace(/^(@[^/]+\/)?/, '$1create-')}@${req.rawSpec}` } else { throw Object.assign(new Error( 'Unrecognized initializer: ' + initerName + diff --git a/lib/commands/install.js b/lib/commands/install.js index ecc0727a2ef7c..512226c6b5a05 100644 --- a/lib/commands/install.js +++ b/lib/commands/install.js @@ -20,8 +20,9 @@ class Install extends ArboristWorkspaceCmd { 'save', 'save-exact', 'global', - 'global-style', + 'install-strategy', 'legacy-bundling', + 'global-style', 'omit', 'strict-peer-deps', 'package-lock', diff --git a/lib/commands/link.js b/lib/commands/link.js index c9169edc9e5c3..5af2c7c269f8f 100644 --- a/lib/commands/link.js +++ b/lib/commands/link.js @@ -22,8 +22,9 @@ class Link extends ArboristWorkspaceCmd { 'save', 'save-exact', 'global', - 'global-style', + 'install-strategy', 'legacy-bundling', + 'global-style', 'strict-peer-deps', 'package-lock', 'omit', diff --git a/lib/commands/ls.js b/lib/commands/ls.js index 6812c3923787e..7eebdf691683f 100644 --- a/lib/commands/ls.js +++ b/lib/commands/ls.js @@ -177,7 +177,7 @@ class LS extends ArboristWorkspaceCmd { const [rootError] = tree.errors.filter(e => e.code === 'EJSONPARSE' && e.path === resolve(path, 'package.json')) - this.npm.output( + this.npm.outputBuffer( json ? jsonOutput({ path, problems, result, rootError, seenItems }) : parseable diff --git a/lib/commands/publish.js b/lib/commands/publish.js index 1f281a0bb1d4f..23323a174ed89 100644 --- a/lib/commands/publish.js +++ b/lib/commands/publish.js @@ -16,7 +16,7 @@ const { getContents, logTar } = require('../utils/tar.js') // keys that npm supports in .npmrc files and elsewhere. We *may* want to // revisit this at some point, and have a minimal set that's a SemVer-major // change that ought to get a RFC written on it. -const flatten = require('../utils/config/flatten.js') +const { flatten } = require('../utils/config/index.js') // this is the only case in the CLI where we want to use the old full slow // 'read-package-json' module, because we want to pull in all the defaults and diff --git a/lib/commands/rebuild.js b/lib/commands/rebuild.js index d06313ce483a9..df791106fdd21 100644 --- a/lib/commands/rebuild.js +++ b/lib/commands/rebuild.js @@ -39,7 +39,7 @@ class Rebuild extends ArboristWorkspaceCmd { const tree = await arb.loadActual() const specs = args.map(arg => { const spec = npa(arg) - if (spec.type === 'tag' && spec.rawSpec === '') { + if (spec.rawSpec === '*') { return spec } diff --git a/lib/commands/unpublish.js b/lib/commands/unpublish.js index 968bcf8018958..268c8c3daedbb 100644 --- a/lib/commands/unpublish.js +++ b/lib/commands/unpublish.js @@ -6,7 +6,7 @@ const path = require('path') const util = require('util') const readJson = util.promisify(require('read-package-json')) -const flatten = require('../utils/config/flatten.js') +const { flatten } = require('../utils/config/index.js') const getIdentity = require('../utils/get-identity.js') const log = require('../utils/log-shim') const otplease = require('../utils/otplease.js') diff --git a/lib/commands/update.js b/lib/commands/update.js index ca80d61537e70..be9d35093d43b 100644 --- a/lib/commands/update.js +++ b/lib/commands/update.js @@ -14,8 +14,9 @@ class Update extends ArboristWorkspaceCmd { static params = [ 'save', 'global', - 'global-style', + 'install-strategy', 'legacy-bundling', + 'global-style', 'omit', 'strict-peer-deps', 'package-lock', diff --git a/lib/commands/view.js b/lib/commands/view.js index 3b8524ad3fc0d..32b2d0f92a1a6 100644 --- a/lib/commands/view.js +++ b/lib/commands/view.js @@ -196,15 +196,16 @@ class View extends BaseCommand { // get the data about this package let version = this.npm.config.get('tag') // rawSpec is the git url if this is from git - if (spec.type !== 'git' && spec.type !== 'directory' && spec.rawSpec) { + if (spec.type !== 'git' && spec.type !== 'directory' && spec.rawSpec !== '*') { version = spec.rawSpec } const pckmnt = await packument(spec, opts) - if (pckmnt['dist-tags'] && pckmnt['dist-tags'][version]) { + if (pckmnt['dist-tags']?.[version]) { version = pckmnt['dist-tags'][version] } + if (pckmnt.time && pckmnt.time.unpublished) { const u = pckmnt.time.unpublished const er = new Error(`Unpublished on ${u.time}`) diff --git a/lib/npm.js b/lib/npm.js index fe2ce5c6b818c..9fbda90734921 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -4,7 +4,7 @@ const { resolve, dirname, join } = require('path') const Config = require('@npmcli/config') const chalk = require('chalk') const which = require('which') -const fs = require('@npmcli/fs') +const fs = require('fs/promises') // Patch the global fs module here at the app level require('graceful-fs').gracefulify(require('fs')) @@ -40,6 +40,7 @@ class Npm extends EventEmitter { #argvClean = [] #chalk = null + #outputBuffer = [] #logFile = new LogFile() #display = new Display() #timers = new Timers({ @@ -246,13 +247,13 @@ class Npm extends EventEmitter { // a cache dir, but we don't want to fail immediately since // the command might not need a cache dir (like `npm --version`) await this.time('npm:load:mkdirpcache', () => - fs.mkdir(this.cache, { recursive: true, owner: 'inherit' }) + fs.mkdir(this.cache, { recursive: true }) .catch((e) => log.verbose('cache', `could not create cache: ${e}`))) // its ok if this fails. user might have specified an invalid dir // which we will tell them about at the end await this.time('npm:load:mkdirplogs', () => - fs.mkdir(this.logsDir, { recursive: true, owner: 'inherit' }) + fs.mkdir(this.logsDir, { recursive: true }) .catch((e) => log.verbose('logfile', `could not create logs-dir: ${e}`))) // note: this MUST be shorter than the actual argv length, because it @@ -311,9 +312,12 @@ class Npm extends EventEmitter { get flatOptions () { const { flat } = this.config - // the Arborist constructor is used almost everywhere we call pacote, it's easiest - // to attach it to flatOptions so it goes everywhere without having to touch every call + // the Arborist constructor is used almost everywhere we call pacote, it's + // easiest to attach it to flatOptions so it goes everywhere without having + // to touch every call flat.Arborist = Arborist + flat.nodeVersion = process.version + flat.npmVersion = pkg.version if (this.command) { flat.npmCommand = this.command } @@ -463,6 +467,37 @@ class Npm extends EventEmitter { log.showProgress() } + outputBuffer (item) { + this.#outputBuffer.push(item) + } + + flushOutput (jsonError) { + if (!jsonError && !this.#outputBuffer.length) { + return + } + + if (this.config.get('json')) { + const jsonOutput = this.#outputBuffer.reduce((acc, item) => { + if (typeof item === 'string') { + // try to parse it as json in case its a string + try { + item = JSON.parse(item) + } catch { + return acc + } + } + return { ...acc, ...item } + }, {}) + this.output(JSON.stringify({ ...jsonOutput, ...jsonError }, null, 2)) + } else { + for (const item of this.#outputBuffer) { + this.output(item) + } + } + + this.#outputBuffer.length = 0 + } + outputError (...msg) { log.clearProgress() // eslint-disable-next-line no-console diff --git a/lib/utils/cmd-list.js b/lib/utils/cmd-list.js index 6fffde32a5ee2..03fe8ed07c930 100644 --- a/lib/utils/cmd-list.js +++ b/lib/utils/cmd-list.js @@ -1,4 +1,5 @@ const abbrev = require('abbrev') +const localeCompare = require('@isaacs/string-locale-compare')('en') // plumbing should not have any aliases const aliases = { @@ -68,8 +69,7 @@ const aliases = { } // these are filenames in . -// Keep these sorted so that lib/utils/npm-usage.js outputs in order -const cmdList = [ +const commands = [ 'access', 'adduser', 'audit', @@ -135,14 +135,16 @@ const cmdList = [ 'version', 'view', 'whoami', -] +].sort(localeCompare) const plumbing = ['help-search'] -const abbrevs = abbrev(cmdList.concat(Object.keys(aliases))) +const allCommands = [...commands, ...plumbing].sort(localeCompare) +const abbrevs = abbrev(commands.concat(Object.keys(aliases))) module.exports = { abbrevs, aliases, - cmdList, + commands, plumbing, + allCommands, } diff --git a/lib/utils/config/definitions.js b/lib/utils/config/definitions.js index 6d92651eb95f3..85d13762eef67 100644 --- a/lib/utils/config/definitions.js +++ b/lib/utils/config/definitions.js @@ -422,6 +422,13 @@ define('cert', { It is _not_ the path to a certificate file, though you can set a registry-scoped "certfile" path like "//other-registry.tld/:certfile=/path/to/cert.pem". `, + deprecated: ` + \`key\` and \`cert\` are no longer used for most registry operations. + Use registry scoped \`keyfile\` and \`certfile\` instead. + Example: + //other-registry.tld/:keyfile=/path/to/key.pem + //other-registry.tld/:certfile=/path/to/cert.crt + `, flatten, }) @@ -823,20 +830,6 @@ define('global', { }, }) -define('global-style', { - default: false, - type: Boolean, - description: ` - Causes npm to install the package into your local \`node_modules\` folder - with the same layout it uses with the global \`node_modules\` folder. - Only your direct dependencies will show in \`node_modules\` and - everything they depend on will be flattened in their \`node_modules\` - folders. This obviously will eliminate some deduping. If used with - \`legacy-bundling\`, \`legacy-bundling\` will be preferred. - `, - flatten, -}) - // the globalconfig has its default defined outside of this module define('globalconfig', { type: path, @@ -851,6 +844,25 @@ define('globalconfig', { flatten, }) +define('global-style', { + default: false, + type: Boolean, + description: ` + Only install direct dependencies in the top level \`node_modules\`, + but hoist on deeper dependendencies. + Sets \`--install-strategy=shallow\`. + `, + deprecated: ` + This option has been deprecated in favor of \`--install-strategy=shallow\` + `, + flatten (key, obj, flatOptions) { + if (obj[key]) { + obj['install-strategy'] = 'shallow' + flatOptions.installStrategy = 'shallow' + } + }, +}) + define('heading', { default: 'npm', type: String, @@ -1076,6 +1088,21 @@ define('install-links', { flatten, }) +define('install-strategy', { + default: 'hoisted', + type: ['hoisted', 'nested', 'shallow'], + description: ` + Sets the strategy for installing packages in node_modules. + hoisted (default): Install non-duplicated in top-level, and duplicated as + necessary within directory structure. + nested: (formerly --legacy-bundling) install in place, no hoisting. + shallow (formerly --global-style) only install direct deps at top-level. + linked: (coming soon) install in node_modules/.store, link in place, + unhoisted. + `, + flatten, +}) + define('json', { default: false, type: Boolean, @@ -1104,6 +1131,13 @@ define('key', { It is _not_ the path to a key file, though you can set a registry-scoped "keyfile" path like "//other-registry.tld/:keyfile=/path/to/key.pem". `, + deprecated: ` + \`key\` and \`cert\` are no longer used for most registry operations. + Use registry scoped \`keyfile\` and \`certfile\` instead. + Example: + //other-registry.tld/:keyfile=/path/to/key.pem + //other-registry.tld/:certfile=/path/to/cert.crt + `, flatten, }) @@ -1111,12 +1145,21 @@ define('legacy-bundling', { default: false, type: Boolean, description: ` - Causes npm to install the package such that versions of npm prior to 1.4, - such as the one included with node 0.8, can install the package. This - eliminates all automatic deduping. If used with \`global-style\` this - option will be preferred. + Instead of hoisting package installs in \`node_modules\`, install packages + in the same manner that they are depended on. This may cause very deep + directory structures and duplicate package installs as there is no + de-duplicating. + Sets \`--install-strategy=nested\`. `, - flatten, + deprecated: ` + This option has been deprecated in favor of \`--install-strategy=nested\` + `, + flatten (key, obj, flatOptions) { + if (obj[key]) { + obj['install-strategy'] = 'nested' + flatOptions.installStrategy = 'nested' + } + }, }) define('legacy-peer-deps', { @@ -1230,7 +1273,6 @@ define('loglevel', { 'warn', 'notice', 'http', - 'timing', 'info', 'verbose', 'silly', @@ -1314,16 +1356,6 @@ define('node-options', { `, }) -define('node-version', { - default: process.version, - defaultDescription: 'Node.js `process.version` value', - type: semver, - description: ` - The node version to use when checking a package's \`engines\` setting. - `, - flatten, -}) - define('noproxy', { default: '', defaultDescription: ` @@ -1344,16 +1376,6 @@ define('noproxy', { }, }) -define('npm-version', { - default: npmVersion, - defaultDescription: 'Output of `npm --version`', - type: semver, - description: ` - The npm version to use when checking a package's \`engines\` setting. - `, - flatten, -}) - define('offline', { default: false, type: Boolean, @@ -1543,8 +1565,8 @@ define('prefix', { short: 'C', default: '', defaultDescription: ` - In global mode, the folder where the node executable is installed. In - local mode, the nearest parent folder containing either a package.json + In global mode, the folder where the node executable is installed. + Otherwise, the nearest parent folder containing either a package.json file or a node_modules folder. `, description: ` @@ -2044,7 +2066,7 @@ define('tag-version-prefix', { type: String, description: ` If set, alters the prefix used when tagging a new version when performing - a version increment using \`npm-version\`. To remove the prefix + a version increment using \`npm version\`. To remove the prefix altogether, set it to the empty string: \`""\`. Because other tools may rely on the convention that npm version tags look @@ -2063,6 +2085,9 @@ define('timing', { You can quickly view it with this [json](https://npm.im/json) command line: \`cat ~/.npm/_logs/*-timing.json | npm exec -- json -g\`. + + Timing information will also be reported in the terminal. To suppress this + while still writing the timing file, use \`--silent\`. `, }) @@ -2166,8 +2191,8 @@ define('user-agent', { inWorkspaces = true } flatOptions.userAgent = - value.replace(/\{node-version\}/gi, obj['node-version']) - .replace(/\{npm-version\}/gi, obj['npm-version']) + value.replace(/\{node-version\}/gi, process.version) + .replace(/\{npm-version\}/gi, npmVersion) .replace(/\{platform\}/gi, process.platform) .replace(/\{arch\}/gi, process.arch) .replace(/\{workspaces\}/gi, inWorkspaces) diff --git a/lib/utils/config/describe-all.js b/lib/utils/config/describe-all.js deleted file mode 100644 index 39f8d5fe4d453..0000000000000 --- a/lib/utils/config/describe-all.js +++ /dev/null @@ -1,20 +0,0 @@ -const definitions = require('./definitions.js') -const localeCompare = require('@isaacs/string-locale-compare')('en') -const describeAll = () => { - // sort not-deprecated ones to the top - /* istanbul ignore next - typically already sorted in the definitions file, - * but this is here so that our help doc will stay consistent if we decide - * to move them around. */ - const sort = ([keya, { deprecated: depa }], [keyb, { deprecated: depb }]) => { - return depa && !depb ? 1 - : !depa && depb ? -1 - : localeCompare(keya, keyb) - } - return Object.entries(definitions).sort(sort) - .map(([key, def]) => def.describe()) - .join( - '\n\n<!-- automatically generated, do not edit manually -->\n' + - '<!-- see lib/utils/config/definitions.js -->\n\n' - ) -} -module.exports = describeAll diff --git a/lib/utils/config/flatten.js b/lib/utils/config/flatten.js deleted file mode 100644 index 588d05bf0d77d..0000000000000 --- a/lib/utils/config/flatten.js +++ /dev/null @@ -1,33 +0,0 @@ -// use the defined flattening function, and copy over any scoped -// registries and registry-specific "nerfdart" configs verbatim -// -// TODO: make these getters so that we only have to make dirty -// the thing that changed, and then flatten the fields that -// could have changed when a config.set is called. -// -// TODO: move nerfdart auth stuff into a nested object that -// is only passed along to paths that end up calling npm-registry-fetch. -const definitions = require('./definitions.js') -const flatten = (obj, flat = {}) => { - for (const [key, val] of Object.entries(obj)) { - const def = definitions[key] - if (def && def.flatten) { - def.flatten(key, obj, flat) - } else if (/@.*:registry$/i.test(key) || /^\/\//.test(key)) { - flat[key] = val - } - } - - // XXX make this the bin/npm-cli.js file explicitly instead - // otherwise using npm programmatically is a bit of a pain. - flat.npmBin = require.main ? require.main.filename - : /* istanbul ignore next - not configurable property */ undefined - flat.nodeBin = process.env.NODE || process.execPath - - // XXX should this be sha512? is it even relevant? - flat.hashAlgorithm = 'sha1' - - return flat -} - -module.exports = flatten diff --git a/lib/utils/config/index.js b/lib/utils/config/index.js index b0ad24d7ee12f..d393aec2297d2 100644 --- a/lib/utils/config/index.js +++ b/lib/utils/config/index.js @@ -1,6 +1,35 @@ -const flatten = require('./flatten.js') const definitions = require('./definitions.js') -const describeAll = require('./describe-all.js') + +// use the defined flattening function, and copy over any scoped +// registries and registry-specific "nerfdart" configs verbatim +// +// TODO: make these getters so that we only have to make dirty +// the thing that changed, and then flatten the fields that +// could have changed when a config.set is called. +// +// TODO: move nerfdart auth stuff into a nested object that +// is only passed along to paths that end up calling npm-registry-fetch. +const flatten = (obj, flat = {}) => { + for (const [key, val] of Object.entries(obj)) { + const def = definitions[key] + if (def && def.flatten) { + def.flatten(key, obj, flat) + } else if (/@.*:registry$/i.test(key) || /^\/\//.test(key)) { + flat[key] = val + } + } + + // XXX make this the bin/npm-cli.js file explicitly instead + // otherwise using npm programmatically is a bit of a pain. + flat.npmBin = require.main ? require.main.filename + : /* istanbul ignore next - not configurable property */ undefined + flat.nodeBin = process.env.NODE || process.execPath + + // XXX should this be sha512? is it even relevant? + flat.hashAlgorithm = 'sha1' + + return flat +} // aliases where they get expanded into a completely different thing // these are NOT supported in the environment or npmrc files, only @@ -26,30 +55,24 @@ const shorthands = { readonly: ['--read-only'], reg: ['--registry'], iwr: ['--include-workspace-root'], -} - -for (const [key, { short }] of Object.entries(definitions)) { - if (!short) { - continue - } - // can be either an array or string - for (const s of [].concat(short)) { - shorthands[s] = [`--${key}`] - } + ...Object.entries(definitions).reduce((acc, [key, { short = [] }]) => { + // can be either an array or string + for (const s of [].concat(short)) { + acc[s] = [`--${key}`] + } + return acc + }, {}), } module.exports = { get defaults () { // NB: 'default' is a reserved word - return Object.entries(definitions).map(([key, { default: def }]) => { - return [key, def] - }).reduce((defaults, [key, def]) => { - defaults[key] = def - return defaults + return Object.entries(definitions).reduce((acc, [key, { default: d }]) => { + acc[key] = d + return acc }, {}) }, definitions, flatten, shorthands, - describeAll, } diff --git a/lib/utils/did-you-mean.js b/lib/utils/did-you-mean.js index b859abaaf5d23..10b33d5f83a08 100644 --- a/lib/utils/did-you-mean.js +++ b/lib/utils/did-you-mean.js @@ -1,10 +1,10 @@ const { distance } = require('fastest-levenshtein') const readJson = require('read-package-json-fast') -const { cmdList } = require('./cmd-list.js') +const { commands } = require('./cmd-list.js') const didYouMean = async (npm, path, scmd) => { // const cmd = await npm.cmd(str) - const close = cmdList.filter(cmd => distance(scmd, cmd) < scmd.length * 0.4 && scmd !== cmd) + const close = commands.filter(cmd => distance(scmd, cmd) < scmd.length * 0.4 && scmd !== cmd) let best = [] for (const str of close) { const cmd = await npm.cmd(str) diff --git a/lib/utils/display.js b/lib/utils/display.js index b23b2467ff4e6..35d221c09cae8 100644 --- a/lib/utils/display.js +++ b/lib/utils/display.js @@ -34,13 +34,20 @@ class Display { heading = 'npm', } = config - // XXX: decouple timing from loglevel - if (timing && loglevel === 'notice') { - log.level = 'timing' - } else { - log.level = loglevel - } - + // npmlog is still going away someday, so this is a hack to dynamically + // set the loglevel of timing based on the timing flag, instead of making + // a breaking change to npmlog. The result is that timing logs are never + // shown except when the --timing flag is set. We also need to change + // the index of the silly level since otherwise it is set to -Infinity + // and we can't go any lower than that. silent is still set to Infinify + // because we DO want silent to hide timing levels. This allows for the + // special case of getting timing information while hiding all CLI output + // in order to get perf information that might be affected by writing to + // a terminal. XXX(npmlog): this will be removed along with npmlog + log.levels.silly = -10000 + log.levels.timing = log.levels[loglevel] + (timing ? 1 : -1) + + log.level = loglevel log.heading = heading if (color) { diff --git a/lib/utils/exit-handler.js b/lib/utils/exit-handler.js index f1843347bc324..a9e061de7a4a5 100644 --- a/lib/utils/exit-handler.js +++ b/lib/utils/exit-handler.js @@ -1,5 +1,5 @@ const os = require('os') -const fs = require('@npmcli/fs') +const fs = require('fs') const log = require('./log-shim.js') const errorMessage = require('./error-message.js') @@ -136,6 +136,7 @@ const exitHandler = err => { let exitCode let noLogMessage + let jsonError if (err) { exitCode = 1 @@ -186,11 +187,7 @@ const exitHandler = err => { file = `${npm.logPath}${file}` content = `'Log files:\n${npm.logFiles.join('\n')}\n\n${content.trim()}\n` try { - fs.withOwnerSync( - file, - () => fs.writeFileSync(file, content), - { owner: 'inherit' } - ) + fs.writeFileSync(file, content) detail.push(['', `\n\nFor a full report see:\n${file}`]) } catch (err) { log.warn('', `Could not write error message to ${file} due to ${err}`) @@ -202,14 +199,13 @@ const exitHandler = err => { } if (hasLoadedNpm && npm.config.get('json')) { - const error = { + jsonError = { error: { code: err.code, summary: messageText(summary), detail: messageText(detail), }, } - npm.outputError(JSON.stringify(error, null, 2)) } if (typeof err.errno === 'number') { @@ -220,6 +216,10 @@ const exitHandler = err => { } } + if (hasLoadedNpm) { + npm.flushOutput(jsonError) + } + log.verbose('exit', exitCode || 0) showLogFileError = (hasLoadedNpm && npm.silent) || noLogMessage diff --git a/lib/utils/log-file.js b/lib/utils/log-file.js index 3351ae6cdd3d5..2935697ac98eb 100644 --- a/lib/utils/log-file.js +++ b/lib/utils/log-file.js @@ -5,7 +5,6 @@ const rimraf = promisify(require('rimraf')) const glob = promisify(require('glob')) const MiniPass = require('minipass') const fsMiniPass = require('fs-minipass') -const fs = require('@npmcli/fs') const log = require('./log-shim') const padZero = (n, length) => n.toString().padStart(length.toString().length, '0') @@ -174,11 +173,7 @@ class LogFiles { // during process.on('exit') which has to be synchronous. So in order // to never drop log messages, it is easiest to make it sync all the time // and this was measured to be about 1.5% slower for 40k lines of output - const logStream = fs.withOwnerSync( - f, - () => new fsMiniPass.WriteStreamSync(f, { flags: 'a' }), - { owner: 'inherit' } - ) + const logStream = new fsMiniPass.WriteStreamSync(f, { flags: 'a' }) if (count > 0) { // Reset file log count if we are opening // after our first file diff --git a/lib/utils/npm-usage.js b/lib/utils/npm-usage.js index 431995ecf0bae..947a3073bc5ff 100644 --- a/lib/utils/npm-usage.js +++ b/lib/utils/npm-usage.js @@ -1,10 +1,18 @@ const { dirname } = require('path') -const { cmdList } = require('./cmd-list') -const localeCompare = require('@isaacs/string-locale-compare')('en') +const { commands } = require('./cmd-list') + +const COL_MAX = 60 +const COL_MIN = 24 +const COL_GUTTER = 16 +const INDENT = 4 + +const indent = (repeat = INDENT) => ' '.repeat(repeat) +const indentNewline = (repeat) => `\n${indent(repeat)}` module.exports = async (npm) => { - const usesBrowser = npm.config.get('viewer') === 'browser' - ? ' (in a browser)' : '' + const browser = npm.config.get('viewer') === 'browser' ? ' (in a browser)' : '' + const allCommands = npm.config.get('long') ? await cmdUsages(npm) : cmdNames() + return `npm <command> Usage: @@ -15,14 +23,14 @@ npm test run this project's tests npm run <foo> run the script named <foo> npm <command> -h quick help on <command> npm -l display usage info for all commands -npm help <term> search for help on <term>${usesBrowser} -npm help npm more involved overview${usesBrowser} +npm help <term> search for help on <term>${browser} +npm help npm more involved overview${browser} All commands: -${await allCommands(npm)} +${allCommands} Specify configs in the ini-formatted file: - ${npm.config.get('userconfig')} +${indent() + npm.config.get('userconfig')} or on the command line via: npm <command> --key=value More configuration info: npm help config @@ -31,21 +39,14 @@ Configuration fields: npm help 7 config npm@${npm.version} ${dirname(dirname(__dirname))}` } -const allCommands = async (npm) => { - if (npm.config.get('long')) { - return usages(npm) - } - return ('\n ' + wrap(cmdList)) -} - -const wrap = (arr) => { +const cmdNames = () => { const out = [''] - const line = !process.stdout.columns ? 60 - : Math.min(60, Math.max(process.stdout.columns - 16, 24)) + const line = !process.stdout.columns ? COL_MAX + : Math.min(COL_MAX, Math.max(process.stdout.columns - COL_GUTTER, COL_MIN)) let l = 0 - for (const c of arr) { + for (const c of commands) { if (out[l].length + c.length + 2 < line) { out[l] += ', ' + c } else { @@ -53,20 +54,23 @@ const wrap = (arr) => { out[l] = c } } - return out.join('\n ').slice(2) + + return indentNewline() + out.join(indentNewline()).slice(2) } -const usages = async (npm) => { +const cmdUsages = async (npm) => { // return a string of <command>: <usage> let maxLen = 0 const set = [] - for (const c of cmdList) { - const cmd = await npm.cmd(c) - set.push([c, cmd.usage]) + for (const c of commands) { + const { usage } = await npm.cmd(c) + set.push([c, usage.split('\n')]) maxLen = Math.max(maxLen, c.length) } - return set.sort(([a], [b]) => localeCompare(a, b)) - .map(([c, usage]) => `\n ${c}${' '.repeat(maxLen - c.length + 1)}${ - (usage.split('\n').join('\n' + ' '.repeat(maxLen + 5)))}`) - .join('\n') + + return set.map(([name, usageLines]) => { + const gutter = indent(maxLen - name.length + 1) + const usage = usageLines.join(indentNewline(INDENT + maxLen + 1)) + return indentNewline() + name + gutter + usage + }).join('\n') } diff --git a/lib/utils/timers.js b/lib/utils/timers.js index c84bbba3819ab..c215fe926afb5 100644 --- a/lib/utils/timers.js +++ b/lib/utils/timers.js @@ -1,5 +1,5 @@ const EE = require('events') -const fs = require('@npmcli/fs') +const fs = require('fs') const log = require('./log-shim') // This is an event emiiter but on/off @@ -90,11 +90,7 @@ class Timers extends EE { return acc }, {}), } - fs.withOwnerSync( - this.file, - () => fs.writeFileSync(this.file, JSON.stringify(content) + '\n'), - { owner: 'inherit' } - ) + fs.writeFileSync(this.file, JSON.stringify(content) + '\n') } catch (e) { this.file = null log.warn('timing', `could not write timing file: ${e}`) diff --git a/make.bat b/make.bat deleted file mode 100644 index d82d893c0802d..0000000000000 --- a/make.bat +++ /dev/null @@ -1,3 +0,0 @@ -:: The tests run "make -s mandocs" in the postsnap script, -:: so this file gives windows something that'll exit -:: successfully, without having to install make. diff --git a/node_modules/.gitignore b/node_modules/.gitignore index 3ca5d9de99121..feac3f375b300 100644 --- a/node_modules/.gitignore +++ b/node_modules/.gitignore @@ -21,9 +21,6 @@ !/@npmcli/fs !/@npmcli/git !/@npmcli/installed-package-contents -!/@npmcli/installed-package-contents/node_modules/ -/@npmcli/installed-package-contents/node_modules/* -!/@npmcli/installed-package-contents/node_modules/npm-bundled !/@npmcli/map-workspaces !/@npmcli/metavuln-calculator !/@npmcli/move-file @@ -37,6 +34,7 @@ /@tootallnate/* !/@tootallnate/once !/abbrev +!/abort-controller !/agent-base !/agentkeepalive !/aggregate-error @@ -45,12 +43,14 @@ !/aproba !/archy !/are-we-there-yet +!/are-we-there-yet/node_modules/ +/are-we-there-yet/node_modules/* +!/are-we-there-yet/node_modules/buffer +!/are-we-there-yet/node_modules/readable-stream !/asap !/balanced-match +!/base64-js !/bin-links -!/bin-links/node_modules/ -/bin-links/node_modules/* -!/bin-links/node_modules/npm-normalize-package-bin !/binary-extensions !/brace-expansion !/builtins @@ -85,6 +85,8 @@ !/encoding !/env-paths !/err-code +!/event-target-shim +!/events !/fastest-levenshtein !/fs-minipass !/fs.realpath @@ -101,6 +103,7 @@ !/https-proxy-agent !/humanize-ms !/iconv-lite +!/ieee754 !/ignore-walk !/imurmurhash !/indent-string @@ -143,7 +146,6 @@ !/minipass-sized !/minipass !/minizlib -!/mkdirp-infer-owner !/mkdirp !/ms !/mute-stream @@ -151,21 +153,37 @@ !/node-gyp !/node-gyp/node_modules/ /node-gyp/node_modules/* +!/node-gyp/node_modules/@npmcli/ +/node-gyp/node_modules/@npmcli/* +!/node-gyp/node_modules/@npmcli/fs +!/node-gyp/node_modules/@npmcli/move-file +!/node-gyp/node_modules/are-we-there-yet !/node-gyp/node_modules/brace-expansion +!/node-gyp/node_modules/cacache +!/node-gyp/node_modules/cacache/node_modules/ +/node-gyp/node_modules/cacache/node_modules/* +!/node-gyp/node_modules/cacache/node_modules/brace-expansion +!/node-gyp/node_modules/cacache/node_modules/glob +!/node-gyp/node_modules/cacache/node_modules/minimatch +!/node-gyp/node_modules/gauge !/node-gyp/node_modules/glob +!/node-gyp/node_modules/make-fetch-happen !/node-gyp/node_modules/minimatch +!/node-gyp/node_modules/minipass-fetch !/node-gyp/node_modules/nopt +!/node-gyp/node_modules/npmlog +!/node-gyp/node_modules/ssri +!/node-gyp/node_modules/unique-filename +!/node-gyp/node_modules/unique-slug !/nopt !/normalize-package-data !/npm-audit-report +!/npm-bundled !/npm-install-checks !/npm-normalize-package-bin !/npm-package-arg !/npm-packlist !/npm-pick-manifest -!/npm-pick-manifest/node_modules/ -/npm-pick-manifest/node_modules/* -!/npm-pick-manifest/node_modules/npm-normalize-package-bin !/npm-profile !/npm-registry-fetch !/npm-user-validate @@ -178,6 +196,7 @@ !/path-is-absolute !/postcss-selector-parser !/proc-log +!/process !/promise-all-reject-late !/promise-call-limit !/promise-inflight @@ -187,9 +206,6 @@ !/read-cmd-shim !/read-package-json-fast !/read-package-json -!/read-package-json/node_modules/ -/read-package-json/node_modules/* -!/read-package-json/node_modules/npm-normalize-package-bin !/read !/readable-stream !/readdir-scoped-modules diff --git a/node_modules/@npmcli/config/lib/errors.js b/node_modules/@npmcli/config/lib/errors.js new file mode 100644 index 0000000000000..fa3e20798542a --- /dev/null +++ b/node_modules/@npmcli/config/lib/errors.js @@ -0,0 +1,22 @@ +'use strict' + +class ErrInvalidAuth extends Error { + constructor (problems) { + let message = 'Invalid auth configuration found: ' + message += problems.map((problem) => { + if (problem.action === 'delete') { + return `\`${problem.key}\` is not allowed in ${problem.where} config` + } else if (problem.action === 'rename') { + return `\`${problem.from}\` must be renamed to \`${problem.to}\` in ${problem.where} config` + } + }).join(', ') + message += '\nPlease run `npm config fix` to repair your configuration.`' + super(message) + this.code = 'ERR_INVALID_AUTH' + this.problems = problems + } +} + +module.exports = { + ErrInvalidAuth, +} diff --git a/node_modules/@npmcli/config/lib/index.js b/node_modules/@npmcli/config/lib/index.js index fe5cfd2aa9ed5..e1d47ffcd3736 100644 --- a/node_modules/@npmcli/config/lib/index.js +++ b/node_modules/@npmcli/config/lib/index.js @@ -2,26 +2,20 @@ const walkUp = require('walk-up-path') const ini = require('ini') const nopt = require('nopt') -const mkdirp = require('mkdirp-infer-owner') const mapWorkspaces = require('@npmcli/map-workspaces') const rpj = require('read-package-json-fast') const log = require('proc-log') -/* istanbul ignore next */ -const myUid = process.getuid && process.getuid() -/* istanbul ignore next */ -const myGid = process.getgid && process.getgid() - const { resolve, dirname, join } = require('path') const { homedir } = require('os') -const { promisify } = require('util') -const fs = require('fs') -const readFile = promisify(fs.readFile) -const writeFile = promisify(fs.writeFile) -const chmod = promisify(fs.chmod) -const chown = promisify(fs.chown) -const unlink = promisify(fs.unlink) -const stat = promisify(fs.stat) +const { + readFile, + writeFile, + chmod, + unlink, + stat, + mkdir, +} = require('fs/promises') const hasOwnProperty = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key) @@ -51,6 +45,10 @@ const parseField = require('./parse-field.js') const typeDescription = require('./type-description.js') const setEnvs = require('./set-envs.js') +const { + ErrInvalidAuth, +} = require('./errors.js') + // types that can be saved back to const confFileTypes = new Set([ 'global', @@ -280,26 +278,10 @@ class Config { await this.loadGlobalConfig() process.emit('timeEnd', 'config:load:global') - // warn if anything is not valid - process.emit('time', 'config:load:validate') - this.validate() - process.emit('timeEnd', 'config:load:validate') - // set this before calling setEnvs, so that we don't have to share // symbols, as that module also does a bunch of get operations this[_loaded] = true - process.emit('time', 'config:load:credentials') - const reg = this.get('registry') - const creds = this.getCredentialsByURI(reg) - // ignore this error because a failed set will strip out anything that - // might be a security hazard, which was the intention. - try { - this.setCredentialsByURI(reg, creds) - // eslint-disable-next-line no-empty - } catch (_) {} - process.emit('timeEnd', 'config:load:credentials') - // set proper globalPrefix now that everything is loaded this.globalPrefix = this.get('prefix') @@ -399,7 +381,9 @@ class Config { validate (where) { if (!where) { let valid = true - for (const [entryWhere] of this.data.entries()) { + const authProblems = [] + + for (const entryWhere of this.data.keys()) { // no need to validate our defaults, we know they're fine // cli was already validated when parsed the first time if (entryWhere === 'default' || entryWhere === 'builtin' || entryWhere === 'cli') { @@ -407,7 +391,48 @@ class Config { } const ret = this.validate(entryWhere) valid = valid && ret + + if (['global', 'user', 'project'].includes(entryWhere)) { + // after validating everything else, we look for old auth configs we no longer support + // if these keys are found, we build up a list of them and the appropriate action and + // attach it as context on the thrown error + + // first, keys that should be removed + for (const key of ['_authtoken', '-authtoken']) { + if (this.get(key, entryWhere)) { + authProblems.push({ action: 'delete', key, where: entryWhere }) + } + } + + // NOTE we pull registry without restricting to the current 'where' because we want to + // suggest scoping things to the registry they would be applied to, which is the default + // regardless of where it was defined + const nerfedReg = nerfDart(this.get('registry')) + // keys that should be nerfed but currently are not + for (const key of ['_auth', '_authToken', 'username', '_password']) { + if (this.get(key, entryWhere)) { + // username and _password must both exist in the same file to be recognized correctly + if (key === 'username' && !this.get('_password', entryWhere)) { + authProblems.push({ action: 'delete', key, where: entryWhere }) + } else if (key === '_password' && !this.get('username', entryWhere)) { + authProblems.push({ action: 'delete', key, where: entryWhere }) + } else { + authProblems.push({ + action: 'rename', + from: key, + to: `${nerfedReg}:${key}`, + where: entryWhere, + }) + } + } + } + } + } + + if (authProblems.length) { + throw new ErrInvalidAuth(authProblems) } + return valid } else { const obj = this.data.get(where) @@ -423,6 +448,40 @@ class Config { } } + // fixes problems identified by validate(), accepts the 'problems' property from a thrown + // ErrInvalidAuth to avoid having to check everything again + repair (problems) { + if (!problems) { + try { + this.validate() + } catch (err) { + // coverage skipped here because we don't need to test re-throwing an error + // istanbul ignore next + if (err.code !== 'ERR_INVALID_AUTH') { + throw err + } + + problems = err.problems + } finally { + if (!problems) { + problems = [] + } + } + } + + for (const problem of problems) { + // coverage disabled for else branch because it doesn't do anything and shouldn't + // istanbul ignore else + if (problem.action === 'delete') { + this.delete(problem.key, problem.where) + } else if (problem.action === 'rename') { + const old = this.get(problem.from, problem.where) + this.set(problem.to, old, problem.where) + this.delete(problem.from, problem.where) + } + } + } + // Returns true if the value is coming directly from the source defined // in default definitions, if the current value for the key config is // coming from any other different source, returns false @@ -644,21 +703,19 @@ class Config { if (!confFileTypes.has(where)) { throw new Error('invalid config location param: ' + where) } + const conf = this.data.get(where) conf[_raw] = { ...conf.data } conf[_loadError] = null - // upgrade auth configs to more secure variants before saving if (where === 'user') { - const reg = this.get('registry') - const creds = this.getCredentialsByURI(reg) - // we ignore this error because the failed set already removed - // anything that might be a security hazard, and it won't be - // saved back to the .npmrc file, so we're good. - try { - this.setCredentialsByURI(reg, creds) - // eslint-disable-next-line no-empty - } catch (_) {} + // if email is nerfed, then we want to de-nerf it + const nerfed = nerfDart(this.get('registry')) + const email = this.get(`${nerfed}:email`, 'user') + if (email) { + this.delete(`${nerfed}:email`, 'user') + this.set('email', email, 'user') + } } const iniData = ini.stringify(conf.data).trim() + '\n' @@ -668,16 +725,8 @@ class Config { return } const dir = dirname(conf.source) - await mkdirp(dir) + await mkdir(dir, { recursive: true }) await writeFile(conf.source, iniData, 'utf8') - // don't leave a root-owned config file lying around - /* istanbul ignore if - this is best-effort and a pita to test */ - if (myUid === 0) { - const st = await stat(dir).catch(() => null) - if (st && (st.uid !== myUid || st.gid !== myGid)) { - await chown(conf.source, st.uid, st.gid).catch(() => {}) - } - } const mode = where === 'user' ? 0o600 : 0o666 await chmod(conf.source, mode) } @@ -686,14 +735,17 @@ class Config { const nerfed = nerfDart(uri) const def = nerfDart(this.get('registry')) if (def === nerfed) { - // do not delete email, that shouldn't be nerfed any more. - // just delete the nerfed copy, if one exists. this.delete(`-authtoken`, 'user') this.delete(`_authToken`, 'user') this.delete(`_authtoken`, 'user') this.delete(`_auth`, 'user') this.delete(`_password`, 'user') this.delete(`username`, 'user') + // de-nerf email if it's nerfed to the default registry + const email = this.get(`${nerfed}:email`, 'user') + if (email) { + this.set('email', email, 'user') + } } this.delete(`${nerfed}:_authToken`, 'user') this.delete(`${nerfed}:_auth`, 'user') @@ -706,28 +758,9 @@ class Config { setCredentialsByURI (uri, { token, username, password, email, certfile, keyfile }) { const nerfed = nerfDart(uri) - const def = nerfDart(this.get('registry')) - if (def === nerfed) { - // remove old style auth info not limited to a single registry - this.delete('_password', 'user') - this.delete('username', 'user') - this.delete('_auth', 'user') - this.delete('_authtoken', 'user') - this.delete('-authtoken', 'user') - this.delete('_authToken', 'user') - } - - // email used to be nerfed always. if we're using the default - // registry, de-nerf it. - if (nerfed === def) { - email = email || - this.get('email', 'user') || - this.get(`${nerfed}:email`, 'user') - if (email) { - this.set('email', email, 'user') - } - } + // email is either provided, a top level key, or nothing + email = email || this.get('email', 'user') // field that hasn't been used as documented for a LONG time, // and as of npm 7.10.0, isn't used at all. We just always @@ -765,15 +798,17 @@ class Config { // this has to be a bit more complicated to support legacy data of all forms getCredentialsByURI (uri) { const nerfed = nerfDart(uri) + const def = nerfDart(this.get('registry')) const creds = {} - const deprecatedAuthWarning = [ - '`_auth`, `_authToken`, `username` and `_password` must be scoped to a registry.', - 'see `npm help npmrc` for more information.', - ].join(' ') - + // email is handled differently, it used to always be nerfed and now it never should be + // if it's set nerfed to the default registry, then we copy it to the unnerfed key + // TODO: evaluate removing 'email' from the credentials object returned here const email = this.get(`${nerfed}:email`) || this.get('email') if (email) { + if (nerfed === def) { + this.set('email', email, 'user') + } creds.email = email } @@ -785,13 +820,8 @@ class Config { // cert/key may be used in conjunction with other credentials, thus no `return` } - const defaultToken = nerfDart(this.get('registry')) && this.get('_authToken') - const tokenReg = this.get(`${nerfed}:_authToken`) || defaultToken - + const tokenReg = this.get(`${nerfed}:_authToken`) if (tokenReg) { - if (tokenReg === defaultToken) { - log.warn('config', deprecatedAuthWarning) - } creds.token = tokenReg return creds } @@ -816,37 +846,7 @@ class Config { return creds } - // at this point, we can only use the values if the URI is the - // default registry. - const defaultNerf = nerfDart(this.get('registry')) - if (nerfed !== defaultNerf) { - return creds - } - - const userDef = this.get('username') - const passDef = this.get('_password') - if (userDef && passDef) { - log.warn('config', deprecatedAuthWarning) - creds.username = userDef - creds.password = Buffer.from(passDef, 'base64').toString('utf8') - const auth = `${creds.username}:${creds.password}` - creds.auth = Buffer.from(auth, 'utf8').toString('base64') - return creds - } - - // Handle the old-style _auth=<base64> style for the default - // registry, if set. - const auth = this.get('_auth') - if (!auth) { - return creds - } - - log.warn('config', deprecatedAuthWarning) - const authDecode = Buffer.from(auth, 'base64').toString('utf8') - const authSplit = authDecode.split(':') - creds.username = authSplit.shift() - creds.password = authSplit.join(':') - creds.auth = auth + // at this point, nothing else is usable so just return what we do have return creds } diff --git a/node_modules/@npmcli/config/package.json b/node_modules/@npmcli/config/package.json index 81c36228c6b4a..3293ffe5cd7e1 100644 --- a/node_modules/@npmcli/config/package.json +++ b/node_modules/@npmcli/config/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/config", - "version": "4.2.2", + "version": "6.0.1", "files": [ "bin/", "lib/" @@ -16,9 +16,6 @@ "scripts": { "test": "tap", "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", "lintfix": "npm run lint -- --fix", @@ -27,28 +24,31 @@ }, "tap": { "check-coverage": true, - "coverage-map": "map.js" + "coverage-map": "map.js", + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.6.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.5.1", "tap": "^16.0.1" }, "dependencies": { - "@npmcli/map-workspaces": "^2.0.2", + "@npmcli/map-workspaces": "^3.0.0", "ini": "^3.0.0", - "mkdirp-infer-owner": "^2.0.0", "nopt": "^6.0.0", - "proc-log": "^2.0.0", - "read-package-json-fast": "^2.0.3", + "proc-log": "^3.0.0", + "read-package-json-fast": "^3.0.0", "semver": "^7.3.5", "walk-up-path": "^1.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.6.0" + "version": "4.5.1" } } diff --git a/node_modules/@npmcli/disparity-colors/package.json b/node_modules/@npmcli/disparity-colors/package.json index 2b45920a7e783..17eb4846c353c 100644 --- a/node_modules/@npmcli/disparity-colors/package.json +++ b/node_modules/@npmcli/disparity-colors/package.json @@ -1,13 +1,13 @@ { "name": "@npmcli/disparity-colors", - "version": "2.0.0", + "version": "3.0.0", "main": "lib/index.js", "files": [ "bin/", "lib/" ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "description": "Colorizes unified diff output", "repository": { @@ -43,20 +43,21 @@ "pretest": "npm run lint", "test": "tap", "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix", "posttest": "npm run lint" }, "tap": { - "check-coverage": true + "check-coverage": true, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.2.2", + "@npmcli/template-oss": "4.5.1", "tap": "^16.0.1" }, "dependencies": { @@ -64,6 +65,6 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.2.2" + "version": "4.5.1" } } diff --git a/node_modules/@npmcli/fs/lib/errors.js b/node_modules/@npmcli/fs/lib/cp/errors.js similarity index 100% rename from node_modules/@npmcli/fs/lib/errors.js rename to node_modules/@npmcli/fs/lib/cp/errors.js diff --git a/node_modules/@npmcli/fs/lib/cp/index.js b/node_modules/@npmcli/fs/lib/cp/index.js index 5da4739bdd528..972ce7aa12abe 100644 --- a/node_modules/@npmcli/fs/lib/cp/index.js +++ b/node_modules/@npmcli/fs/lib/cp/index.js @@ -1,4 +1,4 @@ -const fs = require('../fs.js') +const fs = require('fs/promises') const getOptions = require('../common/get-options.js') const node = require('../common/node.js') const polyfill = require('./polyfill.js') diff --git a/node_modules/@npmcli/fs/lib/cp/polyfill.js b/node_modules/@npmcli/fs/lib/cp/polyfill.js index f83ccbf57ecc9..80eb10de97191 100644 --- a/node_modules/@npmcli/fs/lib/cp/polyfill.js +++ b/node_modules/@npmcli/fs/lib/cp/polyfill.js @@ -23,7 +23,7 @@ const { ERR_FS_CP_UNKNOWN, ERR_FS_EISDIR, ERR_INVALID_ARG_TYPE, -} = require('../errors.js') +} = require('./errors.js') const { constants: { errno: { @@ -45,7 +45,7 @@ const { symlink, unlink, utimes, -} = require('../fs.js') +} = require('fs/promises') const { dirname, isAbsolute, diff --git a/node_modules/@npmcli/fs/lib/index.js b/node_modules/@npmcli/fs/lib/index.js index 3a98648eca9a1..0dc02f8a3da44 100644 --- a/node_modules/@npmcli/fs/lib/index.js +++ b/node_modules/@npmcli/fs/lib/index.js @@ -1,12 +1,9 @@ +'use strict' + +const cp = require('./cp/index.js') +const withTempDir = require('./with-temp-dir.js') + module.exports = { - ...require('./fs.js'), - copyFile: require('./copy-file.js'), - cp: require('./cp/index.js'), - mkdir: require('./mkdir.js'), - mkdtemp: require('./mkdtemp.js'), - rm: require('./rm/index.js'), - withTempDir: require('./with-temp-dir.js'), - withOwner: require('./with-owner.js'), - withOwnerSync: require('./with-owner-sync.js'), - writeFile: require('./write-file.js'), + cp, + withTempDir, } diff --git a/node_modules/@npmcli/fs/lib/with-temp-dir.js b/node_modules/@npmcli/fs/lib/with-temp-dir.js index 81db59dd054b4..0738ac4f29e1b 100644 --- a/node_modules/@npmcli/fs/lib/with-temp-dir.js +++ b/node_modules/@npmcli/fs/lib/with-temp-dir.js @@ -1,9 +1,7 @@ const { join, sep } = require('path') const getOptions = require('./common/get-options.js') -const mkdir = require('./mkdir.js') -const mkdtemp = require('./mkdtemp.js') -const rm = require('./rm/index.js') +const { mkdir, mkdtemp, rm } = require('fs/promises') // create a temp directory, ensure its permissions match its parent, then call // the supplied function passing it the path to the directory. clean up after @@ -12,10 +10,10 @@ const withTempDir = async (root, fn, opts) => { const options = getOptions(opts, { copy: ['tmpPrefix'], }) - // create the directory, and fix its ownership - await mkdir(root, { recursive: true, owner: 'inherit' }) + // create the directory + await mkdir(root, { recursive: true }) - const target = await mkdtemp(join(`${root}${sep}`, options.tmpPrefix || ''), { owner: 'inherit' }) + const target = await mkdtemp(join(`${root}${sep}`, options.tmpPrefix || '')) let err let result diff --git a/node_modules/@npmcli/fs/package.json b/node_modules/@npmcli/fs/package.json index 1512fd6e4b0ac..2eabc35dab33b 100644 --- a/node_modules/@npmcli/fs/package.json +++ b/node_modules/@npmcli/fs/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/fs", - "version": "2.1.2", + "version": "3.0.0", "description": "filesystem utilities for the npm cli", "main": "lib/index.js", "files": [ @@ -8,9 +8,6 @@ "lib/" ], "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "snap": "tap", "test": "tap", "npmclilint": "npmcli-lint", @@ -33,18 +30,23 @@ "license": "ISC", "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.5.0", + "@npmcli/template-oss": "4.5.1", "tap": "^16.0.1" }, "dependencies": { - "@gar/promisify": "^1.1.3", "semver": "^7.3.5" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.5.0" + "version": "4.5.1" + }, + "tap": { + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] } } diff --git a/node_modules/@npmcli/git/package.json b/node_modules/@npmcli/git/package.json index 86b8e85399266..91381accdf2a1 100644 --- a/node_modules/@npmcli/git/package.json +++ b/node_modules/@npmcli/git/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/git", - "version": "3.0.2", + "version": "4.0.1", "main": "lib/index.js", "files": [ "bin/", @@ -15,9 +15,6 @@ "license": "ISC", "scripts": { "lint": "eslint \"**/*.js\"", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "preversion": "npm test", "snap": "tap", "test": "tap", "posttest": "npm run lint", @@ -27,33 +24,37 @@ }, "tap": { "check-coverage": true, - "coverage-map": "map.js" + "coverage-map": "map.js", + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.5.1", "npm-package-arg": "^9.1.0", "rimraf": "^3.0.2", "slash": "^3.0.0", "tap": "^16.0.1" }, "dependencies": { - "@npmcli/promise-spawn": "^3.0.0", + "@npmcli/promise-spawn": "^4.0.0", "lru-cache": "^7.4.4", "mkdirp": "^1.0.4", - "npm-pick-manifest": "^7.0.0", - "proc-log": "^2.0.0", + "npm-pick-manifest": "^8.0.0", + "proc-log": "^3.0.0", "promise-inflight": "^1.0.1", "promise-retry": "^2.0.1", "semver": "^7.3.5", "which": "^2.0.2" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", "windowsCI": false, - "version": "3.5.0" + "version": "4.5.1" } } diff --git a/node_modules/@npmcli/installed-package-contents/index.js b/node_modules/@npmcli/installed-package-contents/lib/index.js similarity index 81% rename from node_modules/@npmcli/installed-package-contents/index.js rename to node_modules/@npmcli/installed-package-contents/lib/index.js index 30427fe28c108..e2c545b5ab949 100755 --- a/node_modules/@npmcli/installed-package-contents/index.js +++ b/node_modules/@npmcli/installed-package-contents/lib/index.js @@ -17,49 +17,49 @@ // - add GET CONTENTS of bundled deps, PACKAGE=true, depth + 1 const bundled = require('npm-bundled') -const {promisify} = require('util') +const { promisify } = require('util') const fs = require('fs') const readFile = promisify(fs.readFile) const readdir = promisify(fs.readdir) const stat = promisify(fs.stat) const lstat = promisify(fs.lstat) -const {relative, resolve, basename, dirname} = require('path') +const { relative, resolve, basename, dirname } = require('path') const normalizePackageBin = require('npm-normalize-package-bin') const readPackage = ({ path, packageJsonCache }) => packageJsonCache.has(path) ? Promise.resolve(packageJsonCache.get(path)) : readFile(path).then(json => { - const pkg = normalizePackageBin(JSON.parse(json)) - packageJsonCache.set(path, pkg) - return pkg - }) + const pkg = normalizePackageBin(JSON.parse(json)) + packageJsonCache.set(path, pkg) + return pkg + }) .catch(er => null) // just normalize bundle deps and bin, that's all we care about here. const normalized = Symbol('package data has been normalized') const rpj = ({ path, packageJsonCache }) => - readPackage({path, packageJsonCache}) - .then(pkg => { - if (!pkg || pkg[normalized]) + readPackage({ path, packageJsonCache }) + .then(pkg => { + if (!pkg || pkg[normalized]) { + return pkg + } + if (pkg.bundledDependencies && !pkg.bundleDependencies) { + pkg.bundleDependencies = pkg.bundledDependencies + delete pkg.bundledDependencies + } + const bd = pkg.bundleDependencies + if (bd === true) { + pkg.bundleDependencies = [ + ...Object.keys(pkg.dependencies || {}), + ...Object.keys(pkg.optionalDependencies || {}), + ] + } + if (typeof bd === 'object' && !Array.isArray(bd)) { + pkg.bundleDependencies = Object.keys(bd) + } + pkg[normalized] = true return pkg - if (pkg.bundledDependencies && !pkg.bundleDependencies) { - pkg.bundleDependencies = pkg.bundledDependencies - delete pkg.bundledDependencies - } - const bd = pkg.bundleDependencies - if (bd === true) { - pkg.bundleDependencies = [ - ...Object.keys(pkg.dependencies || {}), - ...Object.keys(pkg.optionalDependencies || {}), - ] - } - if (typeof bd === 'object' && !Array.isArray(bd)) { - pkg.bundleDependencies = Object.keys(bd) - } - pkg[normalized] = true - return pkg - }) - + }) const pkgContents = async ({ path, @@ -69,19 +69,21 @@ const pkgContents = async ({ result = null, packageJsonCache = null, }) => { - if (!result) + if (!result) { result = new Set() + } - if (!packageJsonCache) + if (!packageJsonCache) { packageJsonCache = new Map() + } if (pkg === true) { return rpj({ path: path + '/package.json', packageJsonCache }) - .then(pkg => pkgContents({ + .then(p => pkgContents({ path, depth, currentDepth, - pkg, + pkg: p, result, packageJsonCache, })) @@ -91,7 +93,6 @@ const pkgContents = async ({ // add all bins to result if they exist if (pkg.bin) { const dir = dirname(path) - const base = basename(path) const scope = basename(dir) const nm = /^@.+/.test(scope) ? dirname(dir) : dir @@ -121,8 +122,9 @@ const pkgContents = async ({ ]).catch(() => []) // not a thing, probably a missing folder - if (!dirEntries) + if (!dirEntries) { return result + } // empty folder, just add the folder itself to the result if (!dirEntries.length && !bundleDeps && currentDepth !== 0) { @@ -140,7 +142,7 @@ const pkgContents = async ({ await Promise.all(dirEntries.map(async (name, index) => { const p = resolve(path, name) const st = await lstat(p) - dirEntries[index] = Object.assign(st, {name}) + dirEntries[index] = Object.assign(st, { name }) })) } @@ -184,20 +186,20 @@ const pkgContents = async ({ })) } - if (recursePromises.length) + if (recursePromises.length) { await Promise.all(recursePromises) + } return result } -module.exports = ({path, depth = 1, packageJsonCache}) => pkgContents({ +module.exports = ({ path, depth = 1, packageJsonCache }) => pkgContents({ path: resolve(path), depth, pkg: true, packageJsonCache, }).then(results => [...results]) - if (require.main === module) { const options = { path: null, depth: 1 } const usage = `Usage: @@ -214,15 +216,16 @@ Options: process.argv.slice(2).forEach(arg => { let match if ((match = arg.match(/^--depth=([0-9]+|Infinity)/)) || - (match = arg.match(/^-d([0-9]+|Infinity)/))) + (match = arg.match(/^-d([0-9]+|Infinity)/))) { options.depth = +match[1] - else if (arg === '-h' || arg === '--help') { + } else if (arg === '-h' || arg === '--help') { console.log(usage) process.exit(0) - } else + } else { options.path = arg + } }) - if (!options.path) { + if (!options.path) { console.error('ERROR: no path provided') console.error(usage) process.exit(1) diff --git a/node_modules/@npmcli/installed-package-contents/node_modules/npm-bundled/package.json b/node_modules/@npmcli/installed-package-contents/node_modules/npm-bundled/package.json deleted file mode 100644 index cf20e297b0b63..0000000000000 --- a/node_modules/@npmcli/installed-package-contents/node_modules/npm-bundled/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "npm-bundled", - "version": "1.1.2", - "description": "list things in node_modules that are bundledDependencies, or transitive dependencies thereof", - "main": "index.js", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/npm-bundled.git" - }, - "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)", - "license": "ISC", - "devDependencies": { - "mkdirp": "^0.5.1", - "mutate-fs": "^1.1.0", - "rimraf": "^2.6.1", - "tap": "^12.0.1" - }, - "scripts": { - "test": "tap test/*.js -J --100", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" - }, - "files": [ - "index.js" - ], - "dependencies": { - "npm-normalize-package-bin": "^1.0.1" - } -} diff --git a/node_modules/@npmcli/installed-package-contents/package.json b/node_modules/@npmcli/installed-package-contents/package.json index 13916308f99db..09caada999a89 100644 --- a/node_modules/@npmcli/installed-package-contents/package.json +++ b/node_modules/@npmcli/installed-package-contents/package.json @@ -1,9 +1,9 @@ { "name": "@npmcli/installed-package-contents", - "version": "1.0.7", + "version": "2.0.0", "description": "Get the list of files installed in a package in node_modules, including bundled dependencies", - "author": "Isaac Z. Schlueter <i@izs.me> (https://izs.me)", - "main": "index.js", + "author": "GitHub Inc.", + "main": "lib/index.js", "bin": { "installed-package-contents": "index.js" }, @@ -11,27 +11,42 @@ "scripts": { "test": "tap", "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags" - }, - "tap": { - "check-coverage": true, - "color": true + "lint": "eslint \"**/*.js\"", + "postlint": "template-oss-check", + "template-oss-apply": "template-oss-apply --force", + "lintfix": "npm run lint -- --fix", + "posttest": "npm run lint" }, "devDependencies": { + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.5.1", + "mkdirp": "^1.0.4", "require-inject": "^1.4.4", - "tap": "^14.11.0" + "tap": "^16.3.0" }, "dependencies": { - "npm-bundled": "^1.1.1", - "npm-normalize-package-bin": "^1.0.1" + "npm-bundled": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/npm/installed-package-contents.git" }, - "repository": "git+https://github.com/npm/installed-package-contents", "files": [ - "index.js" + "bin/", + "lib/" ], "engines": { - "node": ">= 10" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "version": "4.5.1" + }, + "tap": { + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] } } diff --git a/node_modules/@npmcli/map-workspaces/package.json b/node_modules/@npmcli/map-workspaces/package.json index a71a1d2805efa..c8113cb25eb32 100644 --- a/node_modules/@npmcli/map-workspaces/package.json +++ b/node_modules/@npmcli/map-workspaces/package.json @@ -1,13 +1,13 @@ { "name": "@npmcli/map-workspaces", - "version": "2.0.4", + "version": "3.0.0", "main": "lib/index.js", "files": [ "bin/", "lib/" ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "description": "Retrieves a name:pathname Map for a given workspaces config", "repository": { @@ -29,30 +29,31 @@ "pretest": "npm run lint", "test": "tap", "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "postlint": "template-oss-check", "lintfix": "npm run lint -- --fix", "posttest": "npm run lint", "template-oss-apply": "template-oss-apply --force" }, "tap": { - "check-coverage": true + "check-coverage": true, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.5.0", + "@npmcli/template-oss": "4.5.1", "tap": "^16.0.1" }, "dependencies": { "@npmcli/name-from-folder": "^1.0.1", "glob": "^8.0.1", "minimatch": "^5.0.1", - "read-package-json-fast": "^2.0.3" + "read-package-json-fast": "^3.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.5.0" + "version": "4.5.1" } } diff --git a/node_modules/@npmcli/metavuln-calculator/package.json b/node_modules/@npmcli/metavuln-calculator/package.json index be020f726ff08..baf59c47fcb40 100644 --- a/node_modules/@npmcli/metavuln-calculator/package.json +++ b/node_modules/@npmcli/metavuln-calculator/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/metavuln-calculator", - "version": "4.0.0", + "version": "5.0.0", "main": "lib/index.js", "files": [ "bin/", @@ -34,14 +34,14 @@ }, "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "4.4.4", + "@npmcli/template-oss": "4.5.1", "require-inject": "^1.4.4", "tap": "^16.0.1" }, "dependencies": { - "cacache": "^16.0.0", - "json-parse-even-better-errors": "^2.3.1", - "pacote": "^14.0.0", + "cacache": "^17.0.0", + "json-parse-even-better-errors": "^3.0.0", + "pacote": "^15.0.0", "semver": "^7.3.5" }, "engines": { @@ -49,6 +49,6 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.4.4" + "version": "4.5.1" } } diff --git a/node_modules/@npmcli/move-file/package.json b/node_modules/@npmcli/move-file/package.json index 58793b93a9ca0..a687ab2510c11 100644 --- a/node_modules/@npmcli/move-file/package.json +++ b/node_modules/@npmcli/move-file/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/move-file", - "version": "2.0.1", + "version": "3.0.0", "files": [ "bin/", "lib/" @@ -13,15 +13,12 @@ }, "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.5.0", + "@npmcli/template-oss": "4.5.1", "tap": "^16.0.1" }, "scripts": { "test": "tap", "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", @@ -33,15 +30,19 @@ "url": "https://github.com/npm/move-file.git" }, "tap": { - "check-coverage": true + "check-coverage": true, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "license": "MIT", "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "author": "GitHub Inc.", "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.5.0" + "version": "4.5.1" } } diff --git a/node_modules/@npmcli/node-gyp/package.json b/node_modules/@npmcli/node-gyp/package.json index 04eeec8ff808c..999572bc5883a 100644 --- a/node_modules/@npmcli/node-gyp/package.json +++ b/node_modules/@npmcli/node-gyp/package.json @@ -1,12 +1,9 @@ { "name": "@npmcli/node-gyp", - "version": "2.0.0", + "version": "3.0.0", "description": "Tools for dealing with node-gyp packages", "scripts": { "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", @@ -32,14 +29,20 @@ "license": "ISC", "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.2.2", + "@npmcli/template-oss": "4.5.1", "tap": "^16.0.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.2.2" + "version": "4.5.1" + }, + "tap": { + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] } } diff --git a/node_modules/@npmcli/package-json/package.json b/node_modules/@npmcli/package-json/package.json index d2c4b9da9db62..faae7891a1e72 100644 --- a/node_modules/@npmcli/package-json/package.json +++ b/node_modules/@npmcli/package-json/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/package-json", - "version": "2.0.0", + "version": "3.0.0", "description": "Programmatic API to update package.json", "main": "lib/index.js", "files": [ @@ -8,9 +8,6 @@ "lib/" ], "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "snap": "tap", "test": "tap", "lint": "eslint \"**/*.js\"", @@ -28,21 +25,27 @@ "license": "ISC", "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.2.2", + "@npmcli/template-oss": "4.5.1", "tap": "^16.0.1" }, "dependencies": { - "json-parse-even-better-errors": "^2.3.1" + "json-parse-even-better-errors": "^3.0.0" }, "repository": { "type": "git", "url": "https://github.com/npm/package-json.git" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.2.2" + "version": "4.5.1" + }, + "tap": { + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] } } diff --git a/node_modules/@npmcli/promise-spawn/package.json b/node_modules/@npmcli/promise-spawn/package.json index 4521b56d50560..a6d05e3d7791f 100644 --- a/node_modules/@npmcli/promise-spawn/package.json +++ b/node_modules/@npmcli/promise-spawn/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/promise-spawn", - "version": "3.0.0", + "version": "4.0.0", "files": [ "bin/", "lib/" @@ -16,9 +16,6 @@ "scripts": { "test": "tap", "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "lint": "eslint \"**/*.js\"", "lintfix": "npm run lint -- --fix", "posttest": "npm run lint", @@ -27,20 +24,24 @@ "template-oss-apply": "template-oss-apply --force" }, "tap": { - "check-coverage": true + "check-coverage": true, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.2.2", + "@npmcli/template-oss": "4.5.1", "minipass": "^3.1.1", "tap": "^16.0.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.2.2" + "version": "4.5.1" }, "dependencies": { "infer-owner": "^1.0.4" diff --git a/node_modules/@npmcli/query/lib/index.js b/node_modules/@npmcli/query/lib/index.js index 09cff0f591d4d..9373a4f7adbf0 100644 --- a/node_modules/@npmcli/query/lib/index.js +++ b/node_modules/@npmcli/query/lib/index.js @@ -1,8 +1,6 @@ 'use strict' -const npa = require('npm-package-arg') const parser = require('postcss-selector-parser') -const semver = require('semver') const arrayDelimiter = Symbol('arrayDelimiter') @@ -12,37 +10,6 @@ const escapeSlashes = str => const unescapeSlashes = str => str.replace(/\\\//g, '/') -const fixupIds = astNode => { - const { name, rawSpec: part } = npa(astNode.value) - const versionParts = [{ astNode, part }] - let currentAstNode = astNode.next() - - if (!part) { - return - } - - while (currentAstNode) { - versionParts.push({ astNode: currentAstNode, part: String(currentAstNode) }) - currentAstNode = currentAstNode.next() - } - - let version - let length = versionParts.length - while (!version && length) { - version = - semver.valid( - versionParts.slice(0, length).reduce((res, i) => `${res}${i.part}`, '') - ) - length-- - } - - astNode.value = `${name}@${version}` - - for (let i = 1; i <= length; i++) { - versionParts[i].astNode.remove() - } -} - // recursively fixes up any :attr pseudo-class found const fixupAttr = astNode => { const properties = [] @@ -186,10 +153,6 @@ const fixupOutdated = astNode => { // of the parsed ast from the query and modifying the parsed nodes accordingly const transformAst = selector => { selector.walk((nextAstNode) => { - if (nextAstNode.type === 'id') { - fixupIds(nextAstNode) - } - switch (nextAstNode.value) { case ':attr': return fixupAttr(nextAstNode) diff --git a/node_modules/@npmcli/query/package.json b/node_modules/@npmcli/query/package.json index 1e2ce917cef75..1e4abd37656f6 100644 --- a/node_modules/@npmcli/query/package.json +++ b/node_modules/@npmcli/query/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/query", - "version": "2.0.0", + "version": "3.0.0", "description": "npm query parser and tools", "main": "lib/index.js", "scripts": { @@ -39,17 +39,15 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.3.2" + "version": "4.5.1" }, "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "4.3.2", + "@npmcli/template-oss": "4.5.1", "tap": "^16.2.0" }, "dependencies": { - "npm-package-arg": "^9.1.0", - "postcss-selector-parser": "^6.0.10", - "semver": "^7.3.7" + "postcss-selector-parser": "^6.0.10" }, "repository": { "type": "git", diff --git a/node_modules/@npmcli/run-script/package.json b/node_modules/@npmcli/run-script/package.json index 551dc610f4914..3c59350467b88 100644 --- a/node_modules/@npmcli/run-script/package.json +++ b/node_modules/@npmcli/run-script/package.json @@ -1,14 +1,11 @@ { "name": "@npmcli/run-script", - "version": "4.2.1", + "version": "5.0.0", "description": "Run a lifecycle script for a package (descendant of npm-lifecycle)", "author": "GitHub Inc.", "license": "ISC", "scripts": { "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "eslint": "eslint", "lint": "eslint \"**/*.js\"", "lintfix": "npm run lint -- --fix", @@ -18,17 +15,17 @@ "template-oss-apply": "template-oss-apply --force" }, "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.5.1", "minipass": "^3.1.6", "require-inject": "^1.4.4", "tap": "^16.0.1" }, "dependencies": { - "@npmcli/node-gyp": "^2.0.0", - "@npmcli/promise-spawn": "^3.0.0", + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/promise-spawn": "^4.0.0", "node-gyp": "^9.0.0", - "read-package-json-fast": "^2.0.3", + "read-package-json-fast": "^3.0.0", "which": "^2.0.2" }, "files": [ @@ -41,10 +38,16 @@ "url": "https://github.com/npm/run-script.git" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.5.0" + "version": "4.5.1" + }, + "tap": { + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] } } diff --git a/node_modules/abort-controller/LICENSE b/node_modules/abort-controller/LICENSE new file mode 100644 index 0000000000000..c914149a6f845 --- /dev/null +++ b/node_modules/abort-controller/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Toru Nagashima + +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. diff --git a/node_modules/abort-controller/browser.js b/node_modules/abort-controller/browser.js new file mode 100644 index 0000000000000..b0c5ec37d9b76 --- /dev/null +++ b/node_modules/abort-controller/browser.js @@ -0,0 +1,13 @@ +/*globals self, window */ +"use strict" + +/*eslint-disable @mysticatea/prettier */ +const { AbortController, AbortSignal } = + typeof self !== "undefined" ? self : + typeof window !== "undefined" ? window : + /* otherwise */ undefined +/*eslint-enable @mysticatea/prettier */ + +module.exports = AbortController +module.exports.AbortSignal = AbortSignal +module.exports.default = AbortController diff --git a/node_modules/abort-controller/browser.mjs b/node_modules/abort-controller/browser.mjs new file mode 100644 index 0000000000000..a8f321afed675 --- /dev/null +++ b/node_modules/abort-controller/browser.mjs @@ -0,0 +1,11 @@ +/*globals self, window */ + +/*eslint-disable @mysticatea/prettier */ +const { AbortController, AbortSignal } = + typeof self !== "undefined" ? self : + typeof window !== "undefined" ? window : + /* otherwise */ undefined +/*eslint-enable @mysticatea/prettier */ + +export default AbortController +export { AbortController, AbortSignal } diff --git a/node_modules/abort-controller/dist/abort-controller.d.ts b/node_modules/abort-controller/dist/abort-controller.d.ts new file mode 100644 index 0000000000000..75852fb59952d --- /dev/null +++ b/node_modules/abort-controller/dist/abort-controller.d.ts @@ -0,0 +1,43 @@ +import { EventTarget } from "event-target-shim" + +type Events = { + abort: any +} +type EventAttributes = { + onabort: any +} +/** + * The signal class. + * @see https://dom.spec.whatwg.org/#abortsignal + */ +declare class AbortSignal extends EventTarget<Events, EventAttributes> { + /** + * AbortSignal cannot be constructed directly. + */ + constructor() + /** + * Returns `true` if this `AbortSignal`"s `AbortController` has signaled to abort, and `false` otherwise. + */ + readonly aborted: boolean +} +/** + * The AbortController. + * @see https://dom.spec.whatwg.org/#abortcontroller + */ +declare class AbortController { + /** + * Initialize this controller. + */ + constructor() + /** + * Returns the `AbortSignal` object associated with this object. + */ + readonly signal: AbortSignal + /** + * Abort and signal to any observers that the associated activity is to be aborted. + */ + abort(): void +} + +export default AbortController +export { AbortController, AbortSignal } diff --git a/node_modules/abort-controller/dist/abort-controller.js b/node_modules/abort-controller/dist/abort-controller.js new file mode 100644 index 0000000000000..49af73955859f --- /dev/null +++ b/node_modules/abort-controller/dist/abort-controller.js @@ -0,0 +1,127 @@ +/** + * @author Toru Nagashima <https://github.com/mysticatea> + * See LICENSE file in root directory for full license. + */ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var eventTargetShim = require('event-target-shim'); + +/** + * The signal class. + * @see https://dom.spec.whatwg.org/#abortsignal + */ +class AbortSignal extends eventTargetShim.EventTarget { + /** + * AbortSignal cannot be constructed directly. + */ + constructor() { + super(); + throw new TypeError("AbortSignal cannot be constructed directly"); + } + /** + * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise. + */ + get aborted() { + const aborted = abortedFlags.get(this); + if (typeof aborted !== "boolean") { + throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this === null ? "null" : typeof this}`); + } + return aborted; + } +} +eventTargetShim.defineEventAttribute(AbortSignal.prototype, "abort"); +/** + * Create an AbortSignal object. + */ +function createAbortSignal() { + const signal = Object.create(AbortSignal.prototype); + eventTargetShim.EventTarget.call(signal); + abortedFlags.set(signal, false); + return signal; +} +/** + * Abort a given signal. + */ +function abortSignal(signal) { + if (abortedFlags.get(signal) !== false) { + return; + } + abortedFlags.set(signal, true); + signal.dispatchEvent({ type: "abort" }); +} +/** + * Aborted flag for each instances. + */ +const abortedFlags = new WeakMap(); +// Properties should be enumerable. +Object.defineProperties(AbortSignal.prototype, { + aborted: { enumerable: true }, +}); +// `toString()` should return `"[object AbortSignal]"` +if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { + Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, { + configurable: true, + value: "AbortSignal", + }); +} + +/** + * The AbortController. + * @see https://dom.spec.whatwg.org/#abortcontroller + */ +class AbortController { + /** + * Initialize this controller. + */ + constructor() { + signals.set(this, createAbortSignal()); + } + /** + * Returns the `AbortSignal` object associated with this object. + */ + get signal() { + return getSignal(this); + } + /** + * Abort and signal to any observers that the associated activity is to be aborted. + */ + abort() { + abortSignal(getSignal(this)); + } +} +/** + * Associated signals. + */ +const signals = new WeakMap(); +/** + * Get the associated signal of a given controller. + */ +function getSignal(controller) { + const signal = signals.get(controller); + if (signal == null) { + throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${controller === null ? "null" : typeof controller}`); + } + return signal; +} +// Properties should be enumerable. +Object.defineProperties(AbortController.prototype, { + signal: { enumerable: true }, + abort: { enumerable: true }, +}); +if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { + Object.defineProperty(AbortController.prototype, Symbol.toStringTag, { + configurable: true, + value: "AbortController", + }); +} + +exports.AbortController = AbortController; +exports.AbortSignal = AbortSignal; +exports.default = AbortController; + +module.exports = AbortController +module.exports.AbortController = module.exports["default"] = AbortController +module.exports.AbortSignal = AbortSignal +//# sourceMappingURL=abort-controller.js.map diff --git a/node_modules/abort-controller/dist/abort-controller.js.map b/node_modules/abort-controller/dist/abort-controller.js.map new file mode 100644 index 0000000000000..cfdcafdc61167 --- /dev/null +++ b/node_modules/abort-controller/dist/abort-controller.js.map @@ -0,0 +1 @@ +{"version":3,"file":"abort-controller.js","sources":["../src/abort-signal.ts","../src/abort-controller.ts"],"sourcesContent":["import {\n // Event,\n EventTarget,\n // Type,\n defineEventAttribute,\n} from \"event-target-shim\"\n\n// Known Limitation\n// Use `any` because the type of `AbortSignal` in `lib.dom.d.ts` is wrong and\n// to make assignable our `AbortSignal` into that.\n// https://github.com/Microsoft/TSJS-lib-generator/pull/623\ntype Events = {\n abort: any // Event & Type<\"abort\">\n}\ntype EventAttributes = {\n onabort: any // Event & Type<\"abort\">\n}\n\n/**\n * The signal class.\n * @see https://dom.spec.whatwg.org/#abortsignal\n */\nexport default class AbortSignal extends EventTarget<Events, EventAttributes> {\n /**\n * AbortSignal cannot be constructed directly.\n */\n public constructor() {\n super()\n throw new TypeError(\"AbortSignal cannot be constructed directly\")\n }\n\n /**\n * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise.\n */\n public get aborted(): boolean {\n const aborted = abortedFlags.get(this)\n if (typeof aborted !== \"boolean\") {\n throw new TypeError(\n `Expected 'this' to be an 'AbortSignal' object, but got ${\n this === null ? \"null\" : typeof this\n }`,\n )\n }\n return aborted\n }\n}\ndefineEventAttribute(AbortSignal.prototype, \"abort\")\n\n/**\n * Create an AbortSignal object.\n */\nexport function createAbortSignal(): AbortSignal {\n const signal = Object.create(AbortSignal.prototype)\n EventTarget.call(signal)\n abortedFlags.set(signal, false)\n return signal\n}\n\n/**\n * Abort a given signal.\n */\nexport function abortSignal(signal: AbortSignal): void {\n if (abortedFlags.get(signal) !== false) {\n return\n }\n\n abortedFlags.set(signal, true)\n signal.dispatchEvent<\"abort\">({ type: \"abort\" })\n}\n\n/**\n * Aborted flag for each instances.\n */\nconst abortedFlags = new WeakMap<AbortSignal, boolean>()\n\n// Properties should be enumerable.\nObject.defineProperties(AbortSignal.prototype, {\n aborted: { enumerable: true },\n})\n\n// `toString()` should return `\"[object AbortSignal]\"`\nif (typeof Symbol === \"function\" && typeof Symbol.toStringTag === \"symbol\") {\n Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, {\n configurable: true,\n value: \"AbortSignal\",\n })\n}\n","import AbortSignal, { abortSignal, createAbortSignal } from \"./abort-signal\"\n\n/**\n * The AbortController.\n * @see https://dom.spec.whatwg.org/#abortcontroller\n */\nexport default class AbortController {\n /**\n * Initialize this controller.\n */\n public constructor() {\n signals.set(this, createAbortSignal())\n }\n\n /**\n * Returns the `AbortSignal` object associated with this object.\n */\n public get signal(): AbortSignal {\n return getSignal(this)\n }\n\n /**\n * Abort and signal to any observers that the associated activity is to be aborted.\n */\n public abort(): void {\n abortSignal(getSignal(this))\n }\n}\n\n/**\n * Associated signals.\n */\nconst signals = new WeakMap<AbortController, AbortSignal>()\n\n/**\n * Get the associated signal of a given controller.\n */\nfunction getSignal(controller: AbortController): AbortSignal {\n const signal = signals.get(controller)\n if (signal == null) {\n throw new TypeError(\n `Expected 'this' to be an 'AbortController' object, but got ${\n controller === null ? \"null\" : typeof controller\n }`,\n )\n }\n return signal\n}\n\n// Properties should be enumerable.\nObject.defineProperties(AbortController.prototype, {\n signal: { enumerable: true },\n abort: { enumerable: true },\n})\n\nif (typeof Symbol === \"function\" && typeof Symbol.toStringTag === \"symbol\") {\n Object.defineProperty(AbortController.prototype, Symbol.toStringTag, {\n configurable: true,\n value: \"AbortController\",\n })\n}\n\nexport { AbortController, AbortSignal }\n"],"names":["EventTarget","defineEventAttribute"],"mappings":";;;;;;;;;;AAkBA;;;;AAIA,MAAqB,WAAY,SAAQA,2BAAoC;;;;IAIzE;QACI,KAAK,EAAE,CAAA;QACP,MAAM,IAAI,SAAS,CAAC,4CAA4C,CAAC,CAAA;KACpE;;;;IAKD,IAAW,OAAO;QACd,MAAM,OAAO,GAAG,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QACtC,IAAI,OAAO,OAAO,KAAK,SAAS,EAAE;YAC9B,MAAM,IAAI,SAAS,CACf,0DACI,IAAI,KAAK,IAAI,GAAG,MAAM,GAAG,OAAO,IACpC,EAAE,CACL,CAAA;SACJ;QACD,OAAO,OAAO,CAAA;KACjB;CACJ;AACDC,oCAAoB,CAAC,WAAW,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;;;;AAKpD,SAAgB,iBAAiB;IAC7B,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;IACnDD,2BAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACxB,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;IAC/B,OAAO,MAAM,CAAA;CAChB;;;;AAKD,SAAgB,WAAW,CAAC,MAAmB;IAC3C,IAAI,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,KAAK,EAAE;QACpC,OAAM;KACT;IAED,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAC9B,MAAM,CAAC,aAAa,CAAU,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAA;CACnD;;;;AAKD,MAAM,YAAY,GAAG,IAAI,OAAO,EAAwB,CAAA;;AAGxD,MAAM,CAAC,gBAAgB,CAAC,WAAW,CAAC,SAAS,EAAE;IAC3C,OAAO,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;CAChC,CAAC,CAAA;;AAGF,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,OAAO,MAAM,CAAC,WAAW,KAAK,QAAQ,EAAE;IACxE,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,WAAW,EAAE;QAC7D,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,aAAa;KACvB,CAAC,CAAA;CACL;;ACpFD;;;;AAIA,MAAqB,eAAe;;;;IAIhC;QACI,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,iBAAiB,EAAE,CAAC,CAAA;KACzC;;;;IAKD,IAAW,MAAM;QACb,OAAO,SAAS,CAAC,IAAI,CAAC,CAAA;KACzB;;;;IAKM,KAAK;QACR,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAA;KAC/B;CACJ;;;;AAKD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAgC,CAAA;;;;AAK3D,SAAS,SAAS,CAAC,UAA2B;IAC1C,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IACtC,IAAI,MAAM,IAAI,IAAI,EAAE;QAChB,MAAM,IAAI,SAAS,CACf,8DACI,UAAU,KAAK,IAAI,GAAG,MAAM,GAAG,OAAO,UAC1C,EAAE,CACL,CAAA;KACJ;IACD,OAAO,MAAM,CAAA;CAChB;;AAGD,MAAM,CAAC,gBAAgB,CAAC,eAAe,CAAC,SAAS,EAAE;IAC/C,MAAM,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;IAC5B,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;CAC9B,CAAC,CAAA;AAEF,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,OAAO,MAAM,CAAC,WAAW,KAAK,QAAQ,EAAE;IACxE,MAAM,CAAC,cAAc,CAAC,eAAe,CAAC,SAAS,EAAE,MAAM,CAAC,WAAW,EAAE;QACjE,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,iBAAiB;KAC3B,CAAC,CAAA;CACL;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/abort-controller/dist/abort-controller.mjs b/node_modules/abort-controller/dist/abort-controller.mjs new file mode 100644 index 0000000000000..88ba22d5574ed --- /dev/null +++ b/node_modules/abort-controller/dist/abort-controller.mjs @@ -0,0 +1,118 @@ +/** + * @author Toru Nagashima <https://github.com/mysticatea> + * See LICENSE file in root directory for full license. + */ +import { EventTarget, defineEventAttribute } from 'event-target-shim'; + +/** + * The signal class. + * @see https://dom.spec.whatwg.org/#abortsignal + */ +class AbortSignal extends EventTarget { + /** + * AbortSignal cannot be constructed directly. + */ + constructor() { + super(); + throw new TypeError("AbortSignal cannot be constructed directly"); + } + /** + * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise. + */ + get aborted() { + const aborted = abortedFlags.get(this); + if (typeof aborted !== "boolean") { + throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this === null ? "null" : typeof this}`); + } + return aborted; + } +} +defineEventAttribute(AbortSignal.prototype, "abort"); +/** + * Create an AbortSignal object. + */ +function createAbortSignal() { + const signal = Object.create(AbortSignal.prototype); + EventTarget.call(signal); + abortedFlags.set(signal, false); + return signal; +} +/** + * Abort a given signal. + */ +function abortSignal(signal) { + if (abortedFlags.get(signal) !== false) { + return; + } + abortedFlags.set(signal, true); + signal.dispatchEvent({ type: "abort" }); +} +/** + * Aborted flag for each instances. + */ +const abortedFlags = new WeakMap(); +// Properties should be enumerable. +Object.defineProperties(AbortSignal.prototype, { + aborted: { enumerable: true }, +}); +// `toString()` should return `"[object AbortSignal]"` +if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { + Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, { + configurable: true, + value: "AbortSignal", + }); +} + +/** + * The AbortController. + * @see https://dom.spec.whatwg.org/#abortcontroller + */ +class AbortController { + /** + * Initialize this controller. + */ + constructor() { + signals.set(this, createAbortSignal()); + } + /** + * Returns the `AbortSignal` object associated with this object. + */ + get signal() { + return getSignal(this); + } + /** + * Abort and signal to any observers that the associated activity is to be aborted. + */ + abort() { + abortSignal(getSignal(this)); + } +} +/** + * Associated signals. + */ +const signals = new WeakMap(); +/** + * Get the associated signal of a given controller. + */ +function getSignal(controller) { + const signal = signals.get(controller); + if (signal == null) { + throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${controller === null ? "null" : typeof controller}`); + } + return signal; +} +// Properties should be enumerable. +Object.defineProperties(AbortController.prototype, { + signal: { enumerable: true }, + abort: { enumerable: true }, +}); +if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { + Object.defineProperty(AbortController.prototype, Symbol.toStringTag, { + configurable: true, + value: "AbortController", + }); +} + +export default AbortController; +export { AbortController, AbortSignal }; +//# sourceMappingURL=abort-controller.mjs.map diff --git a/node_modules/abort-controller/dist/abort-controller.mjs.map b/node_modules/abort-controller/dist/abort-controller.mjs.map new file mode 100644 index 0000000000000..1e8fa6b00f6ef --- /dev/null +++ b/node_modules/abort-controller/dist/abort-controller.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"abort-controller.mjs","sources":["../src/abort-signal.ts","../src/abort-controller.ts"],"sourcesContent":["import {\n // Event,\n EventTarget,\n // Type,\n defineEventAttribute,\n} from \"event-target-shim\"\n\n// Known Limitation\n// Use `any` because the type of `AbortSignal` in `lib.dom.d.ts` is wrong and\n// to make assignable our `AbortSignal` into that.\n// https://github.com/Microsoft/TSJS-lib-generator/pull/623\ntype Events = {\n abort: any // Event & Type<\"abort\">\n}\ntype EventAttributes = {\n onabort: any // Event & Type<\"abort\">\n}\n\n/**\n * The signal class.\n * @see https://dom.spec.whatwg.org/#abortsignal\n */\nexport default class AbortSignal extends EventTarget<Events, EventAttributes> {\n /**\n * AbortSignal cannot be constructed directly.\n */\n public constructor() {\n super()\n throw new TypeError(\"AbortSignal cannot be constructed directly\")\n }\n\n /**\n * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise.\n */\n public get aborted(): boolean {\n const aborted = abortedFlags.get(this)\n if (typeof aborted !== \"boolean\") {\n throw new TypeError(\n `Expected 'this' to be an 'AbortSignal' object, but got ${\n this === null ? \"null\" : typeof this\n }`,\n )\n }\n return aborted\n }\n}\ndefineEventAttribute(AbortSignal.prototype, \"abort\")\n\n/**\n * Create an AbortSignal object.\n */\nexport function createAbortSignal(): AbortSignal {\n const signal = Object.create(AbortSignal.prototype)\n EventTarget.call(signal)\n abortedFlags.set(signal, false)\n return signal\n}\n\n/**\n * Abort a given signal.\n */\nexport function abortSignal(signal: AbortSignal): void {\n if (abortedFlags.get(signal) !== false) {\n return\n }\n\n abortedFlags.set(signal, true)\n signal.dispatchEvent<\"abort\">({ type: \"abort\" })\n}\n\n/**\n * Aborted flag for each instances.\n */\nconst abortedFlags = new WeakMap<AbortSignal, boolean>()\n\n// Properties should be enumerable.\nObject.defineProperties(AbortSignal.prototype, {\n aborted: { enumerable: true },\n})\n\n// `toString()` should return `\"[object AbortSignal]\"`\nif (typeof Symbol === \"function\" && typeof Symbol.toStringTag === \"symbol\") {\n Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, {\n configurable: true,\n value: \"AbortSignal\",\n })\n}\n","import AbortSignal, { abortSignal, createAbortSignal } from \"./abort-signal\"\n\n/**\n * The AbortController.\n * @see https://dom.spec.whatwg.org/#abortcontroller\n */\nexport default class AbortController {\n /**\n * Initialize this controller.\n */\n public constructor() {\n signals.set(this, createAbortSignal())\n }\n\n /**\n * Returns the `AbortSignal` object associated with this object.\n */\n public get signal(): AbortSignal {\n return getSignal(this)\n }\n\n /**\n * Abort and signal to any observers that the associated activity is to be aborted.\n */\n public abort(): void {\n abortSignal(getSignal(this))\n }\n}\n\n/**\n * Associated signals.\n */\nconst signals = new WeakMap<AbortController, AbortSignal>()\n\n/**\n * Get the associated signal of a given controller.\n */\nfunction getSignal(controller: AbortController): AbortSignal {\n const signal = signals.get(controller)\n if (signal == null) {\n throw new TypeError(\n `Expected 'this' to be an 'AbortController' object, but got ${\n controller === null ? \"null\" : typeof controller\n }`,\n )\n }\n return signal\n}\n\n// Properties should be enumerable.\nObject.defineProperties(AbortController.prototype, {\n signal: { enumerable: true },\n abort: { enumerable: true },\n})\n\nif (typeof Symbol === \"function\" && typeof Symbol.toStringTag === \"symbol\") {\n Object.defineProperty(AbortController.prototype, Symbol.toStringTag, {\n configurable: true,\n value: \"AbortController\",\n })\n}\n\nexport { AbortController, AbortSignal }\n"],"names":[],"mappings":";;;;;;AAkBA;;;;AAIA,MAAqB,WAAY,SAAQ,WAAoC;;;;IAIzE;QACI,KAAK,EAAE,CAAA;QACP,MAAM,IAAI,SAAS,CAAC,4CAA4C,CAAC,CAAA;KACpE;;;;IAKD,IAAW,OAAO;QACd,MAAM,OAAO,GAAG,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QACtC,IAAI,OAAO,OAAO,KAAK,SAAS,EAAE;YAC9B,MAAM,IAAI,SAAS,CACf,0DACI,IAAI,KAAK,IAAI,GAAG,MAAM,GAAG,OAAO,IACpC,EAAE,CACL,CAAA;SACJ;QACD,OAAO,OAAO,CAAA;KACjB;CACJ;AACD,oBAAoB,CAAC,WAAW,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;;;;AAKpD,SAAgB,iBAAiB;IAC7B,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;IACnD,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACxB,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;IAC/B,OAAO,MAAM,CAAA;CAChB;;;;AAKD,SAAgB,WAAW,CAAC,MAAmB;IAC3C,IAAI,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,KAAK,EAAE;QACpC,OAAM;KACT;IAED,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAC9B,MAAM,CAAC,aAAa,CAAU,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAA;CACnD;;;;AAKD,MAAM,YAAY,GAAG,IAAI,OAAO,EAAwB,CAAA;;AAGxD,MAAM,CAAC,gBAAgB,CAAC,WAAW,CAAC,SAAS,EAAE;IAC3C,OAAO,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;CAChC,CAAC,CAAA;;AAGF,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,OAAO,MAAM,CAAC,WAAW,KAAK,QAAQ,EAAE;IACxE,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,WAAW,EAAE;QAC7D,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,aAAa;KACvB,CAAC,CAAA;CACL;;ACpFD;;;;AAIA,MAAqB,eAAe;;;;IAIhC;QACI,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,iBAAiB,EAAE,CAAC,CAAA;KACzC;;;;IAKD,IAAW,MAAM;QACb,OAAO,SAAS,CAAC,IAAI,CAAC,CAAA;KACzB;;;;IAKM,KAAK;QACR,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAA;KAC/B;CACJ;;;;AAKD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAgC,CAAA;;;;AAK3D,SAAS,SAAS,CAAC,UAA2B;IAC1C,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IACtC,IAAI,MAAM,IAAI,IAAI,EAAE;QAChB,MAAM,IAAI,SAAS,CACf,8DACI,UAAU,KAAK,IAAI,GAAG,MAAM,GAAG,OAAO,UAC1C,EAAE,CACL,CAAA;KACJ;IACD,OAAO,MAAM,CAAA;CAChB;;AAGD,MAAM,CAAC,gBAAgB,CAAC,eAAe,CAAC,SAAS,EAAE;IAC/C,MAAM,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;IAC5B,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;CAC9B,CAAC,CAAA;AAEF,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,OAAO,MAAM,CAAC,WAAW,KAAK,QAAQ,EAAE;IACxE,MAAM,CAAC,cAAc,CAAC,eAAe,CAAC,SAAS,EAAE,MAAM,CAAC,WAAW,EAAE;QACjE,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,iBAAiB;KAC3B,CAAC,CAAA;CACL;;;;;"} \ No newline at end of file diff --git a/node_modules/abort-controller/dist/abort-controller.umd.js b/node_modules/abort-controller/dist/abort-controller.umd.js new file mode 100644 index 0000000000000..f643cfd6b6711 --- /dev/null +++ b/node_modules/abort-controller/dist/abort-controller.umd.js @@ -0,0 +1,5 @@ +/** + * @author Toru Nagashima <https://github.com/mysticatea> + * See LICENSE file in root directory for full license. + */(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports):"function"==typeof define&&define.amd?define(["exports"],b):(a=a||self,b(a.AbortControllerShim={}))})(this,function(a){'use strict';function b(a){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},b(a)}function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}function e(a,b,c){return b&&d(a.prototype,b),c&&d(a,c),a}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),b&&h(a,b)}function g(a){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},g(a)}function h(a,b){return h=Object.setPrototypeOf||function(a,b){return a.__proto__=b,a},h(a,b)}function i(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function j(a,b){return b&&("object"==typeof b||"function"==typeof b)?b:i(a)}function k(a){var b=F.get(a);return console.assert(null!=b,"'this' is expected an Event object, but got",a),b}function l(a){return null==a.passiveListener?void(!a.event.cancelable||(a.canceled=!0,"function"==typeof a.event.preventDefault&&a.event.preventDefault())):void("undefined"!=typeof console&&"function"==typeof console.error&&console.error("Unable to preventDefault inside passive event listener invocation.",a.passiveListener))}function m(a,b){F.set(this,{eventTarget:a,event:b,eventPhase:2,currentTarget:a,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:b.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});for(var c,d=Object.keys(b),e=0;e<d.length;++e)c=d[e],c in this||Object.defineProperty(this,c,n(c))}function n(a){return{get:function(){return k(this).event[a]},set:function(b){k(this).event[a]=b},configurable:!0,enumerable:!0}}function o(a){return{value:function(){var b=k(this).event;return b[a].apply(b,arguments)},configurable:!0,enumerable:!0}}function p(a,b){function c(b,c){a.call(this,b,c)}var d=Object.keys(b);if(0===d.length)return a;c.prototype=Object.create(a.prototype,{constructor:{value:c,configurable:!0,writable:!0}});for(var e,f=0;f<d.length;++f)if(e=d[f],!(e in a.prototype)){var g=Object.getOwnPropertyDescriptor(b,e),h="function"==typeof g.value;Object.defineProperty(c.prototype,e,h?o(e):n(e))}return c}function q(a){if(null==a||a===Object.prototype)return m;var b=G.get(a);return null==b&&(b=p(q(Object.getPrototypeOf(a)),a),G.set(a,b)),b}function r(a,b){var c=q(Object.getPrototypeOf(b));return new c(a,b)}function s(a){return k(a).immediateStopped}function t(a,b){k(a).eventPhase=b}function u(a,b){k(a).currentTarget=b}function v(a,b){k(a).passiveListener=b}function w(a){return null!==a&&"object"===b(a)}function x(a){var b=H.get(a);if(null==b)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return b}function y(a){return{get:function(){for(var b=x(this),c=b.get(a);null!=c;){if(3===c.listenerType)return c.listener;c=c.next}return null},set:function(b){"function"==typeof b||w(b)||(b=null);for(var c=x(this),d=null,e=c.get(a);null!=e;)3===e.listenerType?null===d?null===e.next?c.delete(a):c.set(a,e.next):d.next=e.next:d=e,e=e.next;if(null!==b){var f={listener:b,listenerType:3,passive:!1,once:!1,next:null};null===d?c.set(a,f):d.next=f}},configurable:!0,enumerable:!0}}function z(a,b){Object.defineProperty(a,"on".concat(b),y(b))}function A(a){function b(){B.call(this)}b.prototype=Object.create(B.prototype,{constructor:{value:b,configurable:!0,writable:!0}});for(var c=0;c<a.length;++c)z(b.prototype,a[c]);return b}function B(){if(this instanceof B)return void H.set(this,new Map);if(1===arguments.length&&Array.isArray(arguments[0]))return A(arguments[0]);if(0<arguments.length){for(var a=Array(arguments.length),b=0;b<arguments.length;++b)a[b]=arguments[b];return A(a)}throw new TypeError("Cannot call a class as a function")}function C(){var a=Object.create(K.prototype);return B.call(a),L.set(a,!1),a}function D(a){!1!==L.get(a)||(L.set(a,!0),a.dispatchEvent({type:"abort"}))}function E(a){var c=N.get(a);if(null==c)throw new TypeError("Expected 'this' to be an 'AbortController' object, but got ".concat(null===a?"null":b(a)));return c}var F=new WeakMap,G=new WeakMap;m.prototype={get type(){return k(this).event.type},get target(){return k(this).eventTarget},get currentTarget(){return k(this).currentTarget},composedPath:function(){var a=k(this).currentTarget;return null==a?[]:[a]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return k(this).eventPhase},stopPropagation:function(){var a=k(this);a.stopped=!0,"function"==typeof a.event.stopPropagation&&a.event.stopPropagation()},stopImmediatePropagation:function(){var a=k(this);a.stopped=!0,a.immediateStopped=!0,"function"==typeof a.event.stopImmediatePropagation&&a.event.stopImmediatePropagation()},get bubbles(){return!!k(this).event.bubbles},get cancelable(){return!!k(this).event.cancelable},preventDefault:function(){l(k(this))},get defaultPrevented(){return k(this).canceled},get composed(){return!!k(this).event.composed},get timeStamp(){return k(this).timeStamp},get srcElement(){return k(this).eventTarget},get cancelBubble(){return k(this).stopped},set cancelBubble(a){if(a){var b=k(this);b.stopped=!0,"boolean"==typeof b.event.cancelBubble&&(b.event.cancelBubble=!0)}},get returnValue(){return!k(this).canceled},set returnValue(a){a||l(k(this))},initEvent:function(){}},Object.defineProperty(m.prototype,"constructor",{value:m,configurable:!0,writable:!0}),"undefined"!=typeof window&&"undefined"!=typeof window.Event&&(Object.setPrototypeOf(m.prototype,window.Event.prototype),G.set(window.Event.prototype,m));var H=new WeakMap,I=1,J=2;B.prototype={addEventListener:function(a,b,c){if(null!=b){if("function"!=typeof b&&!w(b))throw new TypeError("'listener' should be a function or an object.");var d=x(this),e=w(c),f=e?!!c.capture:!!c,g=f?I:J,h={listener:b,listenerType:g,passive:e&&!!c.passive,once:e&&!!c.once,next:null},i=d.get(a);if(void 0===i)return void d.set(a,h);for(var j=null;null!=i;){if(i.listener===b&&i.listenerType===g)return;j=i,i=i.next}j.next=h}},removeEventListener:function(a,b,c){if(null!=b)for(var d=x(this),e=w(c)?!!c.capture:!!c,f=e?I:J,g=null,h=d.get(a);null!=h;){if(h.listener===b&&h.listenerType===f)return void(null===g?null===h.next?d.delete(a):d.set(a,h.next):g.next=h.next);g=h,h=h.next}},dispatchEvent:function(a){if(null==a||"string"!=typeof a.type)throw new TypeError("\"event.type\" should be a string.");var b=x(this),c=a.type,d=b.get(c);if(null==d)return!0;for(var e=r(this,a),f=null;null!=d;){if(d.once?null===f?null===d.next?b.delete(c):b.set(c,d.next):f.next=d.next:f=d,v(e,d.passive?d.listener:null),"function"==typeof d.listener)try{d.listener.call(this,e)}catch(a){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(a)}else d.listenerType!==3&&"function"==typeof d.listener.handleEvent&&d.listener.handleEvent(e);if(s(e))break;d=d.next}return v(e,null),t(e,0),u(e,null),!e.defaultPrevented}},Object.defineProperty(B.prototype,"constructor",{value:B,configurable:!0,writable:!0}),"undefined"!=typeof window&&"undefined"!=typeof window.EventTarget&&Object.setPrototypeOf(B.prototype,window.EventTarget.prototype);var K=function(a){function d(){var a;throw c(this,d),a=j(this,g(d).call(this)),new TypeError("AbortSignal cannot be constructed directly")}return f(d,a),e(d,[{key:"aborted",get:function(){var a=L.get(this);if("boolean"!=typeof a)throw new TypeError("Expected 'this' to be an 'AbortSignal' object, but got ".concat(null===this?"null":b(this)));return a}}]),d}(B);z(K.prototype,"abort");var L=new WeakMap;Object.defineProperties(K.prototype,{aborted:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"===b(Symbol.toStringTag)&&Object.defineProperty(K.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});var M=function(){function a(){c(this,a),N.set(this,C())}return e(a,[{key:"abort",value:function(){D(E(this))}},{key:"signal",get:function(){return E(this)}}]),a}(),N=new WeakMap;if(Object.defineProperties(M.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"===b(Symbol.toStringTag)&&Object.defineProperty(M.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"}),a.AbortController=M,a.AbortSignal=K,a.default=M,Object.defineProperty(a,"__esModule",{value:!0}),"undefined"==typeof module&&"undefined"==typeof define){var O=Function("return this")();"undefined"==typeof O.AbortController&&(O.AbortController=M,O.AbortSignal=K)}}); +//# sourceMappingURL=abort-controller.umd.js.map diff --git a/node_modules/abort-controller/dist/abort-controller.umd.js.map b/node_modules/abort-controller/dist/abort-controller.umd.js.map new file mode 100644 index 0000000000000..875ab0283d6ae --- /dev/null +++ b/node_modules/abort-controller/dist/abort-controller.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"abort-controller.umd.js","sources":["../node_modules/event-target-shim/dist/event-target-shim.mjs","../src/abort-signal.ts","../src/abort-controller.ts"],"sourcesContent":["/**\n * @author Toru Nagashima <https://github.com/mysticatea>\n * @copyright 2015 Toru Nagashima. All rights reserved.\n * See LICENSE file in root directory for full license.\n */\n/**\n * @typedef {object} PrivateData\n * @property {EventTarget} eventTarget The event target.\n * @property {{type:string}} event The original event object.\n * @property {number} eventPhase The current event phase.\n * @property {EventTarget|null} currentTarget The current event target.\n * @property {boolean} canceled The flag to prevent default.\n * @property {boolean} stopped The flag to stop propagation.\n * @property {boolean} immediateStopped The flag to stop propagation immediately.\n * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null.\n * @property {number} timeStamp The unix time.\n * @private\n */\n\n/**\n * Private data for event wrappers.\n * @type {WeakMap<Event, PrivateData>}\n * @private\n */\nconst privateData = new WeakMap();\n\n/**\n * Cache for wrapper classes.\n * @type {WeakMap<Object, Function>}\n * @private\n */\nconst wrappers = new WeakMap();\n\n/**\n * Get private data.\n * @param {Event} event The event object to get private data.\n * @returns {PrivateData} The private data of the event.\n * @private\n */\nfunction pd(event) {\n const retv = privateData.get(event);\n console.assert(\n retv != null,\n \"'this' is expected an Event object, but got\",\n event\n );\n return retv\n}\n\n/**\n * https://dom.spec.whatwg.org/#set-the-canceled-flag\n * @param data {PrivateData} private data.\n */\nfunction setCancelFlag(data) {\n if (data.passiveListener != null) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(\n \"Unable to preventDefault inside passive event listener invocation.\",\n data.passiveListener\n );\n }\n return\n }\n if (!data.event.cancelable) {\n return\n }\n\n data.canceled = true;\n if (typeof data.event.preventDefault === \"function\") {\n data.event.preventDefault();\n }\n}\n\n/**\n * @see https://dom.spec.whatwg.org/#interface-event\n * @private\n */\n/**\n * The event wrapper.\n * @constructor\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Event|{type:string}} event The original event to wrap.\n */\nfunction Event(eventTarget, event) {\n privateData.set(this, {\n eventTarget,\n event,\n eventPhase: 2,\n currentTarget: eventTarget,\n canceled: false,\n stopped: false,\n immediateStopped: false,\n passiveListener: null,\n timeStamp: event.timeStamp || Date.now(),\n });\n\n // https://heycam.github.io/webidl/#Unforgeable\n Object.defineProperty(this, \"isTrusted\", { value: false, enumerable: true });\n\n // Define accessors\n const keys = Object.keys(event);\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i];\n if (!(key in this)) {\n Object.defineProperty(this, key, defineRedirectDescriptor(key));\n }\n }\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEvent.prototype = {\n /**\n * The type of this event.\n * @type {string}\n */\n get type() {\n return pd(this).event.type\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get target() {\n return pd(this).eventTarget\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get currentTarget() {\n return pd(this).currentTarget\n },\n\n /**\n * @returns {EventTarget[]} The composed path of this event.\n */\n composedPath() {\n const currentTarget = pd(this).currentTarget;\n if (currentTarget == null) {\n return []\n }\n return [currentTarget]\n },\n\n /**\n * Constant of NONE.\n * @type {number}\n */\n get NONE() {\n return 0\n },\n\n /**\n * Constant of CAPTURING_PHASE.\n * @type {number}\n */\n get CAPTURING_PHASE() {\n return 1\n },\n\n /**\n * Constant of AT_TARGET.\n * @type {number}\n */\n get AT_TARGET() {\n return 2\n },\n\n /**\n * Constant of BUBBLING_PHASE.\n * @type {number}\n */\n get BUBBLING_PHASE() {\n return 3\n },\n\n /**\n * The target of this event.\n * @type {number}\n */\n get eventPhase() {\n return pd(this).eventPhase\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopPropagation() {\n const data = pd(this);\n\n data.stopped = true;\n if (typeof data.event.stopPropagation === \"function\") {\n data.event.stopPropagation();\n }\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopImmediatePropagation() {\n const data = pd(this);\n\n data.stopped = true;\n data.immediateStopped = true;\n if (typeof data.event.stopImmediatePropagation === \"function\") {\n data.event.stopImmediatePropagation();\n }\n },\n\n /**\n * The flag to be bubbling.\n * @type {boolean}\n */\n get bubbles() {\n return Boolean(pd(this).event.bubbles)\n },\n\n /**\n * The flag to be cancelable.\n * @type {boolean}\n */\n get cancelable() {\n return Boolean(pd(this).event.cancelable)\n },\n\n /**\n * Cancel this event.\n * @returns {void}\n */\n preventDefault() {\n setCancelFlag(pd(this));\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n */\n get defaultPrevented() {\n return pd(this).canceled\n },\n\n /**\n * The flag to be composed.\n * @type {boolean}\n */\n get composed() {\n return Boolean(pd(this).event.composed)\n },\n\n /**\n * The unix time of this event.\n * @type {number}\n */\n get timeStamp() {\n return pd(this).timeStamp\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n * @deprecated\n */\n get srcElement() {\n return pd(this).eventTarget\n },\n\n /**\n * The flag to stop event bubbling.\n * @type {boolean}\n * @deprecated\n */\n get cancelBubble() {\n return pd(this).stopped\n },\n set cancelBubble(value) {\n if (!value) {\n return\n }\n const data = pd(this);\n\n data.stopped = true;\n if (typeof data.event.cancelBubble === \"boolean\") {\n data.event.cancelBubble = true;\n }\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n * @deprecated\n */\n get returnValue() {\n return !pd(this).canceled\n },\n set returnValue(value) {\n if (!value) {\n setCancelFlag(pd(this));\n }\n },\n\n /**\n * Initialize this event object. But do nothing under event dispatching.\n * @param {string} type The event type.\n * @param {boolean} [bubbles=false] The flag to be possible to bubble up.\n * @param {boolean} [cancelable=false] The flag to be possible to cancel.\n * @deprecated\n */\n initEvent() {\n // Do nothing.\n },\n};\n\n// `constructor` is not enumerable.\nObject.defineProperty(Event.prototype, \"constructor\", {\n value: Event,\n configurable: true,\n writable: true,\n});\n\n// Ensure `event instanceof window.Event` is `true`.\nif (typeof window !== \"undefined\" && typeof window.Event !== \"undefined\") {\n Object.setPrototypeOf(Event.prototype, window.Event.prototype);\n\n // Make association for wrappers.\n wrappers.set(window.Event.prototype, Event);\n}\n\n/**\n * Get the property descriptor to redirect a given property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to redirect the property.\n * @private\n */\nfunction defineRedirectDescriptor(key) {\n return {\n get() {\n return pd(this).event[key]\n },\n set(value) {\n pd(this).event[key] = value;\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Get the property descriptor to call a given method property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to call the method property.\n * @private\n */\nfunction defineCallDescriptor(key) {\n return {\n value() {\n const event = pd(this).event;\n return event[key].apply(event, arguments)\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define new wrapper class.\n * @param {Function} BaseEvent The base wrapper class.\n * @param {Object} proto The prototype of the original event.\n * @returns {Function} The defined wrapper class.\n * @private\n */\nfunction defineWrapper(BaseEvent, proto) {\n const keys = Object.keys(proto);\n if (keys.length === 0) {\n return BaseEvent\n }\n\n /** CustomEvent */\n function CustomEvent(eventTarget, event) {\n BaseEvent.call(this, eventTarget, event);\n }\n\n CustomEvent.prototype = Object.create(BaseEvent.prototype, {\n constructor: { value: CustomEvent, configurable: true, writable: true },\n });\n\n // Define accessors.\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i];\n if (!(key in BaseEvent.prototype)) {\n const descriptor = Object.getOwnPropertyDescriptor(proto, key);\n const isFunc = typeof descriptor.value === \"function\";\n Object.defineProperty(\n CustomEvent.prototype,\n key,\n isFunc\n ? defineCallDescriptor(key)\n : defineRedirectDescriptor(key)\n );\n }\n }\n\n return CustomEvent\n}\n\n/**\n * Get the wrapper class of a given prototype.\n * @param {Object} proto The prototype of the original event to get its wrapper.\n * @returns {Function} The wrapper class.\n * @private\n */\nfunction getWrapper(proto) {\n if (proto == null || proto === Object.prototype) {\n return Event\n }\n\n let wrapper = wrappers.get(proto);\n if (wrapper == null) {\n wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto);\n wrappers.set(proto, wrapper);\n }\n return wrapper\n}\n\n/**\n * Wrap a given event to management a dispatching.\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Object} event The event to wrap.\n * @returns {Event} The wrapper instance.\n * @private\n */\nfunction wrapEvent(eventTarget, event) {\n const Wrapper = getWrapper(Object.getPrototypeOf(event));\n return new Wrapper(eventTarget, event)\n}\n\n/**\n * Get the immediateStopped flag of a given event.\n * @param {Event} event The event to get.\n * @returns {boolean} The flag to stop propagation immediately.\n * @private\n */\nfunction isStopped(event) {\n return pd(event).immediateStopped\n}\n\n/**\n * Set the current event phase of a given event.\n * @param {Event} event The event to set current target.\n * @param {number} eventPhase New event phase.\n * @returns {void}\n * @private\n */\nfunction setEventPhase(event, eventPhase) {\n pd(event).eventPhase = eventPhase;\n}\n\n/**\n * Set the current target of a given event.\n * @param {Event} event The event to set current target.\n * @param {EventTarget|null} currentTarget New current target.\n * @returns {void}\n * @private\n */\nfunction setCurrentTarget(event, currentTarget) {\n pd(event).currentTarget = currentTarget;\n}\n\n/**\n * Set a passive listener of a given event.\n * @param {Event} event The event to set current target.\n * @param {Function|null} passiveListener New passive listener.\n * @returns {void}\n * @private\n */\nfunction setPassiveListener(event, passiveListener) {\n pd(event).passiveListener = passiveListener;\n}\n\n/**\n * @typedef {object} ListenerNode\n * @property {Function} listener\n * @property {1|2|3} listenerType\n * @property {boolean} passive\n * @property {boolean} once\n * @property {ListenerNode|null} next\n * @private\n */\n\n/**\n * @type {WeakMap<object, Map<string, ListenerNode>>}\n * @private\n */\nconst listenersMap = new WeakMap();\n\n// Listener types\nconst CAPTURE = 1;\nconst BUBBLE = 2;\nconst ATTRIBUTE = 3;\n\n/**\n * Check whether a given value is an object or not.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is an object.\n */\nfunction isObject(x) {\n return x !== null && typeof x === \"object\" //eslint-disable-line no-restricted-syntax\n}\n\n/**\n * Get listeners.\n * @param {EventTarget} eventTarget The event target to get.\n * @returns {Map<string, ListenerNode>} The listeners.\n * @private\n */\nfunction getListeners(eventTarget) {\n const listeners = listenersMap.get(eventTarget);\n if (listeners == null) {\n throw new TypeError(\n \"'this' is expected an EventTarget object, but got another value.\"\n )\n }\n return listeners\n}\n\n/**\n * Get the property descriptor for the event attribute of a given event.\n * @param {string} eventName The event name to get property descriptor.\n * @returns {PropertyDescriptor} The property descriptor.\n * @private\n */\nfunction defineEventAttributeDescriptor(eventName) {\n return {\n get() {\n const listeners = getListeners(this);\n let node = listeners.get(eventName);\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n return node.listener\n }\n node = node.next;\n }\n return null\n },\n\n set(listener) {\n if (typeof listener !== \"function\" && !isObject(listener)) {\n listener = null; // eslint-disable-line no-param-reassign\n }\n const listeners = getListeners(this);\n\n // Traverse to the tail while removing old value.\n let prev = null;\n let node = listeners.get(eventName);\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n // Remove old value.\n if (prev !== null) {\n prev.next = node.next;\n } else if (node.next !== null) {\n listeners.set(eventName, node.next);\n } else {\n listeners.delete(eventName);\n }\n } else {\n prev = node;\n }\n\n node = node.next;\n }\n\n // Add new value.\n if (listener !== null) {\n const newNode = {\n listener,\n listenerType: ATTRIBUTE,\n passive: false,\n once: false,\n next: null,\n };\n if (prev === null) {\n listeners.set(eventName, newNode);\n } else {\n prev.next = newNode;\n }\n }\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define an event attribute (e.g. `eventTarget.onclick`).\n * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite.\n * @param {string} eventName The event name to define.\n * @returns {void}\n */\nfunction defineEventAttribute(eventTargetPrototype, eventName) {\n Object.defineProperty(\n eventTargetPrototype,\n `on${eventName}`,\n defineEventAttributeDescriptor(eventName)\n );\n}\n\n/**\n * Define a custom EventTarget with event attributes.\n * @param {string[]} eventNames Event names for event attributes.\n * @returns {EventTarget} The custom EventTarget.\n * @private\n */\nfunction defineCustomEventTarget(eventNames) {\n /** CustomEventTarget */\n function CustomEventTarget() {\n EventTarget.call(this);\n }\n\n CustomEventTarget.prototype = Object.create(EventTarget.prototype, {\n constructor: {\n value: CustomEventTarget,\n configurable: true,\n writable: true,\n },\n });\n\n for (let i = 0; i < eventNames.length; ++i) {\n defineEventAttribute(CustomEventTarget.prototype, eventNames[i]);\n }\n\n return CustomEventTarget\n}\n\n/**\n * EventTarget.\n *\n * - This is constructor if no arguments.\n * - This is a function which returns a CustomEventTarget constructor if there are arguments.\n *\n * For example:\n *\n * class A extends EventTarget {}\n * class B extends EventTarget(\"message\") {}\n * class C extends EventTarget(\"message\", \"error\") {}\n * class D extends EventTarget([\"message\", \"error\"]) {}\n */\nfunction EventTarget() {\n /*eslint-disable consistent-return */\n if (this instanceof EventTarget) {\n listenersMap.set(this, new Map());\n return\n }\n if (arguments.length === 1 && Array.isArray(arguments[0])) {\n return defineCustomEventTarget(arguments[0])\n }\n if (arguments.length > 0) {\n const types = new Array(arguments.length);\n for (let i = 0; i < arguments.length; ++i) {\n types[i] = arguments[i];\n }\n return defineCustomEventTarget(types)\n }\n throw new TypeError(\"Cannot call a class as a function\")\n /*eslint-enable consistent-return */\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEventTarget.prototype = {\n /**\n * Add a given listener to this event target.\n * @param {string} eventName The event name to add.\n * @param {Function} listener The listener to add.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n addEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n if (typeof listener !== \"function\" && !isObject(listener)) {\n throw new TypeError(\"'listener' should be a function or an object.\")\n }\n\n const listeners = getListeners(this);\n const optionsIsObj = isObject(options);\n const capture = optionsIsObj\n ? Boolean(options.capture)\n : Boolean(options);\n const listenerType = capture ? CAPTURE : BUBBLE;\n const newNode = {\n listener,\n listenerType,\n passive: optionsIsObj && Boolean(options.passive),\n once: optionsIsObj && Boolean(options.once),\n next: null,\n };\n\n // Set it as the first node if the first node is null.\n let node = listeners.get(eventName);\n if (node === undefined) {\n listeners.set(eventName, newNode);\n return\n }\n\n // Traverse to the tail while checking duplication..\n let prev = null;\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n // Should ignore duplication.\n return\n }\n prev = node;\n node = node.next;\n }\n\n // Add it.\n prev.next = newNode;\n },\n\n /**\n * Remove a given listener from this event target.\n * @param {string} eventName The event name to remove.\n * @param {Function} listener The listener to remove.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n removeEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n\n const listeners = getListeners(this);\n const capture = isObject(options)\n ? Boolean(options.capture)\n : Boolean(options);\n const listenerType = capture ? CAPTURE : BUBBLE;\n\n let prev = null;\n let node = listeners.get(eventName);\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n if (prev !== null) {\n prev.next = node.next;\n } else if (node.next !== null) {\n listeners.set(eventName, node.next);\n } else {\n listeners.delete(eventName);\n }\n return\n }\n\n prev = node;\n node = node.next;\n }\n },\n\n /**\n * Dispatch a given event.\n * @param {Event|{type:string}} event The event to dispatch.\n * @returns {boolean} `false` if canceled.\n */\n dispatchEvent(event) {\n if (event == null || typeof event.type !== \"string\") {\n throw new TypeError('\"event.type\" should be a string.')\n }\n\n // If listeners aren't registered, terminate.\n const listeners = getListeners(this);\n const eventName = event.type;\n let node = listeners.get(eventName);\n if (node == null) {\n return true\n }\n\n // Since we cannot rewrite several properties, so wrap object.\n const wrappedEvent = wrapEvent(this, event);\n\n // This doesn't process capturing phase and bubbling phase.\n // This isn't participating in a tree.\n let prev = null;\n while (node != null) {\n // Remove this listener if it's once\n if (node.once) {\n if (prev !== null) {\n prev.next = node.next;\n } else if (node.next !== null) {\n listeners.set(eventName, node.next);\n } else {\n listeners.delete(eventName);\n }\n } else {\n prev = node;\n }\n\n // Call this listener\n setPassiveListener(\n wrappedEvent,\n node.passive ? node.listener : null\n );\n if (typeof node.listener === \"function\") {\n try {\n node.listener.call(this, wrappedEvent);\n } catch (err) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(err);\n }\n }\n } else if (\n node.listenerType !== ATTRIBUTE &&\n typeof node.listener.handleEvent === \"function\"\n ) {\n node.listener.handleEvent(wrappedEvent);\n }\n\n // Break if `event.stopImmediatePropagation` was called.\n if (isStopped(wrappedEvent)) {\n break\n }\n\n node = node.next;\n }\n setPassiveListener(wrappedEvent, null);\n setEventPhase(wrappedEvent, 0);\n setCurrentTarget(wrappedEvent, null);\n\n return !wrappedEvent.defaultPrevented\n },\n};\n\n// `constructor` is not enumerable.\nObject.defineProperty(EventTarget.prototype, \"constructor\", {\n value: EventTarget,\n configurable: true,\n writable: true,\n});\n\n// Ensure `eventTarget instanceof window.EventTarget` is `true`.\nif (\n typeof window !== \"undefined\" &&\n typeof window.EventTarget !== \"undefined\"\n) {\n Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype);\n}\n\nexport default EventTarget;\nexport { defineEventAttribute, EventTarget };\n//# sourceMappingURL=event-target-shim.mjs.map\n","import {\n // Event,\n EventTarget,\n // Type,\n defineEventAttribute,\n} from \"event-target-shim\"\n\n// Known Limitation\n// Use `any` because the type of `AbortSignal` in `lib.dom.d.ts` is wrong and\n// to make assignable our `AbortSignal` into that.\n// https://github.com/Microsoft/TSJS-lib-generator/pull/623\ntype Events = {\n abort: any // Event & Type<\"abort\">\n}\ntype EventAttributes = {\n onabort: any // Event & Type<\"abort\">\n}\n\n/**\n * The signal class.\n * @see https://dom.spec.whatwg.org/#abortsignal\n */\nexport default class AbortSignal extends EventTarget<Events, EventAttributes> {\n /**\n * AbortSignal cannot be constructed directly.\n */\n public constructor() {\n super()\n throw new TypeError(\"AbortSignal cannot be constructed directly\")\n }\n\n /**\n * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise.\n */\n public get aborted(): boolean {\n const aborted = abortedFlags.get(this)\n if (typeof aborted !== \"boolean\") {\n throw new TypeError(\n `Expected 'this' to be an 'AbortSignal' object, but got ${\n this === null ? \"null\" : typeof this\n }`,\n )\n }\n return aborted\n }\n}\ndefineEventAttribute(AbortSignal.prototype, \"abort\")\n\n/**\n * Create an AbortSignal object.\n */\nexport function createAbortSignal(): AbortSignal {\n const signal = Object.create(AbortSignal.prototype)\n EventTarget.call(signal)\n abortedFlags.set(signal, false)\n return signal\n}\n\n/**\n * Abort a given signal.\n */\nexport function abortSignal(signal: AbortSignal): void {\n if (abortedFlags.get(signal) !== false) {\n return\n }\n\n abortedFlags.set(signal, true)\n signal.dispatchEvent<\"abort\">({ type: \"abort\" })\n}\n\n/**\n * Aborted flag for each instances.\n */\nconst abortedFlags = new WeakMap<AbortSignal, boolean>()\n\n// Properties should be enumerable.\nObject.defineProperties(AbortSignal.prototype, {\n aborted: { enumerable: true },\n})\n\n// `toString()` should return `\"[object AbortSignal]\"`\nif (typeof Symbol === \"function\" && typeof Symbol.toStringTag === \"symbol\") {\n Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, {\n configurable: true,\n value: \"AbortSignal\",\n })\n}\n","import AbortSignal, { abortSignal, createAbortSignal } from \"./abort-signal\"\n\n/**\n * The AbortController.\n * @see https://dom.spec.whatwg.org/#abortcontroller\n */\nexport default class AbortController {\n /**\n * Initialize this controller.\n */\n public constructor() {\n signals.set(this, createAbortSignal())\n }\n\n /**\n * Returns the `AbortSignal` object associated with this object.\n */\n public get signal(): AbortSignal {\n return getSignal(this)\n }\n\n /**\n * Abort and signal to any observers that the associated activity is to be aborted.\n */\n public abort(): void {\n abortSignal(getSignal(this))\n }\n}\n\n/**\n * Associated signals.\n */\nconst signals = new WeakMap<AbortController, AbortSignal>()\n\n/**\n * Get the associated signal of a given controller.\n */\nfunction getSignal(controller: AbortController): AbortSignal {\n const signal = signals.get(controller)\n if (signal == null) {\n throw new TypeError(\n `Expected 'this' to be an 'AbortController' object, but got ${\n controller === null ? \"null\" : typeof controller\n }`,\n )\n }\n return signal\n}\n\n// Properties should be enumerable.\nObject.defineProperties(AbortController.prototype, {\n signal: { enumerable: true },\n abort: { enumerable: true },\n})\n\nif (typeof Symbol === \"function\" && typeof Symbol.toStringTag === \"symbol\") {\n Object.defineProperty(AbortController.prototype, Symbol.toStringTag, {\n configurable: true,\n value: \"AbortController\",\n })\n}\n\nexport { AbortController, AbortSignal }\n"],"names":["pd","event","retv","privateData","get","console","assert","setCancelFlag","data","passiveListener","cancelable","canceled","preventDefault","error","Event","eventTarget","set","eventPhase","currentTarget","stopped","immediateStopped","timeStamp","Date","now","Object","defineProperty","value","enumerable","key","keys","i","length","defineRedirectDescriptor","configurable","defineCallDescriptor","apply","arguments","defineWrapper","BaseEvent","proto","CustomEvent","call","prototype","create","constructor","writable","descriptor","getOwnPropertyDescriptor","isFunc","getWrapper","wrapper","wrappers","getPrototypeOf","wrapEvent","Wrapper","isStopped","setEventPhase","setCurrentTarget","setPassiveListener","createAbortSignal","signal","AbortSignal","EventTarget","abortedFlags","abortSignal","dispatchEvent","type","getSignal","controller","signals","TypeError","WeakMap","target","composedPath","NONE","CAPTURING_PHASE","AT_TARGET","BUBBLING_PHASE","stopPropagation","stopImmediatePropagation","bubbles","defaultPrevented","composed","srcElement","cancelBubble","returnValue","initEvent","window","setPrototypeOf","aborted","defineEventAttribute","defineProperties","Symbol","_typeof","toStringTag","AbortController","abort"],"mappings":";;;+3CAkCA,QAASA,CAAAA,CAAT,CAAYC,CAAZ,CAAmB,IACTC,CAAAA,CAAI,CAAGC,CAAW,CAACC,GAAZ,CAAgBH,CAAhB,QACbI,CAAAA,OAAO,CAACC,MAAR,CACY,IAAR,EAAAJ,CADJ,CAEI,6CAFJ,CAGID,CAHJ,EAKOC,EAOX,QAASK,CAAAA,CAAT,CAAuBC,CAAvB,CAA6B,OACG,KAAxB,EAAAA,CAAI,CAACC,eADgB,MAarB,CAACD,CAAI,CAACP,KAAL,CAAWS,UAbS,GAiBzBF,CAAI,CAACG,QAAL,GAjByB,CAkBgB,UAArC,QAAOH,CAAAA,CAAI,CAACP,KAAL,CAAWW,cAlBG,EAmBrBJ,CAAI,CAACP,KAAL,CAAWW,cAAX,EAnBqB,QAGE,WAAnB,QAAOP,CAAAA,OAAP,EACyB,UAAzB,QAAOA,CAAAA,OAAO,CAACQ,KAJE,EAMjBR,OAAO,CAACQ,KAAR,CACI,oEADJ,CAEIL,CAAI,CAACC,eAFT,CANiB,EAiC7B,QAASK,CAAAA,CAAT,CAAeC,CAAf,CAA4Bd,CAA5B,CAAmC,CAC/BE,CAAW,CAACa,GAAZ,CAAgB,IAAhB,CAAsB,CAClBD,WAAW,CAAXA,CADkB,CAElBd,KAAK,CAALA,CAFkB,CAGlBgB,UAAU,CAAE,CAHM,CAIlBC,aAAa,CAAEH,CAJG,CAKlBJ,QAAQ,GALU,CAMlBQ,OAAO,GANW,CAOlBC,gBAAgB,GAPE,CAQlBX,eAAe,CAAE,IARC,CASlBY,SAAS,CAAEpB,CAAK,CAACoB,SAAN,EAAmBC,IAAI,CAACC,GAAL,EATZ,CAAtB,CAD+B,CAc/BC,MAAM,CAACC,cAAP,CAAsB,IAAtB,CAA4B,WAA5B,CAAyC,CAAEC,KAAK,GAAP,CAAgBC,UAAU,GAA1B,CAAzC,CAd+B,QAmBrBC,CAAAA,EAFJC,CAAI,CAAGL,MAAM,CAACK,IAAP,CAAY5B,CAAZ,EACJ6B,CAAC,CAAG,EAAGA,CAAC,CAAGD,CAAI,CAACE,OAAQ,EAAED,EACzBF,EAAMC,CAAI,CAACC,CAAD,EACVF,CAAG,GAAI,OACTJ,MAAM,CAACC,cAAP,CAAsB,IAAtB,CAA4BG,CAA5B,CAAiCI,CAAwB,CAACJ,CAAD,CAAzD,EAyOZ,QAASI,CAAAA,CAAT,CAAkCJ,CAAlC,CAAuC,OAC5B,CACHxB,GADG,WACG,OACKJ,CAAAA,CAAE,CAAC,IAAD,CAAF,CAASC,KAAT,CAAe2B,CAAf,CAFR,CAAA,CAIHZ,GAJG,UAICU,EAAO,CACP1B,CAAE,CAAC,IAAD,CAAF,CAASC,KAAT,CAAe2B,CAAf,EAAsBF,CALvB,CAAA,CAOHO,YAAY,GAPT,CAQHN,UAAU,GARP,EAkBX,QAASO,CAAAA,CAAT,CAA8BN,CAA9B,CAAmC,OACxB,CACHF,KADG,WACK,IACEzB,CAAAA,CAAK,CAAGD,CAAE,CAAC,IAAD,CAAF,CAASC,YAChBA,CAAAA,CAAK,CAAC2B,CAAD,CAAL,CAAWO,KAAX,CAAiBlC,CAAjB,CAAwBmC,SAAxB,CAHR,CAAA,CAKHH,YAAY,GALT,CAMHN,UAAU,GANP,EAiBX,QAASU,CAAAA,CAAT,CAAuBC,CAAvB,CAAkCC,CAAlC,CAAyC,SAO5BC,CAAAA,EAAYzB,EAAad,EAAO,CACrCqC,CAAS,CAACG,IAAV,CAAe,IAAf,CAAqB1B,CAArB,CAAkCd,CAAlC,KAPE4B,CAAAA,CAAI,CAAGL,MAAM,CAACK,IAAP,CAAYU,CAAZ,KACO,CAAhB,GAAAV,CAAI,CAACE,aACEO,CAAAA,EAQXE,CAAW,CAACE,SAAZ,CAAwBlB,MAAM,CAACmB,MAAP,CAAcL,CAAS,CAACI,SAAxB,CAAmC,CACvDE,WAAW,CAAE,CAAElB,KAAK,CAAEc,CAAT,CAAsBP,YAAY,GAAlC,CAA0CY,QAAQ,GAAlD,CAD0C,CAAnC,CAXa,KAgBhC,GACKjB,CAAAA,CADL,CAAIE,CAAC,CAAG,EAAGA,CAAC,CAAGD,CAAI,CAACE,OAAQ,EAAED,KACzBF,EAAMC,CAAI,CAACC,CAAD,EACZ,EAAEF,CAAG,GAAIU,CAAAA,CAAS,CAACI,SAAnB,EAA+B,IACzBI,CAAAA,CAAU,CAAGtB,MAAM,CAACuB,wBAAP,CAAgCR,CAAhC,CAAuCX,CAAvC,CADY,CAEzBoB,CAAM,CAA+B,UAA5B,QAAOF,CAAAA,CAAU,CAACpB,KAFF,CAG/BF,MAAM,CAACC,cAAP,CACIe,CAAW,CAACE,SADhB,CAEId,CAFJ,CAGIoB,CAAM,CACAd,CAAoB,CAACN,CAAD,CADpB,CAEAI,CAAwB,CAACJ,CAAD,CALlC,QAUDY,CAAAA,EASX,QAASS,CAAAA,CAAT,CAAoBV,CAApB,CAA2B,IACV,IAAT,EAAAA,CAAK,EAAYA,CAAK,GAAKf,MAAM,CAACkB,gBAC3B5B,CAAAA,KAGPoC,CAAAA,CAAO,CAAGC,CAAQ,CAAC/C,GAAT,CAAamC,CAAb,QACC,KAAX,EAAAW,IACAA,CAAO,CAAGb,CAAa,CAACY,CAAU,CAACzB,MAAM,CAAC4B,cAAP,CAAsBb,CAAtB,CAAD,CAAX,CAA2CA,CAA3C,EACvBY,CAAQ,CAACnC,GAAT,CAAauB,CAAb,CAAoBW,CAApB,GAEGA,EAUJ,QAASG,CAAAA,CAAT,CAAmBtC,CAAnB,CAAgCd,CAAhC,CAAuC,IACpCqD,CAAAA,CAAO,CAAGL,CAAU,CAACzB,MAAM,CAAC4B,cAAP,CAAsBnD,CAAtB,CAAD,QACnB,IAAIqD,CAAAA,CAAJ,CAAYvC,CAAZ,CAAyBd,CAAzB,EASJ,QAASsD,CAAAA,CAAT,CAAmBtD,CAAnB,CAA0B,OACtBD,CAAAA,CAAE,CAACC,CAAD,CAAF,CAAUmB,iBAUd,QAASoC,CAAAA,CAAT,CAAuBvD,CAAvB,CAA8BgB,CAA9B,CAA0C,CAC7CjB,CAAE,CAACC,CAAD,CAAF,CAAUgB,UAAV,CAAuBA,EAUpB,QAASwC,CAAAA,CAAT,CAA0BxD,CAA1B,CAAiCiB,CAAjC,CAAgD,CACnDlB,CAAE,CAACC,CAAD,CAAF,CAAUiB,aAAV,CAA0BA,EAUvB,QAASwC,CAAAA,CAAT,CAA4BzD,CAA5B,CAAmCQ,CAAnC,CAAoD,CACvDT,CAAE,CAACC,CAAD,CAAF,CAAUQ,eAAV,CAA4BA,ysCC1ahBkD,CAAAA,OACNC,CAAAA,CAAM,CAAGpC,MAAM,CAACmB,MAAPnB,CAAcqC,CAAW,CAACnB,SAA1BlB,QACfsC,CAAAA,CAAW,CAACrB,IAAZqB,CAAiBF,CAAjBE,EACAC,CAAY,CAAC/C,GAAb+C,CAAiBH,CAAjBG,KACOH,UAMKI,CAAAA,EAAYJ,GACpBG,KAAAA,CAAY,CAAC3D,GAAb2D,CAAiBH,CAAjBG,IAIJA,CAAY,CAAC/C,GAAb+C,CAAiBH,CAAjBG,KACAH,CAAM,CAACK,aAAPL,CAA8B,CAAEM,IAAI,CAAE,OAAR,CAA9BN,GC9BJ,QAASO,CAAAA,CAAT,CAAmBC,CAAnB,KACUR,CAAAA,CAAM,CAAGS,CAAO,CAACjE,GAARiE,CAAYD,CAAZC,KACD,IAAVT,EAAAA,OACM,IAAIU,CAAAA,SAAJ,sEAEiB,IAAfF,GAAAA,CAAU,CAAY,MAAZ,GAA4BA,GAFxC,QAMHR,CAAAA,KF3BLzD,CAAAA,CAAW,CAAG,GAAIoE,CAAAA,QAOlBpB,CAAQ,CAAG,GAAIoB,CAAAA,QAkFrBzD,CAAK,CAAC4B,SAAN,CAAkB,IAKVwB,CAAAA,MAAO,OACAlE,CAAAA,CAAE,CAAC,IAAD,CAAF,CAASC,KAAT,CAAeiE,IANZ,CAAA,IAaVM,CAAAA,QAAS,OACFxE,CAAAA,CAAE,CAAC,IAAD,CAAF,CAASe,WAdN,CAAA,IAqBVG,CAAAA,eAAgB,OACTlB,CAAAA,CAAE,CAAC,IAAD,CAAF,CAASkB,aAtBN,CAAA,CA4BduD,YA5Bc,WA4BC,IACLvD,CAAAA,CAAa,CAAGlB,CAAE,CAAC,IAAD,CAAF,CAASkB,cADpB,MAEU,KAAjB,EAAAA,CAFO,CAGA,EAHA,CAKJ,CAACA,CAAD,CAjCG,CAAA,IAwCVwD,CAAAA,MAAO,OACA,EAzCG,CAAA,IAgDVC,CAAAA,iBAAkB,OACX,EAjDG,CAAA,IAwDVC,CAAAA,WAAY,OACL,EAzDG,CAAA,IAgEVC,CAAAA,gBAAiB,OACV,EAjEG,CAAA,IAwEV5D,CAAAA,YAAa,OACNjB,CAAAA,CAAE,CAAC,IAAD,CAAF,CAASiB,UAzEN,CAAA,CAgFd6D,eAhFc,WAgFI,IACRtE,CAAAA,CAAI,CAAGR,CAAE,CAAC,IAAD,EAEfQ,CAAI,CAACW,OAAL,GAHc,CAI4B,UAAtC,QAAOX,CAAAA,CAAI,CAACP,KAAL,CAAW6E,eAJR,EAKVtE,CAAI,CAACP,KAAL,CAAW6E,eAAX,EArFM,CAAA,CA6FdC,wBA7Fc,WA6Fa,IACjBvE,CAAAA,CAAI,CAAGR,CAAE,CAAC,IAAD,EAEfQ,CAAI,CAACW,OAAL,GAHuB,CAIvBX,CAAI,CAACY,gBAAL,GAJuB,CAK4B,UAA/C,QAAOZ,CAAAA,CAAI,CAACP,KAAL,CAAW8E,wBALC,EAMnBvE,CAAI,CAACP,KAAL,CAAW8E,wBAAX,EAnGM,CAAA,IA2GVC,CAAAA,SAAU,SACKhF,CAAE,CAAC,IAAD,CAAF,CAASC,KAAT,CAAe+E,OA5GpB,CAAA,IAmHVtE,CAAAA,YAAa,SACEV,CAAE,CAAC,IAAD,CAAF,CAASC,KAAT,CAAeS,UApHpB,CAAA,CA2HdE,cA3Hc,WA2HG,CACbL,CAAa,CAACP,CAAE,CAAC,IAAD,CAAH,CA5HH,CAAA,IAmIViF,CAAAA,kBAAmB,OACZjF,CAAAA,CAAE,CAAC,IAAD,CAAF,CAASW,QApIN,CAAA,IA2IVuE,CAAAA,UAAW,SACIlF,CAAE,CAAC,IAAD,CAAF,CAASC,KAAT,CAAeiF,QA5IpB,CAAA,IAmJV7D,CAAAA,WAAY,OACLrB,CAAAA,CAAE,CAAC,IAAD,CAAF,CAASqB,SApJN,CAAA,IA4JV8D,CAAAA,YAAa,OACNnF,CAAAA,CAAE,CAAC,IAAD,CAAF,CAASe,WA7JN,CAAA,IAqKVqE,CAAAA,cAAe,OACRpF,CAAAA,CAAE,CAAC,IAAD,CAAF,CAASmB,OAtKN,CAAA,IAwKViE,CAAAA,aAAa1D,EAAO,IACfA,MAGClB,CAAAA,CAAI,CAAGR,CAAE,CAAC,IAAD,EAEfQ,CAAI,CAACW,OAAL,IACuC,SAAnC,QAAOX,CAAAA,CAAI,CAACP,KAAL,CAAWmF,eAClB5E,CAAI,CAACP,KAAL,CAAWmF,YAAX,KAhLM,CAAA,IAyLVC,CAAAA,aAAc,OACP,CAACrF,CAAE,CAAC,IAAD,CAAF,CAASW,QA1LP,CAAA,IA4LV0E,CAAAA,YAAY3D,EAAO,CACdA,CADc,EAEfnB,CAAa,CAACP,CAAE,CAAC,IAAD,CAAH,CA9LP,CAAA,CAyMdsF,SAzMc,WAyMF,EAzME,EA+MlB9D,MAAM,CAACC,cAAP,CAAsBX,CAAK,CAAC4B,SAA5B,CAAuC,aAAvC,CAAsD,CAClDhB,KAAK,CAAEZ,CAD2C,CAElDmB,YAAY,GAFsC,CAGlDY,QAAQ,GAH0C,CAAtD,EAOsB,WAAlB,QAAO0C,CAAAA,MAAP,EAAyD,WAAxB,QAAOA,CAAAA,MAAM,CAACzE,QAC/CU,MAAM,CAACgE,cAAP,CAAsB1E,CAAK,CAAC4B,SAA5B,CAAuC6C,MAAM,CAACzE,KAAP,CAAa4B,SAApD,EAGAS,CAAQ,CAACnC,GAAT,CAAauE,MAAM,CAACzE,KAAP,CAAa4B,SAA1B,CAAqC5B,CAArC,wiDChTiB+C,CAAAA,2EAMP,GAAIS,CAAAA,SAAJ,CAAc,4CAAd,sDAOAmB,CAAAA,CAAO,CAAG1B,CAAY,CAAC3D,GAAb2D,CAAiB,IAAjBA,KACO,SAAnB,QAAO0B,CAAAA,OACD,IAAInB,CAAAA,SAAJ,kEAEW,IAAT,QAAgB,MAAhB,GAAgC,MAFlC,QAMHmB,CAAAA,SArB0B3B,GAwBzC4B,CAAoB,CAAC7B,CAAW,CAACnB,SAAb,CAAwB,OAAxB,EA2BpB,GAAMqB,CAAAA,CAAY,CAAG,GAAIQ,CAAAA,OAAzB,CAGA/C,MAAM,CAACmE,gBAAPnE,CAAwBqC,CAAW,CAACnB,SAApClB,CAA+C,CAC3CiE,OAAO,CAAE,CAAE9D,UAAU,GAAZ,CADkC,CAA/CH,EAKsB,UAAlB,QAAOoE,CAAAA,MAAP,EAA8D,QAA9B,GAAAC,EAAOD,MAAM,CAACE,cAC9CtE,MAAM,CAACC,cAAPD,CAAsBqC,CAAW,CAACnB,SAAlClB,CAA6CoE,MAAM,CAACE,WAApDtE,CAAiE,CAC7DS,YAAY,GADiD,CAE7DP,KAAK,CAAE,aAFsD,CAAjEF,KC5EiBuE,CAAAA,oCAKb1B,CAAO,CAACrD,GAARqD,CAAY,IAAZA,CAAkBV,CAAiB,EAAnCU,4CAcAL,CAAW,CAACG,CAAS,CAAC,IAAD,CAAV,uCAPJA,CAAAA,CAAS,CAAC,IAAD,WAclBE,CAAO,CAAG,GAAIE,CAAAA,WAkBpB/C,MAAM,CAACmE,gBAAPnE,CAAwBuE,CAAe,CAACrD,SAAxClB,CAAmD,CAC/CoC,MAAM,CAAE,CAAEjC,UAAU,GAAZ,CADuC,CAE/CqE,KAAK,CAAE,CAAErE,UAAU,GAAZ,CAFwC,CAAnDH,EAKsB,UAAlB,QAAOoE,CAAAA,MAAP,EAA8D,QAA9B,GAAAC,EAAOD,MAAM,CAACE,cAC9CtE,MAAM,CAACC,cAAPD,CAAsBuE,CAAe,CAACrD,SAAtClB,CAAiDoE,MAAM,CAACE,WAAxDtE,CAAqE,CACjES,YAAY,GADqD,CAEjEP,KAAK,CAAE,iBAF0D,CAArEF"} \ No newline at end of file diff --git a/node_modules/abort-controller/package.json b/node_modules/abort-controller/package.json new file mode 100644 index 0000000000000..fc705e03f3539 --- /dev/null +++ b/node_modules/abort-controller/package.json @@ -0,0 +1,97 @@ +{ + "name": "abort-controller", + "version": "3.0.0", + "description": "An implementation of WHATWG AbortController interface.", + "main": "dist/abort-controller", + "files": [ + "dist", + "polyfill.*", + "browser.*" + ], + "engines": { + "node": ">=6.5" + }, + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "browser": "./browser.js", + "devDependencies": { + "@babel/core": "^7.2.2", + "@babel/plugin-transform-modules-commonjs": "^7.2.0", + "@babel/preset-env": "^7.3.0", + "@babel/register": "^7.0.0", + "@mysticatea/eslint-plugin": "^8.0.1", + "@mysticatea/spy": "^0.1.2", + "@types/mocha": "^5.2.5", + "@types/node": "^10.12.18", + "assert": "^1.4.1", + "codecov": "^3.1.0", + "dts-bundle-generator": "^2.0.0", + "eslint": "^5.12.1", + "karma": "^3.1.4", + "karma-chrome-launcher": "^2.2.0", + "karma-coverage": "^1.1.2", + "karma-firefox-launcher": "^1.1.0", + "karma-growl-reporter": "^1.0.0", + "karma-ie-launcher": "^1.0.0", + "karma-mocha": "^1.3.0", + "karma-rollup-preprocessor": "^7.0.0-rc.2", + "mocha": "^5.2.0", + "npm-run-all": "^4.1.5", + "nyc": "^13.1.0", + "opener": "^1.5.1", + "rimraf": "^2.6.3", + "rollup": "^1.1.2", + "rollup-plugin-babel": "^4.3.2", + "rollup-plugin-babel-minify": "^7.0.0", + "rollup-plugin-commonjs": "^9.2.0", + "rollup-plugin-node-resolve": "^4.0.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "rollup-plugin-typescript": "^1.0.0", + "rollup-watch": "^4.3.1", + "ts-node": "^8.0.1", + "type-tester": "^1.0.0", + "typescript": "^3.2.4" + }, + "scripts": { + "preversion": "npm test", + "version": "npm run -s build && git add dist/*", + "postversion": "git push && git push --tags", + "clean": "rimraf .nyc_output coverage", + "coverage": "opener coverage/lcov-report/index.html", + "lint": "eslint . --ext .ts", + "build": "run-s -s build:*", + "build:rollup": "rollup -c", + "build:dts": "dts-bundle-generator -o dist/abort-controller.d.ts src/abort-controller.ts && ts-node scripts/fix-dts", + "test": "run-s -s lint test:*", + "test:mocha": "nyc mocha test/*.ts", + "test:karma": "karma start --single-run", + "watch": "run-p -s watch:*", + "watch:mocha": "mocha test/*.ts --require ts-node/register --watch-extensions ts --watch --growl", + "watch:karma": "karma start --watch", + "codecov": "codecov" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/mysticatea/abort-controller.git" + }, + "keywords": [ + "w3c", + "whatwg", + "event", + "events", + "abort", + "cancel", + "abortcontroller", + "abortsignal", + "controller", + "signal", + "shim" + ], + "author": "Toru Nagashima (https://github.com/mysticatea)", + "license": "MIT", + "bugs": { + "url": "https://github.com/mysticatea/abort-controller/issues" + }, + "homepage": "https://github.com/mysticatea/abort-controller#readme" +} diff --git a/node_modules/abort-controller/polyfill.js b/node_modules/abort-controller/polyfill.js new file mode 100644 index 0000000000000..3ca892330b1e5 --- /dev/null +++ b/node_modules/abort-controller/polyfill.js @@ -0,0 +1,21 @@ +/*globals require, self, window */ +"use strict" + +const ac = require("./dist/abort-controller") + +/*eslint-disable @mysticatea/prettier */ +const g = + typeof self !== "undefined" ? self : + typeof window !== "undefined" ? window : + typeof global !== "undefined" ? global : + /* otherwise */ undefined +/*eslint-enable @mysticatea/prettier */ + +if (g) { + if (typeof g.AbortController === "undefined") { + g.AbortController = ac.AbortController + } + if (typeof g.AbortSignal === "undefined") { + g.AbortSignal = ac.AbortSignal + } +} diff --git a/node_modules/abort-controller/polyfill.mjs b/node_modules/abort-controller/polyfill.mjs new file mode 100644 index 0000000000000..0602a64dddfd2 --- /dev/null +++ b/node_modules/abort-controller/polyfill.mjs @@ -0,0 +1,19 @@ +/*globals self, window */ +import * as ac from "./dist/abort-controller" + +/*eslint-disable @mysticatea/prettier */ +const g = + typeof self !== "undefined" ? self : + typeof window !== "undefined" ? window : + typeof global !== "undefined" ? global : + /* otherwise */ undefined +/*eslint-enable @mysticatea/prettier */ + +if (g) { + if (typeof g.AbortController === "undefined") { + g.AbortController = ac.AbortController + } + if (typeof g.AbortSignal === "undefined") { + g.AbortSignal = ac.AbortSignal + } +} diff --git a/node_modules/are-we-there-yet/node_modules/buffer/AUTHORS.md b/node_modules/are-we-there-yet/node_modules/buffer/AUTHORS.md new file mode 100644 index 0000000000000..468aa1908c379 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/buffer/AUTHORS.md @@ -0,0 +1,73 @@ +# Authors + +#### Ordered by first contribution. + +- Romain Beauxis (toots@rastageeks.org) +- Tobias Koppers (tobias.koppers@googlemail.com) +- Janus (ysangkok@gmail.com) +- Rainer Dreyer (rdrey1@gmail.com) +- Tõnis Tiigi (tonistiigi@gmail.com) +- James Halliday (mail@substack.net) +- Michael Williamson (mike@zwobble.org) +- elliottcable (github@elliottcable.name) +- rafael (rvalle@livelens.net) +- Andrew Kelley (superjoe30@gmail.com) +- Andreas Madsen (amwebdk@gmail.com) +- Mike Brevoort (mike.brevoort@pearson.com) +- Brian White (mscdex@mscdex.net) +- Feross Aboukhadijeh (feross@feross.org) +- Ruben Verborgh (ruben@verborgh.org) +- eliang (eliang.cs@gmail.com) +- Jesse Tane (jesse.tane@gmail.com) +- Alfonso Boza (alfonso@cloud.com) +- Mathias Buus (mathiasbuus@gmail.com) +- Devon Govett (devongovett@gmail.com) +- Daniel Cousens (github@dcousens.com) +- Joseph Dykstra (josephdykstra@gmail.com) +- Parsha Pourkhomami (parshap+git@gmail.com) +- Damjan Košir (damjan.kosir@gmail.com) +- daverayment (dave.rayment@gmail.com) +- kawanet (u-suke@kawa.net) +- Linus Unnebäck (linus@folkdatorn.se) +- Nolan Lawson (nolan.lawson@gmail.com) +- Calvin Metcalf (calvin.metcalf@gmail.com) +- Koki Takahashi (hakatasiloving@gmail.com) +- Guy Bedford (guybedford@gmail.com) +- Jan Schär (jscissr@gmail.com) +- RaulTsc (tomescu.raul@gmail.com) +- Matthieu Monsch (monsch@alum.mit.edu) +- Dan Ehrenberg (littledan@chromium.org) +- Kirill Fomichev (fanatid@ya.ru) +- Yusuke Kawasaki (u-suke@kawa.net) +- DC (dcposch@dcpos.ch) +- John-David Dalton (john.david.dalton@gmail.com) +- adventure-yunfei (adventure030@gmail.com) +- Emil Bay (github@tixz.dk) +- Sam Sudar (sudar.sam@gmail.com) +- Volker Mische (volker.mische@gmail.com) +- David Walton (support@geekstocks.com) +- Сковорода Никита Андреевич (chalkerx@gmail.com) +- greenkeeper[bot] (greenkeeper[bot]@users.noreply.github.com) +- ukstv (sergey.ukustov@machinomy.com) +- Renée Kooi (renee@kooi.me) +- ranbochen (ranbochen@qq.com) +- Vladimir Borovik (bobahbdb@gmail.com) +- greenkeeper[bot] (23040076+greenkeeper[bot]@users.noreply.github.com) +- kumavis (aaron@kumavis.me) +- Sergey Ukustov (sergey.ukustov@machinomy.com) +- Fei Liu (liu.feiwood@gmail.com) +- Blaine Bublitz (blaine.bublitz@gmail.com) +- clement (clement@seald.io) +- Koushik Dutta (koushd@gmail.com) +- Jordan Harband (ljharb@gmail.com) +- Niklas Mischkulnig (mischnic@users.noreply.github.com) +- Nikolai Vavilov (vvnicholas@gmail.com) +- Fedor Nezhivoi (gyzerok@users.noreply.github.com) +- shuse2 (shus.toda@gmail.com) +- Peter Newman (peternewman@users.noreply.github.com) +- mathmakgakpak (44949126+mathmakgakpak@users.noreply.github.com) +- jkkang (jkkang@smartauth.kr) +- Deklan Webster (deklanw@gmail.com) +- Martin Heidegger (martin.heidegger@gmail.com) + +#### Generated by bin/update-authors.sh. diff --git a/node_modules/are-we-there-yet/node_modules/buffer/LICENSE b/node_modules/are-we-there-yet/node_modules/buffer/LICENSE new file mode 100644 index 0000000000000..d6bf75dcf1f6f --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh, and other contributors. + +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. diff --git a/node_modules/are-we-there-yet/node_modules/buffer/index.d.ts b/node_modules/are-we-there-yet/node_modules/buffer/index.d.ts new file mode 100644 index 0000000000000..07096a2f725aa --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/buffer/index.d.ts @@ -0,0 +1,194 @@ +export class Buffer extends Uint8Array { + length: number + write(string: string, offset?: number, length?: number, encoding?: string): number; + toString(encoding?: string, start?: number, end?: number): string; + toJSON(): { type: 'Buffer', data: any[] }; + equals(otherBuffer: Buffer): boolean; + compare(otherBuffer: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; + copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + slice(start?: number, end?: number): Buffer; + writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readUInt8(offset: number, noAssert?: boolean): number; + readUInt16LE(offset: number, noAssert?: boolean): number; + readUInt16BE(offset: number, noAssert?: boolean): number; + readUInt32LE(offset: number, noAssert?: boolean): number; + readUInt32BE(offset: number, noAssert?: boolean): number; + readBigUInt64LE(offset: number): BigInt; + readBigUInt64BE(offset: number): BigInt; + readInt8(offset: number, noAssert?: boolean): number; + readInt16LE(offset: number, noAssert?: boolean): number; + readInt16BE(offset: number, noAssert?: boolean): number; + readInt32LE(offset: number, noAssert?: boolean): number; + readInt32BE(offset: number, noAssert?: boolean): number; + readBigInt64LE(offset: number): BigInt; + readBigInt64BE(offset: number): BigInt; + readFloatLE(offset: number, noAssert?: boolean): number; + readFloatBE(offset: number, noAssert?: boolean): number; + readDoubleLE(offset: number, noAssert?: boolean): number; + readDoubleBE(offset: number, noAssert?: boolean): number; + reverse(): this; + swap16(): Buffer; + swap32(): Buffer; + swap64(): Buffer; + writeUInt8(value: number, offset: number, noAssert?: boolean): number; + writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeBigUInt64LE(value: number, offset: number): BigInt; + writeBigUInt64BE(value: number, offset: number): BigInt; + writeInt8(value: number, offset: number, noAssert?: boolean): number; + writeInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeBigInt64LE(value: number, offset: number): BigInt; + writeBigInt64BE(value: number, offset: number): BigInt; + writeFloatLE(value: number, offset: number, noAssert?: boolean): number; + writeFloatBE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; + fill(value: any, offset?: number, end?: number): this; + indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; + + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + */ + constructor (str: string, encoding?: string); + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + */ + constructor (size: number); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: Uint8Array); + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}. + * + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + */ + constructor (arrayBuffer: ArrayBuffer); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: any[]); + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + */ + constructor (buffer: Buffer); + prototype: Buffer; + /** + * Allocates a new Buffer using an {array} of octets. + * + * @param array + */ + static from(array: any[]): Buffer; + /** + * When passed a reference to the .buffer property of a TypedArray instance, + * the newly created Buffer will share the same allocated memory as the TypedArray. + * The optional {byteOffset} and {length} arguments specify a memory range + * within the {arrayBuffer} that will be shared by the Buffer. + * + * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() + * @param byteOffset + * @param length + */ + static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; + /** + * Copies the passed {buffer} data onto a new Buffer instance. + * + * @param buffer + */ + static from(buffer: Buffer | Uint8Array): Buffer; + /** + * Creates a new Buffer containing the given JavaScript string {str}. + * If provided, the {encoding} parameter identifies the character encoding. + * If not provided, {encoding} defaults to 'utf8'. + * + * @param str + */ + static from(str: string, encoding?: string): Buffer; + /** + * Returns true if {obj} is a Buffer + * + * @param obj object to test. + */ + static isBuffer(obj: any): obj is Buffer; + /** + * Returns true if {encoding} is a valid encoding argument. + * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + * + * @param encoding string to test. + */ + static isEncoding(encoding: string): boolean; + /** + * Gives the actual byte length of a string. encoding defaults to 'utf8'. + * This is not the same as String.prototype.length since that returns the number of characters in a string. + * + * @param string string to test. + * @param encoding encoding used to evaluate (defaults to 'utf8') + */ + static byteLength(string: string, encoding?: string): number; + /** + * Returns a buffer which is the result of concatenating all the buffers in the list together. + * + * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. + * If the list has exactly one item, then the first item of the list is returned. + * If the list has more than one item, then a new Buffer is created. + * + * @param list An array of Buffer objects to concatenate + * @param totalLength Total length of the buffers when concatenated. + * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. + */ + static concat(list: Uint8Array[], totalLength?: number): Buffer; + /** + * The same as buf1.compare(buf2). + */ + static compare(buf1: Uint8Array, buf2: Uint8Array): number; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @param fill if specified, buffer will be initialized by calling buf.fill(fill). + * If parameter is omitted, buffer will be filled with zeros. + * @param encoding encoding used for call to buf.fill while initializing + */ + static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; + /** + * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafe(size: number): Buffer; + /** + * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafeSlow(size: number): Buffer; +} diff --git a/node_modules/are-we-there-yet/node_modules/buffer/index.js b/node_modules/are-we-there-yet/node_modules/buffer/index.js new file mode 100644 index 0000000000000..7a0e9c2a123bc --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/buffer/index.js @@ -0,0 +1,2106 @@ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh <https://feross.org> + * @license MIT + */ +/* eslint-disable no-proto */ + +'use strict' + +const base64 = require('base64-js') +const ieee754 = require('ieee754') +const customInspectSymbol = + (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation + ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation + : null + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 + +const K_MAX_LENGTH = 0x7fffffff +exports.kMaxLength = K_MAX_LENGTH + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Print warning and recommend using `buffer` v4.x which has an Object + * implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * We report that the browser does not support typed arrays if the are not subclassable + * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` + * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support + * for __proto__ and has a buggy typed array implementation. + */ +Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() + +if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && + typeof console.error === 'function') { + console.error( + 'This browser lacks typed array (Uint8Array) support which is required by ' + + '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' + ) +} + +function typedArraySupport () { + // Can typed array instances can be augmented? + try { + const arr = new Uint8Array(1) + const proto = { foo: function () { return 42 } } + Object.setPrototypeOf(proto, Uint8Array.prototype) + Object.setPrototypeOf(arr, proto) + return arr.foo() === 42 + } catch (e) { + return false + } +} + +Object.defineProperty(Buffer.prototype, 'parent', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.buffer + } +}) + +Object.defineProperty(Buffer.prototype, 'offset', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.byteOffset + } +}) + +function createBuffer (length) { + if (length > K_MAX_LENGTH) { + throw new RangeError('The value "' + length + '" is invalid for option "size"') + } + // Return an augmented `Uint8Array` instance + const buf = new Uint8Array(length) + Object.setPrototypeOf(buf, Buffer.prototype) + return buf +} + +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + +function Buffer (arg, encodingOrOffset, length) { + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new TypeError( + 'The "string" argument must be of type string. Received type number' + ) + } + return allocUnsafe(arg) + } + return from(arg, encodingOrOffset, length) +} + +Buffer.poolSize = 8192 // not used by this implementation + +function from (value, encodingOrOffset, length) { + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + if (ArrayBuffer.isView(value)) { + return fromArrayView(value) + } + + if (value == null) { + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) + } + + if (isInstance(value, ArrayBuffer) || + (value && isInstance(value.buffer, ArrayBuffer))) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof SharedArrayBuffer !== 'undefined' && + (isInstance(value, SharedArrayBuffer) || + (value && isInstance(value.buffer, SharedArrayBuffer)))) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'number') { + throw new TypeError( + 'The "value" argument must not be of type number. Received type number' + ) + } + + const valueOf = value.valueOf && value.valueOf() + if (valueOf != null && valueOf !== value) { + return Buffer.from(valueOf, encodingOrOffset, length) + } + + const b = fromObject(value) + if (b) return b + + if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && + typeof value[Symbol.toPrimitive] === 'function') { + return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length) + } + + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) +} + +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer.from = function (value, encodingOrOffset, length) { + return from(value, encodingOrOffset, length) +} + +// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: +// https://github.com/feross/buffer/pull/148 +Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype) +Object.setPrototypeOf(Buffer, Uint8Array) + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be of type number') + } else if (size < 0) { + throw new RangeError('The value "' + size + '" is invalid for option "size"') + } +} + +function alloc (size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpreted as a start offset. + return typeof encoding === 'string' + ? createBuffer(size).fill(fill, encoding) + : createBuffer(size).fill(fill) + } + return createBuffer(size) +} + +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer.alloc = function (size, fill, encoding) { + return alloc(size, fill, encoding) +} + +function allocUnsafe (size) { + assertSize(size) + return createBuffer(size < 0 ? 0 : checked(size) | 0) +} + +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer.allocUnsafe = function (size) { + return allocUnsafe(size) +} +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(size) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + + const length = byteLength(string, encoding) | 0 + let buf = createBuffer(length) + + const actual = buf.write(string, encoding) + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + buf = buf.slice(0, actual) + } + + return buf +} + +function fromArrayLike (array) { + const length = array.length < 0 ? 0 : checked(array.length) | 0 + const buf = createBuffer(length) + for (let i = 0; i < length; i += 1) { + buf[i] = array[i] & 255 + } + return buf +} + +function fromArrayView (arrayView) { + if (isInstance(arrayView, Uint8Array)) { + const copy = new Uint8Array(arrayView) + return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength) + } + return fromArrayLike(arrayView) +} + +function fromArrayBuffer (array, byteOffset, length) { + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('"offset" is outside of buffer bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('"length" is outside of buffer bounds') + } + + let buf + if (byteOffset === undefined && length === undefined) { + buf = new Uint8Array(array) + } else if (length === undefined) { + buf = new Uint8Array(array, byteOffset) + } else { + buf = new Uint8Array(array, byteOffset, length) + } + + // Return an augmented `Uint8Array` instance + Object.setPrototypeOf(buf, Buffer.prototype) + + return buf +} + +function fromObject (obj) { + if (Buffer.isBuffer(obj)) { + const len = checked(obj.length) | 0 + const buf = createBuffer(len) + + if (buf.length === 0) { + return buf + } + + obj.copy(buf, 0, 0, len) + return buf + } + + if (obj.length !== undefined) { + if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { + return createBuffer(0) + } + return fromArrayLike(obj) + } + + if (obj.type === 'Buffer' && Array.isArray(obj.data)) { + return fromArrayLike(obj.data) + } +} + +function checked (length) { + // Note: cannot use `length < K_MAX_LENGTH` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= K_MAX_LENGTH) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (length) { + if (+length != length) { // eslint-disable-line eqeqeq + length = 0 + } + return Buffer.alloc(+length) +} + +Buffer.isBuffer = function isBuffer (b) { + return b != null && b._isBuffer === true && + b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false +} + +Buffer.compare = function compare (a, b) { + if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) + if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError( + 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' + ) + } + + if (a === b) return 0 + + let x = a.length + let y = b.length + + for (let i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i] + y = b[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!Array.isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + + if (list.length === 0) { + return Buffer.alloc(0) + } + + let i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; ++i) { + length += list[i].length + } + } + + const buffer = Buffer.allocUnsafe(length) + let pos = 0 + for (i = 0; i < list.length; ++i) { + let buf = list[i] + if (isInstance(buf, Uint8Array)) { + if (pos + buf.length > buffer.length) { + if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf) + buf.copy(buffer, pos) + } else { + Uint8Array.prototype.set.call( + buffer, + buf, + pos + ) + } + } else if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } else { + buf.copy(buffer, pos) + } + pos += buf.length + } + return buffer +} + +function byteLength (string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length + } + if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + throw new TypeError( + 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + + 'Received type ' + typeof string + ) + } + + const len = string.length + const mustMatch = (arguments.length > 2 && arguments[2] === true) + if (!mustMatch && len === 0) return 0 + + // Use a for loop to avoid recursion + let loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) { + return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8 + } + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +function slowToString (encoding, start, end) { + let loweredCase = false + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0 + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } + + if (end === undefined || end > this.length) { + end = this.length + } + + if (end <= 0) { + return '' + } + + // Force coercion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0 + start >>>= 0 + + if (end <= start) { + return '' + } + + if (!encoding) encoding = 'utf8' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) +// to detect a Buffer instance. It's not possible to use `instanceof Buffer` +// reliably in a browserify context because there could be multiple different +// copies of the 'buffer' package in use. This method works even for Buffer +// instances that were created from another copy of the `buffer` package. +// See: https://github.com/feross/buffer/issues/154 +Buffer.prototype._isBuffer = true + +function swap (b, n, m) { + const i = b[n] + b[n] = b[m] + b[m] = i +} + +Buffer.prototype.swap16 = function swap16 () { + const len = this.length + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (let i = 0; i < len; i += 2) { + swap(this, i, i + 1) + } + return this +} + +Buffer.prototype.swap32 = function swap32 () { + const len = this.length + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (let i = 0; i < len; i += 4) { + swap(this, i, i + 3) + swap(this, i + 1, i + 2) + } + return this +} + +Buffer.prototype.swap64 = function swap64 () { + const len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (let i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this +} + +Buffer.prototype.toString = function toString () { + const length = this.length + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.toLocaleString = Buffer.prototype.toString + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + let str = '' + const max = exports.INSPECT_MAX_BYTES + str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() + if (this.length > max) str += ' ... ' + return '<Buffer ' + str + '>' +} +if (customInspectSymbol) { + Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect +} + +Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (isInstance(target, Uint8Array)) { + target = Buffer.from(target, target.offset, target.byteLength) + } + if (!Buffer.isBuffer(target)) { + throw new TypeError( + 'The "target" argument must be one of type Buffer or Uint8Array. ' + + 'Received type ' + (typeof target) + ) + } + + if (start === undefined) { + start = 0 + } + if (end === undefined) { + end = target ? target.length : 0 + } + if (thisStart === undefined) { + thisStart = 0 + } + if (thisEnd === undefined) { + thisEnd = this.length + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } + + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + + start >>>= 0 + end >>>= 0 + thisStart >>>= 0 + thisEnd >>>= 0 + + if (this === target) return 0 + + let x = thisEnd - thisStart + let y = end - start + const len = Math.min(x, y) + + const thisCopy = this.slice(thisStart, thisEnd) + const targetCopy = target.slice(start, end) + + for (let i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i] + y = targetCopy[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000 + } + byteOffset = +byteOffset // Coerce to Number. + if (numberIsNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1) + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding) + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF // Search for a byte value [0-255] + if (typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [val], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + let indexSize = 1 + let arrLength = arr.length + let valLength = val.length + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase() + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2 + arrLength /= 2 + valLength /= 2 + byteOffset /= 2 + } + } + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + let i + if (dir) { + let foundIndex = -1 + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex + foundIndex = -1 + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + let found = true + for (let j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } + } + if (found) return i + } + } + + return -1 +} + +Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +} + +Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + const remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + const strLen = string.length + + if (length > strLen / 2) { + length = strLen / 2 + } + let i + for (i = 0; i < length; ++i) { + const parsed = parseInt(string.substr(i * 2, 2), 16) + if (numberIsNaN(parsed)) return i + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset >>> 0 + if (isFinite(length)) { + length = length >>> 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } + + const remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + let loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + case 'latin1': + case 'binary': + return asciiWrite(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + const res = [] + + let i = start + while (i < end) { + const firstByte = buf[i] + let codePoint = null + let bytesPerSequence = (firstByte > 0xEF) + ? 4 + : (firstByte > 0xDF) + ? 3 + : (firstByte > 0xBF) + ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + let secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +const MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + const len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + let res = '' + let i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + let ret = '' + end = Math.min(buf.length, end) + + for (let i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function latin1Slice (buf, start, end) { + let ret = '' + end = Math.min(buf.length, end) + + for (let i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + const len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + let out = '' + for (let i = start; i < end; ++i) { + out += hexSliceLookupTable[buf[i]] + } + return out +} + +function utf16leSlice (buf, start, end) { + const bytes = buf.slice(start, end) + let res = '' + // If bytes.length is odd, the last 8 bits must be ignored (same as node.js) + for (let i = 0; i < bytes.length - 1; i += 2) { + res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + const len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + const newBuf = this.subarray(start, end) + // Return an augmented `Uint8Array` instance + Object.setPrototypeOf(newBuf, Buffer.prototype) + + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUintLE = +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + let val = this[offset] + let mul = 1 + let i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUintBE = +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + let val = this[offset + --byteLength] + let mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUint8 = +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUint16LE = +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUint16BE = +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUint32LE = +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUint32BE = +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) { + offset = offset >>> 0 + validateNumber(offset, 'offset') + const first = this[offset] + const last = this[offset + 7] + if (first === undefined || last === undefined) { + boundsError(offset, this.length - 8) + } + + const lo = first + + this[++offset] * 2 ** 8 + + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 24 + + const hi = this[++offset] + + this[++offset] * 2 ** 8 + + this[++offset] * 2 ** 16 + + last * 2 ** 24 + + return BigInt(lo) + (BigInt(hi) << BigInt(32)) +}) + +Buffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) { + offset = offset >>> 0 + validateNumber(offset, 'offset') + const first = this[offset] + const last = this[offset + 7] + if (first === undefined || last === undefined) { + boundsError(offset, this.length - 8) + } + + const hi = first * 2 ** 24 + + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 8 + + this[++offset] + + const lo = this[++offset] * 2 ** 24 + + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 8 + + last + + return (BigInt(hi) << BigInt(32)) + BigInt(lo) +}) + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + let val = this[offset] + let mul = 1 + let i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + let i = byteLength + let mul = 1 + let val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + const val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + const val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) { + offset = offset >>> 0 + validateNumber(offset, 'offset') + const first = this[offset] + const last = this[offset + 7] + if (first === undefined || last === undefined) { + boundsError(offset, this.length - 8) + } + + const val = this[offset + 4] + + this[offset + 5] * 2 ** 8 + + this[offset + 6] * 2 ** 16 + + (last << 24) // Overflow + + return (BigInt(val) << BigInt(32)) + + BigInt(first + + this[++offset] * 2 ** 8 + + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 24) +}) + +Buffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) { + offset = offset >>> 0 + validateNumber(offset, 'offset') + const first = this[offset] + const last = this[offset + 7] + if (first === undefined || last === undefined) { + boundsError(offset, this.length - 8) + } + + const val = (first << 24) + // Overflow + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 8 + + this[++offset] + + return (BigInt(val) << BigInt(32)) + + BigInt(this[++offset] * 2 ** 24 + + this[++offset] * 2 ** 16 + + this[++offset] * 2 ** 8 + + last) +}) + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} + +Buffer.prototype.writeUintLE = +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + const maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + let mul = 1 + let i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUintBE = +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + const maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + let i = byteLength - 1 + let mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUint8 = +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeUint16LE = +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeUint16BE = +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeUint32LE = +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeUint32BE = +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +function wrtBigUInt64LE (buf, value, offset, min, max) { + checkIntBI(value, min, max, buf, offset, 7) + + let lo = Number(value & BigInt(0xffffffff)) + buf[offset++] = lo + lo = lo >> 8 + buf[offset++] = lo + lo = lo >> 8 + buf[offset++] = lo + lo = lo >> 8 + buf[offset++] = lo + let hi = Number(value >> BigInt(32) & BigInt(0xffffffff)) + buf[offset++] = hi + hi = hi >> 8 + buf[offset++] = hi + hi = hi >> 8 + buf[offset++] = hi + hi = hi >> 8 + buf[offset++] = hi + return offset +} + +function wrtBigUInt64BE (buf, value, offset, min, max) { + checkIntBI(value, min, max, buf, offset, 7) + + let lo = Number(value & BigInt(0xffffffff)) + buf[offset + 7] = lo + lo = lo >> 8 + buf[offset + 6] = lo + lo = lo >> 8 + buf[offset + 5] = lo + lo = lo >> 8 + buf[offset + 4] = lo + let hi = Number(value >> BigInt(32) & BigInt(0xffffffff)) + buf[offset + 3] = hi + hi = hi >> 8 + buf[offset + 2] = hi + hi = hi >> 8 + buf[offset + 1] = hi + hi = hi >> 8 + buf[offset] = hi + return offset + 8 +} + +Buffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) { + return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff')) +}) + +Buffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) { + return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff')) +}) + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + const limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + let i = 0 + let mul = 1 + let sub = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + const limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + let i = byteLength - 1 + let mul = 1 + let sub = 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) { + return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')) +}) + +Buffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) { + return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')) +}) + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('Index out of range') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + const len = end - start + + if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { + // Use built-in when available, missing from IE11 + this.copyWithin(targetStart, start, end) + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, end), + targetStart + ) + } + + return len +} + +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = this.length + } else if (typeof end === 'string') { + encoding = end + end = this.length + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + if (val.length === 1) { + const code = val.charCodeAt(0) + if ((encoding === 'utf8' && code < 128) || + encoding === 'latin1') { + // Fast path: If `val` fits into a single byte, use that numeric value. + val = code + } + } + } else if (typeof val === 'number') { + val = val & 255 + } else if (typeof val === 'boolean') { + val = Number(val) + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return this + } + + start = start >>> 0 + end = end === undefined ? this.length : end >>> 0 + + if (!val) val = 0 + + let i + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val + } + } else { + const bytes = Buffer.isBuffer(val) + ? val + : Buffer.from(val, encoding) + const len = bytes.length + if (len === 0) { + throw new TypeError('The value "' + val + + '" is invalid for argument "value"') + } + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len] + } + } + + return this +} + +// CUSTOM ERRORS +// ============= + +// Simplified versions from Node, changed for Buffer-only usage +const errors = {} +function E (sym, getMessage, Base) { + errors[sym] = class NodeError extends Base { + constructor () { + super() + + Object.defineProperty(this, 'message', { + value: getMessage.apply(this, arguments), + writable: true, + configurable: true + }) + + // Add the error code to the name to include it in the stack trace. + this.name = `${this.name} [${sym}]` + // Access the stack to generate the error message including the error code + // from the name. + this.stack // eslint-disable-line no-unused-expressions + // Reset the name to the actual name. + delete this.name + } + + get code () { + return sym + } + + set code (value) { + Object.defineProperty(this, 'code', { + configurable: true, + enumerable: true, + value, + writable: true + }) + } + + toString () { + return `${this.name} [${sym}]: ${this.message}` + } + } +} + +E('ERR_BUFFER_OUT_OF_BOUNDS', + function (name) { + if (name) { + return `${name} is outside of buffer bounds` + } + + return 'Attempt to access memory outside buffer bounds' + }, RangeError) +E('ERR_INVALID_ARG_TYPE', + function (name, actual) { + return `The "${name}" argument must be of type number. Received type ${typeof actual}` + }, TypeError) +E('ERR_OUT_OF_RANGE', + function (str, range, input) { + let msg = `The value of "${str}" is out of range.` + let received = input + if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) { + received = addNumericalSeparator(String(input)) + } else if (typeof input === 'bigint') { + received = String(input) + if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) { + received = addNumericalSeparator(received) + } + received += 'n' + } + msg += ` It must be ${range}. Received ${received}` + return msg + }, RangeError) + +function addNumericalSeparator (val) { + let res = '' + let i = val.length + const start = val[0] === '-' ? 1 : 0 + for (; i >= start + 4; i -= 3) { + res = `_${val.slice(i - 3, i)}${res}` + } + return `${val.slice(0, i)}${res}` +} + +// CHECK FUNCTIONS +// =============== + +function checkBounds (buf, offset, byteLength) { + validateNumber(offset, 'offset') + if (buf[offset] === undefined || buf[offset + byteLength] === undefined) { + boundsError(offset, buf.length - (byteLength + 1)) + } +} + +function checkIntBI (value, min, max, buf, offset, byteLength) { + if (value > max || value < min) { + const n = typeof min === 'bigint' ? 'n' : '' + let range + if (byteLength > 3) { + if (min === 0 || min === BigInt(0)) { + range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}` + } else { + range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` + + `${(byteLength + 1) * 8 - 1}${n}` + } + } else { + range = `>= ${min}${n} and <= ${max}${n}` + } + throw new errors.ERR_OUT_OF_RANGE('value', range, value) + } + checkBounds(buf, offset, byteLength) +} + +function validateNumber (value, name) { + if (typeof value !== 'number') { + throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value) + } +} + +function boundsError (value, length, type) { + if (Math.floor(value) !== value) { + validateNumber(value, type) + throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value) + } + + if (length < 0) { + throw new errors.ERR_BUFFER_OUT_OF_BOUNDS() + } + + throw new errors.ERR_OUT_OF_RANGE(type || 'offset', + `>= ${type ? 1 : 0} and <= ${length}`, + value) +} + +// HELPER FUNCTIONS +// ================ + +const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node takes equal signs as end of the Base64 encoding + str = str.split('=')[0] + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = str.trim().replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function utf8ToBytes (string, units) { + units = units || Infinity + let codePoint + const length = string.length + let leadSurrogate = null + const bytes = [] + + for (let i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + const byteArray = [] + for (let i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + let c, hi, lo + const byteArray = [] + for (let i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + let i + for (i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass +// the `instanceof` check but they should be treated as of that type. +// See: https://github.com/feross/buffer/issues/166 +function isInstance (obj, type) { + return obj instanceof type || + (obj != null && obj.constructor != null && obj.constructor.name != null && + obj.constructor.name === type.name) +} +function numberIsNaN (obj) { + // For IE11 support + return obj !== obj // eslint-disable-line no-self-compare +} + +// Create lookup table for `toString('hex')` +// See: https://github.com/feross/buffer/issues/219 +const hexSliceLookupTable = (function () { + const alphabet = '0123456789abcdef' + const table = new Array(256) + for (let i = 0; i < 16; ++i) { + const i16 = i * 16 + for (let j = 0; j < 16; ++j) { + table[i16 + j] = alphabet[i] + alphabet[j] + } + } + return table +})() + +// Return not function with Error if BigInt not supported +function defineBigIntMethod (fn) { + return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn +} + +function BufferBigIntNotDefined () { + throw new Error('BigInt not supported') +} diff --git a/node_modules/are-we-there-yet/node_modules/buffer/package.json b/node_modules/are-we-there-yet/node_modules/buffer/package.json new file mode 100644 index 0000000000000..ca1ad9a707884 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/buffer/package.json @@ -0,0 +1,93 @@ +{ + "name": "buffer", + "description": "Node.js Buffer API, for the browser", + "version": "6.0.3", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "https://feross.org/" + }, + "bugs": { + "url": "https://github.com/feross/buffer/issues" + }, + "contributors": [ + "Romain Beauxis <toots@rastageeks.org>", + "James Halliday <mail@substack.net>" + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + }, + "devDependencies": { + "airtap": "^3.0.0", + "benchmark": "^2.1.4", + "browserify": "^17.0.0", + "concat-stream": "^2.0.0", + "hyperquest": "^2.1.3", + "is-buffer": "^2.0.5", + "is-nan": "^1.3.0", + "split": "^1.0.1", + "standard": "*", + "tape": "^5.0.1", + "through2": "^4.0.2", + "uglify-js": "^3.11.5" + }, + "homepage": "https://github.com/feross/buffer", + "jspm": { + "map": { + "./index.js": { + "node": "@node/buffer" + } + } + }, + "keywords": [ + "arraybuffer", + "browser", + "browserify", + "buffer", + "compatible", + "dataview", + "uint8array" + ], + "license": "MIT", + "main": "index.js", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "git://github.com/feross/buffer.git" + }, + "scripts": { + "perf": "browserify --debug perf/bracket-notation.js > perf/bundle.js && open perf/index.html", + "perf-node": "node perf/bracket-notation.js && node perf/concat.js && node perf/copy-big.js && node perf/copy.js && node perf/new-big.js && node perf/new.js && node perf/readDoubleBE.js && node perf/readFloatBE.js && node perf/readUInt32LE.js && node perf/slice.js && node perf/writeFloatBE.js", + "size": "browserify -r ./ | uglifyjs -c -m | gzip | wc -c", + "test": "standard && node ./bin/test.js", + "test-browser-old": "airtap -- test/*.js", + "test-browser-old-local": "airtap --local -- test/*.js", + "test-browser-new": "airtap -- test/*.js test/node/*.js", + "test-browser-new-local": "airtap --local -- test/*.js test/node/*.js", + "test-node": "tape test/*.js test/node/*.js", + "update-authors": "./bin/update-authors.sh" + }, + "standard": { + "ignore": [ + "test/node/**/*.js", + "test/common.js", + "test/_polyfill.js", + "perf/**/*.js" + ] + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] +} diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/LICENSE b/node_modules/are-we-there-yet/node_modules/readable-stream/LICENSE new file mode 100644 index 0000000000000..2873b3b2e5950 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/LICENSE @@ -0,0 +1,47 @@ +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +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. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +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. +""" diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_duplex.js new file mode 100644 index 0000000000000..105eebbd1c6af --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_duplex.js @@ -0,0 +1,3 @@ +'use strict' // Keep this file as an alias for the full stream module. + +module.exports = require('./stream').Duplex diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_passthrough.js new file mode 100644 index 0000000000000..31358e6d12957 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_passthrough.js @@ -0,0 +1,3 @@ +'use strict' // Keep this file as an alias for the full stream module. + +module.exports = require('./stream').PassThrough diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_readable.js new file mode 100644 index 0000000000000..abd53db4ca77d --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_readable.js @@ -0,0 +1,3 @@ +'use strict' // Keep this file as an alias for the full stream module. + +module.exports = require('./stream').Readable diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_transform.js new file mode 100644 index 0000000000000..98ea338248e0a --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_transform.js @@ -0,0 +1,3 @@ +'use strict' // Keep this file as an alias for the full stream module. + +module.exports = require('./stream').Transform diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_writable.js new file mode 100644 index 0000000000000..07204c4295470 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_writable.js @@ -0,0 +1,3 @@ +'use strict' // Keep this file as an alias for the full stream module. + +module.exports = require('./stream').Writable diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js new file mode 100644 index 0000000000000..8d5a840f70793 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js @@ -0,0 +1,52 @@ +'use strict' + +const { AbortError, codes } = require('../../ours/errors') + +const eos = require('./end-of-stream') + +const { ERR_INVALID_ARG_TYPE } = codes // This method is inlined here for readable-stream +// It also does not allow for signal to not exist on the stream +// https://github.com/nodejs/node/pull/36061#discussion_r533718029 + +const validateAbortSignal = (signal, name) => { + if (typeof signal !== 'object' || !('aborted' in signal)) { + throw new ERR_INVALID_ARG_TYPE(name, 'AbortSignal', signal) + } +} + +function isNodeStream(obj) { + return !!(obj && typeof obj.pipe === 'function') +} + +module.exports.addAbortSignal = function addAbortSignal(signal, stream) { + validateAbortSignal(signal, 'signal') + + if (!isNodeStream(stream)) { + throw new ERR_INVALID_ARG_TYPE('stream', 'stream.Stream', stream) + } + + return module.exports.addAbortSignalNoValidate(signal, stream) +} + +module.exports.addAbortSignalNoValidate = function (signal, stream) { + if (typeof signal !== 'object' || !('aborted' in signal)) { + return stream + } + + const onAbort = () => { + stream.destroy( + new AbortError(undefined, { + cause: signal.reason + }) + ) + } + + if (signal.aborted) { + onAbort() + } else { + signal.addEventListener('abort', onAbort) + eos(stream, () => signal.removeEventListener('abort', onAbort)) + } + + return stream +} diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/buffer_list.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/buffer_list.js new file mode 100644 index 0000000000000..e22914f0edca0 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/buffer_list.js @@ -0,0 +1,180 @@ +'use strict' + +const { StringPrototypeSlice, SymbolIterator, TypedArrayPrototypeSet, Uint8Array } = require('../../ours/primordials') + +const { Buffer } = require('buffer') + +const { inspect } = require('../../ours/util') + +module.exports = class BufferList { + constructor() { + this.head = null + this.tail = null + this.length = 0 + } + + push(v) { + const entry = { + data: v, + next: null + } + if (this.length > 0) this.tail.next = entry + else this.head = entry + this.tail = entry + ++this.length + } + + unshift(v) { + const entry = { + data: v, + next: this.head + } + if (this.length === 0) this.tail = entry + this.head = entry + ++this.length + } + + shift() { + if (this.length === 0) return + const ret = this.head.data + if (this.length === 1) this.head = this.tail = null + else this.head = this.head.next + --this.length + return ret + } + + clear() { + this.head = this.tail = null + this.length = 0 + } + + join(s) { + if (this.length === 0) return '' + let p = this.head + let ret = '' + p.data + + while ((p = p.next) !== null) ret += s + p.data + + return ret + } + + concat(n) { + if (this.length === 0) return Buffer.alloc(0) + const ret = Buffer.allocUnsafe(n >>> 0) + let p = this.head + let i = 0 + + while (p) { + TypedArrayPrototypeSet(ret, p.data, i) + i += p.data.length + p = p.next + } + + return ret + } // Consumes a specified amount of bytes or characters from the buffered data. + + consume(n, hasStrings) { + const data = this.head.data + + if (n < data.length) { + // `slice` is the same for buffers and strings. + const slice = data.slice(0, n) + this.head.data = data.slice(n) + return slice + } + + if (n === data.length) { + // First chunk is a perfect match. + return this.shift() + } // Result spans more than one buffer. + + return hasStrings ? this._getString(n) : this._getBuffer(n) + } + + first() { + return this.head.data + } + + *[SymbolIterator]() { + for (let p = this.head; p; p = p.next) { + yield p.data + } + } // Consumes a specified amount of characters from the buffered data. + + _getString(n) { + let ret = '' + let p = this.head + let c = 0 + + do { + const str = p.data + + if (n > str.length) { + ret += str + n -= str.length + } else { + if (n === str.length) { + ret += str + ++c + if (p.next) this.head = p.next + else this.head = this.tail = null + } else { + ret += StringPrototypeSlice(str, 0, n) + this.head = p + p.data = StringPrototypeSlice(str, n) + } + + break + } + + ++c + } while ((p = p.next) !== null) + + this.length -= c + return ret + } // Consumes a specified amount of bytes from the buffered data. + + _getBuffer(n) { + const ret = Buffer.allocUnsafe(n) + const retLen = n + let p = this.head + let c = 0 + + do { + const buf = p.data + + if (n > buf.length) { + TypedArrayPrototypeSet(ret, buf, retLen - n) + n -= buf.length + } else { + if (n === buf.length) { + TypedArrayPrototypeSet(ret, buf, retLen - n) + ++c + if (p.next) this.head = p.next + else this.head = this.tail = null + } else { + TypedArrayPrototypeSet(ret, new Uint8Array(buf.buffer, buf.byteOffset, n), retLen - n) + this.head = p + p.data = buf.slice(n) + } + + break + } + + ++c + } while ((p = p.next) !== null) + + this.length -= c + return ret + } // Make sure the linked list only shows the minimal necessary information. + + [Symbol.for('nodejs.util.inspect.custom')](_, options) { + return inspect(this, { + ...options, + // Only inspect one level. + depth: 0, + // It should not recurse. + customInspect: false + }) + } +} diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/compose.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/compose.js new file mode 100644 index 0000000000000..0a2e810a3e886 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/compose.js @@ -0,0 +1,161 @@ +'use strict' + +const { pipeline } = require('./pipeline') + +const Duplex = require('./duplex') + +const { destroyer } = require('./destroy') + +const { isNodeStream, isReadable, isWritable } = require('./utils') + +const { + AbortError, + codes: { ERR_INVALID_ARG_VALUE, ERR_MISSING_ARGS } +} = require('../../ours/errors') + +module.exports = function compose(...streams) { + if (streams.length === 0) { + throw new ERR_MISSING_ARGS('streams') + } + + if (streams.length === 1) { + return Duplex.from(streams[0]) + } + + const orgStreams = [...streams] + + if (typeof streams[0] === 'function') { + streams[0] = Duplex.from(streams[0]) + } + + if (typeof streams[streams.length - 1] === 'function') { + const idx = streams.length - 1 + streams[idx] = Duplex.from(streams[idx]) + } + + for (let n = 0; n < streams.length; ++n) { + if (!isNodeStream(streams[n])) { + // TODO(ronag): Add checks for non streams. + continue + } + + if (n < streams.length - 1 && !isReadable(streams[n])) { + throw new ERR_INVALID_ARG_VALUE(`streams[${n}]`, orgStreams[n], 'must be readable') + } + + if (n > 0 && !isWritable(streams[n])) { + throw new ERR_INVALID_ARG_VALUE(`streams[${n}]`, orgStreams[n], 'must be writable') + } + } + + let ondrain + let onfinish + let onreadable + let onclose + let d + + function onfinished(err) { + const cb = onclose + onclose = null + + if (cb) { + cb(err) + } else if (err) { + d.destroy(err) + } else if (!readable && !writable) { + d.destroy() + } + } + + const head = streams[0] + const tail = pipeline(streams, onfinished) + const writable = !!isWritable(head) + const readable = !!isReadable(tail) // TODO(ronag): Avoid double buffering. + // Implement Writable/Readable/Duplex traits. + // See, https://github.com/nodejs/node/pull/33515. + + d = new Duplex({ + // TODO (ronag): highWaterMark? + writableObjectMode: !!(head !== null && head !== undefined && head.writableObjectMode), + readableObjectMode: !!(tail !== null && tail !== undefined && tail.writableObjectMode), + writable, + readable + }) + + if (writable) { + d._write = function (chunk, encoding, callback) { + if (head.write(chunk, encoding)) { + callback() + } else { + ondrain = callback + } + } + + d._final = function (callback) { + head.end() + onfinish = callback + } + + head.on('drain', function () { + if (ondrain) { + const cb = ondrain + ondrain = null + cb() + } + }) + tail.on('finish', function () { + if (onfinish) { + const cb = onfinish + onfinish = null + cb() + } + }) + } + + if (readable) { + tail.on('readable', function () { + if (onreadable) { + const cb = onreadable + onreadable = null + cb() + } + }) + tail.on('end', function () { + d.push(null) + }) + + d._read = function () { + while (true) { + const buf = tail.read() + + if (buf === null) { + onreadable = d._read + return + } + + if (!d.push(buf)) { + return + } + } + } + } + + d._destroy = function (err, callback) { + if (!err && onclose !== null) { + err = new AbortError() + } + + onreadable = null + ondrain = null + onfinish = null + + if (onclose === null) { + callback(err) + } else { + onclose = callback + destroyer(tail, err) + } + } + + return d +} diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/destroy.js new file mode 100644 index 0000000000000..e04306f0b1904 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/destroy.js @@ -0,0 +1,337 @@ +'use strict' + +/* replacement start */ + +const process = require('process') +/* replacement end */ + +const { + aggregateTwoErrors, + codes: { ERR_MULTIPLE_CALLBACK }, + AbortError +} = require('../../ours/errors') + +const { Symbol } = require('../../ours/primordials') + +const { kDestroyed, isDestroyed, isFinished, isServerRequest } = require('./utils') + +const kDestroy = Symbol('kDestroy') +const kConstruct = Symbol('kConstruct') + +function checkError(err, w, r) { + if (err) { + // Avoid V8 leak, https://github.com/nodejs/node/pull/34103#issuecomment-652002364 + err.stack // eslint-disable-line no-unused-expressions + + if (w && !w.errored) { + w.errored = err + } + + if (r && !r.errored) { + r.errored = err + } + } +} // Backwards compat. cb() is undocumented and unused in core but +// unfortunately might be used by modules. + +function destroy(err, cb) { + const r = this._readableState + const w = this._writableState // With duplex streams we use the writable side for state. + + const s = w || r + + if ((w && w.destroyed) || (r && r.destroyed)) { + if (typeof cb === 'function') { + cb() + } + + return this + } // We set destroyed to true before firing error callbacks in order + // to make it re-entrance safe in case destroy() is called within callbacks + + checkError(err, w, r) + + if (w) { + w.destroyed = true + } + + if (r) { + r.destroyed = true + } // If still constructing then defer calling _destroy. + + if (!s.constructed) { + this.once(kDestroy, function (er) { + _destroy(this, aggregateTwoErrors(er, err), cb) + }) + } else { + _destroy(this, err, cb) + } + + return this +} + +function _destroy(self, err, cb) { + let called = false + + function onDestroy(err) { + if (called) { + return + } + + called = true + const r = self._readableState + const w = self._writableState + checkError(err, w, r) + + if (w) { + w.closed = true + } + + if (r) { + r.closed = true + } + + if (typeof cb === 'function') { + cb(err) + } + + if (err) { + process.nextTick(emitErrorCloseNT, self, err) + } else { + process.nextTick(emitCloseNT, self) + } + } + + try { + self._destroy(err || null, onDestroy) + } catch (err) { + onDestroy(err) + } +} + +function emitErrorCloseNT(self, err) { + emitErrorNT(self, err) + emitCloseNT(self) +} + +function emitCloseNT(self) { + const r = self._readableState + const w = self._writableState + + if (w) { + w.closeEmitted = true + } + + if (r) { + r.closeEmitted = true + } + + if ((w && w.emitClose) || (r && r.emitClose)) { + self.emit('close') + } +} + +function emitErrorNT(self, err) { + const r = self._readableState + const w = self._writableState + + if ((w && w.errorEmitted) || (r && r.errorEmitted)) { + return + } + + if (w) { + w.errorEmitted = true + } + + if (r) { + r.errorEmitted = true + } + + self.emit('error', err) +} + +function undestroy() { + const r = this._readableState + const w = this._writableState + + if (r) { + r.constructed = true + r.closed = false + r.closeEmitted = false + r.destroyed = false + r.errored = null + r.errorEmitted = false + r.reading = false + r.ended = r.readable === false + r.endEmitted = r.readable === false + } + + if (w) { + w.constructed = true + w.destroyed = false + w.closed = false + w.closeEmitted = false + w.errored = null + w.errorEmitted = false + w.finalCalled = false + w.prefinished = false + w.ended = w.writable === false + w.ending = w.writable === false + w.finished = w.writable === false + } +} + +function errorOrDestroy(stream, err, sync) { + // We have tests that rely on errors being emitted + // in the same tick, so changing this is semver major. + // For now when you opt-in to autoDestroy we allow + // the error to be emitted nextTick. In a future + // semver major update we should change the default to this. + const r = stream._readableState + const w = stream._writableState + + if ((w && w.destroyed) || (r && r.destroyed)) { + return this + } + + if ((r && r.autoDestroy) || (w && w.autoDestroy)) stream.destroy(err) + else if (err) { + // Avoid V8 leak, https://github.com/nodejs/node/pull/34103#issuecomment-652002364 + err.stack // eslint-disable-line no-unused-expressions + + if (w && !w.errored) { + w.errored = err + } + + if (r && !r.errored) { + r.errored = err + } + + if (sync) { + process.nextTick(emitErrorNT, stream, err) + } else { + emitErrorNT(stream, err) + } + } +} + +function construct(stream, cb) { + if (typeof stream._construct !== 'function') { + return + } + + const r = stream._readableState + const w = stream._writableState + + if (r) { + r.constructed = false + } + + if (w) { + w.constructed = false + } + + stream.once(kConstruct, cb) + + if (stream.listenerCount(kConstruct) > 1) { + // Duplex + return + } + + process.nextTick(constructNT, stream) +} + +function constructNT(stream) { + let called = false + + function onConstruct(err) { + if (called) { + errorOrDestroy(stream, err !== null && err !== undefined ? err : new ERR_MULTIPLE_CALLBACK()) + return + } + + called = true + const r = stream._readableState + const w = stream._writableState + const s = w || r + + if (r) { + r.constructed = true + } + + if (w) { + w.constructed = true + } + + if (s.destroyed) { + stream.emit(kDestroy, err) + } else if (err) { + errorOrDestroy(stream, err, true) + } else { + process.nextTick(emitConstructNT, stream) + } + } + + try { + stream._construct(onConstruct) + } catch (err) { + onConstruct(err) + } +} + +function emitConstructNT(stream) { + stream.emit(kConstruct) +} + +function isRequest(stream) { + return stream && stream.setHeader && typeof stream.abort === 'function' +} + +function emitCloseLegacy(stream) { + stream.emit('close') +} + +function emitErrorCloseLegacy(stream, err) { + stream.emit('error', err) + process.nextTick(emitCloseLegacy, stream) +} // Normalize destroy for legacy. + +function destroyer(stream, err) { + if (!stream || isDestroyed(stream)) { + return + } + + if (!err && !isFinished(stream)) { + err = new AbortError() + } // TODO: Remove isRequest branches. + + if (isServerRequest(stream)) { + stream.socket = null + stream.destroy(err) + } else if (isRequest(stream)) { + stream.abort() + } else if (isRequest(stream.req)) { + stream.req.abort() + } else if (typeof stream.destroy === 'function') { + stream.destroy(err) + } else if (typeof stream.close === 'function') { + // TODO: Don't lose err? + stream.close() + } else if (err) { + process.nextTick(emitErrorCloseLegacy, stream, err) + } else { + process.nextTick(emitCloseLegacy, stream) + } + + if (!stream.destroyed) { + stream[kDestroyed] = true + } +} + +module.exports = { + construct, + destroyer, + destroy, + undestroy, + errorOrDestroy +} diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/duplex.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/duplex.js new file mode 100644 index 0000000000000..24e5be6fffff4 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/duplex.js @@ -0,0 +1,157 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototype inheritance, this class +// prototypically inherits from Readable, and then parasitically from +// Writable. +'use strict' + +const { + ObjectDefineProperties, + ObjectGetOwnPropertyDescriptor, + ObjectKeys, + ObjectSetPrototypeOf +} = require('../../ours/primordials') + +module.exports = Duplex + +const Readable = require('./readable') + +const Writable = require('./writable') + +ObjectSetPrototypeOf(Duplex.prototype, Readable.prototype) +ObjectSetPrototypeOf(Duplex, Readable) +{ + const keys = ObjectKeys(Writable.prototype) // Allow the keys array to be GC'ed. + + for (let i = 0; i < keys.length; i++) { + const method = keys[i] + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method] + } +} + +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options) + Readable.call(this, options) + Writable.call(this, options) + + if (options) { + this.allowHalfOpen = options.allowHalfOpen !== false + + if (options.readable === false) { + this._readableState.readable = false + this._readableState.ended = true + this._readableState.endEmitted = true + } + + if (options.writable === false) { + this._writableState.writable = false + this._writableState.ending = true + this._writableState.ended = true + this._writableState.finished = true + } + } else { + this.allowHalfOpen = true + } +} + +ObjectDefineProperties(Duplex.prototype, { + writable: { + __proto__: null, + ...ObjectGetOwnPropertyDescriptor(Writable.prototype, 'writable') + }, + writableHighWaterMark: { + __proto__: null, + ...ObjectGetOwnPropertyDescriptor(Writable.prototype, 'writableHighWaterMark') + }, + writableObjectMode: { + __proto__: null, + ...ObjectGetOwnPropertyDescriptor(Writable.prototype, 'writableObjectMode') + }, + writableBuffer: { + __proto__: null, + ...ObjectGetOwnPropertyDescriptor(Writable.prototype, 'writableBuffer') + }, + writableLength: { + __proto__: null, + ...ObjectGetOwnPropertyDescriptor(Writable.prototype, 'writableLength') + }, + writableFinished: { + __proto__: null, + ...ObjectGetOwnPropertyDescriptor(Writable.prototype, 'writableFinished') + }, + writableCorked: { + __proto__: null, + ...ObjectGetOwnPropertyDescriptor(Writable.prototype, 'writableCorked') + }, + writableEnded: { + __proto__: null, + ...ObjectGetOwnPropertyDescriptor(Writable.prototype, 'writableEnded') + }, + writableNeedDrain: { + __proto__: null, + ...ObjectGetOwnPropertyDescriptor(Writable.prototype, 'writableNeedDrain') + }, + destroyed: { + __proto__: null, + + get() { + if (this._readableState === undefined || this._writableState === undefined) { + return false + } + + return this._readableState.destroyed && this._writableState.destroyed + }, + + set(value) { + // Backward compatibility, the user is explicitly + // managing destroyed. + if (this._readableState && this._writableState) { + this._readableState.destroyed = value + this._writableState.destroyed = value + } + } + } +}) +let webStreamsAdapters // Lazy to avoid circular references + +function lazyWebStreams() { + if (webStreamsAdapters === undefined) webStreamsAdapters = {} + return webStreamsAdapters +} + +Duplex.fromWeb = function (pair, options) { + return lazyWebStreams().newStreamDuplexFromReadableWritablePair(pair, options) +} + +Duplex.toWeb = function (duplex) { + return lazyWebStreams().newReadableWritablePairFromDuplex(duplex) +} + +let duplexify + +Duplex.from = function (body) { + if (!duplexify) { + duplexify = require('./duplexify') + } + + return duplexify(body, 'body') +} diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/duplexify.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/duplexify.js new file mode 100644 index 0000000000000..9ff4df96433e3 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/duplexify.js @@ -0,0 +1,425 @@ +/* replacement start */ +const process = require('process') +/* replacement end */ + +;('use strict') + +const bufferModule = require('buffer') + +const { + isReadable, + isWritable, + isIterable, + isNodeStream, + isReadableNodeStream, + isWritableNodeStream, + isDuplexNodeStream +} = require('./utils') + +const eos = require('./end-of-stream') + +const { + AbortError, + codes: { ERR_INVALID_ARG_TYPE, ERR_INVALID_RETURN_VALUE } +} = require('../../ours/errors') + +const { destroyer } = require('./destroy') + +const Duplex = require('./duplex') + +const Readable = require('./readable') + +const { createDeferredPromise } = require('../../ours/util') + +const from = require('./from') + +const Blob = globalThis.Blob || bufferModule.Blob +const isBlob = + typeof Blob !== 'undefined' + ? function isBlob(b) { + return b instanceof Blob + } + : function isBlob(b) { + return false + } + +const AbortController = globalThis.AbortController || require('abort-controller').AbortController + +const { FunctionPrototypeCall } = require('../../ours/primordials') // This is needed for pre node 17. + +class Duplexify extends Duplex { + constructor(options) { + super(options) // https://github.com/nodejs/node/pull/34385 + + if ((options === null || options === undefined ? undefined : options.readable) === false) { + this._readableState.readable = false + this._readableState.ended = true + this._readableState.endEmitted = true + } + + if ((options === null || options === undefined ? undefined : options.writable) === false) { + this._writableState.writable = false + this._writableState.ending = true + this._writableState.ended = true + this._writableState.finished = true + } + } +} + +module.exports = function duplexify(body, name) { + if (isDuplexNodeStream(body)) { + return body + } + + if (isReadableNodeStream(body)) { + return _duplexify({ + readable: body + }) + } + + if (isWritableNodeStream(body)) { + return _duplexify({ + writable: body + }) + } + + if (isNodeStream(body)) { + return _duplexify({ + writable: false, + readable: false + }) + } // TODO: Webstreams + // if (isReadableStream(body)) { + // return _duplexify({ readable: Readable.fromWeb(body) }); + // } + // TODO: Webstreams + // if (isWritableStream(body)) { + // return _duplexify({ writable: Writable.fromWeb(body) }); + // } + + if (typeof body === 'function') { + const { value, write, final, destroy } = fromAsyncGen(body) + + if (isIterable(value)) { + return from(Duplexify, value, { + // TODO (ronag): highWaterMark? + objectMode: true, + write, + final, + destroy + }) + } + + const then = value === null || value === undefined ? undefined : value.then + + if (typeof then === 'function') { + let d + const promise = FunctionPrototypeCall( + then, + value, + (val) => { + if (val != null) { + throw new ERR_INVALID_RETURN_VALUE('nully', 'body', val) + } + }, + (err) => { + destroyer(d, err) + } + ) + return (d = new Duplexify({ + // TODO (ronag): highWaterMark? + objectMode: true, + readable: false, + write, + + final(cb) { + final(async () => { + try { + await promise + process.nextTick(cb, null) + } catch (err) { + process.nextTick(cb, err) + } + }) + }, + + destroy + })) + } + + throw new ERR_INVALID_RETURN_VALUE('Iterable, AsyncIterable or AsyncFunction', name, value) + } + + if (isBlob(body)) { + return duplexify(body.arrayBuffer()) + } + + if (isIterable(body)) { + return from(Duplexify, body, { + // TODO (ronag): highWaterMark? + objectMode: true, + writable: false + }) + } // TODO: Webstreams. + // if ( + // isReadableStream(body?.readable) && + // isWritableStream(body?.writable) + // ) { + // return Duplexify.fromWeb(body); + // } + + if ( + typeof (body === null || body === undefined ? undefined : body.writable) === 'object' || + typeof (body === null || body === undefined ? undefined : body.readable) === 'object' + ) { + const readable = + body !== null && body !== undefined && body.readable + ? isReadableNodeStream(body === null || body === undefined ? undefined : body.readable) + ? body === null || body === undefined + ? undefined + : body.readable + : duplexify(body.readable) + : undefined + const writable = + body !== null && body !== undefined && body.writable + ? isWritableNodeStream(body === null || body === undefined ? undefined : body.writable) + ? body === null || body === undefined + ? undefined + : body.writable + : duplexify(body.writable) + : undefined + return _duplexify({ + readable, + writable + }) + } + + const then = body === null || body === undefined ? undefined : body.then + + if (typeof then === 'function') { + let d + FunctionPrototypeCall( + then, + body, + (val) => { + if (val != null) { + d.push(val) + } + + d.push(null) + }, + (err) => { + destroyer(d, err) + } + ) + return (d = new Duplexify({ + objectMode: true, + writable: false, + + read() {} + })) + } + + throw new ERR_INVALID_ARG_TYPE( + name, + [ + 'Blob', + 'ReadableStream', + 'WritableStream', + 'Stream', + 'Iterable', + 'AsyncIterable', + 'Function', + '{ readable, writable } pair', + 'Promise' + ], + body + ) +} + +function fromAsyncGen(fn) { + let { promise, resolve } = createDeferredPromise() + const ac = new AbortController() + const signal = ac.signal + const value = fn( + (async function* () { + while (true) { + const _promise = promise + promise = null + const { chunk, done, cb } = await _promise + process.nextTick(cb) + if (done) return + if (signal.aborted) + throw new AbortError(undefined, { + cause: signal.reason + }) + ;({ promise, resolve } = createDeferredPromise()) + yield chunk + } + })(), + { + signal + } + ) + return { + value, + + write(chunk, encoding, cb) { + const _resolve = resolve + resolve = null + + _resolve({ + chunk, + done: false, + cb + }) + }, + + final(cb) { + const _resolve = resolve + resolve = null + + _resolve({ + done: true, + cb + }) + }, + + destroy(err, cb) { + ac.abort() + cb(err) + } + } +} + +function _duplexify(pair) { + const r = pair.readable && typeof pair.readable.read !== 'function' ? Readable.wrap(pair.readable) : pair.readable + const w = pair.writable + let readable = !!isReadable(r) + let writable = !!isWritable(w) + let ondrain + let onfinish + let onreadable + let onclose + let d + + function onfinished(err) { + const cb = onclose + onclose = null + + if (cb) { + cb(err) + } else if (err) { + d.destroy(err) + } else if (!readable && !writable) { + d.destroy() + } + } // TODO(ronag): Avoid double buffering. + // Implement Writable/Readable/Duplex traits. + // See, https://github.com/nodejs/node/pull/33515. + + d = new Duplexify({ + // TODO (ronag): highWaterMark? + readableObjectMode: !!(r !== null && r !== undefined && r.readableObjectMode), + writableObjectMode: !!(w !== null && w !== undefined && w.writableObjectMode), + readable, + writable + }) + + if (writable) { + eos(w, (err) => { + writable = false + + if (err) { + destroyer(r, err) + } + + onfinished(err) + }) + + d._write = function (chunk, encoding, callback) { + if (w.write(chunk, encoding)) { + callback() + } else { + ondrain = callback + } + } + + d._final = function (callback) { + w.end() + onfinish = callback + } + + w.on('drain', function () { + if (ondrain) { + const cb = ondrain + ondrain = null + cb() + } + }) + w.on('finish', function () { + if (onfinish) { + const cb = onfinish + onfinish = null + cb() + } + }) + } + + if (readable) { + eos(r, (err) => { + readable = false + + if (err) { + destroyer(r, err) + } + + onfinished(err) + }) + r.on('readable', function () { + if (onreadable) { + const cb = onreadable + onreadable = null + cb() + } + }) + r.on('end', function () { + d.push(null) + }) + + d._read = function () { + while (true) { + const buf = r.read() + + if (buf === null) { + onreadable = d._read + return + } + + if (!d.push(buf)) { + return + } + } + } + } + + d._destroy = function (err, callback) { + if (!err && onclose !== null) { + err = new AbortError() + } + + onreadable = null + ondrain = null + onfinish = null + + if (onclose === null) { + callback(err) + } else { + onclose = callback + destroyer(w, err) + destroyer(r, err) + } + } + + return d +} diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/end-of-stream.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/end-of-stream.js new file mode 100644 index 0000000000000..acc13be7d2642 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/end-of-stream.js @@ -0,0 +1,262 @@ +/* replacement start */ +const process = require('process') +/* replacement end */ +// Ported from https://github.com/mafintosh/end-of-stream with +// permission from the author, Mathias Buus (@mafintosh). + +;('use strict') + +const { AbortError, codes } = require('../../ours/errors') + +const { ERR_INVALID_ARG_TYPE, ERR_STREAM_PREMATURE_CLOSE } = codes + +const { kEmptyObject, once } = require('../../ours/util') + +const { validateAbortSignal, validateFunction, validateObject } = require('../validators') + +const { Promise } = require('../../ours/primordials') + +const { + isClosed, + isReadable, + isReadableNodeStream, + isReadableFinished, + isReadableErrored, + isWritable, + isWritableNodeStream, + isWritableFinished, + isWritableErrored, + isNodeStream, + willEmitClose: _willEmitClose +} = require('./utils') + +function isRequest(stream) { + return stream.setHeader && typeof stream.abort === 'function' +} + +const nop = () => {} + +function eos(stream, options, callback) { + var _options$readable, _options$writable + + if (arguments.length === 2) { + callback = options + options = kEmptyObject + } else if (options == null) { + options = kEmptyObject + } else { + validateObject(options, 'options') + } + + validateFunction(callback, 'callback') + validateAbortSignal(options.signal, 'options.signal') + callback = once(callback) + const readable = + (_options$readable = options.readable) !== null && _options$readable !== undefined + ? _options$readable + : isReadableNodeStream(stream) + const writable = + (_options$writable = options.writable) !== null && _options$writable !== undefined + ? _options$writable + : isWritableNodeStream(stream) + + if (!isNodeStream(stream)) { + // TODO: Webstreams. + throw new ERR_INVALID_ARG_TYPE('stream', 'Stream', stream) + } + + const wState = stream._writableState + const rState = stream._readableState + + const onlegacyfinish = () => { + if (!stream.writable) { + onfinish() + } + } // TODO (ronag): Improve soft detection to include core modules and + // common ecosystem modules that do properly emit 'close' but fail + // this generic check. + + let willEmitClose = + _willEmitClose(stream) && isReadableNodeStream(stream) === readable && isWritableNodeStream(stream) === writable + let writableFinished = isWritableFinished(stream, false) + + const onfinish = () => { + writableFinished = true // Stream should not be destroyed here. If it is that + // means that user space is doing something differently and + // we cannot trust willEmitClose. + + if (stream.destroyed) { + willEmitClose = false + } + + if (willEmitClose && (!stream.readable || readable)) { + return + } + + if (!readable || readableFinished) { + callback.call(stream) + } + } + + let readableFinished = isReadableFinished(stream, false) + + const onend = () => { + readableFinished = true // Stream should not be destroyed here. If it is that + // means that user space is doing something differently and + // we cannot trust willEmitClose. + + if (stream.destroyed) { + willEmitClose = false + } + + if (willEmitClose && (!stream.writable || writable)) { + return + } + + if (!writable || writableFinished) { + callback.call(stream) + } + } + + const onerror = (err) => { + callback.call(stream, err) + } + + let closed = isClosed(stream) + + const onclose = () => { + closed = true + const errored = isWritableErrored(stream) || isReadableErrored(stream) + + if (errored && typeof errored !== 'boolean') { + return callback.call(stream, errored) + } + + if (readable && !readableFinished && isReadableNodeStream(stream, true)) { + if (!isReadableFinished(stream, false)) return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE()) + } + + if (writable && !writableFinished) { + if (!isWritableFinished(stream, false)) return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE()) + } + + callback.call(stream) + } + + const onrequest = () => { + stream.req.on('finish', onfinish) + } + + if (isRequest(stream)) { + stream.on('complete', onfinish) + + if (!willEmitClose) { + stream.on('abort', onclose) + } + + if (stream.req) { + onrequest() + } else { + stream.on('request', onrequest) + } + } else if (writable && !wState) { + // legacy streams + stream.on('end', onlegacyfinish) + stream.on('close', onlegacyfinish) + } // Not all streams will emit 'close' after 'aborted'. + + if (!willEmitClose && typeof stream.aborted === 'boolean') { + stream.on('aborted', onclose) + } + + stream.on('end', onend) + stream.on('finish', onfinish) + + if (options.error !== false) { + stream.on('error', onerror) + } + + stream.on('close', onclose) + + if (closed) { + process.nextTick(onclose) + } else if ( + (wState !== null && wState !== undefined && wState.errorEmitted) || + (rState !== null && rState !== undefined && rState.errorEmitted) + ) { + if (!willEmitClose) { + process.nextTick(onclose) + } + } else if ( + !readable && + (!willEmitClose || isReadable(stream)) && + (writableFinished || isWritable(stream) === false) + ) { + process.nextTick(onclose) + } else if ( + !writable && + (!willEmitClose || isWritable(stream)) && + (readableFinished || isReadable(stream) === false) + ) { + process.nextTick(onclose) + } else if (rState && stream.req && stream.aborted) { + process.nextTick(onclose) + } + + const cleanup = () => { + callback = nop + stream.removeListener('aborted', onclose) + stream.removeListener('complete', onfinish) + stream.removeListener('abort', onclose) + stream.removeListener('request', onrequest) + if (stream.req) stream.req.removeListener('finish', onfinish) + stream.removeListener('end', onlegacyfinish) + stream.removeListener('close', onlegacyfinish) + stream.removeListener('finish', onfinish) + stream.removeListener('end', onend) + stream.removeListener('error', onerror) + stream.removeListener('close', onclose) + } + + if (options.signal && !closed) { + const abort = () => { + // Keep it because cleanup removes it. + const endCallback = callback + cleanup() + endCallback.call( + stream, + new AbortError(undefined, { + cause: options.signal.reason + }) + ) + } + + if (options.signal.aborted) { + process.nextTick(abort) + } else { + const originalCallback = callback + callback = once((...args) => { + options.signal.removeEventListener('abort', abort) + originalCallback.apply(stream, args) + }) + options.signal.addEventListener('abort', abort) + } + } + + return cleanup +} + +function finished(stream, opts) { + return new Promise((resolve, reject) => { + eos(stream, opts, (err) => { + if (err) { + reject(err) + } else { + resolve() + } + }) + }) +} + +module.exports = eos +module.exports.finished = finished diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/from.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/from.js new file mode 100644 index 0000000000000..89ce1a8bec79d --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/from.js @@ -0,0 +1,115 @@ +'use strict' + +/* replacement start */ + +const process = require('process') +/* replacement end */ + +const { PromisePrototypeThen, SymbolAsyncIterator, SymbolIterator } = require('../../ours/primordials') + +const { Buffer } = require('buffer') + +const { ERR_INVALID_ARG_TYPE, ERR_STREAM_NULL_VALUES } = require('../../ours/errors').codes + +function from(Readable, iterable, opts) { + let iterator + + if (typeof iterable === 'string' || iterable instanceof Buffer) { + return new Readable({ + objectMode: true, + ...opts, + + read() { + this.push(iterable) + this.push(null) + } + }) + } + + let isAsync + + if (iterable && iterable[SymbolAsyncIterator]) { + isAsync = true + iterator = iterable[SymbolAsyncIterator]() + } else if (iterable && iterable[SymbolIterator]) { + isAsync = false + iterator = iterable[SymbolIterator]() + } else { + throw new ERR_INVALID_ARG_TYPE('iterable', ['Iterable'], iterable) + } + + const readable = new Readable({ + objectMode: true, + highWaterMark: 1, + // TODO(ronag): What options should be allowed? + ...opts + }) // Flag to protect against _read + // being called before last iteration completion. + + let reading = false + + readable._read = function () { + if (!reading) { + reading = true + next() + } + } + + readable._destroy = function (error, cb) { + PromisePrototypeThen( + close(error), + () => process.nextTick(cb, error), // nextTick is here in case cb throws + (e) => process.nextTick(cb, e || error) + ) + } + + async function close(error) { + const hadError = error !== undefined && error !== null + const hasThrow = typeof iterator.throw === 'function' + + if (hadError && hasThrow) { + const { value, done } = await iterator.throw(error) + await value + + if (done) { + return + } + } + + if (typeof iterator.return === 'function') { + const { value } = await iterator.return() + await value + } + } + + async function next() { + for (;;) { + try { + const { value, done } = isAsync ? await iterator.next() : iterator.next() + + if (done) { + readable.push(null) + } else { + const res = value && typeof value.then === 'function' ? await value : value + + if (res === null) { + reading = false + throw new ERR_STREAM_NULL_VALUES() + } else if (readable.push(res)) { + continue + } else { + reading = false + } + } + } catch (err) { + readable.destroy(err) + } + + break + } + } + + return readable +} + +module.exports = from diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/lazy_transform.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/lazy_transform.js new file mode 100644 index 0000000000000..466aa03544457 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/lazy_transform.js @@ -0,0 +1,61 @@ +// LazyTransform is a special type of Transform stream that is lazily loaded. +// This is used for performance with bi-API-ship: when two APIs are available +// for the stream, one conventional and one non-conventional. +'use strict' + +const { ObjectDefineProperties, ObjectDefineProperty, ObjectSetPrototypeOf } = require('../../ours/primordials') + +const stream = require('../../stream') + +const { getDefaultEncoding } = require('../crypto/util') + +module.exports = LazyTransform + +function LazyTransform(options) { + this._options = options +} + +ObjectSetPrototypeOf(LazyTransform.prototype, stream.Transform.prototype) +ObjectSetPrototypeOf(LazyTransform, stream.Transform) + +function makeGetter(name) { + return function () { + stream.Transform.call(this, this._options) + this._writableState.decodeStrings = false + + if (!this._options || !this._options.defaultEncoding) { + this._writableState.defaultEncoding = getDefaultEncoding() + } + + return this[name] + } +} + +function makeSetter(name) { + return function (val) { + ObjectDefineProperty(this, name, { + __proto__: null, + value: val, + enumerable: true, + configurable: true, + writable: true + }) + } +} + +ObjectDefineProperties(LazyTransform.prototype, { + _readableState: { + __proto__: null, + get: makeGetter('_readableState'), + set: makeSetter('_readableState'), + configurable: true, + enumerable: true + }, + _writableState: { + __proto__: null, + get: makeGetter('_writableState'), + set: makeSetter('_writableState'), + configurable: true, + enumerable: true + } +}) diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/legacy.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/legacy.js new file mode 100644 index 0000000000000..09c3b7201376f --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/legacy.js @@ -0,0 +1,100 @@ +'use strict' + +const { ArrayIsArray, ObjectSetPrototypeOf } = require('../../ours/primordials') + +const { EventEmitter: EE } = require('events') + +function Stream(opts) { + EE.call(this, opts) +} + +ObjectSetPrototypeOf(Stream.prototype, EE.prototype) +ObjectSetPrototypeOf(Stream, EE) + +Stream.prototype.pipe = function (dest, options) { + const source = this + + function ondata(chunk) { + if (dest.writable && dest.write(chunk) === false && source.pause) { + source.pause() + } + } + + source.on('data', ondata) + + function ondrain() { + if (source.readable && source.resume) { + source.resume() + } + } + + dest.on('drain', ondrain) // If the 'end' option is not supplied, dest.end() will be called when + // source gets the 'end' or 'close' events. Only dest.end() once. + + if (!dest._isStdio && (!options || options.end !== false)) { + source.on('end', onend) + source.on('close', onclose) + } + + let didOnEnd = false + + function onend() { + if (didOnEnd) return + didOnEnd = true + dest.end() + } + + function onclose() { + if (didOnEnd) return + didOnEnd = true + if (typeof dest.destroy === 'function') dest.destroy() + } // Don't leave dangling pipes when there are errors. + + function onerror(er) { + cleanup() + + if (EE.listenerCount(this, 'error') === 0) { + this.emit('error', er) + } + } + + prependListener(source, 'error', onerror) + prependListener(dest, 'error', onerror) // Remove all the event listeners that were added. + + function cleanup() { + source.removeListener('data', ondata) + dest.removeListener('drain', ondrain) + source.removeListener('end', onend) + source.removeListener('close', onclose) + source.removeListener('error', onerror) + dest.removeListener('error', onerror) + source.removeListener('end', cleanup) + source.removeListener('close', cleanup) + dest.removeListener('close', cleanup) + } + + source.on('end', cleanup) + source.on('close', cleanup) + dest.on('close', cleanup) + dest.emit('pipe', source) // Allow for unix-like usage: A.pipe(B).pipe(C) + + return dest +} + +function prependListener(emitter, event, fn) { + // Sadly this is not cacheable as some libraries bundle their own + // event emitter implementation with them. + if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn) // This is a hack to make sure that our error handler is attached before any + // userland ones. NEVER DO THIS. This is here only because this code needs + // to continue to work with older versions of Node.js that do not include + // the prependListener() method. The goal is to eventually remove this hack. + + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn) + else if (ArrayIsArray(emitter._events[event])) emitter._events[event].unshift(fn) + else emitter._events[event] = [fn, emitter._events[event]] +} + +module.exports = { + Stream, + prependListener +} diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/operators.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/operators.js new file mode 100644 index 0000000000000..11778e50f1956 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/operators.js @@ -0,0 +1,534 @@ +'use strict' + +const AbortController = globalThis.AbortController || require('abort-controller').AbortController + +const { + codes: { ERR_INVALID_ARG_TYPE, ERR_MISSING_ARGS, ERR_OUT_OF_RANGE }, + AbortError +} = require('../../ours/errors') + +const { validateAbortSignal, validateInteger, validateObject } = require('../validators') + +const kWeakHandler = require('../../ours/primordials').Symbol('kWeak') + +const { finished } = require('./end-of-stream') + +const { + ArrayPrototypePush, + MathFloor, + Number, + NumberIsNaN, + Promise, + PromiseReject, + PromisePrototypeThen, + Symbol +} = require('../../ours/primordials') + +const kEmpty = Symbol('kEmpty') +const kEof = Symbol('kEof') + +function map(fn, options) { + if (typeof fn !== 'function') { + throw new ERR_INVALID_ARG_TYPE('fn', ['Function', 'AsyncFunction'], fn) + } + + if (options != null) { + validateObject(options, 'options') + } + + if ((options === null || options === undefined ? undefined : options.signal) != null) { + validateAbortSignal(options.signal, 'options.signal') + } + + let concurrency = 1 + + if ((options === null || options === undefined ? undefined : options.concurrency) != null) { + concurrency = MathFloor(options.concurrency) + } + + validateInteger(concurrency, 'concurrency', 1) + return async function* map() { + var _options$signal, _options$signal2 + + const ac = new AbortController() + const stream = this + const queue = [] + const signal = ac.signal + const signalOpt = { + signal + } + + const abort = () => ac.abort() + + if ( + options !== null && + options !== undefined && + (_options$signal = options.signal) !== null && + _options$signal !== undefined && + _options$signal.aborted + ) { + abort() + } + + options === null || options === undefined + ? undefined + : (_options$signal2 = options.signal) === null || _options$signal2 === undefined + ? undefined + : _options$signal2.addEventListener('abort', abort) + let next + let resume + let done = false + + function onDone() { + done = true + } + + async function pump() { + try { + for await (let val of stream) { + var _val + + if (done) { + return + } + + if (signal.aborted) { + throw new AbortError() + } + + try { + val = fn(val, signalOpt) + } catch (err) { + val = PromiseReject(err) + } + + if (val === kEmpty) { + continue + } + + if (typeof ((_val = val) === null || _val === undefined ? undefined : _val.catch) === 'function') { + val.catch(onDone) + } + + queue.push(val) + + if (next) { + next() + next = null + } + + if (!done && queue.length && queue.length >= concurrency) { + await new Promise((resolve) => { + resume = resolve + }) + } + } + + queue.push(kEof) + } catch (err) { + const val = PromiseReject(err) + PromisePrototypeThen(val, undefined, onDone) + queue.push(val) + } finally { + var _options$signal3 + + done = true + + if (next) { + next() + next = null + } + + options === null || options === undefined + ? undefined + : (_options$signal3 = options.signal) === null || _options$signal3 === undefined + ? undefined + : _options$signal3.removeEventListener('abort', abort) + } + } + + pump() + + try { + while (true) { + while (queue.length > 0) { + const val = await queue[0] + + if (val === kEof) { + return + } + + if (signal.aborted) { + throw new AbortError() + } + + if (val !== kEmpty) { + yield val + } + + queue.shift() + + if (resume) { + resume() + resume = null + } + } + + await new Promise((resolve) => { + next = resolve + }) + } + } finally { + ac.abort() + done = true + + if (resume) { + resume() + resume = null + } + } + }.call(this) +} + +function asIndexedPairs(options = undefined) { + if (options != null) { + validateObject(options, 'options') + } + + if ((options === null || options === undefined ? undefined : options.signal) != null) { + validateAbortSignal(options.signal, 'options.signal') + } + + return async function* asIndexedPairs() { + let index = 0 + + for await (const val of this) { + var _options$signal4 + + if ( + options !== null && + options !== undefined && + (_options$signal4 = options.signal) !== null && + _options$signal4 !== undefined && + _options$signal4.aborted + ) { + throw new AbortError({ + cause: options.signal.reason + }) + } + + yield [index++, val] + } + }.call(this) +} + +async function some(fn, options = undefined) { + for await (const unused of filter.call(this, fn, options)) { + return true + } + + return false +} + +async function every(fn, options = undefined) { + if (typeof fn !== 'function') { + throw new ERR_INVALID_ARG_TYPE('fn', ['Function', 'AsyncFunction'], fn) + } // https://en.wikipedia.org/wiki/De_Morgan%27s_laws + + return !(await some.call( + this, + async (...args) => { + return !(await fn(...args)) + }, + options + )) +} + +async function find(fn, options) { + for await (const result of filter.call(this, fn, options)) { + return result + } + + return undefined +} + +async function forEach(fn, options) { + if (typeof fn !== 'function') { + throw new ERR_INVALID_ARG_TYPE('fn', ['Function', 'AsyncFunction'], fn) + } + + async function forEachFn(value, options) { + await fn(value, options) + return kEmpty + } // eslint-disable-next-line no-unused-vars + + for await (const unused of map.call(this, forEachFn, options)); +} + +function filter(fn, options) { + if (typeof fn !== 'function') { + throw new ERR_INVALID_ARG_TYPE('fn', ['Function', 'AsyncFunction'], fn) + } + + async function filterFn(value, options) { + if (await fn(value, options)) { + return value + } + + return kEmpty + } + + return map.call(this, filterFn, options) +} // Specific to provide better error to reduce since the argument is only +// missing if the stream has no items in it - but the code is still appropriate + +class ReduceAwareErrMissingArgs extends ERR_MISSING_ARGS { + constructor() { + super('reduce') + this.message = 'Reduce of an empty stream requires an initial value' + } +} + +async function reduce(reducer, initialValue, options) { + var _options$signal5 + + if (typeof reducer !== 'function') { + throw new ERR_INVALID_ARG_TYPE('reducer', ['Function', 'AsyncFunction'], reducer) + } + + if (options != null) { + validateObject(options, 'options') + } + + if ((options === null || options === undefined ? undefined : options.signal) != null) { + validateAbortSignal(options.signal, 'options.signal') + } + + let hasInitialValue = arguments.length > 1 + + if ( + options !== null && + options !== undefined && + (_options$signal5 = options.signal) !== null && + _options$signal5 !== undefined && + _options$signal5.aborted + ) { + const err = new AbortError(undefined, { + cause: options.signal.reason + }) + this.once('error', () => {}) // The error is already propagated + + await finished(this.destroy(err)) + throw err + } + + const ac = new AbortController() + const signal = ac.signal + + if (options !== null && options !== undefined && options.signal) { + const opts = { + once: true, + [kWeakHandler]: this + } + options.signal.addEventListener('abort', () => ac.abort(), opts) + } + + let gotAnyItemFromStream = false + + try { + for await (const value of this) { + var _options$signal6 + + gotAnyItemFromStream = true + + if ( + options !== null && + options !== undefined && + (_options$signal6 = options.signal) !== null && + _options$signal6 !== undefined && + _options$signal6.aborted + ) { + throw new AbortError() + } + + if (!hasInitialValue) { + initialValue = value + hasInitialValue = true + } else { + initialValue = await reducer(initialValue, value, { + signal + }) + } + } + + if (!gotAnyItemFromStream && !hasInitialValue) { + throw new ReduceAwareErrMissingArgs() + } + } finally { + ac.abort() + } + + return initialValue +} + +async function toArray(options) { + if (options != null) { + validateObject(options, 'options') + } + + if ((options === null || options === undefined ? undefined : options.signal) != null) { + validateAbortSignal(options.signal, 'options.signal') + } + + const result = [] + + for await (const val of this) { + var _options$signal7 + + if ( + options !== null && + options !== undefined && + (_options$signal7 = options.signal) !== null && + _options$signal7 !== undefined && + _options$signal7.aborted + ) { + throw new AbortError(undefined, { + cause: options.signal.reason + }) + } + + ArrayPrototypePush(result, val) + } + + return result +} + +function flatMap(fn, options) { + const values = map.call(this, fn, options) + return async function* flatMap() { + for await (const val of values) { + yield* val + } + }.call(this) +} + +function toIntegerOrInfinity(number) { + // We coerce here to align with the spec + // https://github.com/tc39/proposal-iterator-helpers/issues/169 + number = Number(number) + + if (NumberIsNaN(number)) { + return 0 + } + + if (number < 0) { + throw new ERR_OUT_OF_RANGE('number', '>= 0', number) + } + + return number +} + +function drop(number, options = undefined) { + if (options != null) { + validateObject(options, 'options') + } + + if ((options === null || options === undefined ? undefined : options.signal) != null) { + validateAbortSignal(options.signal, 'options.signal') + } + + number = toIntegerOrInfinity(number) + return async function* drop() { + var _options$signal8 + + if ( + options !== null && + options !== undefined && + (_options$signal8 = options.signal) !== null && + _options$signal8 !== undefined && + _options$signal8.aborted + ) { + throw new AbortError() + } + + for await (const val of this) { + var _options$signal9 + + if ( + options !== null && + options !== undefined && + (_options$signal9 = options.signal) !== null && + _options$signal9 !== undefined && + _options$signal9.aborted + ) { + throw new AbortError() + } + + if (number-- <= 0) { + yield val + } + } + }.call(this) +} + +function take(number, options = undefined) { + if (options != null) { + validateObject(options, 'options') + } + + if ((options === null || options === undefined ? undefined : options.signal) != null) { + validateAbortSignal(options.signal, 'options.signal') + } + + number = toIntegerOrInfinity(number) + return async function* take() { + var _options$signal10 + + if ( + options !== null && + options !== undefined && + (_options$signal10 = options.signal) !== null && + _options$signal10 !== undefined && + _options$signal10.aborted + ) { + throw new AbortError() + } + + for await (const val of this) { + var _options$signal11 + + if ( + options !== null && + options !== undefined && + (_options$signal11 = options.signal) !== null && + _options$signal11 !== undefined && + _options$signal11.aborted + ) { + throw new AbortError() + } + + if (number-- > 0) { + yield val + } else { + return + } + } + }.call(this) +} + +module.exports.streamReturningOperators = { + asIndexedPairs, + drop, + filter, + flatMap, + map, + take +} +module.exports.promiseReturningOperators = { + every, + forEach, + reduce, + toArray, + some, + find +} diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/passthrough.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/passthrough.js new file mode 100644 index 0000000000000..55c551723ee32 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/passthrough.js @@ -0,0 +1,42 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. +'use strict' + +const { ObjectSetPrototypeOf } = require('../../ours/primordials') + +module.exports = PassThrough + +const Transform = require('./transform') + +ObjectSetPrototypeOf(PassThrough.prototype, Transform.prototype) +ObjectSetPrototypeOf(PassThrough, Transform) + +function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options) + Transform.call(this, options) +} + +PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk) +} diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/pipeline.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/pipeline.js new file mode 100644 index 0000000000000..c170b48327eee --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/pipeline.js @@ -0,0 +1,434 @@ +/* replacement start */ +const process = require('process') +/* replacement end */ +// Ported from https://github.com/mafintosh/pump with +// permission from the author, Mathias Buus (@mafintosh). + +;('use strict') + +const { ArrayIsArray, Promise, SymbolAsyncIterator } = require('../../ours/primordials') + +const eos = require('./end-of-stream') + +const { once } = require('../../ours/util') + +const destroyImpl = require('./destroy') + +const Duplex = require('./duplex') + +const { + aggregateTwoErrors, + codes: { + ERR_INVALID_ARG_TYPE, + ERR_INVALID_RETURN_VALUE, + ERR_MISSING_ARGS, + ERR_STREAM_DESTROYED, + ERR_STREAM_PREMATURE_CLOSE + }, + AbortError +} = require('../../ours/errors') + +const { validateFunction, validateAbortSignal } = require('../validators') + +const { isIterable, isReadable, isReadableNodeStream, isNodeStream } = require('./utils') + +const AbortController = globalThis.AbortController || require('abort-controller').AbortController + +let PassThrough +let Readable + +function destroyer(stream, reading, writing) { + let finished = false + stream.on('close', () => { + finished = true + }) + const cleanup = eos( + stream, + { + readable: reading, + writable: writing + }, + (err) => { + finished = !err + } + ) + return { + destroy: (err) => { + if (finished) return + finished = true + destroyImpl.destroyer(stream, err || new ERR_STREAM_DESTROYED('pipe')) + }, + cleanup + } +} + +function popCallback(streams) { + // Streams should never be an empty array. It should always contain at least + // a single stream. Therefore optimize for the average case instead of + // checking for length === 0 as well. + validateFunction(streams[streams.length - 1], 'streams[stream.length - 1]') + return streams.pop() +} + +function makeAsyncIterable(val) { + if (isIterable(val)) { + return val + } else if (isReadableNodeStream(val)) { + // Legacy streams are not Iterable. + return fromReadable(val) + } + + throw new ERR_INVALID_ARG_TYPE('val', ['Readable', 'Iterable', 'AsyncIterable'], val) +} + +async function* fromReadable(val) { + if (!Readable) { + Readable = require('./readable') + } + + yield* Readable.prototype[SymbolAsyncIterator].call(val) +} + +async function pump(iterable, writable, finish, { end }) { + let error + let onresolve = null + + const resume = (err) => { + if (err) { + error = err + } + + if (onresolve) { + const callback = onresolve + onresolve = null + callback() + } + } + + const wait = () => + new Promise((resolve, reject) => { + if (error) { + reject(error) + } else { + onresolve = () => { + if (error) { + reject(error) + } else { + resolve() + } + } + } + }) + + writable.on('drain', resume) + const cleanup = eos( + writable, + { + readable: false + }, + resume + ) + + try { + if (writable.writableNeedDrain) { + await wait() + } + + for await (const chunk of iterable) { + if (!writable.write(chunk)) { + await wait() + } + } + + if (end) { + writable.end() + } + + await wait() + finish() + } catch (err) { + finish(error !== err ? aggregateTwoErrors(error, err) : err) + } finally { + cleanup() + writable.off('drain', resume) + } +} + +function pipeline(...streams) { + return pipelineImpl(streams, once(popCallback(streams))) +} + +function pipelineImpl(streams, callback, opts) { + if (streams.length === 1 && ArrayIsArray(streams[0])) { + streams = streams[0] + } + + if (streams.length < 2) { + throw new ERR_MISSING_ARGS('streams') + } + + const ac = new AbortController() + const signal = ac.signal + const outerSignal = opts === null || opts === undefined ? undefined : opts.signal // Need to cleanup event listeners if last stream is readable + // https://github.com/nodejs/node/issues/35452 + + const lastStreamCleanup = [] + validateAbortSignal(outerSignal, 'options.signal') + + function abort() { + finishImpl(new AbortError()) + } + + outerSignal === null || outerSignal === undefined ? undefined : outerSignal.addEventListener('abort', abort) + let error + let value + const destroys = [] + let finishCount = 0 + + function finish(err) { + finishImpl(err, --finishCount === 0) + } + + function finishImpl(err, final) { + if (err && (!error || error.code === 'ERR_STREAM_PREMATURE_CLOSE')) { + error = err + } + + if (!error && !final) { + return + } + + while (destroys.length) { + destroys.shift()(error) + } + + outerSignal === null || outerSignal === undefined ? undefined : outerSignal.removeEventListener('abort', abort) + ac.abort() + + if (final) { + if (!error) { + lastStreamCleanup.forEach((fn) => fn()) + } + + process.nextTick(callback, error, value) + } + } + + let ret + + for (let i = 0; i < streams.length; i++) { + const stream = streams[i] + const reading = i < streams.length - 1 + const writing = i > 0 + const end = reading || (opts === null || opts === undefined ? undefined : opts.end) !== false + const isLastStream = i === streams.length - 1 + + if (isNodeStream(stream)) { + if (end) { + const { destroy, cleanup } = destroyer(stream, reading, writing) + destroys.push(destroy) + + if (isReadable(stream) && isLastStream) { + lastStreamCleanup.push(cleanup) + } + } // Catch stream errors that occur after pipe/pump has completed. + + function onError(err) { + if (err && err.name !== 'AbortError' && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') { + finish(err) + } + } + + stream.on('error', onError) + + if (isReadable(stream) && isLastStream) { + lastStreamCleanup.push(() => { + stream.removeListener('error', onError) + }) + } + } + + if (i === 0) { + if (typeof stream === 'function') { + ret = stream({ + signal + }) + + if (!isIterable(ret)) { + throw new ERR_INVALID_RETURN_VALUE('Iterable, AsyncIterable or Stream', 'source', ret) + } + } else if (isIterable(stream) || isReadableNodeStream(stream)) { + ret = stream + } else { + ret = Duplex.from(stream) + } + } else if (typeof stream === 'function') { + ret = makeAsyncIterable(ret) + ret = stream(ret, { + signal + }) + + if (reading) { + if (!isIterable(ret, true)) { + throw new ERR_INVALID_RETURN_VALUE('AsyncIterable', `transform[${i - 1}]`, ret) + } + } else { + var _ret + + if (!PassThrough) { + PassThrough = require('./passthrough') + } // If the last argument to pipeline is not a stream + // we must create a proxy stream so that pipeline(...) + // always returns a stream which can be further + // composed through `.pipe(stream)`. + + const pt = new PassThrough({ + objectMode: true + }) // Handle Promises/A+ spec, `then` could be a getter that throws on + // second use. + + const then = (_ret = ret) === null || _ret === undefined ? undefined : _ret.then + + if (typeof then === 'function') { + finishCount++ + then.call( + ret, + (val) => { + value = val + + if (val != null) { + pt.write(val) + } + + if (end) { + pt.end() + } + + process.nextTick(finish) + }, + (err) => { + pt.destroy(err) + process.nextTick(finish, err) + } + ) + } else if (isIterable(ret, true)) { + finishCount++ + pump(ret, pt, finish, { + end + }) + } else { + throw new ERR_INVALID_RETURN_VALUE('AsyncIterable or Promise', 'destination', ret) + } + + ret = pt + const { destroy, cleanup } = destroyer(ret, false, true) + destroys.push(destroy) + + if (isLastStream) { + lastStreamCleanup.push(cleanup) + } + } + } else if (isNodeStream(stream)) { + if (isReadableNodeStream(ret)) { + finishCount += 2 + const cleanup = pipe(ret, stream, finish, { + end + }) + + if (isReadable(stream) && isLastStream) { + lastStreamCleanup.push(cleanup) + } + } else if (isIterable(ret)) { + finishCount++ + pump(ret, stream, finish, { + end + }) + } else { + throw new ERR_INVALID_ARG_TYPE('val', ['Readable', 'Iterable', 'AsyncIterable'], ret) + } + + ret = stream + } else { + ret = Duplex.from(stream) + } + } + + if ( + (signal !== null && signal !== undefined && signal.aborted) || + (outerSignal !== null && outerSignal !== undefined && outerSignal.aborted) + ) { + process.nextTick(abort) + } + + return ret +} + +function pipe(src, dst, finish, { end }) { + let ended = false + dst.on('close', () => { + if (!ended) { + // Finish if the destination closes before the source has completed. + finish(new ERR_STREAM_PREMATURE_CLOSE()) + } + }) + src.pipe(dst, { + end + }) + + if (end) { + // Compat. Before node v10.12.0 stdio used to throw an error so + // pipe() did/does not end() stdio destinations. + // Now they allow it but "secretly" don't close the underlying fd. + src.once('end', () => { + ended = true + dst.end() + }) + } else { + finish() + } + + eos( + src, + { + readable: true, + writable: false + }, + (err) => { + const rState = src._readableState + + if ( + err && + err.code === 'ERR_STREAM_PREMATURE_CLOSE' && + rState && + rState.ended && + !rState.errored && + !rState.errorEmitted + ) { + // Some readable streams will emit 'close' before 'end'. However, since + // this is on the readable side 'end' should still be emitted if the + // stream has been ended and no error emitted. This should be allowed in + // favor of backwards compatibility. Since the stream is piped to a + // destination this should not result in any observable difference. + // We don't need to check if this is a writable premature close since + // eos will only fail with premature close on the reading side for + // duplex streams. + src.once('end', finish).once('error', finish) + } else { + finish(err) + } + } + ) + return eos( + dst, + { + readable: false, + writable: true + }, + finish + ) +} + +module.exports = { + pipelineImpl, + pipeline +} diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/readable.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/readable.js new file mode 100644 index 0000000000000..299299d244629 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/readable.js @@ -0,0 +1,1339 @@ +/* replacement start */ +const process = require('process') +/* replacement end */ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +;('use strict') + +const { + ArrayPrototypeIndexOf, + NumberIsInteger, + NumberIsNaN, + NumberParseInt, + ObjectDefineProperties, + ObjectKeys, + ObjectSetPrototypeOf, + Promise, + SafeSet, + SymbolAsyncIterator, + Symbol +} = require('../../ours/primordials') + +module.exports = Readable +Readable.ReadableState = ReadableState + +const { EventEmitter: EE } = require('events') + +const { Stream, prependListener } = require('./legacy') + +const { Buffer } = require('buffer') + +const { addAbortSignal } = require('./add-abort-signal') + +const eos = require('./end-of-stream') + +let debug = require('../../ours/util').debuglog('stream', (fn) => { + debug = fn +}) + +const BufferList = require('./buffer_list') + +const destroyImpl = require('./destroy') + +const { getHighWaterMark, getDefaultHighWaterMark } = require('./state') + +const { + aggregateTwoErrors, + codes: { + ERR_INVALID_ARG_TYPE, + ERR_METHOD_NOT_IMPLEMENTED, + ERR_OUT_OF_RANGE, + ERR_STREAM_PUSH_AFTER_EOF, + ERR_STREAM_UNSHIFT_AFTER_END_EVENT + } +} = require('../../ours/errors') + +const { validateObject } = require('../validators') + +const kPaused = Symbol('kPaused') + +const { StringDecoder } = require('string_decoder') + +const from = require('./from') + +ObjectSetPrototypeOf(Readable.prototype, Stream.prototype) +ObjectSetPrototypeOf(Readable, Stream) + +const nop = () => {} + +const { errorOrDestroy } = destroyImpl + +function ReadableState(options, stream, isDuplex) { + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof require('./duplex') // Object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away. + + this.objectMode = !!(options && options.objectMode) + if (isDuplex) this.objectMode = this.objectMode || !!(options && options.readableObjectMode) // The point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + + this.highWaterMark = options + ? getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex) + : getDefaultHighWaterMark(false) // A linked list is used to store data chunks instead of an array because the + // linked list can remove elements from the beginning faster than + // array.shift(). + + this.buffer = new BufferList() + this.length = 0 + this.pipes = [] + this.flowing = null + this.ended = false + this.endEmitted = false + this.reading = false // Stream is still being constructed and cannot be + // destroyed until construction finished or failed. + // Async construction is opt in, therefore we start as + // constructed. + + this.constructed = true // A flag to be able to tell if the event 'readable'/'data' is emitted + // immediately, or on a later tick. We set this to true at first, because + // any actions that shouldn't happen until "later" should generally also + // not happen before the first read call. + + this.sync = true // Whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + + this.needReadable = false + this.emittedReadable = false + this.readableListening = false + this.resumeScheduled = false + this[kPaused] = null // True if the error was already emitted and should not be thrown again. + + this.errorEmitted = false // Should close be emitted on destroy. Defaults to true. + + this.emitClose = !options || options.emitClose !== false // Should .destroy() be called after 'end' (and potentially 'finish'). + + this.autoDestroy = !options || options.autoDestroy !== false // Has it been destroyed. + + this.destroyed = false // Indicates whether the stream has errored. When true no further + // _read calls, 'data' or 'readable' events should occur. This is needed + // since when autoDestroy is disabled we need a way to tell whether the + // stream has failed. + + this.errored = null // Indicates whether the stream has finished destroying. + + this.closed = false // True if close has been emitted or would have been emitted + // depending on emitClose. + + this.closeEmitted = false // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + + this.defaultEncoding = (options && options.defaultEncoding) || 'utf8' // Ref the piped dest which we need a drain event on it + // type: null | Writable | Set<Writable>. + + this.awaitDrainWriters = null + this.multiAwaitDrain = false // If true, a maybeReadMore has been scheduled. + + this.readingMore = false + this.dataEmitted = false + this.decoder = null + this.encoding = null + + if (options && options.encoding) { + this.decoder = new StringDecoder(options.encoding) + this.encoding = options.encoding + } +} + +function Readable(options) { + if (!(this instanceof Readable)) return new Readable(options) // Checking for a Stream.Duplex instance is faster here instead of inside + // the ReadableState constructor, at least with V8 6.5. + + const isDuplex = this instanceof require('./duplex') + + this._readableState = new ReadableState(options, this, isDuplex) + + if (options) { + if (typeof options.read === 'function') this._read = options.read + if (typeof options.destroy === 'function') this._destroy = options.destroy + if (typeof options.construct === 'function') this._construct = options.construct + if (options.signal && !isDuplex) addAbortSignal(options.signal, this) + } + + Stream.call(this, options) + destroyImpl.construct(this, () => { + if (this._readableState.needReadable) { + maybeReadMore(this, this._readableState) + } + }) +} + +Readable.prototype.destroy = destroyImpl.destroy +Readable.prototype._undestroy = destroyImpl.undestroy + +Readable.prototype._destroy = function (err, cb) { + cb(err) +} + +Readable.prototype[EE.captureRejectionSymbol] = function (err) { + this.destroy(err) +} // Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. + +Readable.prototype.push = function (chunk, encoding) { + return readableAddChunk(this, chunk, encoding, false) +} // Unshift should *always* be something directly out of read(). + +Readable.prototype.unshift = function (chunk, encoding) { + return readableAddChunk(this, chunk, encoding, true) +} + +function readableAddChunk(stream, chunk, encoding, addToFront) { + debug('readableAddChunk', chunk) + const state = stream._readableState + let err + + if (!state.objectMode) { + if (typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding + + if (state.encoding !== encoding) { + if (addToFront && state.encoding) { + // When unshifting, if state.encoding is set, we have to save + // the string in the BufferList with the state encoding. + chunk = Buffer.from(chunk, encoding).toString(state.encoding) + } else { + chunk = Buffer.from(chunk, encoding) + encoding = '' + } + } + } else if (chunk instanceof Buffer) { + encoding = '' + } else if (Stream._isUint8Array(chunk)) { + chunk = Stream._uint8ArrayToBuffer(chunk) + encoding = '' + } else if (chunk != null) { + err = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk) + } + } + + if (err) { + errorOrDestroy(stream, err) + } else if (chunk === null) { + state.reading = false + onEofChunk(stream, state) + } else if (state.objectMode || (chunk && chunk.length > 0)) { + if (addToFront) { + if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT()) + else if (state.destroyed || state.errored) return false + else addChunk(stream, state, chunk, true) + } else if (state.ended) { + errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()) + } else if (state.destroyed || state.errored) { + return false + } else { + state.reading = false + + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk) + if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false) + else maybeReadMore(stream, state) + } else { + addChunk(stream, state, chunk, false) + } + } + } else if (!addToFront) { + state.reading = false + maybeReadMore(stream, state) + } // We can push more data if we are below the highWaterMark. + // Also, if we have no data yet, we can stand some more bytes. + // This is to work around cases where hwm=0, such as the repl. + + return !state.ended && (state.length < state.highWaterMark || state.length === 0) +} + +function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync && stream.listenerCount('data') > 0) { + // Use the guard to avoid creating `Set()` repeatedly + // when we have multiple pipes. + if (state.multiAwaitDrain) { + state.awaitDrainWriters.clear() + } else { + state.awaitDrainWriters = null + } + + state.dataEmitted = true + stream.emit('data', chunk) + } else { + // Update the buffer info. + state.length += state.objectMode ? 1 : chunk.length + if (addToFront) state.buffer.unshift(chunk) + else state.buffer.push(chunk) + if (state.needReadable) emitReadable(stream) + } + + maybeReadMore(stream, state) +} + +Readable.prototype.isPaused = function () { + const state = this._readableState + return state[kPaused] === true || state.flowing === false +} // Backwards compatibility. + +Readable.prototype.setEncoding = function (enc) { + const decoder = new StringDecoder(enc) + this._readableState.decoder = decoder // If setEncoding(null), decoder.encoding equals utf8. + + this._readableState.encoding = this._readableState.decoder.encoding + const buffer = this._readableState.buffer // Iterate over current buffer to convert already stored Buffers: + + let content = '' + + for (const data of buffer) { + content += decoder.write(data) + } + + buffer.clear() + if (content !== '') buffer.push(content) + this._readableState.length = content.length + return this +} // Don't raise the hwm > 1GB. + +const MAX_HWM = 0x40000000 + +function computeNewHighWaterMark(n) { + if (n > MAX_HWM) { + throw new ERR_OUT_OF_RANGE('size', '<= 1GiB', n) + } else { + // Get the next highest power of 2 to prevent increasing hwm excessively in + // tiny amounts. + n-- + n |= n >>> 1 + n |= n >>> 2 + n |= n >>> 4 + n |= n >>> 8 + n |= n >>> 16 + n++ + } + + return n +} // This function is designed to be inlinable, so please take care when making +// changes to the function body. + +function howMuchToRead(n, state) { + if (n <= 0 || (state.length === 0 && state.ended)) return 0 + if (state.objectMode) return 1 + + if (NumberIsNaN(n)) { + // Only flow one buffer at a time. + if (state.flowing && state.length) return state.buffer.first().length + return state.length + } + + if (n <= state.length) return n + return state.ended ? state.length : 0 +} // You can override either this method, or the async _read(n) below. + +Readable.prototype.read = function (n) { + debug('read', n) // Same as parseInt(undefined, 10), however V8 7.3 performance regressed + // in this scenario, so we are doing it manually. + + if (n === undefined) { + n = NaN + } else if (!NumberIsInteger(n)) { + n = NumberParseInt(n, 10) + } + + const state = this._readableState + const nOrig = n // If we're asking for more than the current hwm, then raise the hwm. + + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n) + if (n !== 0) state.emittedReadable = false // If we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + + if ( + n === 0 && + state.needReadable && + ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended) + ) { + debug('read: emitReadable', state.length, state.ended) + if (state.length === 0 && state.ended) endReadable(this) + else emitReadable(this) + return null + } + + n = howMuchToRead(n, state) // If we've ended, and we're now clear, then finish it up. + + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this) + return null + } // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + // if we need a readable event, then we need to do some reading. + + let doRead = state.needReadable + debug('need readable', doRead) // If we currently have less than the highWaterMark, then also read some. + + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true + debug('length less than watermark', doRead) + } // However, if we've ended, then there's no point, if we're already + // reading, then it's unnecessary, if we're constructing we have to wait, + // and if we're destroyed or errored, then it's not allowed, + + if (state.ended || state.reading || state.destroyed || state.errored || !state.constructed) { + doRead = false + debug('reading, ended or constructing', doRead) + } else if (doRead) { + debug('do read') + state.reading = true + state.sync = true // If the length is currently zero, then we *need* a readable event. + + if (state.length === 0) state.needReadable = true // Call internal read method + + try { + this._read(state.highWaterMark) + } catch (err) { + errorOrDestroy(this, err) + } + + state.sync = false // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + + if (!state.reading) n = howMuchToRead(nOrig, state) + } + + let ret + if (n > 0) ret = fromList(n, state) + else ret = null + + if (ret === null) { + state.needReadable = state.length <= state.highWaterMark + n = 0 + } else { + state.length -= n + + if (state.multiAwaitDrain) { + state.awaitDrainWriters.clear() + } else { + state.awaitDrainWriters = null + } + } + + if (state.length === 0) { + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (!state.ended) state.needReadable = true // If we tried to read() past the EOF, then emit end on the next tick. + + if (nOrig !== n && state.ended) endReadable(this) + } + + if (ret !== null && !state.errorEmitted && !state.closeEmitted) { + state.dataEmitted = true + this.emit('data', ret) + } + + return ret +} + +function onEofChunk(stream, state) { + debug('onEofChunk') + if (state.ended) return + + if (state.decoder) { + const chunk = state.decoder.end() + + if (chunk && chunk.length) { + state.buffer.push(chunk) + state.length += state.objectMode ? 1 : chunk.length + } + } + + state.ended = true + + if (state.sync) { + // If we are sync, wait until next tick to emit the data. + // Otherwise we risk emitting data in the flow() + // the readable code triggers during a read() call. + emitReadable(stream) + } else { + // Emit 'readable' now to make sure it gets picked up. + state.needReadable = false + state.emittedReadable = true // We have to emit readable now that we are EOF. Modules + // in the ecosystem (e.g. dicer) rely on this event being sync. + + emitReadable_(stream) + } +} // Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. + +function emitReadable(stream) { + const state = stream._readableState + debug('emitReadable', state.needReadable, state.emittedReadable) + state.needReadable = false + + if (!state.emittedReadable) { + debug('emitReadable', state.flowing) + state.emittedReadable = true + process.nextTick(emitReadable_, stream) + } +} + +function emitReadable_(stream) { + const state = stream._readableState + debug('emitReadable_', state.destroyed, state.length, state.ended) + + if (!state.destroyed && !state.errored && (state.length || state.ended)) { + stream.emit('readable') + state.emittedReadable = false + } // The stream needs another readable event if: + // 1. It is not flowing, as the flow mechanism will take + // care of it. + // 2. It is not ended. + // 3. It is below the highWaterMark, so we can schedule + // another readable later. + + state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark + flow(stream) +} // At this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. + +function maybeReadMore(stream, state) { + if (!state.readingMore && state.constructed) { + state.readingMore = true + process.nextTick(maybeReadMore_, stream, state) + } +} + +function maybeReadMore_(stream, state) { + // Attempt to read more data if we should. + // + // The conditions for reading more data are (one of): + // - Not enough data buffered (state.length < state.highWaterMark). The loop + // is responsible for filling the buffer with enough data if such data + // is available. If highWaterMark is 0 and we are not in the flowing mode + // we should _not_ attempt to buffer any extra data. We'll get more data + // when the stream consumer calls read() instead. + // - No data in the buffer, and the stream is in flowing mode. In this mode + // the loop below is responsible for ensuring read() is called. Failing to + // call read here would abort the flow and there's no other mechanism for + // continuing the flow if the stream consumer has just subscribed to the + // 'data' event. + // + // In addition to the above conditions to keep reading data, the following + // conditions prevent the data from being read: + // - The stream has ended (state.ended). + // - There is already a pending 'read' operation (state.reading). This is a + // case where the stream has called the implementation defined _read() + // method, but they are processing the call asynchronously and have _not_ + // called push() with new data. In this case we skip performing more + // read()s. The execution ends in this method again after the _read() ends + // up calling push() with more data. + while ( + !state.reading && + !state.ended && + (state.length < state.highWaterMark || (state.flowing && state.length === 0)) + ) { + const len = state.length + debug('maybeReadMore read 0') + stream.read(0) + if (len === state.length) + // Didn't get any data, stop spinning. + break + } + + state.readingMore = false +} // Abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. + +Readable.prototype._read = function (n) { + throw new ERR_METHOD_NOT_IMPLEMENTED('_read()') +} + +Readable.prototype.pipe = function (dest, pipeOpts) { + const src = this + const state = this._readableState + + if (state.pipes.length === 1) { + if (!state.multiAwaitDrain) { + state.multiAwaitDrain = true + state.awaitDrainWriters = new SafeSet(state.awaitDrainWriters ? [state.awaitDrainWriters] : []) + } + } + + state.pipes.push(dest) + debug('pipe count=%d opts=%j', state.pipes.length, pipeOpts) + const doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr + const endFn = doEnd ? onend : unpipe + if (state.endEmitted) process.nextTick(endFn) + else src.once('end', endFn) + dest.on('unpipe', onunpipe) + + function onunpipe(readable, unpipeInfo) { + debug('onunpipe') + + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true + cleanup() + } + } + } + + function onend() { + debug('onend') + dest.end() + } + + let ondrain + let cleanedUp = false + + function cleanup() { + debug('cleanup') // Cleanup event handlers once the pipe is broken. + + dest.removeListener('close', onclose) + dest.removeListener('finish', onfinish) + + if (ondrain) { + dest.removeListener('drain', ondrain) + } + + dest.removeListener('error', onerror) + dest.removeListener('unpipe', onunpipe) + src.removeListener('end', onend) + src.removeListener('end', unpipe) + src.removeListener('data', ondata) + cleanedUp = true // If the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + + if (ondrain && state.awaitDrainWriters && (!dest._writableState || dest._writableState.needDrain)) ondrain() + } + + function pause() { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if (!cleanedUp) { + if (state.pipes.length === 1 && state.pipes[0] === dest) { + debug('false write response, pause', 0) + state.awaitDrainWriters = dest + state.multiAwaitDrain = false + } else if (state.pipes.length > 1 && state.pipes.includes(dest)) { + debug('false write response, pause', state.awaitDrainWriters.size) + state.awaitDrainWriters.add(dest) + } + + src.pause() + } + + if (!ondrain) { + // When the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + ondrain = pipeOnDrain(src, dest) + dest.on('drain', ondrain) + } + } + + src.on('data', ondata) + + function ondata(chunk) { + debug('ondata') + const ret = dest.write(chunk) + debug('dest.write', ret) + + if (ret === false) { + pause() + } + } // If the dest has an error, then stop piping into it. + // However, don't suppress the throwing behavior for this. + + function onerror(er) { + debug('onerror', er) + unpipe() + dest.removeListener('error', onerror) + + if (dest.listenerCount('error') === 0) { + const s = dest._writableState || dest._readableState + + if (s && !s.errorEmitted) { + // User incorrectly emitted 'error' directly on the stream. + errorOrDestroy(dest, er) + } else { + dest.emit('error', er) + } + } + } // Make sure our error handler is attached before userland ones. + + prependListener(dest, 'error', onerror) // Both close and finish should trigger unpipe, but only once. + + function onclose() { + dest.removeListener('finish', onfinish) + unpipe() + } + + dest.once('close', onclose) + + function onfinish() { + debug('onfinish') + dest.removeListener('close', onclose) + unpipe() + } + + dest.once('finish', onfinish) + + function unpipe() { + debug('unpipe') + src.unpipe(dest) + } // Tell the dest that it's being piped to. + + dest.emit('pipe', src) // Start the flow if it hasn't been started already. + + if (dest.writableNeedDrain === true) { + if (state.flowing) { + pause() + } + } else if (!state.flowing) { + debug('pipe resume') + src.resume() + } + + return dest +} + +function pipeOnDrain(src, dest) { + return function pipeOnDrainFunctionResult() { + const state = src._readableState // `ondrain` will call directly, + // `this` maybe not a reference to dest, + // so we use the real dest here. + + if (state.awaitDrainWriters === dest) { + debug('pipeOnDrain', 1) + state.awaitDrainWriters = null + } else if (state.multiAwaitDrain) { + debug('pipeOnDrain', state.awaitDrainWriters.size) + state.awaitDrainWriters.delete(dest) + } + + if ((!state.awaitDrainWriters || state.awaitDrainWriters.size === 0) && src.listenerCount('data')) { + src.resume() + } + } +} + +Readable.prototype.unpipe = function (dest) { + const state = this._readableState + const unpipeInfo = { + hasUnpiped: false + } // If we're not piping anywhere, then do nothing. + + if (state.pipes.length === 0) return this + + if (!dest) { + // remove all. + const dests = state.pipes + state.pipes = [] + this.pause() + + for (let i = 0; i < dests.length; i++) + dests[i].emit('unpipe', this, { + hasUnpiped: false + }) + + return this + } // Try to find the right one. + + const index = ArrayPrototypeIndexOf(state.pipes, dest) + if (index === -1) return this + state.pipes.splice(index, 1) + if (state.pipes.length === 0) this.pause() + dest.emit('unpipe', this, unpipeInfo) + return this +} // Set up data events if they are asked for +// Ensure readable listeners eventually get something. + +Readable.prototype.on = function (ev, fn) { + const res = Stream.prototype.on.call(this, ev, fn) + const state = this._readableState + + if (ev === 'data') { + // Update readableListening so that resume() may be a no-op + // a few lines down. This is needed to support once('readable'). + state.readableListening = this.listenerCount('readable') > 0 // Try start flowing on next tick if stream isn't explicitly paused. + + if (state.flowing !== false) this.resume() + } else if (ev === 'readable') { + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true + state.flowing = false + state.emittedReadable = false + debug('on readable', state.length, state.reading) + + if (state.length) { + emitReadable(this) + } else if (!state.reading) { + process.nextTick(nReadingNextTick, this) + } + } + } + + return res +} + +Readable.prototype.addListener = Readable.prototype.on + +Readable.prototype.removeListener = function (ev, fn) { + const res = Stream.prototype.removeListener.call(this, ev, fn) + + if (ev === 'readable') { + // We need to check if there is someone still listening to + // readable and reset the state. However this needs to happen + // after readable has been emitted but before I/O (nextTick) to + // support once('readable', fn) cycles. This means that calling + // resume within the same tick will have no + // effect. + process.nextTick(updateReadableListening, this) + } + + return res +} + +Readable.prototype.off = Readable.prototype.removeListener + +Readable.prototype.removeAllListeners = function (ev) { + const res = Stream.prototype.removeAllListeners.apply(this, arguments) + + if (ev === 'readable' || ev === undefined) { + // We need to check if there is someone still listening to + // readable and reset the state. However this needs to happen + // after readable has been emitted but before I/O (nextTick) to + // support once('readable', fn) cycles. This means that calling + // resume within the same tick will have no + // effect. + process.nextTick(updateReadableListening, this) + } + + return res +} + +function updateReadableListening(self) { + const state = self._readableState + state.readableListening = self.listenerCount('readable') > 0 + + if (state.resumeScheduled && state[kPaused] === false) { + // Flowing needs to be set to true now, otherwise + // the upcoming resume will not flow. + state.flowing = true // Crude way to check if we should resume. + } else if (self.listenerCount('data') > 0) { + self.resume() + } else if (!state.readableListening) { + state.flowing = null + } +} + +function nReadingNextTick(self) { + debug('readable nexttick read 0') + self.read(0) +} // pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. + +Readable.prototype.resume = function () { + const state = this._readableState + + if (!state.flowing) { + debug('resume') // We flow only if there is no one listening + // for readable, but we still have to call + // resume(). + + state.flowing = !state.readableListening + resume(this, state) + } + + state[kPaused] = false + return this +} + +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true + process.nextTick(resume_, stream, state) + } +} + +function resume_(stream, state) { + debug('resume', state.reading) + + if (!state.reading) { + stream.read(0) + } + + state.resumeScheduled = false + stream.emit('resume') + flow(stream) + if (state.flowing && !state.reading) stream.read(0) +} + +Readable.prototype.pause = function () { + debug('call pause flowing=%j', this._readableState.flowing) + + if (this._readableState.flowing !== false) { + debug('pause') + this._readableState.flowing = false + this.emit('pause') + } + + this._readableState[kPaused] = true + return this +} + +function flow(stream) { + const state = stream._readableState + debug('flow', state.flowing) + + while (state.flowing && stream.read() !== null); +} // Wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. + +Readable.prototype.wrap = function (stream) { + let paused = false // TODO (ronag): Should this.destroy(err) emit + // 'error' on the wrapped stream? Would require + // a static factory method, e.g. Readable.wrap(stream). + + stream.on('data', (chunk) => { + if (!this.push(chunk) && stream.pause) { + paused = true + stream.pause() + } + }) + stream.on('end', () => { + this.push(null) + }) + stream.on('error', (err) => { + errorOrDestroy(this, err) + }) + stream.on('close', () => { + this.destroy() + }) + stream.on('destroy', () => { + this.destroy() + }) + + this._read = () => { + if (paused && stream.resume) { + paused = false + stream.resume() + } + } // Proxy all the other methods. Important when wrapping filters and duplexes. + + const streamKeys = ObjectKeys(stream) + + for (let j = 1; j < streamKeys.length; j++) { + const i = streamKeys[j] + + if (this[i] === undefined && typeof stream[i] === 'function') { + this[i] = stream[i].bind(stream) + } + } + + return this +} + +Readable.prototype[SymbolAsyncIterator] = function () { + return streamToAsyncIterator(this) +} + +Readable.prototype.iterator = function (options) { + if (options !== undefined) { + validateObject(options, 'options') + } + + return streamToAsyncIterator(this, options) +} + +function streamToAsyncIterator(stream, options) { + if (typeof stream.read !== 'function') { + stream = Readable.wrap(stream, { + objectMode: true + }) + } + + const iter = createAsyncIterator(stream, options) + iter.stream = stream + return iter +} + +async function* createAsyncIterator(stream, options) { + let callback = nop + + function next(resolve) { + if (this === stream) { + callback() + callback = nop + } else { + callback = resolve + } + } + + stream.on('readable', next) + let error + const cleanup = eos( + stream, + { + writable: false + }, + (err) => { + error = err ? aggregateTwoErrors(error, err) : null + callback() + callback = nop + } + ) + + try { + while (true) { + const chunk = stream.destroyed ? null : stream.read() + + if (chunk !== null) { + yield chunk + } else if (error) { + throw error + } else if (error === null) { + return + } else { + await new Promise(next) + } + } + } catch (err) { + error = aggregateTwoErrors(error, err) + throw error + } finally { + if ( + (error || (options === null || options === undefined ? undefined : options.destroyOnReturn) !== false) && + (error === undefined || stream._readableState.autoDestroy) + ) { + destroyImpl.destroyer(stream, null) + } else { + stream.off('readable', next) + cleanup() + } + } +} // Making it explicit these properties are not enumerable +// because otherwise some prototype manipulation in +// userland will fail. + +ObjectDefineProperties(Readable.prototype, { + readable: { + __proto__: null, + + get() { + const r = this._readableState // r.readable === false means that this is part of a Duplex stream + // where the readable side was disabled upon construction. + // Compat. The user might manually disable readable side through + // deprecated setter. + + return !!r && r.readable !== false && !r.destroyed && !r.errorEmitted && !r.endEmitted + }, + + set(val) { + // Backwards compat. + if (this._readableState) { + this._readableState.readable = !!val + } + } + }, + readableDidRead: { + __proto__: null, + enumerable: false, + get: function () { + return this._readableState.dataEmitted + } + }, + readableAborted: { + __proto__: null, + enumerable: false, + get: function () { + return !!( + this._readableState.readable !== false && + (this._readableState.destroyed || this._readableState.errored) && + !this._readableState.endEmitted + ) + } + }, + readableHighWaterMark: { + __proto__: null, + enumerable: false, + get: function () { + return this._readableState.highWaterMark + } + }, + readableBuffer: { + __proto__: null, + enumerable: false, + get: function () { + return this._readableState && this._readableState.buffer + } + }, + readableFlowing: { + __proto__: null, + enumerable: false, + get: function () { + return this._readableState.flowing + }, + set: function (state) { + if (this._readableState) { + this._readableState.flowing = state + } + } + }, + readableLength: { + __proto__: null, + enumerable: false, + + get() { + return this._readableState.length + } + }, + readableObjectMode: { + __proto__: null, + enumerable: false, + + get() { + return this._readableState ? this._readableState.objectMode : false + } + }, + readableEncoding: { + __proto__: null, + enumerable: false, + + get() { + return this._readableState ? this._readableState.encoding : null + } + }, + errored: { + __proto__: null, + enumerable: false, + + get() { + return this._readableState ? this._readableState.errored : null + } + }, + closed: { + __proto__: null, + + get() { + return this._readableState ? this._readableState.closed : false + } + }, + destroyed: { + __proto__: null, + enumerable: false, + + get() { + return this._readableState ? this._readableState.destroyed : false + }, + + set(value) { + // We ignore the value if the stream + // has not been initialized yet. + if (!this._readableState) { + return + } // Backward compatibility, the user is explicitly + // managing destroyed. + + this._readableState.destroyed = value + } + }, + readableEnded: { + __proto__: null, + enumerable: false, + + get() { + return this._readableState ? this._readableState.endEmitted : false + } + } +}) +ObjectDefineProperties(ReadableState.prototype, { + // Legacy getter for `pipesCount`. + pipesCount: { + __proto__: null, + + get() { + return this.pipes.length + } + }, + // Legacy property for `paused`. + paused: { + __proto__: null, + + get() { + return this[kPaused] !== false + }, + + set(value) { + this[kPaused] = !!value + } + } +}) // Exposed for testing purposes only. + +Readable._fromList = fromList // Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. + +function fromList(n, state) { + // nothing buffered. + if (state.length === 0) return null + let ret + if (state.objectMode) ret = state.buffer.shift() + else if (!n || n >= state.length) { + // Read it all, truncate the list. + if (state.decoder) ret = state.buffer.join('') + else if (state.buffer.length === 1) ret = state.buffer.first() + else ret = state.buffer.concat(state.length) + state.buffer.clear() + } else { + // read part of list. + ret = state.buffer.consume(n, state.decoder) + } + return ret +} + +function endReadable(stream) { + const state = stream._readableState + debug('endReadable', state.endEmitted) + + if (!state.endEmitted) { + state.ended = true + process.nextTick(endReadableNT, state, stream) + } +} + +function endReadableNT(state, stream) { + debug('endReadableNT', state.endEmitted, state.length) // Check that we didn't get one last unshift. + + if (!state.errored && !state.closeEmitted && !state.endEmitted && state.length === 0) { + state.endEmitted = true + stream.emit('end') + + if (stream.writable && stream.allowHalfOpen === false) { + process.nextTick(endWritableNT, stream) + } else if (state.autoDestroy) { + // In case of duplex streams we need a way to detect + // if the writable side is ready for autoDestroy as well. + const wState = stream._writableState + const autoDestroy = + !wState || + (wState.autoDestroy && // We don't expect the writable to ever 'finish' + // if writable is explicitly set to false. + (wState.finished || wState.writable === false)) + + if (autoDestroy) { + stream.destroy() + } + } + } +} + +function endWritableNT(stream) { + const writable = stream.writable && !stream.writableEnded && !stream.destroyed + + if (writable) { + stream.end() + } +} + +Readable.from = function (iterable, opts) { + return from(Readable, iterable, opts) +} + +let webStreamsAdapters // Lazy to avoid circular references + +function lazyWebStreams() { + if (webStreamsAdapters === undefined) webStreamsAdapters = {} + return webStreamsAdapters +} + +Readable.fromWeb = function (readableStream, options) { + return lazyWebStreams().newStreamReadableFromReadableStream(readableStream, options) +} + +Readable.toWeb = function (streamReadable, options) { + return lazyWebStreams().newReadableStreamFromStreamReadable(streamReadable, options) +} + +Readable.wrap = function (src, options) { + var _ref, _src$readableObjectMo + + return new Readable({ + objectMode: + (_ref = + (_src$readableObjectMo = src.readableObjectMode) !== null && _src$readableObjectMo !== undefined + ? _src$readableObjectMo + : src.objectMode) !== null && _ref !== undefined + ? _ref + : true, + ...options, + + destroy(err, callback) { + destroyImpl.destroyer(src, err) + callback(err) + } + }).wrap(src) +} diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/state.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/state.js new file mode 100644 index 0000000000000..e7fcebdde9de1 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/state.js @@ -0,0 +1,33 @@ +'use strict' + +const { MathFloor, NumberIsInteger } = require('../../ours/primordials') + +const { ERR_INVALID_ARG_VALUE } = require('../../ours/errors').codes + +function highWaterMarkFrom(options, isDuplex, duplexKey) { + return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null +} + +function getDefaultHighWaterMark(objectMode) { + return objectMode ? 16 : 16 * 1024 +} + +function getHighWaterMark(state, options, duplexKey, isDuplex) { + const hwm = highWaterMarkFrom(options, isDuplex, duplexKey) + + if (hwm != null) { + if (!NumberIsInteger(hwm) || hwm < 0) { + const name = isDuplex ? `options.${duplexKey}` : 'options.highWaterMark' + throw new ERR_INVALID_ARG_VALUE(name, hwm) + } + + return MathFloor(hwm) + } // Default value + + return getDefaultHighWaterMark(state.objectMode) +} + +module.exports = { + getHighWaterMark, + getDefaultHighWaterMark +} diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/transform.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/transform.js new file mode 100644 index 0000000000000..18601011e03f4 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/transform.js @@ -0,0 +1,196 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. +'use strict' + +const { ObjectSetPrototypeOf, Symbol } = require('../../ours/primordials') + +module.exports = Transform + +const { ERR_METHOD_NOT_IMPLEMENTED } = require('../../ours/errors').codes + +const Duplex = require('./duplex') + +const { getHighWaterMark } = require('./state') + +ObjectSetPrototypeOf(Transform.prototype, Duplex.prototype) +ObjectSetPrototypeOf(Transform, Duplex) +const kCallback = Symbol('kCallback') + +function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options) // TODO (ronag): This should preferably always be + // applied but would be semver-major. Or even better; + // make Transform a Readable with the Writable interface. + + const readableHighWaterMark = options ? getHighWaterMark(this, options, 'readableHighWaterMark', true) : null + + if (readableHighWaterMark === 0) { + // A Duplex will buffer both on the writable and readable side while + // a Transform just wants to buffer hwm number of elements. To avoid + // buffering twice we disable buffering on the writable side. + options = { + ...options, + highWaterMark: null, + readableHighWaterMark, + // TODO (ronag): 0 is not optimal since we have + // a "bug" where we check needDrain before calling _write and not after. + // Refs: https://github.com/nodejs/node/pull/32887 + // Refs: https://github.com/nodejs/node/pull/35941 + writableHighWaterMark: options.writableHighWaterMark || 0 + } + } + + Duplex.call(this, options) // We have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + + this._readableState.sync = false + this[kCallback] = null + + if (options) { + if (typeof options.transform === 'function') this._transform = options.transform + if (typeof options.flush === 'function') this._flush = options.flush + } // When the writable side finishes, then flush out anything remaining. + // Backwards compat. Some Transform streams incorrectly implement _final + // instead of or in addition to _flush. By using 'prefinish' instead of + // implementing _final we continue supporting this unfortunate use case. + + this.on('prefinish', prefinish) +} + +function final(cb) { + if (typeof this._flush === 'function' && !this.destroyed) { + this._flush((er, data) => { + if (er) { + if (cb) { + cb(er) + } else { + this.destroy(er) + } + + return + } + + if (data != null) { + this.push(data) + } + + this.push(null) + + if (cb) { + cb() + } + }) + } else { + this.push(null) + + if (cb) { + cb() + } + } +} + +function prefinish() { + if (this._final !== final) { + final.call(this) + } +} + +Transform.prototype._final = final + +Transform.prototype._transform = function (chunk, encoding, callback) { + throw new ERR_METHOD_NOT_IMPLEMENTED('_transform()') +} + +Transform.prototype._write = function (chunk, encoding, callback) { + const rState = this._readableState + const wState = this._writableState + const length = rState.length + + this._transform(chunk, encoding, (err, val) => { + if (err) { + callback(err) + return + } + + if (val != null) { + this.push(val) + } + + if ( + wState.ended || // Backwards compat. + length === rState.length || // Backwards compat. + rState.length < rState.highWaterMark + ) { + callback() + } else { + this[kCallback] = callback + } + }) +} + +Transform.prototype._read = function () { + if (this[kCallback]) { + const callback = this[kCallback] + this[kCallback] = null + callback() + } +} diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/utils.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/utils.js new file mode 100644 index 0000000000000..b1aa7d81705c0 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/utils.js @@ -0,0 +1,328 @@ +'use strict' + +const { Symbol, SymbolAsyncIterator, SymbolIterator } = require('../../ours/primordials') + +const kDestroyed = Symbol('kDestroyed') +const kIsErrored = Symbol('kIsErrored') +const kIsReadable = Symbol('kIsReadable') +const kIsDisturbed = Symbol('kIsDisturbed') + +function isReadableNodeStream(obj, strict = false) { + var _obj$_readableState + + return !!( + ( + obj && + typeof obj.pipe === 'function' && + typeof obj.on === 'function' && + (!strict || (typeof obj.pause === 'function' && typeof obj.resume === 'function')) && + (!obj._writableState || + ((_obj$_readableState = obj._readableState) === null || _obj$_readableState === undefined + ? undefined + : _obj$_readableState.readable) !== false) && // Duplex + (!obj._writableState || obj._readableState) + ) // Writable has .pipe. + ) +} + +function isWritableNodeStream(obj) { + var _obj$_writableState + + return !!( + ( + obj && + typeof obj.write === 'function' && + typeof obj.on === 'function' && + (!obj._readableState || + ((_obj$_writableState = obj._writableState) === null || _obj$_writableState === undefined + ? undefined + : _obj$_writableState.writable) !== false) + ) // Duplex + ) +} + +function isDuplexNodeStream(obj) { + return !!( + obj && + typeof obj.pipe === 'function' && + obj._readableState && + typeof obj.on === 'function' && + typeof obj.write === 'function' + ) +} + +function isNodeStream(obj) { + return ( + obj && + (obj._readableState || + obj._writableState || + (typeof obj.write === 'function' && typeof obj.on === 'function') || + (typeof obj.pipe === 'function' && typeof obj.on === 'function')) + ) +} + +function isIterable(obj, isAsync) { + if (obj == null) return false + if (isAsync === true) return typeof obj[SymbolAsyncIterator] === 'function' + if (isAsync === false) return typeof obj[SymbolIterator] === 'function' + return typeof obj[SymbolAsyncIterator] === 'function' || typeof obj[SymbolIterator] === 'function' +} + +function isDestroyed(stream) { + if (!isNodeStream(stream)) return null + const wState = stream._writableState + const rState = stream._readableState + const state = wState || rState + return !!(stream.destroyed || stream[kDestroyed] || (state !== null && state !== undefined && state.destroyed)) +} // Have been end():d. + +function isWritableEnded(stream) { + if (!isWritableNodeStream(stream)) return null + if (stream.writableEnded === true) return true + const wState = stream._writableState + if (wState !== null && wState !== undefined && wState.errored) return false + if (typeof (wState === null || wState === undefined ? undefined : wState.ended) !== 'boolean') return null + return wState.ended +} // Have emitted 'finish'. + +function isWritableFinished(stream, strict) { + if (!isWritableNodeStream(stream)) return null + if (stream.writableFinished === true) return true + const wState = stream._writableState + if (wState !== null && wState !== undefined && wState.errored) return false + if (typeof (wState === null || wState === undefined ? undefined : wState.finished) !== 'boolean') return null + return !!(wState.finished || (strict === false && wState.ended === true && wState.length === 0)) +} // Have been push(null):d. + +function isReadableEnded(stream) { + if (!isReadableNodeStream(stream)) return null + if (stream.readableEnded === true) return true + const rState = stream._readableState + if (!rState || rState.errored) return false + if (typeof (rState === null || rState === undefined ? undefined : rState.ended) !== 'boolean') return null + return rState.ended +} // Have emitted 'end'. + +function isReadableFinished(stream, strict) { + if (!isReadableNodeStream(stream)) return null + const rState = stream._readableState + if (rState !== null && rState !== undefined && rState.errored) return false + if (typeof (rState === null || rState === undefined ? undefined : rState.endEmitted) !== 'boolean') return null + return !!(rState.endEmitted || (strict === false && rState.ended === true && rState.length === 0)) +} + +function isReadable(stream) { + if (stream && stream[kIsReadable] != null) return stream[kIsReadable] + if (typeof (stream === null || stream === undefined ? undefined : stream.readable) !== 'boolean') return null + if (isDestroyed(stream)) return false + return isReadableNodeStream(stream) && stream.readable && !isReadableFinished(stream) +} + +function isWritable(stream) { + if (typeof (stream === null || stream === undefined ? undefined : stream.writable) !== 'boolean') return null + if (isDestroyed(stream)) return false + return isWritableNodeStream(stream) && stream.writable && !isWritableEnded(stream) +} + +function isFinished(stream, opts) { + if (!isNodeStream(stream)) { + return null + } + + if (isDestroyed(stream)) { + return true + } + + if ((opts === null || opts === undefined ? undefined : opts.readable) !== false && isReadable(stream)) { + return false + } + + if ((opts === null || opts === undefined ? undefined : opts.writable) !== false && isWritable(stream)) { + return false + } + + return true +} + +function isWritableErrored(stream) { + var _stream$_writableStat, _stream$_writableStat2 + + if (!isNodeStream(stream)) { + return null + } + + if (stream.writableErrored) { + return stream.writableErrored + } + + return (_stream$_writableStat = + (_stream$_writableStat2 = stream._writableState) === null || _stream$_writableStat2 === undefined + ? undefined + : _stream$_writableStat2.errored) !== null && _stream$_writableStat !== undefined + ? _stream$_writableStat + : null +} + +function isReadableErrored(stream) { + var _stream$_readableStat, _stream$_readableStat2 + + if (!isNodeStream(stream)) { + return null + } + + if (stream.readableErrored) { + return stream.readableErrored + } + + return (_stream$_readableStat = + (_stream$_readableStat2 = stream._readableState) === null || _stream$_readableStat2 === undefined + ? undefined + : _stream$_readableStat2.errored) !== null && _stream$_readableStat !== undefined + ? _stream$_readableStat + : null +} + +function isClosed(stream) { + if (!isNodeStream(stream)) { + return null + } + + if (typeof stream.closed === 'boolean') { + return stream.closed + } + + const wState = stream._writableState + const rState = stream._readableState + + if ( + typeof (wState === null || wState === undefined ? undefined : wState.closed) === 'boolean' || + typeof (rState === null || rState === undefined ? undefined : rState.closed) === 'boolean' + ) { + return ( + (wState === null || wState === undefined ? undefined : wState.closed) || + (rState === null || rState === undefined ? undefined : rState.closed) + ) + } + + if (typeof stream._closed === 'boolean' && isOutgoingMessage(stream)) { + return stream._closed + } + + return null +} + +function isOutgoingMessage(stream) { + return ( + typeof stream._closed === 'boolean' && + typeof stream._defaultKeepAlive === 'boolean' && + typeof stream._removedConnection === 'boolean' && + typeof stream._removedContLen === 'boolean' + ) +} + +function isServerResponse(stream) { + return typeof stream._sent100 === 'boolean' && isOutgoingMessage(stream) +} + +function isServerRequest(stream) { + var _stream$req + + return ( + typeof stream._consuming === 'boolean' && + typeof stream._dumped === 'boolean' && + ((_stream$req = stream.req) === null || _stream$req === undefined ? undefined : _stream$req.upgradeOrConnect) === + undefined + ) +} + +function willEmitClose(stream) { + if (!isNodeStream(stream)) return null + const wState = stream._writableState + const rState = stream._readableState + const state = wState || rState + return ( + (!state && isServerResponse(stream)) || !!(state && state.autoDestroy && state.emitClose && state.closed === false) + ) +} + +function isDisturbed(stream) { + var _stream$kIsDisturbed + + return !!( + stream && + ((_stream$kIsDisturbed = stream[kIsDisturbed]) !== null && _stream$kIsDisturbed !== undefined + ? _stream$kIsDisturbed + : stream.readableDidRead || stream.readableAborted) + ) +} + +function isErrored(stream) { + var _ref, + _ref2, + _ref3, + _ref4, + _ref5, + _stream$kIsErrored, + _stream$_readableStat3, + _stream$_writableStat3, + _stream$_readableStat4, + _stream$_writableStat4 + + return !!( + stream && + ((_ref = + (_ref2 = + (_ref3 = + (_ref4 = + (_ref5 = + (_stream$kIsErrored = stream[kIsErrored]) !== null && _stream$kIsErrored !== undefined + ? _stream$kIsErrored + : stream.readableErrored) !== null && _ref5 !== undefined + ? _ref5 + : stream.writableErrored) !== null && _ref4 !== undefined + ? _ref4 + : (_stream$_readableStat3 = stream._readableState) === null || _stream$_readableStat3 === undefined + ? undefined + : _stream$_readableStat3.errorEmitted) !== null && _ref3 !== undefined + ? _ref3 + : (_stream$_writableStat3 = stream._writableState) === null || _stream$_writableStat3 === undefined + ? undefined + : _stream$_writableStat3.errorEmitted) !== null && _ref2 !== undefined + ? _ref2 + : (_stream$_readableStat4 = stream._readableState) === null || _stream$_readableStat4 === undefined + ? undefined + : _stream$_readableStat4.errored) !== null && _ref !== undefined + ? _ref + : (_stream$_writableStat4 = stream._writableState) === null || _stream$_writableStat4 === undefined + ? undefined + : _stream$_writableStat4.errored) + ) +} + +module.exports = { + kDestroyed, + isDisturbed, + kIsDisturbed, + isErrored, + kIsErrored, + isReadable, + kIsReadable, + isClosed, + isDestroyed, + isDuplexNodeStream, + isFinished, + isIterable, + isReadableNodeStream, + isReadableEnded, + isReadableFinished, + isReadableErrored, + isNodeStream, + isWritable, + isWritableNodeStream, + isWritableEnded, + isWritableFinished, + isWritableErrored, + isServerRequest, + isServerResponse, + willEmitClose +} diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/writable.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/writable.js new file mode 100644 index 0000000000000..9b792e60d7fc8 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/streams/writable.js @@ -0,0 +1,893 @@ +/* replacement start */ +const process = require('process') +/* replacement end */ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. +// A bit simpler than readable streams. +// Implement an async ._write(chunk, encoding, cb), and it'll handle all +// the drain event emission and buffering. + +;('use strict') + +const { + ArrayPrototypeSlice, + Error, + FunctionPrototypeSymbolHasInstance, + ObjectDefineProperty, + ObjectDefineProperties, + ObjectSetPrototypeOf, + StringPrototypeToLowerCase, + Symbol, + SymbolHasInstance +} = require('../../ours/primordials') + +module.exports = Writable +Writable.WritableState = WritableState + +const { EventEmitter: EE } = require('events') + +const Stream = require('./legacy').Stream + +const { Buffer } = require('buffer') + +const destroyImpl = require('./destroy') + +const { addAbortSignal } = require('./add-abort-signal') + +const { getHighWaterMark, getDefaultHighWaterMark } = require('./state') + +const { + ERR_INVALID_ARG_TYPE, + ERR_METHOD_NOT_IMPLEMENTED, + ERR_MULTIPLE_CALLBACK, + ERR_STREAM_CANNOT_PIPE, + ERR_STREAM_DESTROYED, + ERR_STREAM_ALREADY_FINISHED, + ERR_STREAM_NULL_VALUES, + ERR_STREAM_WRITE_AFTER_END, + ERR_UNKNOWN_ENCODING +} = require('../../ours/errors').codes + +const { errorOrDestroy } = destroyImpl +ObjectSetPrototypeOf(Writable.prototype, Stream.prototype) +ObjectSetPrototypeOf(Writable, Stream) + +function nop() {} + +const kOnFinished = Symbol('kOnFinished') + +function WritableState(options, stream, isDuplex) { + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream, + // e.g. options.readableObjectMode vs. options.writableObjectMode, etc. + if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof require('./duplex') // Object stream flag to indicate whether or not this stream + // contains buffers or objects. + + this.objectMode = !!(options && options.objectMode) + if (isDuplex) this.objectMode = this.objectMode || !!(options && options.writableObjectMode) // The point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write(). + + this.highWaterMark = options + ? getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex) + : getDefaultHighWaterMark(false) // if _final has been called. + + this.finalCalled = false // drain event flag. + + this.needDrain = false // At the start of calling end() + + this.ending = false // When end() has been called, and returned. + + this.ended = false // When 'finish' is emitted. + + this.finished = false // Has it been destroyed + + this.destroyed = false // Should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + + const noDecode = !!(options && options.decodeStrings === false) + this.decodeStrings = !noDecode // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + + this.defaultEncoding = (options && options.defaultEncoding) || 'utf8' // Not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + + this.length = 0 // A flag to see when we're in the middle of a write. + + this.writing = false // When true all writes will be buffered until .uncork() call. + + this.corked = 0 // A flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + + this.sync = true // A flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + + this.bufferProcessing = false // The callback that's passed to _write(chunk, cb). + + this.onwrite = onwrite.bind(undefined, stream) // The callback that the user supplies to write(chunk, encoding, cb). + + this.writecb = null // The amount that is being written when _write is called. + + this.writelen = 0 // Storage for data passed to the afterWrite() callback in case of + // synchronous _write() completion. + + this.afterWriteTickInfo = null + resetBuffer(this) // Number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted. + + this.pendingcb = 0 // Stream is still being constructed and cannot be + // destroyed until construction finished or failed. + // Async construction is opt in, therefore we start as + // constructed. + + this.constructed = true // Emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams. + + this.prefinished = false // True if the error was already emitted and should not be thrown again. + + this.errorEmitted = false // Should close be emitted on destroy. Defaults to true. + + this.emitClose = !options || options.emitClose !== false // Should .destroy() be called after 'finish' (and potentially 'end'). + + this.autoDestroy = !options || options.autoDestroy !== false // Indicates whether the stream has errored. When true all write() calls + // should return false. This is needed since when autoDestroy + // is disabled we need a way to tell whether the stream has failed. + + this.errored = null // Indicates whether the stream has finished destroying. + + this.closed = false // True if close has been emitted or would have been emitted + // depending on emitClose. + + this.closeEmitted = false + this[kOnFinished] = [] +} + +function resetBuffer(state) { + state.buffered = [] + state.bufferedIndex = 0 + state.allBuffers = true + state.allNoop = true +} + +WritableState.prototype.getBuffer = function getBuffer() { + return ArrayPrototypeSlice(this.buffered, this.bufferedIndex) +} + +ObjectDefineProperty(WritableState.prototype, 'bufferedRequestCount', { + __proto__: null, + + get() { + return this.buffered.length - this.bufferedIndex + } +}) + +function Writable(options) { + // Writable ctor is applied to Duplexes, too. + // `realHasInstance` is necessary because using plain `instanceof` + // would return false, as no `_writableState` property is attached. + // Trying to use the custom `instanceof` for Writable here will also break the + // Node.js LazyTransform implementation, which has a non-trivial getter for + // `_writableState` that would lead to infinite recursion. + // Checking for a Stream.Duplex instance is faster here instead of inside + // the WritableState constructor, at least with V8 6.5. + const isDuplex = this instanceof require('./duplex') + + if (!isDuplex && !FunctionPrototypeSymbolHasInstance(Writable, this)) return new Writable(options) + this._writableState = new WritableState(options, this, isDuplex) + + if (options) { + if (typeof options.write === 'function') this._write = options.write + if (typeof options.writev === 'function') this._writev = options.writev + if (typeof options.destroy === 'function') this._destroy = options.destroy + if (typeof options.final === 'function') this._final = options.final + if (typeof options.construct === 'function') this._construct = options.construct + if (options.signal) addAbortSignal(options.signal, this) + } + + Stream.call(this, options) + destroyImpl.construct(this, () => { + const state = this._writableState + + if (!state.writing) { + clearBuffer(this, state) + } + + finishMaybe(this, state) + }) +} + +ObjectDefineProperty(Writable, SymbolHasInstance, { + __proto__: null, + value: function (object) { + if (FunctionPrototypeSymbolHasInstance(this, object)) return true + if (this !== Writable) return false + return object && object._writableState instanceof WritableState + } +}) // Otherwise people can pipe Writable streams, which is just wrong. + +Writable.prototype.pipe = function () { + errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()) +} + +function _write(stream, chunk, encoding, cb) { + const state = stream._writableState + + if (typeof encoding === 'function') { + cb = encoding + encoding = state.defaultEncoding + } else { + if (!encoding) encoding = state.defaultEncoding + else if (encoding !== 'buffer' && !Buffer.isEncoding(encoding)) throw new ERR_UNKNOWN_ENCODING(encoding) + if (typeof cb !== 'function') cb = nop + } + + if (chunk === null) { + throw new ERR_STREAM_NULL_VALUES() + } else if (!state.objectMode) { + if (typeof chunk === 'string') { + if (state.decodeStrings !== false) { + chunk = Buffer.from(chunk, encoding) + encoding = 'buffer' + } + } else if (chunk instanceof Buffer) { + encoding = 'buffer' + } else if (Stream._isUint8Array(chunk)) { + chunk = Stream._uint8ArrayToBuffer(chunk) + encoding = 'buffer' + } else { + throw new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk) + } + } + + let err + + if (state.ending) { + err = new ERR_STREAM_WRITE_AFTER_END() + } else if (state.destroyed) { + err = new ERR_STREAM_DESTROYED('write') + } + + if (err) { + process.nextTick(cb, err) + errorOrDestroy(stream, err, true) + return err + } + + state.pendingcb++ + return writeOrBuffer(stream, state, chunk, encoding, cb) +} + +Writable.prototype.write = function (chunk, encoding, cb) { + return _write(this, chunk, encoding, cb) === true +} + +Writable.prototype.cork = function () { + this._writableState.corked++ +} + +Writable.prototype.uncork = function () { + const state = this._writableState + + if (state.corked) { + state.corked-- + if (!state.writing) clearBuffer(this, state) + } +} + +Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + // node::ParseEncoding() requires lower case. + if (typeof encoding === 'string') encoding = StringPrototypeToLowerCase(encoding) + if (!Buffer.isEncoding(encoding)) throw new ERR_UNKNOWN_ENCODING(encoding) + this._writableState.defaultEncoding = encoding + return this +} // If we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. + +function writeOrBuffer(stream, state, chunk, encoding, callback) { + const len = state.objectMode ? 1 : chunk.length + state.length += len // stream._write resets state.length + + const ret = state.length < state.highWaterMark // We must ensure that previous needDrain will not be reset to false. + + if (!ret) state.needDrain = true + + if (state.writing || state.corked || state.errored || !state.constructed) { + state.buffered.push({ + chunk, + encoding, + callback + }) + + if (state.allBuffers && encoding !== 'buffer') { + state.allBuffers = false + } + + if (state.allNoop && callback !== nop) { + state.allNoop = false + } + } else { + state.writelen = len + state.writecb = callback + state.writing = true + state.sync = true + + stream._write(chunk, encoding, state.onwrite) + + state.sync = false + } // Return false if errored or destroyed in order to break + // any synchronous while(stream.write(data)) loops. + + return ret && !state.errored && !state.destroyed +} + +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len + state.writecb = cb + state.writing = true + state.sync = true + if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write')) + else if (writev) stream._writev(chunk, state.onwrite) + else stream._write(chunk, encoding, state.onwrite) + state.sync = false +} + +function onwriteError(stream, state, er, cb) { + --state.pendingcb + cb(er) // Ensure callbacks are invoked even when autoDestroy is + // not enabled. Passing `er` here doesn't make sense since + // it's related to one specific write, not to the buffered + // writes. + + errorBuffer(state) // This can emit error, but error must always follow cb. + + errorOrDestroy(stream, er) +} + +function onwrite(stream, er) { + const state = stream._writableState + const sync = state.sync + const cb = state.writecb + + if (typeof cb !== 'function') { + errorOrDestroy(stream, new ERR_MULTIPLE_CALLBACK()) + return + } + + state.writing = false + state.writecb = null + state.length -= state.writelen + state.writelen = 0 + + if (er) { + // Avoid V8 leak, https://github.com/nodejs/node/pull/34103#issuecomment-652002364 + er.stack // eslint-disable-line no-unused-expressions + + if (!state.errored) { + state.errored = er + } // In case of duplex streams we need to notify the readable side of the + // error. + + if (stream._readableState && !stream._readableState.errored) { + stream._readableState.errored = er + } + + if (sync) { + process.nextTick(onwriteError, stream, state, er, cb) + } else { + onwriteError(stream, state, er, cb) + } + } else { + if (state.buffered.length > state.bufferedIndex) { + clearBuffer(stream, state) + } + + if (sync) { + // It is a common case that the callback passed to .write() is always + // the same. In that case, we do not schedule a new nextTick(), but + // rather just increase a counter, to improve performance and avoid + // memory allocations. + if (state.afterWriteTickInfo !== null && state.afterWriteTickInfo.cb === cb) { + state.afterWriteTickInfo.count++ + } else { + state.afterWriteTickInfo = { + count: 1, + cb, + stream, + state + } + process.nextTick(afterWriteTick, state.afterWriteTickInfo) + } + } else { + afterWrite(stream, state, 1, cb) + } + } +} + +function afterWriteTick({ stream, state, count, cb }) { + state.afterWriteTickInfo = null + return afterWrite(stream, state, count, cb) +} + +function afterWrite(stream, state, count, cb) { + const needDrain = !state.ending && !stream.destroyed && state.length === 0 && state.needDrain + + if (needDrain) { + state.needDrain = false + stream.emit('drain') + } + + while (count-- > 0) { + state.pendingcb-- + cb() + } + + if (state.destroyed) { + errorBuffer(state) + } + + finishMaybe(stream, state) +} // If there's something in the buffer waiting, then invoke callbacks. + +function errorBuffer(state) { + if (state.writing) { + return + } + + for (let n = state.bufferedIndex; n < state.buffered.length; ++n) { + var _state$errored + + const { chunk, callback } = state.buffered[n] + const len = state.objectMode ? 1 : chunk.length + state.length -= len + callback( + (_state$errored = state.errored) !== null && _state$errored !== undefined + ? _state$errored + : new ERR_STREAM_DESTROYED('write') + ) + } + + const onfinishCallbacks = state[kOnFinished].splice(0) + + for (let i = 0; i < onfinishCallbacks.length; i++) { + var _state$errored2 + + onfinishCallbacks[i]( + (_state$errored2 = state.errored) !== null && _state$errored2 !== undefined + ? _state$errored2 + : new ERR_STREAM_DESTROYED('end') + ) + } + + resetBuffer(state) +} // If there's something in the buffer waiting, then process it. + +function clearBuffer(stream, state) { + if (state.corked || state.bufferProcessing || state.destroyed || !state.constructed) { + return + } + + const { buffered, bufferedIndex, objectMode } = state + const bufferedLength = buffered.length - bufferedIndex + + if (!bufferedLength) { + return + } + + let i = bufferedIndex + state.bufferProcessing = true + + if (bufferedLength > 1 && stream._writev) { + state.pendingcb -= bufferedLength - 1 + const callback = state.allNoop + ? nop + : (err) => { + for (let n = i; n < buffered.length; ++n) { + buffered[n].callback(err) + } + } // Make a copy of `buffered` if it's going to be used by `callback` above, + // since `doWrite` will mutate the array. + + const chunks = state.allNoop && i === 0 ? buffered : ArrayPrototypeSlice(buffered, i) + chunks.allBuffers = state.allBuffers + doWrite(stream, state, true, state.length, chunks, '', callback) + resetBuffer(state) + } else { + do { + const { chunk, encoding, callback } = buffered[i] + buffered[i++] = null + const len = objectMode ? 1 : chunk.length + doWrite(stream, state, false, len, chunk, encoding, callback) + } while (i < buffered.length && !state.writing) + + if (i === buffered.length) { + resetBuffer(state) + } else if (i > 256) { + buffered.splice(0, i) + state.bufferedIndex = 0 + } else { + state.bufferedIndex = i + } + } + + state.bufferProcessing = false +} + +Writable.prototype._write = function (chunk, encoding, cb) { + if (this._writev) { + this._writev( + [ + { + chunk, + encoding + } + ], + cb + ) + } else { + throw new ERR_METHOD_NOT_IMPLEMENTED('_write()') + } +} + +Writable.prototype._writev = null + +Writable.prototype.end = function (chunk, encoding, cb) { + const state = this._writableState + + if (typeof chunk === 'function') { + cb = chunk + chunk = null + encoding = null + } else if (typeof encoding === 'function') { + cb = encoding + encoding = null + } + + let err + + if (chunk !== null && chunk !== undefined) { + const ret = _write(this, chunk, encoding) + + if (ret instanceof Error) { + err = ret + } + } // .end() fully uncorks. + + if (state.corked) { + state.corked = 1 + this.uncork() + } + + if (err) { + // Do nothing... + } else if (!state.errored && !state.ending) { + // This is forgiving in terms of unnecessary calls to end() and can hide + // logic errors. However, usually such errors are harmless and causing a + // hard error can be disproportionately destructive. It is not always + // trivial for the user to determine whether end() needs to be called + // or not. + state.ending = true + finishMaybe(this, state, true) + state.ended = true + } else if (state.finished) { + err = new ERR_STREAM_ALREADY_FINISHED('end') + } else if (state.destroyed) { + err = new ERR_STREAM_DESTROYED('end') + } + + if (typeof cb === 'function') { + if (err || state.finished) { + process.nextTick(cb, err) + } else { + state[kOnFinished].push(cb) + } + } + + return this +} + +function needFinish(state) { + return ( + state.ending && + !state.destroyed && + state.constructed && + state.length === 0 && + !state.errored && + state.buffered.length === 0 && + !state.finished && + !state.writing && + !state.errorEmitted && + !state.closeEmitted + ) +} + +function callFinal(stream, state) { + let called = false + + function onFinish(err) { + if (called) { + errorOrDestroy(stream, err !== null && err !== undefined ? err : ERR_MULTIPLE_CALLBACK()) + return + } + + called = true + state.pendingcb-- + + if (err) { + const onfinishCallbacks = state[kOnFinished].splice(0) + + for (let i = 0; i < onfinishCallbacks.length; i++) { + onfinishCallbacks[i](err) + } + + errorOrDestroy(stream, err, state.sync) + } else if (needFinish(state)) { + state.prefinished = true + stream.emit('prefinish') // Backwards compat. Don't check state.sync here. + // Some streams assume 'finish' will be emitted + // asynchronously relative to _final callback. + + state.pendingcb++ + process.nextTick(finish, stream, state) + } + } + + state.sync = true + state.pendingcb++ + + try { + stream._final(onFinish) + } catch (err) { + onFinish(err) + } + + state.sync = false +} + +function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === 'function' && !state.destroyed) { + state.finalCalled = true + callFinal(stream, state) + } else { + state.prefinished = true + stream.emit('prefinish') + } + } +} + +function finishMaybe(stream, state, sync) { + if (needFinish(state)) { + prefinish(stream, state) + + if (state.pendingcb === 0) { + if (sync) { + state.pendingcb++ + process.nextTick( + (stream, state) => { + if (needFinish(state)) { + finish(stream, state) + } else { + state.pendingcb-- + } + }, + stream, + state + ) + } else if (needFinish(state)) { + state.pendingcb++ + finish(stream, state) + } + } + } +} + +function finish(stream, state) { + state.pendingcb-- + state.finished = true + const onfinishCallbacks = state[kOnFinished].splice(0) + + for (let i = 0; i < onfinishCallbacks.length; i++) { + onfinishCallbacks[i]() + } + + stream.emit('finish') + + if (state.autoDestroy) { + // In case of duplex streams we need a way to detect + // if the readable side is ready for autoDestroy as well. + const rState = stream._readableState + const autoDestroy = + !rState || + (rState.autoDestroy && // We don't expect the readable to ever 'end' + // if readable is explicitly set to false. + (rState.endEmitted || rState.readable === false)) + + if (autoDestroy) { + stream.destroy() + } + } +} + +ObjectDefineProperties(Writable.prototype, { + closed: { + __proto__: null, + + get() { + return this._writableState ? this._writableState.closed : false + } + }, + destroyed: { + __proto__: null, + + get() { + return this._writableState ? this._writableState.destroyed : false + }, + + set(value) { + // Backward compatibility, the user is explicitly managing destroyed. + if (this._writableState) { + this._writableState.destroyed = value + } + } + }, + writable: { + __proto__: null, + + get() { + const w = this._writableState // w.writable === false means that this is part of a Duplex stream + // where the writable side was disabled upon construction. + // Compat. The user might manually disable writable side through + // deprecated setter. + + return !!w && w.writable !== false && !w.destroyed && !w.errored && !w.ending && !w.ended + }, + + set(val) { + // Backwards compatible. + if (this._writableState) { + this._writableState.writable = !!val + } + } + }, + writableFinished: { + __proto__: null, + + get() { + return this._writableState ? this._writableState.finished : false + } + }, + writableObjectMode: { + __proto__: null, + + get() { + return this._writableState ? this._writableState.objectMode : false + } + }, + writableBuffer: { + __proto__: null, + + get() { + return this._writableState && this._writableState.getBuffer() + } + }, + writableEnded: { + __proto__: null, + + get() { + return this._writableState ? this._writableState.ending : false + } + }, + writableNeedDrain: { + __proto__: null, + + get() { + const wState = this._writableState + if (!wState) return false + return !wState.destroyed && !wState.ending && wState.needDrain + } + }, + writableHighWaterMark: { + __proto__: null, + + get() { + return this._writableState && this._writableState.highWaterMark + } + }, + writableCorked: { + __proto__: null, + + get() { + return this._writableState ? this._writableState.corked : 0 + } + }, + writableLength: { + __proto__: null, + + get() { + return this._writableState && this._writableState.length + } + }, + errored: { + __proto__: null, + enumerable: false, + + get() { + return this._writableState ? this._writableState.errored : null + } + }, + writableAborted: { + __proto__: null, + enumerable: false, + get: function () { + return !!( + this._writableState.writable !== false && + (this._writableState.destroyed || this._writableState.errored) && + !this._writableState.finished + ) + } + } +}) +const destroy = destroyImpl.destroy + +Writable.prototype.destroy = function (err, cb) { + const state = this._writableState // Invoke pending callbacks. + + if (!state.destroyed && (state.bufferedIndex < state.buffered.length || state[kOnFinished].length)) { + process.nextTick(errorBuffer, state) + } + + destroy.call(this, err, cb) + return this +} + +Writable.prototype._undestroy = destroyImpl.undestroy + +Writable.prototype._destroy = function (err, cb) { + cb(err) +} + +Writable.prototype[EE.captureRejectionSymbol] = function (err) { + this.destroy(err) +} + +let webStreamsAdapters // Lazy to avoid circular references + +function lazyWebStreams() { + if (webStreamsAdapters === undefined) webStreamsAdapters = {} + return webStreamsAdapters +} + +Writable.fromWeb = function (writableStream, options) { + return lazyWebStreams().newStreamWritableFromWritableStream(writableStream, options) +} + +Writable.toWeb = function (streamWritable) { + return lazyWebStreams().newWritableStreamFromStreamWritable(streamWritable) +} diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/validators.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/validators.js new file mode 100644 index 0000000000000..3225949f38f94 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/internal/validators.js @@ -0,0 +1,417 @@ +'use strict' + +const { + ArrayIsArray, + ArrayPrototypeIncludes, + ArrayPrototypeJoin, + ArrayPrototypeMap, + NumberIsInteger, + NumberIsNaN, + NumberMAX_SAFE_INTEGER, + NumberMIN_SAFE_INTEGER, + NumberParseInt, + ObjectPrototypeHasOwnProperty, + RegExpPrototypeExec, + String, + StringPrototypeToUpperCase, + StringPrototypeTrim +} = require('../ours/primordials') + +const { + hideStackFrames, + codes: { ERR_SOCKET_BAD_PORT, ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, ERR_OUT_OF_RANGE, ERR_UNKNOWN_SIGNAL } +} = require('../ours/errors') + +const { normalizeEncoding } = require('../ours/util') + +const { isAsyncFunction, isArrayBufferView } = require('../ours/util').types + +const signals = {} +/** + * @param {*} value + * @returns {boolean} + */ + +function isInt32(value) { + return value === (value | 0) +} +/** + * @param {*} value + * @returns {boolean} + */ + +function isUint32(value) { + return value === value >>> 0 +} + +const octalReg = /^[0-7]+$/ +const modeDesc = 'must be a 32-bit unsigned integer or an octal string' +/** + * Parse and validate values that will be converted into mode_t (the S_* + * constants). Only valid numbers and octal strings are allowed. They could be + * converted to 32-bit unsigned integers or non-negative signed integers in the + * C++ land, but any value higher than 0o777 will result in platform-specific + * behaviors. + * + * @param {*} value Values to be validated + * @param {string} name Name of the argument + * @param {number} [def] If specified, will be returned for invalid values + * @returns {number} + */ + +function parseFileMode(value, name, def) { + if (typeof value === 'undefined') { + value = def + } + + if (typeof value === 'string') { + if (RegExpPrototypeExec(octalReg, value) === null) { + throw new ERR_INVALID_ARG_VALUE(name, value, modeDesc) + } + + value = NumberParseInt(value, 8) + } + + validateUint32(value, name) + return value +} +/** + * @callback validateInteger + * @param {*} value + * @param {string} name + * @param {number} [min] + * @param {number} [max] + * @returns {asserts value is number} + */ + +/** @type {validateInteger} */ + +const validateInteger = hideStackFrames((value, name, min = NumberMIN_SAFE_INTEGER, max = NumberMAX_SAFE_INTEGER) => { + if (typeof value !== 'number') throw new ERR_INVALID_ARG_TYPE(name, 'number', value) + if (!NumberIsInteger(value)) throw new ERR_OUT_OF_RANGE(name, 'an integer', value) + if (value < min || value > max) throw new ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value) +}) +/** + * @callback validateInt32 + * @param {*} value + * @param {string} name + * @param {number} [min] + * @param {number} [max] + * @returns {asserts value is number} + */ + +/** @type {validateInt32} */ + +const validateInt32 = hideStackFrames((value, name, min = -2147483648, max = 2147483647) => { + // The defaults for min and max correspond to the limits of 32-bit integers. + if (typeof value !== 'number') { + throw new ERR_INVALID_ARG_TYPE(name, 'number', value) + } + + if (!NumberIsInteger(value)) { + throw new ERR_OUT_OF_RANGE(name, 'an integer', value) + } + + if (value < min || value > max) { + throw new ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value) + } +}) +/** + * @callback validateUint32 + * @param {*} value + * @param {string} name + * @param {number|boolean} [positive=false] + * @returns {asserts value is number} + */ + +/** @type {validateUint32} */ + +const validateUint32 = hideStackFrames((value, name, positive = false) => { + if (typeof value !== 'number') { + throw new ERR_INVALID_ARG_TYPE(name, 'number', value) + } + + if (!NumberIsInteger(value)) { + throw new ERR_OUT_OF_RANGE(name, 'an integer', value) + } + + const min = positive ? 1 : 0 // 2 ** 32 === 4294967296 + + const max = 4_294_967_295 + + if (value < min || value > max) { + throw new ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value) + } +}) +/** + * @callback validateString + * @param {*} value + * @param {string} name + * @returns {asserts value is string} + */ + +/** @type {validateString} */ + +function validateString(value, name) { + if (typeof value !== 'string') throw new ERR_INVALID_ARG_TYPE(name, 'string', value) +} +/** + * @callback validateNumber + * @param {*} value + * @param {string} name + * @param {number} [min] + * @param {number} [max] + * @returns {asserts value is number} + */ + +/** @type {validateNumber} */ + +function validateNumber(value, name, min = undefined, max) { + if (typeof value !== 'number') throw new ERR_INVALID_ARG_TYPE(name, 'number', value) + + if ( + (min != null && value < min) || + (max != null && value > max) || + ((min != null || max != null) && NumberIsNaN(value)) + ) { + throw new ERR_OUT_OF_RANGE( + name, + `${min != null ? `>= ${min}` : ''}${min != null && max != null ? ' && ' : ''}${max != null ? `<= ${max}` : ''}`, + value + ) + } +} +/** + * @callback validateOneOf + * @template T + * @param {T} value + * @param {string} name + * @param {T[]} oneOf + */ + +/** @type {validateOneOf} */ + +const validateOneOf = hideStackFrames((value, name, oneOf) => { + if (!ArrayPrototypeIncludes(oneOf, value)) { + const allowed = ArrayPrototypeJoin( + ArrayPrototypeMap(oneOf, (v) => (typeof v === 'string' ? `'${v}'` : String(v))), + ', ' + ) + const reason = 'must be one of: ' + allowed + throw new ERR_INVALID_ARG_VALUE(name, value, reason) + } +}) +/** + * @callback validateBoolean + * @param {*} value + * @param {string} name + * @returns {asserts value is boolean} + */ + +/** @type {validateBoolean} */ + +function validateBoolean(value, name) { + if (typeof value !== 'boolean') throw new ERR_INVALID_ARG_TYPE(name, 'boolean', value) +} + +function getOwnPropertyValueOrDefault(options, key, defaultValue) { + return options == null || !ObjectPrototypeHasOwnProperty(options, key) ? defaultValue : options[key] +} +/** + * @callback validateObject + * @param {*} value + * @param {string} name + * @param {{ + * allowArray?: boolean, + * allowFunction?: boolean, + * nullable?: boolean + * }} [options] + */ + +/** @type {validateObject} */ + +const validateObject = hideStackFrames((value, name, options = null) => { + const allowArray = getOwnPropertyValueOrDefault(options, 'allowArray', false) + const allowFunction = getOwnPropertyValueOrDefault(options, 'allowFunction', false) + const nullable = getOwnPropertyValueOrDefault(options, 'nullable', false) + + if ( + (!nullable && value === null) || + (!allowArray && ArrayIsArray(value)) || + (typeof value !== 'object' && (!allowFunction || typeof value !== 'function')) + ) { + throw new ERR_INVALID_ARG_TYPE(name, 'Object', value) + } +}) +/** + * @callback validateArray + * @param {*} value + * @param {string} name + * @param {number} [minLength] + * @returns {asserts value is any[]} + */ + +/** @type {validateArray} */ + +const validateArray = hideStackFrames((value, name, minLength = 0) => { + if (!ArrayIsArray(value)) { + throw new ERR_INVALID_ARG_TYPE(name, 'Array', value) + } + + if (value.length < minLength) { + const reason = `must be longer than ${minLength}` + throw new ERR_INVALID_ARG_VALUE(name, value, reason) + } +}) // eslint-disable-next-line jsdoc/require-returns-check + +/** + * @param {*} signal + * @param {string} [name='signal'] + * @returns {asserts signal is keyof signals} + */ + +function validateSignalName(signal, name = 'signal') { + validateString(signal, name) + + if (signals[signal] === undefined) { + if (signals[StringPrototypeToUpperCase(signal)] !== undefined) { + throw new ERR_UNKNOWN_SIGNAL(signal + ' (signals must use all capital letters)') + } + + throw new ERR_UNKNOWN_SIGNAL(signal) + } +} +/** + * @callback validateBuffer + * @param {*} buffer + * @param {string} [name='buffer'] + * @returns {asserts buffer is ArrayBufferView} + */ + +/** @type {validateBuffer} */ + +const validateBuffer = hideStackFrames((buffer, name = 'buffer') => { + if (!isArrayBufferView(buffer)) { + throw new ERR_INVALID_ARG_TYPE(name, ['Buffer', 'TypedArray', 'DataView'], buffer) + } +}) +/** + * @param {string} data + * @param {string} encoding + */ + +function validateEncoding(data, encoding) { + const normalizedEncoding = normalizeEncoding(encoding) + const length = data.length + + if (normalizedEncoding === 'hex' && length % 2 !== 0) { + throw new ERR_INVALID_ARG_VALUE('encoding', encoding, `is invalid for data of length ${length}`) + } +} +/** + * Check that the port number is not NaN when coerced to a number, + * is an integer and that it falls within the legal range of port numbers. + * @param {*} port + * @param {string} [name='Port'] + * @param {boolean} [allowZero=true] + * @returns {number} + */ + +function validatePort(port, name = 'Port', allowZero = true) { + if ( + (typeof port !== 'number' && typeof port !== 'string') || + (typeof port === 'string' && StringPrototypeTrim(port).length === 0) || + +port !== +port >>> 0 || + port > 0xffff || + (port === 0 && !allowZero) + ) { + throw new ERR_SOCKET_BAD_PORT(name, port, allowZero) + } + + return port | 0 +} +/** + * @callback validateAbortSignal + * @param {*} signal + * @param {string} name + */ + +/** @type {validateAbortSignal} */ + +const validateAbortSignal = hideStackFrames((signal, name) => { + if (signal !== undefined && (signal === null || typeof signal !== 'object' || !('aborted' in signal))) { + throw new ERR_INVALID_ARG_TYPE(name, 'AbortSignal', signal) + } +}) +/** + * @callback validateFunction + * @param {*} value + * @param {string} name + * @returns {asserts value is Function} + */ + +/** @type {validateFunction} */ + +const validateFunction = hideStackFrames((value, name) => { + if (typeof value !== 'function') throw new ERR_INVALID_ARG_TYPE(name, 'Function', value) +}) +/** + * @callback validatePlainFunction + * @param {*} value + * @param {string} name + * @returns {asserts value is Function} + */ + +/** @type {validatePlainFunction} */ + +const validatePlainFunction = hideStackFrames((value, name) => { + if (typeof value !== 'function' || isAsyncFunction(value)) throw new ERR_INVALID_ARG_TYPE(name, 'Function', value) +}) +/** + * @callback validateUndefined + * @param {*} value + * @param {string} name + * @returns {asserts value is undefined} + */ + +/** @type {validateUndefined} */ + +const validateUndefined = hideStackFrames((value, name) => { + if (value !== undefined) throw new ERR_INVALID_ARG_TYPE(name, 'undefined', value) +}) +/** + * @template T + * @param {T} value + * @param {string} name + * @param {T[]} union + */ + +function validateUnion(value, name, union) { + if (!ArrayPrototypeIncludes(union, value)) { + throw new ERR_INVALID_ARG_TYPE(name, `('${ArrayPrototypeJoin(union, '|')}')`, value) + } +} + +module.exports = { + isInt32, + isUint32, + parseFileMode, + validateArray, + validateBoolean, + validateBuffer, + validateEncoding, + validateFunction, + validateInt32, + validateInteger, + validateNumber, + validateObject, + validateOneOf, + validatePlainFunction, + validatePort, + validateSignalName, + validateString, + validateUint32, + validateUndefined, + validateUnion, + validateAbortSignal +} diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/ours/browser.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/ours/browser.js new file mode 100644 index 0000000000000..7083fb31e5972 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/ours/browser.js @@ -0,0 +1,36 @@ +'use strict' + +const CustomStream = require('../stream') + +const promises = require('../stream/promises') + +const originalDestroy = CustomStream.Readable.destroy +module.exports = CustomStream.Readable // Explicit export naming is needed for ESM + +module.exports._uint8ArrayToBuffer = CustomStream._uint8ArrayToBuffer +module.exports._isUint8Array = CustomStream._isUint8Array +module.exports.isDisturbed = CustomStream.isDisturbed +module.exports.isErrored = CustomStream.isErrored +module.exports.isReadable = CustomStream.isReadable +module.exports.Readable = CustomStream.Readable +module.exports.Writable = CustomStream.Writable +module.exports.Duplex = CustomStream.Duplex +module.exports.Transform = CustomStream.Transform +module.exports.PassThrough = CustomStream.PassThrough +module.exports.addAbortSignal = CustomStream.addAbortSignal +module.exports.finished = CustomStream.finished +module.exports.destroy = CustomStream.destroy +module.exports.destroy = originalDestroy +module.exports.pipeline = CustomStream.pipeline +module.exports.compose = CustomStream.compose +Object.defineProperty(CustomStream, 'promises', { + configurable: true, + enumerable: true, + + get() { + return promises + } +}) +module.exports.Stream = CustomStream.Stream // Allow default importing + +module.exports.default = module.exports diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/ours/errors.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/ours/errors.js new file mode 100644 index 0000000000000..7fd9a97c94ca2 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/ours/errors.js @@ -0,0 +1,391 @@ +'use strict' + +const { format, inspect, AggregateError: CustomAggregateError } = require('./util') +/* + This file is a reduced and adapted version of the main lib/internal/errors.js file defined at + + https://github.com/nodejs/node/blob/master/lib/internal/errors.js + + Don't try to replace with the original file and keep it up to date (starting from E(...) definitions) + with the upstream file. +*/ + +const AggregateError = globalThis.AggregateError || CustomAggregateError +const kIsNodeError = Symbol('kIsNodeError') +const kTypes = [ + 'string', + 'function', + 'number', + 'object', // Accept 'Function' and 'Object' as alternative to the lower cased version. + 'Function', + 'Object', + 'boolean', + 'bigint', + 'symbol' +] +const classRegExp = /^([A-Z][a-z0-9]*)+$/ +const nodeInternalPrefix = '__node_internal_' +const codes = {} + +function assert(value, message) { + if (!value) { + throw new codes.ERR_INTERNAL_ASSERTION(message) + } +} // Only use this for integers! Decimal numbers do not work with this function. + +function addNumericalSeparator(val) { + let res = '' + let i = val.length + const start = val[0] === '-' ? 1 : 0 + + for (; i >= start + 4; i -= 3) { + res = `_${val.slice(i - 3, i)}${res}` + } + + return `${val.slice(0, i)}${res}` +} + +function getMessage(key, msg, args) { + if (typeof msg === 'function') { + assert( + msg.length <= args.length, // Default options do not count. + `Code: ${key}; The provided arguments length (${args.length}) does not match the required ones (${msg.length}).` + ) + return msg(...args) + } + + const expectedLength = (msg.match(/%[dfijoOs]/g) || []).length + assert( + expectedLength === args.length, + `Code: ${key}; The provided arguments length (${args.length}) does not match the required ones (${expectedLength}).` + ) + + if (args.length === 0) { + return msg + } + + return format(msg, ...args) +} + +function E(code, message, Base) { + if (!Base) { + Base = Error + } + + class NodeError extends Base { + constructor(...args) { + super(getMessage(code, message, args)) + } + + toString() { + return `${this.name} [${code}]: ${this.message}` + } + } + + Object.defineProperties(NodeError.prototype, { + name: { + value: Base.name, + writable: true, + enumerable: false, + configurable: true + }, + toString: { + value() { + return `${this.name} [${code}]: ${this.message}` + }, + + writable: true, + enumerable: false, + configurable: true + } + }) + NodeError.prototype.code = code + NodeError.prototype[kIsNodeError] = true + codes[code] = NodeError +} + +function hideStackFrames(fn) { + // We rename the functions that will be hidden to cut off the stacktrace + // at the outermost one + const hidden = nodeInternalPrefix + fn.name + Object.defineProperty(fn, 'name', { + value: hidden + }) + return fn +} + +function aggregateTwoErrors(innerError, outerError) { + if (innerError && outerError && innerError !== outerError) { + if (Array.isArray(outerError.errors)) { + // If `outerError` is already an `AggregateError`. + outerError.errors.push(innerError) + return outerError + } + + const err = new AggregateError([outerError, innerError], outerError.message) + err.code = outerError.code + return err + } + + return innerError || outerError +} + +class AbortError extends Error { + constructor(message = 'The operation was aborted', options = undefined) { + if (options !== undefined && typeof options !== 'object') { + throw new codes.ERR_INVALID_ARG_TYPE('options', 'Object', options) + } + + super(message, options) + this.code = 'ABORT_ERR' + this.name = 'AbortError' + } +} + +E('ERR_ASSERTION', '%s', Error) +E( + 'ERR_INVALID_ARG_TYPE', + (name, expected, actual) => { + assert(typeof name === 'string', "'name' must be a string") + + if (!Array.isArray(expected)) { + expected = [expected] + } + + let msg = 'The ' + + if (name.endsWith(' argument')) { + // For cases like 'first argument' + msg += `${name} ` + } else { + msg += `"${name}" ${name.includes('.') ? 'property' : 'argument'} ` + } + + msg += 'must be ' + const types = [] + const instances = [] + const other = [] + + for (const value of expected) { + assert(typeof value === 'string', 'All expected entries have to be of type string') + + if (kTypes.includes(value)) { + types.push(value.toLowerCase()) + } else if (classRegExp.test(value)) { + instances.push(value) + } else { + assert(value !== 'object', 'The value "object" should be written as "Object"') + other.push(value) + } + } // Special handle `object` in case other instances are allowed to outline + // the differences between each other. + + if (instances.length > 0) { + const pos = types.indexOf('object') + + if (pos !== -1) { + types.splice(types, pos, 1) + instances.push('Object') + } + } + + if (types.length > 0) { + switch (types.length) { + case 1: + msg += `of type ${types[0]}` + break + + case 2: + msg += `one of type ${types[0]} or ${types[1]}` + break + + default: { + const last = types.pop() + msg += `one of type ${types.join(', ')}, or ${last}` + } + } + + if (instances.length > 0 || other.length > 0) { + msg += ' or ' + } + } + + if (instances.length > 0) { + switch (instances.length) { + case 1: + msg += `an instance of ${instances[0]}` + break + + case 2: + msg += `an instance of ${instances[0]} or ${instances[1]}` + break + + default: { + const last = instances.pop() + msg += `an instance of ${instances.join(', ')}, or ${last}` + } + } + + if (other.length > 0) { + msg += ' or ' + } + } + + switch (other.length) { + case 0: + break + + case 1: + if (other[0].toLowerCase() !== other[0]) { + msg += 'an ' + } + + msg += `${other[0]}` + break + + case 2: + msg += `one of ${other[0]} or ${other[1]}` + break + + default: { + const last = other.pop() + msg += `one of ${other.join(', ')}, or ${last}` + } + } + + if (actual == null) { + msg += `. Received ${actual}` + } else if (typeof actual === 'function' && actual.name) { + msg += `. Received function ${actual.name}` + } else if (typeof actual === 'object') { + var _actual$constructor + + if ( + (_actual$constructor = actual.constructor) !== null && + _actual$constructor !== undefined && + _actual$constructor.name + ) { + msg += `. Received an instance of ${actual.constructor.name}` + } else { + const inspected = inspect(actual, { + depth: -1 + }) + msg += `. Received ${inspected}` + } + } else { + let inspected = inspect(actual, { + colors: false + }) + + if (inspected.length > 25) { + inspected = `${inspected.slice(0, 25)}...` + } + + msg += `. Received type ${typeof actual} (${inspected})` + } + + return msg + }, + TypeError +) +E( + 'ERR_INVALID_ARG_VALUE', + (name, value, reason = 'is invalid') => { + let inspected = inspect(value) + + if (inspected.length > 128) { + inspected = inspected.slice(0, 128) + '...' + } + + const type = name.includes('.') ? 'property' : 'argument' + return `The ${type} '${name}' ${reason}. Received ${inspected}` + }, + TypeError +) +E( + 'ERR_INVALID_RETURN_VALUE', + (input, name, value) => { + var _value$constructor + + const type = + value !== null && + value !== undefined && + (_value$constructor = value.constructor) !== null && + _value$constructor !== undefined && + _value$constructor.name + ? `instance of ${value.constructor.name}` + : `type ${typeof value}` + return `Expected ${input} to be returned from the "${name}"` + ` function but got ${type}.` + }, + TypeError +) +E( + 'ERR_MISSING_ARGS', + (...args) => { + assert(args.length > 0, 'At least one arg needs to be specified') + let msg + const len = args.length + args = (Array.isArray(args) ? args : [args]).map((a) => `"${a}"`).join(' or ') + + switch (len) { + case 1: + msg += `The ${args[0]} argument` + break + + case 2: + msg += `The ${args[0]} and ${args[1]} arguments` + break + + default: + { + const last = args.pop() + msg += `The ${args.join(', ')}, and ${last} arguments` + } + break + } + + return `${msg} must be specified` + }, + TypeError +) +E( + 'ERR_OUT_OF_RANGE', + (str, range, input) => { + assert(range, 'Missing "range" argument') + let received + + if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) { + received = addNumericalSeparator(String(input)) + } else if (typeof input === 'bigint') { + received = String(input) + + if (input > 2n ** 32n || input < -(2n ** 32n)) { + received = addNumericalSeparator(received) + } + + received += 'n' + } else { + received = inspect(input) + } + + return `The value of "${str}" is out of range. It must be ${range}. Received ${received}` + }, + RangeError +) +E('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times', Error) +E('ERR_METHOD_NOT_IMPLEMENTED', 'The %s method is not implemented', Error) +E('ERR_STREAM_ALREADY_FINISHED', 'Cannot call %s after a stream was finished', Error) +E('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable', Error) +E('ERR_STREAM_DESTROYED', 'Cannot call %s after a stream was destroyed', Error) +E('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError) +E('ERR_STREAM_PREMATURE_CLOSE', 'Premature close', Error) +E('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF', Error) +E('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event', Error) +E('ERR_STREAM_WRITE_AFTER_END', 'write after end', Error) +E('ERR_UNKNOWN_ENCODING', 'Unknown encoding: %s', TypeError) +module.exports = { + AbortError, + aggregateTwoErrors: hideStackFrames(aggregateTwoErrors), + hideStackFrames, + codes +} diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/ours/index.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/ours/index.js new file mode 100644 index 0000000000000..1a6af8ad86bf7 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/ours/index.js @@ -0,0 +1,67 @@ +'use strict' + +const Stream = require('stream') + +if (Stream && process.env.READABLE_STREAM === 'disable') { + const promises = Stream.promises // Explicit export naming is needed for ESM + + module.exports._uint8ArrayToBuffer = Stream._uint8ArrayToBuffer + module.exports._isUint8Array = Stream._isUint8Array + module.exports.isDisturbed = Stream.isDisturbed + module.exports.isErrored = Stream.isErrored + module.exports.isReadable = Stream.isReadable + module.exports.Readable = Stream.Readable + module.exports.Writable = Stream.Writable + module.exports.Duplex = Stream.Duplex + module.exports.Transform = Stream.Transform + module.exports.PassThrough = Stream.PassThrough + module.exports.addAbortSignal = Stream.addAbortSignal + module.exports.finished = Stream.finished + module.exports.destroy = Stream.destroy + module.exports.pipeline = Stream.pipeline + module.exports.compose = Stream.compose + Object.defineProperty(Stream, 'promises', { + configurable: true, + enumerable: true, + + get() { + return promises + } + }) + module.exports.Stream = Stream.Stream +} else { + const CustomStream = require('../stream') + + const promises = require('../stream/promises') + + const originalDestroy = CustomStream.Readable.destroy + module.exports = CustomStream.Readable // Explicit export naming is needed for ESM + + module.exports._uint8ArrayToBuffer = CustomStream._uint8ArrayToBuffer + module.exports._isUint8Array = CustomStream._isUint8Array + module.exports.isDisturbed = CustomStream.isDisturbed + module.exports.isErrored = CustomStream.isErrored + module.exports.isReadable = CustomStream.isReadable + module.exports.Readable = CustomStream.Readable + module.exports.Writable = CustomStream.Writable + module.exports.Duplex = CustomStream.Duplex + module.exports.Transform = CustomStream.Transform + module.exports.PassThrough = CustomStream.PassThrough + module.exports.addAbortSignal = CustomStream.addAbortSignal + module.exports.finished = CustomStream.finished + module.exports.destroy = CustomStream.destroy + module.exports.destroy = originalDestroy + module.exports.pipeline = CustomStream.pipeline + module.exports.compose = CustomStream.compose + Object.defineProperty(CustomStream, 'promises', { + configurable: true, + enumerable: true, + + get() { + return promises + } + }) + module.exports.Stream = CustomStream.Stream +} // Allow default importing + +module.exports.default = module.exports diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/ours/primordials.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/ours/primordials.js new file mode 100644 index 0000000000000..fab7a28e444ad --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/ours/primordials.js @@ -0,0 +1,130 @@ +'use strict' +/* + This file is a reduced and adapted version of the main lib/internal/per_context/primordials.js file defined at + + https://github.com/nodejs/node/blob/master/lib/internal/per_context/primordials.js + + Don't try to replace with the original file and keep it up to date with the upstream file. +*/ + +module.exports = { + ArrayIsArray(self) { + return Array.isArray(self) + }, + + ArrayPrototypeIncludes(self, el) { + return self.includes(el) + }, + + ArrayPrototypeIndexOf(self, el) { + return self.indexOf(el) + }, + + ArrayPrototypeJoin(self, sep) { + return self.join(sep) + }, + + ArrayPrototypeMap(self, fn) { + return self.map(fn) + }, + + ArrayPrototypePop(self, el) { + return self.pop(el) + }, + + ArrayPrototypePush(self, el) { + return self.push(el) + }, + + ArrayPrototypeSlice(self, start, end) { + return self.slice(start, end) + }, + + Error, + + FunctionPrototypeCall(fn, thisArgs, ...args) { + return fn.call(thisArgs, ...args) + }, + + FunctionPrototypeSymbolHasInstance(self, instance) { + return Function.prototype[Symbol.hasInstance].call(self, instance) + }, + + MathFloor: Math.floor, + Number, + NumberIsInteger: Number.isInteger, + NumberIsNaN: Number.isNaN, + NumberMAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER, + NumberMIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER, + NumberParseInt: Number.parseInt, + + ObjectDefineProperties(self, props) { + return Object.defineProperties(self, props) + }, + + ObjectDefineProperty(self, name, prop) { + return Object.defineProperty(self, name, prop) + }, + + ObjectGetOwnPropertyDescriptor(self, name) { + return Object.getOwnPropertyDescriptor(self, name) + }, + + ObjectKeys(obj) { + return Object.keys(obj) + }, + + ObjectSetPrototypeOf(target, proto) { + return Object.setPrototypeOf(target, proto) + }, + + Promise, + + PromisePrototypeCatch(self, fn) { + return self.catch(fn) + }, + + PromisePrototypeThen(self, thenFn, catchFn) { + return self.then(thenFn, catchFn) + }, + + PromiseReject(err) { + return Promise.reject(err) + }, + + ReflectApply: Reflect.apply, + + RegExpPrototypeTest(self, value) { + return self.test(value) + }, + + SafeSet: Set, + String, + + StringPrototypeSlice(self, start, end) { + return self.slice(start, end) + }, + + StringPrototypeToLowerCase(self) { + return self.toLowerCase() + }, + + StringPrototypeToUpperCase(self) { + return self.toUpperCase() + }, + + StringPrototypeTrim(self) { + return self.trim() + }, + + Symbol, + SymbolAsyncIterator: Symbol.asyncIterator, + SymbolHasInstance: Symbol.hasInstance, + SymbolIterator: Symbol.iterator, + + TypedArrayPrototypeSet(self, buf, len) { + return self.set(buf, len) + }, + + Uint8Array +} diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/ours/util.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/ours/util.js new file mode 100644 index 0000000000000..fdaaacd6753d1 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/ours/util.js @@ -0,0 +1,150 @@ +'use strict' + +const bufferModule = require('buffer') + +const AsyncFunction = Object.getPrototypeOf(async function () {}).constructor +const Blob = globalThis.Blob || bufferModule.Blob +/* eslint-disable indent */ + +const isBlob = + typeof Blob !== 'undefined' + ? function isBlob(b) { + // eslint-disable-next-line indent + return b instanceof Blob + } + : function isBlob(b) { + return false + } +/* eslint-enable indent */ +// This is a simplified version of AggregateError + +class AggregateError extends Error { + constructor(errors) { + if (!Array.isArray(errors)) { + throw new TypeError(`Expected input to be an Array, got ${typeof errors}`) + } + + let message = '' + + for (let i = 0; i < errors.length; i++) { + message += ` ${errors[i].stack}\n` + } + + super(message) + this.name = 'AggregateError' + this.errors = errors + } +} + +module.exports = { + AggregateError, + kEmptyObject: Object.freeze({}), + + once(callback) { + let called = false + return function (...args) { + if (called) { + return + } + + called = true + callback.apply(this, args) + } + }, + + createDeferredPromise: function () { + let resolve + let reject // eslint-disable-next-line promise/param-names + + const promise = new Promise((res, rej) => { + resolve = res + reject = rej + }) + return { + promise, + resolve, + reject + } + }, + + promisify(fn) { + return new Promise((resolve, reject) => { + fn((err, ...args) => { + if (err) { + return reject(err) + } + + return resolve(...args) + }) + }) + }, + + debuglog() { + return function () {} + }, + + format(format, ...args) { + // Simplified version of https://nodejs.org/api/util.html#utilformatformat-args + return format.replace(/%([sdifj])/g, function (...[_unused, type]) { + const replacement = args.shift() + + if (type === 'f') { + return replacement.toFixed(6) + } else if (type === 'j') { + return JSON.stringify(replacement) + } else if (type === 's' && typeof replacement === 'object') { + const ctor = replacement.constructor !== Object ? replacement.constructor.name : '' + return `${ctor} {}`.trim() + } else { + return replacement.toString() + } + }) + }, + + inspect(value) { + // Vastly simplified version of https://nodejs.org/api/util.html#utilinspectobject-options + switch (typeof value) { + case 'string': + if (value.includes("'")) { + if (!value.includes('"')) { + return `"${value}"` + } else if (!value.includes('`') && !value.includes('${')) { + return `\`${value}\`` + } + } + + return `'${value}'` + + case 'number': + if (isNaN(value)) { + return 'NaN' + } else if (Object.is(value, -0)) { + return String(value) + } + + return value + + case 'bigint': + return `${String(value)}n` + + case 'boolean': + case 'undefined': + return String(value) + + case 'object': + return '{}' + } + }, + + types: { + isAsyncFunction(fn) { + return fn instanceof AsyncFunction + }, + + isArrayBufferView(arr) { + return ArrayBuffer.isView(arr) + } + }, + isBlob +} +module.exports.promisify.custom = Symbol.for('nodejs.util.promisify.custom') diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/stream.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/stream.js new file mode 100644 index 0000000000000..f5268171458d9 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/stream.js @@ -0,0 +1,162 @@ +/* replacement start */ +const { Buffer } = require('buffer') +/* replacement end */ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +;('use strict') + +const { ObjectDefineProperty, ObjectKeys, ReflectApply } = require('./ours/primordials') + +const { + promisify: { custom: customPromisify } +} = require('./ours/util') + +const { streamReturningOperators, promiseReturningOperators } = require('./internal/streams/operators') + +const { + codes: { ERR_ILLEGAL_CONSTRUCTOR } +} = require('./ours/errors') + +const compose = require('./internal/streams/compose') + +const { pipeline } = require('./internal/streams/pipeline') + +const { destroyer } = require('./internal/streams/destroy') + +const eos = require('./internal/streams/end-of-stream') + +const internalBuffer = {} + +const promises = require('./stream/promises') + +const utils = require('./internal/streams/utils') + +const Stream = (module.exports = require('./internal/streams/legacy').Stream) + +Stream.isDisturbed = utils.isDisturbed +Stream.isErrored = utils.isErrored +Stream.isReadable = utils.isReadable +Stream.Readable = require('./internal/streams/readable') + +for (const key of ObjectKeys(streamReturningOperators)) { + const op = streamReturningOperators[key] + + function fn(...args) { + if (new.target) { + throw ERR_ILLEGAL_CONSTRUCTOR() + } + + return Stream.Readable.from(ReflectApply(op, this, args)) + } + + ObjectDefineProperty(fn, 'name', { + __proto__: null, + value: op.name + }) + ObjectDefineProperty(fn, 'length', { + __proto__: null, + value: op.length + }) + ObjectDefineProperty(Stream.Readable.prototype, key, { + __proto__: null, + value: fn, + enumerable: false, + configurable: true, + writable: true + }) +} + +for (const key of ObjectKeys(promiseReturningOperators)) { + const op = promiseReturningOperators[key] + + function fn(...args) { + if (new.target) { + throw ERR_ILLEGAL_CONSTRUCTOR() + } + + return ReflectApply(op, this, args) + } + + ObjectDefineProperty(fn, 'name', { + __proto__: null, + value: op.name + }) + ObjectDefineProperty(fn, 'length', { + __proto__: null, + value: op.length + }) + ObjectDefineProperty(Stream.Readable.prototype, key, { + __proto__: null, + value: fn, + enumerable: false, + configurable: true, + writable: true + }) +} + +Stream.Writable = require('./internal/streams/writable') +Stream.Duplex = require('./internal/streams/duplex') +Stream.Transform = require('./internal/streams/transform') +Stream.PassThrough = require('./internal/streams/passthrough') +Stream.pipeline = pipeline + +const { addAbortSignal } = require('./internal/streams/add-abort-signal') + +Stream.addAbortSignal = addAbortSignal +Stream.finished = eos +Stream.destroy = destroyer +Stream.compose = compose +ObjectDefineProperty(Stream, 'promises', { + __proto__: null, + configurable: true, + enumerable: true, + + get() { + return promises + } +}) +ObjectDefineProperty(pipeline, customPromisify, { + __proto__: null, + enumerable: true, + + get() { + return promises.pipeline + } +}) +ObjectDefineProperty(eos, customPromisify, { + __proto__: null, + enumerable: true, + + get() { + return promises.finished + } +}) // Backwards-compat with node 0.4.x + +Stream.Stream = Stream + +Stream._isUint8Array = function isUint8Array(value) { + return value instanceof Uint8Array +} + +Stream._uint8ArrayToBuffer = function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength) +} diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/lib/stream/promises.js b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/stream/promises.js new file mode 100644 index 0000000000000..5e7972ee8acb7 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/lib/stream/promises.js @@ -0,0 +1,43 @@ +'use strict' + +const { ArrayPrototypePop, Promise } = require('../ours/primordials') + +const { isIterable, isNodeStream } = require('../internal/streams/utils') + +const { pipelineImpl: pl } = require('../internal/streams/pipeline') + +const { finished } = require('../internal/streams/end-of-stream') + +function pipeline(...streams) { + return new Promise((resolve, reject) => { + let signal + let end + const lastArg = streams[streams.length - 1] + + if (lastArg && typeof lastArg === 'object' && !isNodeStream(lastArg) && !isIterable(lastArg)) { + const options = ArrayPrototypePop(streams) + signal = options.signal + end = options.end + } + + pl( + streams, + (err, value) => { + if (err) { + reject(err) + } else { + resolve(value) + } + }, + { + signal, + end + } + ) + }) +} + +module.exports = { + finished, + pipeline +} diff --git a/node_modules/are-we-there-yet/node_modules/readable-stream/package.json b/node_modules/are-we-there-yet/node_modules/readable-stream/package.json new file mode 100644 index 0000000000000..1b65f2332a447 --- /dev/null +++ b/node_modules/are-we-there-yet/node_modules/readable-stream/package.json @@ -0,0 +1,84 @@ +{ + "name": "readable-stream", + "version": "4.2.0", + "description": "Node.js Streams, a user-land copy of the stream library from Node.js", + "homepage": "https://github.com/nodejs/readable-stream", + "license": "MIT", + "licenses": [ + { + "type": "MIT", + "url": "https://choosealicense.com/licenses/mit/" + } + ], + "keywords": [ + "readable", + "stream", + "pipe" + ], + "repository": { + "type": "git", + "url": "git://github.com/nodejs/readable-stream" + }, + "bugs": { + "url": "https://github.com/nodejs/readable-stream/issues" + }, + "main": "lib/ours/index.js", + "files": [ + "lib", + "LICENSE", + "README.md" + ], + "browser": { + "util": "./lib/ours/util.js", + "./lib/ours/index.js": "./lib/ours/browser.js" + }, + "scripts": { + "build": "node build/build.mjs", + "postbuild": "prettier -w lib test", + "test": "tap --rcfile=./tap.yml test/parallel/test-*.js test/ours/test-*.js", + "test:prepare": "node test/browser/runner-prepare.mjs", + "test:browsers": "node test/browser/runner-browser.mjs", + "test:bundlers": "node test/browser/runner-node.mjs", + "coverage": "c8 -c ./c8.json tap --rcfile=./tap.yml test/parallel/test-*.js test/ours/test-*.js", + "format": "prettier -w src lib test", + "lint": "eslint src" + }, + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10" + }, + "devDependencies": { + "@babel/core": "^7.17.10", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7", + "@babel/plugin-proposal-optional-chaining": "^7.16.7", + "@rollup/plugin-commonjs": "^22.0.0", + "@rollup/plugin-inject": "^4.0.4", + "@rollup/plugin-node-resolve": "^13.3.0", + "@sinonjs/fake-timers": "^9.1.2", + "browserify": "^17.0.0", + "c8": "^7.11.2", + "esbuild": "^0.14.39", + "esbuild-plugin-alias": "^0.2.1", + "eslint": "^8.15.0", + "eslint-config-standard": "^17.0.0", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-n": "^15.2.0", + "eslint-plugin-promise": "^6.0.0", + "playwright": "^1.21.1", + "prettier": "^2.6.2", + "rollup": "^2.72.1", + "rollup-plugin-polyfill-node": "^0.9.0", + "tap": "^16.2.0", + "tap-mocha-reporter": "^5.0.3", + "tape": "^5.5.3", + "tar": "^6.1.11", + "undici": "^5.1.1", + "webpack": "^5.72.1", + "webpack-cli": "^4.9.2" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } +} diff --git a/node_modules/are-we-there-yet/package.json b/node_modules/are-we-there-yet/package.json index cc3d7504299fa..919cb9a1dc5a7 100644 --- a/node_modules/are-we-there-yet/package.json +++ b/node_modules/are-we-there-yet/package.json @@ -1,18 +1,14 @@ { "name": "are-we-there-yet", - "version": "3.0.1", + "version": "4.0.0", "description": "Keep track of the overall completion of many disparate processes", "main": "lib/index.js", "scripts": { "test": "tap", - "npmclilint": "npmcli-lint", "lint": "eslint \"**/*.js\"", "lintfix": "npm run lint -- --fix", "posttest": "npm run lint", "postsnap": "npm run lintfix --", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "snap": "tap", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force" @@ -29,28 +25,32 @@ "homepage": "https://github.com/npm/are-we-there-yet", "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.5.0", + "@npmcli/template-oss": "4.5.1", "tap": "^16.0.1" }, "dependencies": { "delegates": "^1.0.0", - "readable-stream": "^3.6.0" + "readable-stream": "^4.1.0" }, "files": [ "bin/", "lib/" ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "tap": { "branches": 68, "statements": 92, "functions": 86, - "lines": 92 + "lines": 92, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.5.0" + "version": "4.5.1" } } diff --git a/node_modules/base64-js/LICENSE b/node_modules/base64-js/LICENSE new file mode 100644 index 0000000000000..6d52b8acfbe77 --- /dev/null +++ b/node_modules/base64-js/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Jameson Little + +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. diff --git a/node_modules/base64-js/base64js.min.js b/node_modules/base64-js/base64js.min.js new file mode 100644 index 0000000000000..908ac83fd1240 --- /dev/null +++ b/node_modules/base64-js/base64js.min.js @@ -0,0 +1 @@ +(function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?this:self:global:window,b.base64js=a()}})(function(){return function(){function b(d,e,g){function a(j,i){if(!e[j]){if(!d[j]){var f="function"==typeof require&&require;if(!i&&f)return f(j,!0);if(h)return h(j,!0);var c=new Error("Cannot find module '"+j+"'");throw c.code="MODULE_NOT_FOUND",c}var k=e[j]={exports:{}};d[j][0].call(k.exports,function(b){var c=d[j][1][b];return a(c||b)},k,k.exports,b,d,e,g)}return e[j].exports}for(var h="function"==typeof require&&require,c=0;c<g.length;c++)a(g[c]);return a}return b}()({"/":[function(a,b,c){'use strict';function d(a){var b=a.length;if(0<b%4)throw new Error("Invalid string. Length must be a multiple of 4");var c=a.indexOf("=");-1===c&&(c=b);var d=c===b?0:4-c%4;return[c,d]}function e(a,b,c){return 3*(b+c)/4-c}function f(a){var b,c,f=d(a),g=f[0],h=f[1],j=new m(e(a,g,h)),k=0,n=0<h?g-4:g;for(c=0;c<n;c+=4)b=l[a.charCodeAt(c)]<<18|l[a.charCodeAt(c+1)]<<12|l[a.charCodeAt(c+2)]<<6|l[a.charCodeAt(c+3)],j[k++]=255&b>>16,j[k++]=255&b>>8,j[k++]=255&b;return 2===h&&(b=l[a.charCodeAt(c)]<<2|l[a.charCodeAt(c+1)]>>4,j[k++]=255&b),1===h&&(b=l[a.charCodeAt(c)]<<10|l[a.charCodeAt(c+1)]<<4|l[a.charCodeAt(c+2)]>>2,j[k++]=255&b>>8,j[k++]=255&b),j}function g(a){return k[63&a>>18]+k[63&a>>12]+k[63&a>>6]+k[63&a]}function h(a,b,c){for(var d,e=[],f=b;f<c;f+=3)d=(16711680&a[f]<<16)+(65280&a[f+1]<<8)+(255&a[f+2]),e.push(g(d));return e.join("")}function j(a){for(var b,c=a.length,d=c%3,e=[],f=16383,g=0,j=c-d;g<j;g+=f)e.push(h(a,g,g+f>j?j:g+f));return 1===d?(b=a[c-1],e.push(k[b>>2]+k[63&b<<4]+"==")):2===d&&(b=(a[c-2]<<8)+a[c-1],e.push(k[b>>10]+k[63&b>>4]+k[63&b<<2]+"=")),e.join("")}c.byteLength=function(a){var b=d(a),c=b[0],e=b[1];return 3*(c+e)/4-e},c.toByteArray=f,c.fromByteArray=j;for(var k=[],l=[],m="undefined"==typeof Uint8Array?Array:Uint8Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,p=n.length;o<p;++o)k[o]=n[o],l[n.charCodeAt(o)]=o;l[45]=62,l[95]=63},{}]},{},[])("/")}); \ No newline at end of file diff --git a/node_modules/base64-js/index.d.ts b/node_modules/base64-js/index.d.ts new file mode 100644 index 0000000000000..7d9fa1d97cb66 --- /dev/null +++ b/node_modules/base64-js/index.d.ts @@ -0,0 +1,3 @@ +export function byteLength(b64: string): number; +export function toByteArray(b64: string): Uint8Array; +export function fromByteArray(uint8: Uint8Array): string; diff --git a/node_modules/base64-js/index.js b/node_modules/base64-js/index.js new file mode 100644 index 0000000000000..0599f3e4a67e0 --- /dev/null +++ b/node_modules/base64-js/index.js @@ -0,0 +1,150 @@ +'use strict' + +exports.byteLength = byteLength +exports.toByteArray = toByteArray +exports.fromByteArray = fromByteArray + +var lookup = [] +var revLookup = [] +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i +} + +// Support decoding URL-safe base64 strings, as Node.js does. +// See: https://en.wikipedia.org/wiki/Base64#URL_applications +revLookup['-'.charCodeAt(0)] = 62 +revLookup['_'.charCodeAt(0)] = 63 + +function getLens (b64) { + var len = b64.length + + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) + + return [validLen, placeHoldersLen] +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + var i + for (i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + + return parts.join('') +} diff --git a/node_modules/base64-js/package.json b/node_modules/base64-js/package.json new file mode 100644 index 0000000000000..c3972e39f2be5 --- /dev/null +++ b/node_modules/base64-js/package.json @@ -0,0 +1,47 @@ +{ + "name": "base64-js", + "description": "Base64 encoding/decoding in pure JS", + "version": "1.5.1", + "author": "T. Jameson Little <t.jameson.little@gmail.com>", + "typings": "index.d.ts", + "bugs": { + "url": "https://github.com/beatgammit/base64-js/issues" + }, + "devDependencies": { + "babel-minify": "^0.5.1", + "benchmark": "^2.1.4", + "browserify": "^16.3.0", + "standard": "*", + "tape": "4.x" + }, + "homepage": "https://github.com/beatgammit/base64-js", + "keywords": [ + "base64" + ], + "license": "MIT", + "main": "index.js", + "repository": { + "type": "git", + "url": "git://github.com/beatgammit/base64-js.git" + }, + "scripts": { + "build": "browserify -s base64js -r ./ | minify > base64js.min.js", + "lint": "standard", + "test": "npm run lint && npm run unit", + "unit": "tape test/*.js" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] +} diff --git a/node_modules/bin-links/lib/check-bin.js b/node_modules/bin-links/lib/check-bin.js index 750a34fbbff3a..c5b997bb96355 100644 --- a/node_modules/bin-links/lib/check-bin.js +++ b/node_modules/bin-links/lib/check-bin.js @@ -4,9 +4,7 @@ const isWindows = require('./is-windows.js') const binTarget = require('./bin-target.js') const { resolve, dirname } = require('path') const readCmdShim = require('read-cmd-shim') -const fs = require('fs') -const { promisify } = require('util') -const readlink = promisify(fs.readlink) +const { readlink } = require('fs/promises') const checkBin = async ({ bin, path, top, global, force }) => { // always ok to clobber when forced diff --git a/node_modules/bin-links/lib/fix-bin.js b/node_modules/bin-links/lib/fix-bin.js index d1f513a2cf93d..453bd4f3e95b1 100644 --- a/node_modules/bin-links/lib/fix-bin.js +++ b/node_modules/bin-links/lib/fix-bin.js @@ -1,16 +1,14 @@ // make sure that bins are executable, and that they don't have // windows line-endings on the hashbang line. -const fs = require('fs') -const { promisify } = require('util') +const { + chmod, + open, + readFile, +} = require('fs/promises') const execMode = 0o777 & (~process.umask()) const writeFileAtomic = require('write-file-atomic') -const open = promisify(fs.open) -const close = promisify(fs.close) -const read = promisify(fs.read) -const chmod = promisify(fs.chmod) -const readFile = promisify(fs.readFile) const isWindowsHashBang = buf => buf[0] === '#'.charCodeAt(0) && @@ -19,16 +17,16 @@ const isWindowsHashBang = buf => const isWindowsHashbangFile = file => { const FALSE = () => false - return open(file, 'r').then(fd => { + return open(file, 'r').then(fh => { const buf = Buffer.alloc(2048) - return read(fd, buf, 0, 2048, 0) + return fh.read(buf, 0, 2048, 0) .then( () => { const isWHB = isWindowsHashBang(buf) - return close(fd).then(() => isWHB, () => isWHB) + return fh.close().then(() => isWHB, () => isWHB) }, // don't leak FD if read() fails - () => close(fd).then(FALSE, FALSE) + () => fh.close().then(FALSE, FALSE) ) }, FALSE) } diff --git a/node_modules/bin-links/lib/link-gently.js b/node_modules/bin-links/lib/link-gently.js index d9ef25e7c5b0b..89ca0f6bf6b99 100644 --- a/node_modules/bin-links/lib/link-gently.js +++ b/node_modules/bin-links/lib/link-gently.js @@ -4,29 +4,25 @@ // if there's a symlink already, pointing into our pkg, remove it first // then create the symlink -const { promisify } = require('util') const { resolve, dirname } = require('path') -const mkdirp = require('mkdirp-infer-owner') -const fs = require('fs') -const symlink = promisify(fs.symlink) -const readlink = promisify(fs.readlink) -const lstat = promisify(fs.lstat) +const { lstat, mkdir, readlink, rm, symlink } = require('fs/promises') const throwNonEnoent = er => { if (er.code !== 'ENOENT') { throw er } } +const rmOpts = { + recursive: true, + force: true, +} + // even in --force mode, we never create a link over a link we've // already created. you can have multiple packages in a tree trying // to contend for the same bin, or the same manpage listed multiple times, // which creates a race condition and nondeterminism. const seen = new Set() -// disable glob in our rimraf calls -const rimraf = promisify(require('rimraf')) -const rm = path => rimraf(path, { glob: false }) - const SKIP = Symbol('skip - missing or already installed') const CLOBBER = Symbol('clobber - ours or in forceful mode') @@ -52,7 +48,7 @@ const linkGently = async ({ path, to, from, absFrom, force }) => { // exists! maybe clobber if we can if (stTo) { if (!stTo.isSymbolicLink()) { - return force && rm(to).then(() => CLOBBER) + return force && rm(to, rmOpts).then(() => CLOBBER) } return readlink(to).then(target => { @@ -62,14 +58,14 @@ const linkGently = async ({ path, to, from, absFrom, force }) => { target = resolve(dirname(to), target) if (target.indexOf(path) === 0 || force) { - return rm(to).then(() => CLOBBER) + return rm(to, rmOpts).then(() => CLOBBER) } // neither skip nor clobber return false }) } else { // doesn't exist, dir might not either - return mkdirp(dirname(to)) + return mkdir(dirname(to), { recursive: true }) } }) .then(skipOrClobber => { @@ -78,7 +74,7 @@ const linkGently = async ({ path, to, from, absFrom, force }) => { } return symlink(from, to, 'file').catch(er => { if (skipOrClobber === CLOBBER || force) { - return rm(to).then(() => symlink(from, to, 'file')) + return rm(to, rmOpts).then(() => symlink(from, to, 'file')) } throw er }).then(() => true) diff --git a/node_modules/bin-links/lib/shim-bin.js b/node_modules/bin-links/lib/shim-bin.js index bde328e510c53..d5e19c0f9617f 100644 --- a/node_modules/bin-links/lib/shim-bin.js +++ b/node_modules/bin-links/lib/shim-bin.js @@ -1,7 +1,5 @@ -const { promisify } = require('util') const { resolve, dirname } = require('path') -const fs = require('fs') -const lstat = promisify(fs.lstat) +const { lstat } = require('fs/promises') const throwNonEnoent = er => { if (er.code !== 'ENOENT') { throw er diff --git a/node_modules/bin-links/node_modules/npm-normalize-package-bin/LICENSE b/node_modules/bin-links/node_modules/npm-normalize-package-bin/LICENSE deleted file mode 100644 index 19cec97b18468..0000000000000 --- a/node_modules/bin-links/node_modules/npm-normalize-package-bin/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) npm, Inc. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/bin-links/package.json b/node_modules/bin-links/package.json index ff240c227622d..589245a931391 100644 --- a/node_modules/bin-links/package.json +++ b/node_modules/bin-links/package.json @@ -1,12 +1,9 @@ { "name": "bin-links", - "version": "3.0.3", + "version": "4.0.1", "description": "JavaScript package binary linker", "main": "./lib/index.js", "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "snap": "tap", "test": "tap", "lint": "eslint \"**/*.js\"", @@ -26,35 +23,36 @@ ], "license": "ISC", "dependencies": { - "cmd-shim": "^5.0.0", - "mkdirp-infer-owner": "^2.0.0", - "npm-normalize-package-bin": "^2.0.0", - "read-cmd-shim": "^3.0.0", - "rimraf": "^3.0.0", - "write-file-atomic": "^4.0.0" + "cmd-shim": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "read-cmd-shim": "^4.0.0", + "write-file-atomic": "^5.0.0" }, "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.5.0", - "mkdirp": "^1.0.3", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.5.1", "require-inject": "^1.4.4", "tap": "^16.0.1" }, "tap": { "check-coverage": true, - "coverage-map": "map.js" + "coverage-map": "map.js", + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "files": [ "bin/", "lib/" ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "author": "GitHub Inc.", "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", "windowsCI": false, - "version": "3.5.0" + "version": "4.5.1" } } diff --git a/node_modules/cacache/lib/content/read.js b/node_modules/cacache/lib/content/read.js index 7c20c75257b4f..f41b539df65dc 100644 --- a/node_modules/cacache/lib/content/read.js +++ b/node_modules/cacache/lib/content/read.js @@ -1,6 +1,6 @@ 'use strict' -const fs = require('@npmcli/fs') +const fs = require('fs/promises') const fsm = require('fs-minipass') const ssri = require('ssri') const contentPath = require('./path') @@ -46,24 +46,6 @@ const readPipeline = (cpath, size, sri, stream) => { return stream } -module.exports.sync = readSync - -function readSync (cache, integrity, opts = {}) { - const { size } = opts - return withContentSriSync(cache, integrity, (cpath, sri) => { - const data = fs.readFileSync(cpath, { encoding: null }) - if (typeof size === 'number' && size !== data.length) { - throw sizeError(size, data.length) - } - - if (ssri.checkData(data, sri)) { - return data - } - - throw integrityError(sri, cpath) - }) -} - module.exports.stream = readStream module.exports.readStream = readStream @@ -88,7 +70,6 @@ function readStream (cache, integrity, opts = {}) { } module.exports.copy = copy -module.exports.copy.sync = copySync function copy (cache, integrity, dest) { return withContentSri(cache, integrity, (cpath, sri) => { @@ -96,12 +77,6 @@ function copy (cache, integrity, dest) { }) } -function copySync (cache, integrity, dest) { - return withContentSriSync(cache, integrity, (cpath, sri) => { - return fs.copyFileSync(cpath, dest) - }) -} - module.exports.hasContent = hasContent async function hasContent (cache, integrity) { @@ -130,34 +105,6 @@ async function hasContent (cache, integrity) { } } -module.exports.hasContent.sync = hasContentSync - -function hasContentSync (cache, integrity) { - if (!integrity) { - return false - } - - return withContentSriSync(cache, integrity, (cpath, sri) => { - try { - const stat = fs.statSync(cpath) - return { size: stat.size, sri, stat } - } catch (err) { - if (err.code === 'ENOENT') { - return false - } - - if (err.code === 'EPERM') { - /* istanbul ignore else */ - if (process.platform !== 'win32') { - throw err - } else { - return false - } - } - } - }) -} - async function withContentSri (cache, integrity, fn) { const sri = ssri.parse(integrity) // If `integrity` has multiple entries, pick the first digest @@ -201,28 +148,6 @@ async function withContentSri (cache, integrity, fn) { } } -function withContentSriSync (cache, integrity, fn) { - const sri = ssri.parse(integrity) - // If `integrity` has multiple entries, pick the first digest - // with available local data. - const algo = sri.pickAlgorithm() - const digests = sri[algo] - if (digests.length <= 1) { - const cpath = contentPath(cache, digests[0]) - return fn(cpath, digests[0]) - } else { - let lastErr = null - for (const meta of digests) { - try { - return withContentSriSync(cache, meta, fn) - } catch (err) { - lastErr = err - } - } - throw lastErr - } -} - function sizeError (expected, found) { /* eslint-disable-next-line max-len */ const err = new Error(`Bad data size: expected inserted data to be ${expected} bytes, but got ${found} instead`) diff --git a/node_modules/cacache/lib/content/rm.js b/node_modules/cacache/lib/content/rm.js index f7333053b393f..ce58d679e4cb2 100644 --- a/node_modules/cacache/lib/content/rm.js +++ b/node_modules/cacache/lib/content/rm.js @@ -1,10 +1,8 @@ 'use strict' -const util = require('util') - +const fs = require('fs/promises') const contentPath = require('./path') const { hasContent } = require('./read') -const rimraf = util.promisify(require('rimraf')) module.exports = rm @@ -12,7 +10,7 @@ async function rm (cache, integrity) { const content = await hasContent(cache, integrity) // ~pretty~ sure we can't end up with a content lacking sri, but be safe if (content && content.sri) { - await rimraf(contentPath(cache, content.sri)) + await fs.rm(contentPath(cache, content.sri), { recursive: true, force: true }) return true } else { return false diff --git a/node_modules/cacache/lib/content/write.js b/node_modules/cacache/lib/content/write.js index 0e8c0f4936064..d799ae883752b 100644 --- a/node_modules/cacache/lib/content/write.js +++ b/node_modules/cacache/lib/content/write.js @@ -1,17 +1,14 @@ 'use strict' const events = require('events') -const util = require('util') const contentPath = require('./path') -const fixOwner = require('../util/fix-owner') -const fs = require('@npmcli/fs') +const fs = require('fs/promises') const moveFile = require('../util/move-file') const Minipass = require('minipass') const Pipeline = require('minipass-pipeline') const Flush = require('minipass-flush') const path = require('path') -const rimraf = util.promisify(require('rimraf')) const ssri = require('ssri') const uniqueFilename = require('unique-filename') const fsm = require('fs-minipass') @@ -40,7 +37,7 @@ async function write (cache, data, opts = {}) { return { integrity: sri, size: data.length } } finally { if (!tmp.moved) { - await rimraf(tmp.target) + await fs.rm(tmp.target, { recursive: true, force: true }) } } } @@ -111,7 +108,7 @@ async function handleContent (inputStream, cache, opts) { return res } finally { if (!tmp.moved) { - await rimraf(tmp.target) + await fs.rm(tmp.target, { recursive: true, force: true }) } } } @@ -152,7 +149,7 @@ async function pipeToTmp (inputStream, cache, tmpTarget, opts) { async function makeTmp (cache, opts) { const tmpTarget = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix) - await fixOwner.mkdirfix(cache, path.dirname(tmpTarget)) + await fs.mkdir(path.dirname(tmpTarget), { recursive: true }) return { target: tmpTarget, moved: false, @@ -163,10 +160,9 @@ async function moveToDestination (tmp, cache, sri, opts) { const destination = contentPath(cache, sri) const destDir = path.dirname(destination) - await fixOwner.mkdirfix(cache, destDir) + await fs.mkdir(destDir, { recursive: true }) await moveFile(tmp.target, destination) tmp.moved = true - await fixOwner.chownr(cache, destination) } function sizeError (expected, found) { diff --git a/node_modules/cacache/lib/entry-index.js b/node_modules/cacache/lib/entry-index.js index 1dc73a93f6b29..e81ef525a778d 100644 --- a/node_modules/cacache/lib/entry-index.js +++ b/node_modules/cacache/lib/entry-index.js @@ -1,21 +1,23 @@ 'use strict' -const util = require('util') const crypto = require('crypto') -const fs = require('@npmcli/fs') +const { + appendFile, + mkdir, + readFile, + readdir, + rm, + writeFile, +} = require('fs/promises') const Minipass = require('minipass') const path = require('path') const ssri = require('ssri') const uniqueFilename = require('unique-filename') const contentPath = require('./content/path') -const fixOwner = require('./util/fix-owner') const hashToSegments = require('./util/hash-to-segments') const indexV = require('../package.json')['cache-version'].index const moveFile = require('@npmcli/move-file') -const _rimraf = require('rimraf') -const rimraf = util.promisify(_rimraf) -rimraf.sync = _rimraf.sync module.exports.NotFoundError = class NotFoundError extends Error { constructor (cache, key) { @@ -66,7 +68,7 @@ async function compact (cache, key, matchFn, opts = {}) { const setup = async () => { const target = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix) - await fixOwner.mkdirfix(cache, path.dirname(target)) + await mkdir(path.dirname(target), { recursive: true }) return { target, moved: false, @@ -75,24 +77,17 @@ async function compact (cache, key, matchFn, opts = {}) { const teardown = async (tmp) => { if (!tmp.moved) { - return rimraf(tmp.target) + return rm(tmp.target, { recursive: true, force: true }) } } const write = async (tmp) => { - await fs.writeFile(tmp.target, newIndex, { flag: 'wx' }) - await fixOwner.mkdirfix(cache, path.dirname(bucket)) + await writeFile(tmp.target, newIndex, { flag: 'wx' }) + await mkdir(path.dirname(bucket), { recursive: true }) // we use @npmcli/move-file directly here because we // want to overwrite the existing file await moveFile(tmp.target, bucket) tmp.moved = true - try { - await fixOwner.chownr(cache, bucket) - } catch (err) { - if (err.code !== 'ENOENT') { - throw err - } - } } // write the file atomically @@ -124,7 +119,7 @@ async function insert (cache, key, integrity, opts = {}) { metadata, } try { - await fixOwner.mkdirfix(cache, path.dirname(bucket)) + await mkdir(path.dirname(bucket), { recursive: true }) const stringified = JSON.stringify(entry) // NOTE - Cleverness ahoy! // @@ -134,44 +129,13 @@ async function insert (cache, key, integrity, opts = {}) { // // Thanks to @isaacs for the whiteboarding session that ended up with // this. - await fs.appendFile(bucket, `\n${hashEntry(stringified)}\t${stringified}`) - await fixOwner.chownr(cache, bucket) + await appendFile(bucket, `\n${hashEntry(stringified)}\t${stringified}`) } catch (err) { if (err.code === 'ENOENT') { return undefined } throw err - // There's a class of race conditions that happen when things get deleted - // during fixOwner, or between the two mkdirfix/chownr calls. - // - // It's perfectly fine to just not bother in those cases and lie - // that the index entry was written. Because it's a cache. - } - return formatEntry(cache, entry) -} - -module.exports.insert.sync = insertSync - -function insertSync (cache, key, integrity, opts = {}) { - const { metadata, size } = opts - const bucket = bucketPath(cache, key) - const entry = { - key, - integrity: integrity && ssri.stringify(integrity), - time: Date.now(), - size, - metadata, - } - fixOwner.mkdirfix.sync(cache, path.dirname(bucket)) - const stringified = JSON.stringify(entry) - fs.appendFileSync(bucket, `\n${hashEntry(stringified)}\t${stringified}`) - try { - fixOwner.chownr.sync(cache, bucket) - } catch (err) { - if (err.code !== 'ENOENT') { - throw err - } } return formatEntry(cache, entry) } @@ -198,27 +162,6 @@ async function find (cache, key) { } } -module.exports.find.sync = findSync - -function findSync (cache, key) { - const bucket = bucketPath(cache, key) - try { - return bucketEntriesSync(bucket).reduce((latest, next) => { - if (next && next.key === key) { - return formatEntry(cache, next) - } else { - return latest - } - }, null) - } catch (err) { - if (err.code === 'ENOENT') { - return null - } else { - throw err - } - } -} - module.exports.delete = del function del (cache, key, opts = {}) { @@ -227,18 +170,7 @@ function del (cache, key, opts = {}) { } const bucket = bucketPath(cache, key) - return rimraf(bucket) -} - -module.exports.delete.sync = delSync - -function delSync (cache, key, opts = {}) { - if (!opts.removeFully) { - return insertSync(cache, key, null, opts) - } - - const bucket = bucketPath(cache, key) - return rimraf.sync(bucket) + return rm(bucket, { recursive: true, force: true }) } module.exports.lsStream = lsStream @@ -304,14 +236,7 @@ async function ls (cache) { module.exports.bucketEntries = bucketEntries async function bucketEntries (bucket, filter) { - const data = await fs.readFile(bucket, 'utf8') - return _bucketEntries(data, filter) -} - -module.exports.bucketEntries.sync = bucketEntriesSync - -function bucketEntriesSync (bucket, filter) { - const data = fs.readFileSync(bucket, 'utf8') + const data = await readFile(bucket, 'utf8') return _bucketEntries(data, filter) } @@ -331,10 +256,11 @@ function _bucketEntries (data, filter) { let obj try { obj = JSON.parse(pieces[1]) - } catch (e) { - // Entry is corrupted! - return + } catch (_) { + // eslint-ignore-next-line no-empty-block } + // coverage disabled here, no need to test with an entry that parses to something falsey + // istanbul ignore else if (obj) { entries.push(obj) } @@ -394,7 +320,7 @@ function formatEntry (cache, entry, keepAll) { } function readdirOrEmpty (dir) { - return fs.readdir(dir).catch((err) => { + return readdir(dir).catch((err) => { if (err.code === 'ENOENT' || err.code === 'ENOTDIR') { return [] } diff --git a/node_modules/cacache/lib/get.js b/node_modules/cacache/lib/get.js index 254b4ecc38b57..272ddb62920a4 100644 --- a/node_modules/cacache/lib/get.js +++ b/node_modules/cacache/lib/get.js @@ -53,61 +53,6 @@ async function getDataByDigest (cache, key, opts = {}) { } module.exports.byDigest = getDataByDigest -function getDataSync (cache, key, opts = {}) { - const { integrity, memoize, size } = opts - const memoized = memo.get(cache, key, opts) - - if (memoized && memoize !== false) { - return { - metadata: memoized.entry.metadata, - data: memoized.data, - integrity: memoized.entry.integrity, - size: memoized.entry.size, - } - } - const entry = index.find.sync(cache, key, opts) - if (!entry) { - throw new index.NotFoundError(cache, key) - } - const data = read.sync(cache, entry.integrity, { - integrity: integrity, - size: size, - }) - const res = { - metadata: entry.metadata, - data: data, - size: entry.size, - integrity: entry.integrity, - } - if (memoize) { - memo.put(cache, entry, res.data, opts) - } - - return res -} - -module.exports.sync = getDataSync - -function getDataByDigestSync (cache, digest, opts = {}) { - const { integrity, memoize, size } = opts - const memoized = memo.get.byDigest(cache, digest, opts) - - if (memoized && memoize !== false) { - return memoized - } - - const res = read.sync(cache, digest, { - integrity: integrity, - size: size, - }) - if (memoize) { - memo.put.byDigest(cache, digest, res, opts) - } - - return res -} -module.exports.sync.byDigest = getDataByDigestSync - const getMemoizedStream = (memoized) => { const stream = new Minipass() stream.on('newListener', function (ev, cb) { diff --git a/node_modules/cacache/lib/index.js b/node_modules/cacache/lib/index.js index 1c56be68dd8fd..c9b0da5f3a271 100644 --- a/node_modules/cacache/lib/index.js +++ b/node_modules/cacache/lib/index.js @@ -17,15 +17,12 @@ module.exports.ls.stream = index.lsStream module.exports.get = get module.exports.get.byDigest = get.byDigest -module.exports.get.sync = get.sync -module.exports.get.sync.byDigest = get.sync.byDigest module.exports.get.stream = get.stream module.exports.get.stream.byDigest = get.stream.byDigest module.exports.get.copy = get.copy module.exports.get.copy.byDigest = get.copy.byDigest module.exports.get.info = get.info module.exports.get.hasContent = get.hasContent -module.exports.get.hasContent.sync = get.hasContent.sync module.exports.put = put module.exports.put.stream = put.stream diff --git a/node_modules/cacache/lib/rm.js b/node_modules/cacache/lib/rm.js index 5f00071770b8d..a94760c7cf243 100644 --- a/node_modules/cacache/lib/rm.js +++ b/node_modules/cacache/lib/rm.js @@ -1,11 +1,10 @@ 'use strict' -const util = require('util') - +const { rm } = require('fs/promises') +const glob = require('./util/glob.js') const index = require('./entry-index') const memo = require('./memoization') const path = require('path') -const rimraf = util.promisify(require('rimraf')) const rmContent = require('./content/rm') module.exports = entry @@ -25,7 +24,8 @@ function content (cache, integrity) { module.exports.all = all -function all (cache) { +async function all (cache) { memo.clearMemoized() - return rimraf(path.join(cache, '*(content-*|index-*)')) + const paths = await glob(path.join(cache, '*(content-*|index-*)'), { silent: true, nosort: true }) + return Promise.all(paths.map((p) => rm(p, { recursive: true, force: true }))) } diff --git a/node_modules/cacache/lib/util/glob.js b/node_modules/cacache/lib/util/glob.js new file mode 100644 index 0000000000000..8908a3aedb4ee --- /dev/null +++ b/node_modules/cacache/lib/util/glob.js @@ -0,0 +1,7 @@ +'use strict' + +const { promisify } = require('util') +const glob = promisify(require('glob')) + +const globify = (pattern) => pattern.split('//').join('/') +module.exports = (path, options) => glob(globify(path), options) diff --git a/node_modules/cacache/lib/util/move-file.js b/node_modules/cacache/lib/util/move-file.js index a0b40413cb56e..2d4de41cf8f91 100644 --- a/node_modules/cacache/lib/util/move-file.js +++ b/node_modules/cacache/lib/util/move-file.js @@ -1,6 +1,6 @@ 'use strict' -const fs = require('@npmcli/fs') +const fs = require('fs/promises') const move = require('@npmcli/move-file') const pinflight = require('promise-inflight') diff --git a/node_modules/cacache/lib/util/tmp.js b/node_modules/cacache/lib/util/tmp.js index b4437cfcbeed6..0bf5302136ebe 100644 --- a/node_modules/cacache/lib/util/tmp.js +++ b/node_modules/cacache/lib/util/tmp.js @@ -1,8 +1,7 @@ 'use strict' -const fs = require('@npmcli/fs') - -const fixOwner = require('./fix-owner') +const { withTempDir } = require('@npmcli/fs') +const fs = require('fs/promises') const path = require('path') module.exports.mkdir = mktmpdir @@ -23,11 +22,5 @@ function withTmp (cache, opts, cb) { cb = opts opts = {} } - return fs.withTempDir(path.join(cache, 'tmp'), cb, opts) -} - -module.exports.fix = fixtmpdir - -function fixtmpdir (cache) { - return fixOwner(cache, path.join(cache, 'tmp')) + return withTempDir(path.join(cache, 'tmp'), cb, opts) } diff --git a/node_modules/cacache/lib/verify.js b/node_modules/cacache/lib/verify.js index 52692a01d192f..33f566c12afa9 100644 --- a/node_modules/cacache/lib/verify.js +++ b/node_modules/cacache/lib/verify.js @@ -1,20 +1,21 @@ 'use strict' -const util = require('util') - +const { + mkdir, + readFile, + rm, + stat, + truncate, + writeFile, +} = require('fs/promises') const pMap = require('p-map') const contentPath = require('./content/path') -const fixOwner = require('./util/fix-owner') -const fs = require('@npmcli/fs') const fsm = require('fs-minipass') -const glob = util.promisify(require('glob')) +const glob = require('./util/glob.js') const index = require('./entry-index') const path = require('path') -const rimraf = util.promisify(require('rimraf')) const ssri = require('ssri') -const globify = pattern => pattern.split('\\').join('/') - const hasOwnProperty = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key) @@ -77,9 +78,7 @@ async function markEndTime (cache, opts) { async function fixPerms (cache, opts) { opts.log.silly('verify', 'fixing cache permissions') - await fixOwner.mkdirfix(cache, cache) - // TODO - fix file permissions too - await fixOwner.chownr(cache, cache) + await mkdir(cache, { recursive: true }) return null } @@ -90,7 +89,7 @@ async function fixPerms (cache, opts) { // 2. Mark each integrity value as "live" // 3. Read entire filesystem tree in `content-vX/` dir // 4. If content is live, verify its checksum and delete it if it fails -// 5. If content is not marked as live, rimraf it. +// 5. If content is not marked as live, rm it. // async function garbageCollect (cache, opts) { opts.log.silly('verify', 'garbage collecting content') @@ -107,7 +106,7 @@ async function garbageCollect (cache, opts) { indexStream.on('end', resolve).on('error', reject) }) const contentDir = contentPath.contentDir(cache) - const files = await glob(globify(path.join(contentDir, '**')), { + const files = await glob(path.join(contentDir, '**'), { follow: false, nodir: true, nosort: true, @@ -139,8 +138,8 @@ async function garbageCollect (cache, opts) { } else { // No entries refer to this content. We can delete. stats.reclaimedCount++ - const s = await fs.stat(f) - await rimraf(f) + const s = await stat(f) + await rm(f, { recursive: true, force: true }) stats.reclaimedSize += s.size } return stats @@ -153,7 +152,7 @@ async function garbageCollect (cache, opts) { async function verifyContent (filepath, sri) { const contentInfo = {} try { - const { size } = await fs.stat(filepath) + const { size } = await stat(filepath) contentInfo.size = size contentInfo.valid = true await ssri.checkStream(new fsm.ReadStream(filepath), sri) @@ -165,7 +164,7 @@ async function verifyContent (filepath, sri) { throw err } - await rimraf(filepath) + await rm(filepath, { recursive: true, force: true }) contentInfo.valid = false } return contentInfo @@ -211,13 +210,13 @@ async function rebuildIndex (cache, opts) { } async function rebuildBucket (cache, bucket, stats, opts) { - await fs.truncate(bucket._path) + await truncate(bucket._path) // This needs to be serialized because cacache explicitly // lets very racy bucket conflicts clobber each other. for (const entry of bucket) { const content = contentPath(cache, entry.integrity) try { - await fs.stat(content) + await stat(content) await index.insert(cache, entry.key, entry.integrity, { metadata: entry.metadata, size: entry.size, @@ -236,22 +235,18 @@ async function rebuildBucket (cache, bucket, stats, opts) { function cleanTmp (cache, opts) { opts.log.silly('verify', 'cleaning tmp directory') - return rimraf(path.join(cache, 'tmp')) + return rm(path.join(cache, 'tmp'), { recursive: true, force: true }) } -function writeVerifile (cache, opts) { +async function writeVerifile (cache, opts) { const verifile = path.join(cache, '_lastverified') opts.log.silly('verify', 'writing verifile to ' + verifile) - try { - return fs.writeFile(verifile, `${Date.now()}`) - } finally { - fixOwner.chownr.sync(cache, verifile) - } + return writeFile(verifile, `${Date.now()}`) } module.exports.lastRun = lastRun async function lastRun (cache) { - const data = await fs.readFile(path.join(cache, '_lastverified'), { encoding: 'utf8' }) + const data = await readFile(path.join(cache, '_lastverified'), { encoding: 'utf8' }) return new Date(+data) } diff --git a/node_modules/cacache/package.json b/node_modules/cacache/package.json index 7dbd407d8fccf..ab5f13a027173 100644 --- a/node_modules/cacache/package.json +++ b/node_modules/cacache/package.json @@ -1,6 +1,6 @@ { "name": "cacache", - "version": "16.1.3", + "version": "17.0.1", "cache-version": { "content": "2", "index": "5" @@ -12,9 +12,6 @@ "lib/" ], "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "test": "tap", "snap": "tap", "coverage": "tap", @@ -48,37 +45,39 @@ ], "license": "ISC", "dependencies": { - "@npmcli/fs": "^2.1.0", - "@npmcli/move-file": "^2.0.0", - "chownr": "^2.0.0", + "@npmcli/fs": "^3.0.0", + "@npmcli/move-file": "^3.0.0", "fs-minipass": "^2.1.0", "glob": "^8.0.1", - "infer-owner": "^1.0.4", "lru-cache": "^7.7.1", "minipass": "^3.1.6", "minipass-collect": "^1.0.2", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", - "mkdirp": "^1.0.4", "p-map": "^4.0.0", "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^9.0.0", + "ssri": "^10.0.0", "tar": "^6.1.11", - "unique-filename": "^2.0.0" + "unique-filename": "^3.0.0" }, "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.5.1", "tap": "^16.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", "windowsCI": false, - "version": "3.5.0" + "version": "4.5.1" }, - "author": "GitHub Inc." + "author": "GitHub Inc.", + "tap": { + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] + } } diff --git a/node_modules/cmd-shim/lib/index.js b/node_modules/cmd-shim/lib/index.js index 10494e58ad548..cf223feb2aa65 100644 --- a/node_modules/cmd-shim/lib/index.js +++ b/node_modules/cmd-shim/lib/index.js @@ -8,16 +8,16 @@ // Write a binroot/pkg.bin + ".cmd" file that has this line in it: // @<prog> <args...> %dp0%<target> %* -const { promisify } = require('util') -const fs = require('fs') -const writeFile = promisify(fs.writeFile) -const readFile = promisify(fs.readFile) -const chmod = promisify(fs.chmod) -const stat = promisify(fs.stat) -const unlink = promisify(fs.unlink) +const { + chmod, + mkdir, + readFile, + stat, + unlink, + writeFile, +} = require('fs/promises') const { dirname, relative } = require('path') -const mkdir = require('mkdirp-infer-owner') const toBatchSyntax = require('./to-batch-syntax') const shebangExpr = /^#!\s*(?:\/usr\/bin\/env\s*((?:[^ \t=]+=[^ \t=]+\s+)*))?([^ \t]+)(.*)$/ @@ -42,7 +42,7 @@ const writeShim = (from, to) => // First, check if the bin is a #! of some sort. // If not, then assume it's something that'll be compiled, or some other // sort of script, and just call it directly. - mkdir(dirname(to)) + mkdir(dirname(to), { recursive: true }) .then(() => readFile(from, 'utf8')) .then(data => { const firstLine = data.trim().split(/\r*\n/)[0] diff --git a/node_modules/cmd-shim/package.json b/node_modules/cmd-shim/package.json index 1bcbdc4342ced..80cbec8aec6a7 100644 --- a/node_modules/cmd-shim/package.json +++ b/node_modules/cmd-shim/package.json @@ -1,18 +1,14 @@ { "name": "cmd-shim", - "version": "5.0.0", + "version": "6.0.0", "description": "Used in npm for command line application support", "scripts": { "test": "tap", "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags", "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix", - "prepublishOnly": "git push origin --follow-tags", "posttest": "npm run lint" }, "repository": { @@ -20,13 +16,9 @@ "url": "https://github.com/npm/cmd-shim.git" }, "license": "ISC", - "dependencies": { - "mkdirp-infer-owner": "^2.0.0" - }, "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.2.2", - "rimraf": "^3.0.2", + "@npmcli/template-oss": "4.5.1", "tap": "^16.0.1" }, "files": [ @@ -37,14 +29,18 @@ "tap": { "before": "test/00-setup.js", "after": "test/zz-cleanup.js", - "check-coverage": true + "check-coverage": true, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "author": "GitHub Inc.", "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.2.2" + "version": "4.5.1" } } diff --git a/node_modules/event-target-shim/LICENSE b/node_modules/event-target-shim/LICENSE new file mode 100644 index 0000000000000..c39e6949ed2dc --- /dev/null +++ b/node_modules/event-target-shim/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Toru Nagashima + +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. + diff --git a/node_modules/event-target-shim/dist/event-target-shim.js b/node_modules/event-target-shim/dist/event-target-shim.js new file mode 100644 index 0000000000000..53ce22036e35e --- /dev/null +++ b/node_modules/event-target-shim/dist/event-target-shim.js @@ -0,0 +1,871 @@ +/** + * @author Toru Nagashima <https://github.com/mysticatea> + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +/** + * @typedef {object} PrivateData + * @property {EventTarget} eventTarget The event target. + * @property {{type:string}} event The original event object. + * @property {number} eventPhase The current event phase. + * @property {EventTarget|null} currentTarget The current event target. + * @property {boolean} canceled The flag to prevent default. + * @property {boolean} stopped The flag to stop propagation. + * @property {boolean} immediateStopped The flag to stop propagation immediately. + * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null. + * @property {number} timeStamp The unix time. + * @private + */ + +/** + * Private data for event wrappers. + * @type {WeakMap<Event, PrivateData>} + * @private + */ +const privateData = new WeakMap(); + +/** + * Cache for wrapper classes. + * @type {WeakMap<Object, Function>} + * @private + */ +const wrappers = new WeakMap(); + +/** + * Get private data. + * @param {Event} event The event object to get private data. + * @returns {PrivateData} The private data of the event. + * @private + */ +function pd(event) { + const retv = privateData.get(event); + console.assert( + retv != null, + "'this' is expected an Event object, but got", + event + ); + return retv +} + +/** + * https://dom.spec.whatwg.org/#set-the-canceled-flag + * @param data {PrivateData} private data. + */ +function setCancelFlag(data) { + if (data.passiveListener != null) { + if ( + typeof console !== "undefined" && + typeof console.error === "function" + ) { + console.error( + "Unable to preventDefault inside passive event listener invocation.", + data.passiveListener + ); + } + return + } + if (!data.event.cancelable) { + return + } + + data.canceled = true; + if (typeof data.event.preventDefault === "function") { + data.event.preventDefault(); + } +} + +/** + * @see https://dom.spec.whatwg.org/#interface-event + * @private + */ +/** + * The event wrapper. + * @constructor + * @param {EventTarget} eventTarget The event target of this dispatching. + * @param {Event|{type:string}} event The original event to wrap. + */ +function Event(eventTarget, event) { + privateData.set(this, { + eventTarget, + event, + eventPhase: 2, + currentTarget: eventTarget, + canceled: false, + stopped: false, + immediateStopped: false, + passiveListener: null, + timeStamp: event.timeStamp || Date.now(), + }); + + // https://heycam.github.io/webidl/#Unforgeable + Object.defineProperty(this, "isTrusted", { value: false, enumerable: true }); + + // Define accessors + const keys = Object.keys(event); + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + if (!(key in this)) { + Object.defineProperty(this, key, defineRedirectDescriptor(key)); + } + } +} + +// Should be enumerable, but class methods are not enumerable. +Event.prototype = { + /** + * The type of this event. + * @type {string} + */ + get type() { + return pd(this).event.type + }, + + /** + * The target of this event. + * @type {EventTarget} + */ + get target() { + return pd(this).eventTarget + }, + + /** + * The target of this event. + * @type {EventTarget} + */ + get currentTarget() { + return pd(this).currentTarget + }, + + /** + * @returns {EventTarget[]} The composed path of this event. + */ + composedPath() { + const currentTarget = pd(this).currentTarget; + if (currentTarget == null) { + return [] + } + return [currentTarget] + }, + + /** + * Constant of NONE. + * @type {number} + */ + get NONE() { + return 0 + }, + + /** + * Constant of CAPTURING_PHASE. + * @type {number} + */ + get CAPTURING_PHASE() { + return 1 + }, + + /** + * Constant of AT_TARGET. + * @type {number} + */ + get AT_TARGET() { + return 2 + }, + + /** + * Constant of BUBBLING_PHASE. + * @type {number} + */ + get BUBBLING_PHASE() { + return 3 + }, + + /** + * The target of this event. + * @type {number} + */ + get eventPhase() { + return pd(this).eventPhase + }, + + /** + * Stop event bubbling. + * @returns {void} + */ + stopPropagation() { + const data = pd(this); + + data.stopped = true; + if (typeof data.event.stopPropagation === "function") { + data.event.stopPropagation(); + } + }, + + /** + * Stop event bubbling. + * @returns {void} + */ + stopImmediatePropagation() { + const data = pd(this); + + data.stopped = true; + data.immediateStopped = true; + if (typeof data.event.stopImmediatePropagation === "function") { + data.event.stopImmediatePropagation(); + } + }, + + /** + * The flag to be bubbling. + * @type {boolean} + */ + get bubbles() { + return Boolean(pd(this).event.bubbles) + }, + + /** + * The flag to be cancelable. + * @type {boolean} + */ + get cancelable() { + return Boolean(pd(this).event.cancelable) + }, + + /** + * Cancel this event. + * @returns {void} + */ + preventDefault() { + setCancelFlag(pd(this)); + }, + + /** + * The flag to indicate cancellation state. + * @type {boolean} + */ + get defaultPrevented() { + return pd(this).canceled + }, + + /** + * The flag to be composed. + * @type {boolean} + */ + get composed() { + return Boolean(pd(this).event.composed) + }, + + /** + * The unix time of this event. + * @type {number} + */ + get timeStamp() { + return pd(this).timeStamp + }, + + /** + * The target of this event. + * @type {EventTarget} + * @deprecated + */ + get srcElement() { + return pd(this).eventTarget + }, + + /** + * The flag to stop event bubbling. + * @type {boolean} + * @deprecated + */ + get cancelBubble() { + return pd(this).stopped + }, + set cancelBubble(value) { + if (!value) { + return + } + const data = pd(this); + + data.stopped = true; + if (typeof data.event.cancelBubble === "boolean") { + data.event.cancelBubble = true; + } + }, + + /** + * The flag to indicate cancellation state. + * @type {boolean} + * @deprecated + */ + get returnValue() { + return !pd(this).canceled + }, + set returnValue(value) { + if (!value) { + setCancelFlag(pd(this)); + } + }, + + /** + * Initialize this event object. But do nothing under event dispatching. + * @param {string} type The event type. + * @param {boolean} [bubbles=false] The flag to be possible to bubble up. + * @param {boolean} [cancelable=false] The flag to be possible to cancel. + * @deprecated + */ + initEvent() { + // Do nothing. + }, +}; + +// `constructor` is not enumerable. +Object.defineProperty(Event.prototype, "constructor", { + value: Event, + configurable: true, + writable: true, +}); + +// Ensure `event instanceof window.Event` is `true`. +if (typeof window !== "undefined" && typeof window.Event !== "undefined") { + Object.setPrototypeOf(Event.prototype, window.Event.prototype); + + // Make association for wrappers. + wrappers.set(window.Event.prototype, Event); +} + +/** + * Get the property descriptor to redirect a given property. + * @param {string} key Property name to define property descriptor. + * @returns {PropertyDescriptor} The property descriptor to redirect the property. + * @private + */ +function defineRedirectDescriptor(key) { + return { + get() { + return pd(this).event[key] + }, + set(value) { + pd(this).event[key] = value; + }, + configurable: true, + enumerable: true, + } +} + +/** + * Get the property descriptor to call a given method property. + * @param {string} key Property name to define property descriptor. + * @returns {PropertyDescriptor} The property descriptor to call the method property. + * @private + */ +function defineCallDescriptor(key) { + return { + value() { + const event = pd(this).event; + return event[key].apply(event, arguments) + }, + configurable: true, + enumerable: true, + } +} + +/** + * Define new wrapper class. + * @param {Function} BaseEvent The base wrapper class. + * @param {Object} proto The prototype of the original event. + * @returns {Function} The defined wrapper class. + * @private + */ +function defineWrapper(BaseEvent, proto) { + const keys = Object.keys(proto); + if (keys.length === 0) { + return BaseEvent + } + + /** CustomEvent */ + function CustomEvent(eventTarget, event) { + BaseEvent.call(this, eventTarget, event); + } + + CustomEvent.prototype = Object.create(BaseEvent.prototype, { + constructor: { value: CustomEvent, configurable: true, writable: true }, + }); + + // Define accessors. + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + if (!(key in BaseEvent.prototype)) { + const descriptor = Object.getOwnPropertyDescriptor(proto, key); + const isFunc = typeof descriptor.value === "function"; + Object.defineProperty( + CustomEvent.prototype, + key, + isFunc + ? defineCallDescriptor(key) + : defineRedirectDescriptor(key) + ); + } + } + + return CustomEvent +} + +/** + * Get the wrapper class of a given prototype. + * @param {Object} proto The prototype of the original event to get its wrapper. + * @returns {Function} The wrapper class. + * @private + */ +function getWrapper(proto) { + if (proto == null || proto === Object.prototype) { + return Event + } + + let wrapper = wrappers.get(proto); + if (wrapper == null) { + wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto); + wrappers.set(proto, wrapper); + } + return wrapper +} + +/** + * Wrap a given event to management a dispatching. + * @param {EventTarget} eventTarget The event target of this dispatching. + * @param {Object} event The event to wrap. + * @returns {Event} The wrapper instance. + * @private + */ +function wrapEvent(eventTarget, event) { + const Wrapper = getWrapper(Object.getPrototypeOf(event)); + return new Wrapper(eventTarget, event) +} + +/** + * Get the immediateStopped flag of a given event. + * @param {Event} event The event to get. + * @returns {boolean} The flag to stop propagation immediately. + * @private + */ +function isStopped(event) { + return pd(event).immediateStopped +} + +/** + * Set the current event phase of a given event. + * @param {Event} event The event to set current target. + * @param {number} eventPhase New event phase. + * @returns {void} + * @private + */ +function setEventPhase(event, eventPhase) { + pd(event).eventPhase = eventPhase; +} + +/** + * Set the current target of a given event. + * @param {Event} event The event to set current target. + * @param {EventTarget|null} currentTarget New current target. + * @returns {void} + * @private + */ +function setCurrentTarget(event, currentTarget) { + pd(event).currentTarget = currentTarget; +} + +/** + * Set a passive listener of a given event. + * @param {Event} event The event to set current target. + * @param {Function|null} passiveListener New passive listener. + * @returns {void} + * @private + */ +function setPassiveListener(event, passiveListener) { + pd(event).passiveListener = passiveListener; +} + +/** + * @typedef {object} ListenerNode + * @property {Function} listener + * @property {1|2|3} listenerType + * @property {boolean} passive + * @property {boolean} once + * @property {ListenerNode|null} next + * @private + */ + +/** + * @type {WeakMap<object, Map<string, ListenerNode>>} + * @private + */ +const listenersMap = new WeakMap(); + +// Listener types +const CAPTURE = 1; +const BUBBLE = 2; +const ATTRIBUTE = 3; + +/** + * Check whether a given value is an object or not. + * @param {any} x The value to check. + * @returns {boolean} `true` if the value is an object. + */ +function isObject(x) { + return x !== null && typeof x === "object" //eslint-disable-line no-restricted-syntax +} + +/** + * Get listeners. + * @param {EventTarget} eventTarget The event target to get. + * @returns {Map<string, ListenerNode>} The listeners. + * @private + */ +function getListeners(eventTarget) { + const listeners = listenersMap.get(eventTarget); + if (listeners == null) { + throw new TypeError( + "'this' is expected an EventTarget object, but got another value." + ) + } + return listeners +} + +/** + * Get the property descriptor for the event attribute of a given event. + * @param {string} eventName The event name to get property descriptor. + * @returns {PropertyDescriptor} The property descriptor. + * @private + */ +function defineEventAttributeDescriptor(eventName) { + return { + get() { + const listeners = getListeners(this); + let node = listeners.get(eventName); + while (node != null) { + if (node.listenerType === ATTRIBUTE) { + return node.listener + } + node = node.next; + } + return null + }, + + set(listener) { + if (typeof listener !== "function" && !isObject(listener)) { + listener = null; // eslint-disable-line no-param-reassign + } + const listeners = getListeners(this); + + // Traverse to the tail while removing old value. + let prev = null; + let node = listeners.get(eventName); + while (node != null) { + if (node.listenerType === ATTRIBUTE) { + // Remove old value. + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + } else { + prev = node; + } + + node = node.next; + } + + // Add new value. + if (listener !== null) { + const newNode = { + listener, + listenerType: ATTRIBUTE, + passive: false, + once: false, + next: null, + }; + if (prev === null) { + listeners.set(eventName, newNode); + } else { + prev.next = newNode; + } + } + }, + configurable: true, + enumerable: true, + } +} + +/** + * Define an event attribute (e.g. `eventTarget.onclick`). + * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite. + * @param {string} eventName The event name to define. + * @returns {void} + */ +function defineEventAttribute(eventTargetPrototype, eventName) { + Object.defineProperty( + eventTargetPrototype, + `on${eventName}`, + defineEventAttributeDescriptor(eventName) + ); +} + +/** + * Define a custom EventTarget with event attributes. + * @param {string[]} eventNames Event names for event attributes. + * @returns {EventTarget} The custom EventTarget. + * @private + */ +function defineCustomEventTarget(eventNames) { + /** CustomEventTarget */ + function CustomEventTarget() { + EventTarget.call(this); + } + + CustomEventTarget.prototype = Object.create(EventTarget.prototype, { + constructor: { + value: CustomEventTarget, + configurable: true, + writable: true, + }, + }); + + for (let i = 0; i < eventNames.length; ++i) { + defineEventAttribute(CustomEventTarget.prototype, eventNames[i]); + } + + return CustomEventTarget +} + +/** + * EventTarget. + * + * - This is constructor if no arguments. + * - This is a function which returns a CustomEventTarget constructor if there are arguments. + * + * For example: + * + * class A extends EventTarget {} + * class B extends EventTarget("message") {} + * class C extends EventTarget("message", "error") {} + * class D extends EventTarget(["message", "error"]) {} + */ +function EventTarget() { + /*eslint-disable consistent-return */ + if (this instanceof EventTarget) { + listenersMap.set(this, new Map()); + return + } + if (arguments.length === 1 && Array.isArray(arguments[0])) { + return defineCustomEventTarget(arguments[0]) + } + if (arguments.length > 0) { + const types = new Array(arguments.length); + for (let i = 0; i < arguments.length; ++i) { + types[i] = arguments[i]; + } + return defineCustomEventTarget(types) + } + throw new TypeError("Cannot call a class as a function") + /*eslint-enable consistent-return */ +} + +// Should be enumerable, but class methods are not enumerable. +EventTarget.prototype = { + /** + * Add a given listener to this event target. + * @param {string} eventName The event name to add. + * @param {Function} listener The listener to add. + * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. + * @returns {void} + */ + addEventListener(eventName, listener, options) { + if (listener == null) { + return + } + if (typeof listener !== "function" && !isObject(listener)) { + throw new TypeError("'listener' should be a function or an object.") + } + + const listeners = getListeners(this); + const optionsIsObj = isObject(options); + const capture = optionsIsObj + ? Boolean(options.capture) + : Boolean(options); + const listenerType = capture ? CAPTURE : BUBBLE; + const newNode = { + listener, + listenerType, + passive: optionsIsObj && Boolean(options.passive), + once: optionsIsObj && Boolean(options.once), + next: null, + }; + + // Set it as the first node if the first node is null. + let node = listeners.get(eventName); + if (node === undefined) { + listeners.set(eventName, newNode); + return + } + + // Traverse to the tail while checking duplication.. + let prev = null; + while (node != null) { + if ( + node.listener === listener && + node.listenerType === listenerType + ) { + // Should ignore duplication. + return + } + prev = node; + node = node.next; + } + + // Add it. + prev.next = newNode; + }, + + /** + * Remove a given listener from this event target. + * @param {string} eventName The event name to remove. + * @param {Function} listener The listener to remove. + * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. + * @returns {void} + */ + removeEventListener(eventName, listener, options) { + if (listener == null) { + return + } + + const listeners = getListeners(this); + const capture = isObject(options) + ? Boolean(options.capture) + : Boolean(options); + const listenerType = capture ? CAPTURE : BUBBLE; + + let prev = null; + let node = listeners.get(eventName); + while (node != null) { + if ( + node.listener === listener && + node.listenerType === listenerType + ) { + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + return + } + + prev = node; + node = node.next; + } + }, + + /** + * Dispatch a given event. + * @param {Event|{type:string}} event The event to dispatch. + * @returns {boolean} `false` if canceled. + */ + dispatchEvent(event) { + if (event == null || typeof event.type !== "string") { + throw new TypeError('"event.type" should be a string.') + } + + // If listeners aren't registered, terminate. + const listeners = getListeners(this); + const eventName = event.type; + let node = listeners.get(eventName); + if (node == null) { + return true + } + + // Since we cannot rewrite several properties, so wrap object. + const wrappedEvent = wrapEvent(this, event); + + // This doesn't process capturing phase and bubbling phase. + // This isn't participating in a tree. + let prev = null; + while (node != null) { + // Remove this listener if it's once + if (node.once) { + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + } else { + prev = node; + } + + // Call this listener + setPassiveListener( + wrappedEvent, + node.passive ? node.listener : null + ); + if (typeof node.listener === "function") { + try { + node.listener.call(this, wrappedEvent); + } catch (err) { + if ( + typeof console !== "undefined" && + typeof console.error === "function" + ) { + console.error(err); + } + } + } else if ( + node.listenerType !== ATTRIBUTE && + typeof node.listener.handleEvent === "function" + ) { + node.listener.handleEvent(wrappedEvent); + } + + // Break if `event.stopImmediatePropagation` was called. + if (isStopped(wrappedEvent)) { + break + } + + node = node.next; + } + setPassiveListener(wrappedEvent, null); + setEventPhase(wrappedEvent, 0); + setCurrentTarget(wrappedEvent, null); + + return !wrappedEvent.defaultPrevented + }, +}; + +// `constructor` is not enumerable. +Object.defineProperty(EventTarget.prototype, "constructor", { + value: EventTarget, + configurable: true, + writable: true, +}); + +// Ensure `eventTarget instanceof window.EventTarget` is `true`. +if ( + typeof window !== "undefined" && + typeof window.EventTarget !== "undefined" +) { + Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype); +} + +exports.defineEventAttribute = defineEventAttribute; +exports.EventTarget = EventTarget; +exports.default = EventTarget; + +module.exports = EventTarget +module.exports.EventTarget = module.exports["default"] = EventTarget +module.exports.defineEventAttribute = defineEventAttribute +//# sourceMappingURL=event-target-shim.js.map diff --git a/node_modules/event-target-shim/dist/event-target-shim.js.map b/node_modules/event-target-shim/dist/event-target-shim.js.map new file mode 100644 index 0000000000000..83c5f626aa670 --- /dev/null +++ b/node_modules/event-target-shim/dist/event-target-shim.js.map @@ -0,0 +1 @@ +{"version":3,"file":"event-target-shim.js","sources":["../src/event.mjs","../src/event-target.mjs"],"sourcesContent":["/**\n * @typedef {object} PrivateData\n * @property {EventTarget} eventTarget The event target.\n * @property {{type:string}} event The original event object.\n * @property {number} eventPhase The current event phase.\n * @property {EventTarget|null} currentTarget The current event target.\n * @property {boolean} canceled The flag to prevent default.\n * @property {boolean} stopped The flag to stop propagation.\n * @property {boolean} immediateStopped The flag to stop propagation immediately.\n * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null.\n * @property {number} timeStamp The unix time.\n * @private\n */\n\n/**\n * Private data for event wrappers.\n * @type {WeakMap<Event, PrivateData>}\n * @private\n */\nconst privateData = new WeakMap()\n\n/**\n * Cache for wrapper classes.\n * @type {WeakMap<Object, Function>}\n * @private\n */\nconst wrappers = new WeakMap()\n\n/**\n * Get private data.\n * @param {Event} event The event object to get private data.\n * @returns {PrivateData} The private data of the event.\n * @private\n */\nfunction pd(event) {\n const retv = privateData.get(event)\n console.assert(\n retv != null,\n \"'this' is expected an Event object, but got\",\n event\n )\n return retv\n}\n\n/**\n * https://dom.spec.whatwg.org/#set-the-canceled-flag\n * @param data {PrivateData} private data.\n */\nfunction setCancelFlag(data) {\n if (data.passiveListener != null) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(\n \"Unable to preventDefault inside passive event listener invocation.\",\n data.passiveListener\n )\n }\n return\n }\n if (!data.event.cancelable) {\n return\n }\n\n data.canceled = true\n if (typeof data.event.preventDefault === \"function\") {\n data.event.preventDefault()\n }\n}\n\n/**\n * @see https://dom.spec.whatwg.org/#interface-event\n * @private\n */\n/**\n * The event wrapper.\n * @constructor\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Event|{type:string}} event The original event to wrap.\n */\nfunction Event(eventTarget, event) {\n privateData.set(this, {\n eventTarget,\n event,\n eventPhase: 2,\n currentTarget: eventTarget,\n canceled: false,\n stopped: false,\n immediateStopped: false,\n passiveListener: null,\n timeStamp: event.timeStamp || Date.now(),\n })\n\n // https://heycam.github.io/webidl/#Unforgeable\n Object.defineProperty(this, \"isTrusted\", { value: false, enumerable: true })\n\n // Define accessors\n const keys = Object.keys(event)\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n if (!(key in this)) {\n Object.defineProperty(this, key, defineRedirectDescriptor(key))\n }\n }\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEvent.prototype = {\n /**\n * The type of this event.\n * @type {string}\n */\n get type() {\n return pd(this).event.type\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get target() {\n return pd(this).eventTarget\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get currentTarget() {\n return pd(this).currentTarget\n },\n\n /**\n * @returns {EventTarget[]} The composed path of this event.\n */\n composedPath() {\n const currentTarget = pd(this).currentTarget\n if (currentTarget == null) {\n return []\n }\n return [currentTarget]\n },\n\n /**\n * Constant of NONE.\n * @type {number}\n */\n get NONE() {\n return 0\n },\n\n /**\n * Constant of CAPTURING_PHASE.\n * @type {number}\n */\n get CAPTURING_PHASE() {\n return 1\n },\n\n /**\n * Constant of AT_TARGET.\n * @type {number}\n */\n get AT_TARGET() {\n return 2\n },\n\n /**\n * Constant of BUBBLING_PHASE.\n * @type {number}\n */\n get BUBBLING_PHASE() {\n return 3\n },\n\n /**\n * The target of this event.\n * @type {number}\n */\n get eventPhase() {\n return pd(this).eventPhase\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopPropagation() {\n const data = pd(this)\n\n data.stopped = true\n if (typeof data.event.stopPropagation === \"function\") {\n data.event.stopPropagation()\n }\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopImmediatePropagation() {\n const data = pd(this)\n\n data.stopped = true\n data.immediateStopped = true\n if (typeof data.event.stopImmediatePropagation === \"function\") {\n data.event.stopImmediatePropagation()\n }\n },\n\n /**\n * The flag to be bubbling.\n * @type {boolean}\n */\n get bubbles() {\n return Boolean(pd(this).event.bubbles)\n },\n\n /**\n * The flag to be cancelable.\n * @type {boolean}\n */\n get cancelable() {\n return Boolean(pd(this).event.cancelable)\n },\n\n /**\n * Cancel this event.\n * @returns {void}\n */\n preventDefault() {\n setCancelFlag(pd(this))\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n */\n get defaultPrevented() {\n return pd(this).canceled\n },\n\n /**\n * The flag to be composed.\n * @type {boolean}\n */\n get composed() {\n return Boolean(pd(this).event.composed)\n },\n\n /**\n * The unix time of this event.\n * @type {number}\n */\n get timeStamp() {\n return pd(this).timeStamp\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n * @deprecated\n */\n get srcElement() {\n return pd(this).eventTarget\n },\n\n /**\n * The flag to stop event bubbling.\n * @type {boolean}\n * @deprecated\n */\n get cancelBubble() {\n return pd(this).stopped\n },\n set cancelBubble(value) {\n if (!value) {\n return\n }\n const data = pd(this)\n\n data.stopped = true\n if (typeof data.event.cancelBubble === \"boolean\") {\n data.event.cancelBubble = true\n }\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n * @deprecated\n */\n get returnValue() {\n return !pd(this).canceled\n },\n set returnValue(value) {\n if (!value) {\n setCancelFlag(pd(this))\n }\n },\n\n /**\n * Initialize this event object. But do nothing under event dispatching.\n * @param {string} type The event type.\n * @param {boolean} [bubbles=false] The flag to be possible to bubble up.\n * @param {boolean} [cancelable=false] The flag to be possible to cancel.\n * @deprecated\n */\n initEvent() {\n // Do nothing.\n },\n}\n\n// `constructor` is not enumerable.\nObject.defineProperty(Event.prototype, \"constructor\", {\n value: Event,\n configurable: true,\n writable: true,\n})\n\n// Ensure `event instanceof window.Event` is `true`.\nif (typeof window !== \"undefined\" && typeof window.Event !== \"undefined\") {\n Object.setPrototypeOf(Event.prototype, window.Event.prototype)\n\n // Make association for wrappers.\n wrappers.set(window.Event.prototype, Event)\n}\n\n/**\n * Get the property descriptor to redirect a given property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to redirect the property.\n * @private\n */\nfunction defineRedirectDescriptor(key) {\n return {\n get() {\n return pd(this).event[key]\n },\n set(value) {\n pd(this).event[key] = value\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Get the property descriptor to call a given method property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to call the method property.\n * @private\n */\nfunction defineCallDescriptor(key) {\n return {\n value() {\n const event = pd(this).event\n return event[key].apply(event, arguments)\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define new wrapper class.\n * @param {Function} BaseEvent The base wrapper class.\n * @param {Object} proto The prototype of the original event.\n * @returns {Function} The defined wrapper class.\n * @private\n */\nfunction defineWrapper(BaseEvent, proto) {\n const keys = Object.keys(proto)\n if (keys.length === 0) {\n return BaseEvent\n }\n\n /** CustomEvent */\n function CustomEvent(eventTarget, event) {\n BaseEvent.call(this, eventTarget, event)\n }\n\n CustomEvent.prototype = Object.create(BaseEvent.prototype, {\n constructor: { value: CustomEvent, configurable: true, writable: true },\n })\n\n // Define accessors.\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n if (!(key in BaseEvent.prototype)) {\n const descriptor = Object.getOwnPropertyDescriptor(proto, key)\n const isFunc = typeof descriptor.value === \"function\"\n Object.defineProperty(\n CustomEvent.prototype,\n key,\n isFunc\n ? defineCallDescriptor(key)\n : defineRedirectDescriptor(key)\n )\n }\n }\n\n return CustomEvent\n}\n\n/**\n * Get the wrapper class of a given prototype.\n * @param {Object} proto The prototype of the original event to get its wrapper.\n * @returns {Function} The wrapper class.\n * @private\n */\nfunction getWrapper(proto) {\n if (proto == null || proto === Object.prototype) {\n return Event\n }\n\n let wrapper = wrappers.get(proto)\n if (wrapper == null) {\n wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto)\n wrappers.set(proto, wrapper)\n }\n return wrapper\n}\n\n/**\n * Wrap a given event to management a dispatching.\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Object} event The event to wrap.\n * @returns {Event} The wrapper instance.\n * @private\n */\nexport function wrapEvent(eventTarget, event) {\n const Wrapper = getWrapper(Object.getPrototypeOf(event))\n return new Wrapper(eventTarget, event)\n}\n\n/**\n * Get the immediateStopped flag of a given event.\n * @param {Event} event The event to get.\n * @returns {boolean} The flag to stop propagation immediately.\n * @private\n */\nexport function isStopped(event) {\n return pd(event).immediateStopped\n}\n\n/**\n * Set the current event phase of a given event.\n * @param {Event} event The event to set current target.\n * @param {number} eventPhase New event phase.\n * @returns {void}\n * @private\n */\nexport function setEventPhase(event, eventPhase) {\n pd(event).eventPhase = eventPhase\n}\n\n/**\n * Set the current target of a given event.\n * @param {Event} event The event to set current target.\n * @param {EventTarget|null} currentTarget New current target.\n * @returns {void}\n * @private\n */\nexport function setCurrentTarget(event, currentTarget) {\n pd(event).currentTarget = currentTarget\n}\n\n/**\n * Set a passive listener of a given event.\n * @param {Event} event The event to set current target.\n * @param {Function|null} passiveListener New passive listener.\n * @returns {void}\n * @private\n */\nexport function setPassiveListener(event, passiveListener) {\n pd(event).passiveListener = passiveListener\n}\n","import {\n isStopped,\n setCurrentTarget,\n setEventPhase,\n setPassiveListener,\n wrapEvent,\n} from \"./event.mjs\"\n\n/**\n * @typedef {object} ListenerNode\n * @property {Function} listener\n * @property {1|2|3} listenerType\n * @property {boolean} passive\n * @property {boolean} once\n * @property {ListenerNode|null} next\n * @private\n */\n\n/**\n * @type {WeakMap<object, Map<string, ListenerNode>>}\n * @private\n */\nconst listenersMap = new WeakMap()\n\n// Listener types\nconst CAPTURE = 1\nconst BUBBLE = 2\nconst ATTRIBUTE = 3\n\n/**\n * Check whether a given value is an object or not.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is an object.\n */\nfunction isObject(x) {\n return x !== null && typeof x === \"object\" //eslint-disable-line no-restricted-syntax\n}\n\n/**\n * Get listeners.\n * @param {EventTarget} eventTarget The event target to get.\n * @returns {Map<string, ListenerNode>} The listeners.\n * @private\n */\nfunction getListeners(eventTarget) {\n const listeners = listenersMap.get(eventTarget)\n if (listeners == null) {\n throw new TypeError(\n \"'this' is expected an EventTarget object, but got another value.\"\n )\n }\n return listeners\n}\n\n/**\n * Get the property descriptor for the event attribute of a given event.\n * @param {string} eventName The event name to get property descriptor.\n * @returns {PropertyDescriptor} The property descriptor.\n * @private\n */\nfunction defineEventAttributeDescriptor(eventName) {\n return {\n get() {\n const listeners = getListeners(this)\n let node = listeners.get(eventName)\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n return node.listener\n }\n node = node.next\n }\n return null\n },\n\n set(listener) {\n if (typeof listener !== \"function\" && !isObject(listener)) {\n listener = null // eslint-disable-line no-param-reassign\n }\n const listeners = getListeners(this)\n\n // Traverse to the tail while removing old value.\n let prev = null\n let node = listeners.get(eventName)\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n // Remove old value.\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n } else {\n prev = node\n }\n\n node = node.next\n }\n\n // Add new value.\n if (listener !== null) {\n const newNode = {\n listener,\n listenerType: ATTRIBUTE,\n passive: false,\n once: false,\n next: null,\n }\n if (prev === null) {\n listeners.set(eventName, newNode)\n } else {\n prev.next = newNode\n }\n }\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define an event attribute (e.g. `eventTarget.onclick`).\n * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite.\n * @param {string} eventName The event name to define.\n * @returns {void}\n */\nfunction defineEventAttribute(eventTargetPrototype, eventName) {\n Object.defineProperty(\n eventTargetPrototype,\n `on${eventName}`,\n defineEventAttributeDescriptor(eventName)\n )\n}\n\n/**\n * Define a custom EventTarget with event attributes.\n * @param {string[]} eventNames Event names for event attributes.\n * @returns {EventTarget} The custom EventTarget.\n * @private\n */\nfunction defineCustomEventTarget(eventNames) {\n /** CustomEventTarget */\n function CustomEventTarget() {\n EventTarget.call(this)\n }\n\n CustomEventTarget.prototype = Object.create(EventTarget.prototype, {\n constructor: {\n value: CustomEventTarget,\n configurable: true,\n writable: true,\n },\n })\n\n for (let i = 0; i < eventNames.length; ++i) {\n defineEventAttribute(CustomEventTarget.prototype, eventNames[i])\n }\n\n return CustomEventTarget\n}\n\n/**\n * EventTarget.\n *\n * - This is constructor if no arguments.\n * - This is a function which returns a CustomEventTarget constructor if there are arguments.\n *\n * For example:\n *\n * class A extends EventTarget {}\n * class B extends EventTarget(\"message\") {}\n * class C extends EventTarget(\"message\", \"error\") {}\n * class D extends EventTarget([\"message\", \"error\"]) {}\n */\nfunction EventTarget() {\n /*eslint-disable consistent-return */\n if (this instanceof EventTarget) {\n listenersMap.set(this, new Map())\n return\n }\n if (arguments.length === 1 && Array.isArray(arguments[0])) {\n return defineCustomEventTarget(arguments[0])\n }\n if (arguments.length > 0) {\n const types = new Array(arguments.length)\n for (let i = 0; i < arguments.length; ++i) {\n types[i] = arguments[i]\n }\n return defineCustomEventTarget(types)\n }\n throw new TypeError(\"Cannot call a class as a function\")\n /*eslint-enable consistent-return */\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEventTarget.prototype = {\n /**\n * Add a given listener to this event target.\n * @param {string} eventName The event name to add.\n * @param {Function} listener The listener to add.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n addEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n if (typeof listener !== \"function\" && !isObject(listener)) {\n throw new TypeError(\"'listener' should be a function or an object.\")\n }\n\n const listeners = getListeners(this)\n const optionsIsObj = isObject(options)\n const capture = optionsIsObj\n ? Boolean(options.capture)\n : Boolean(options)\n const listenerType = capture ? CAPTURE : BUBBLE\n const newNode = {\n listener,\n listenerType,\n passive: optionsIsObj && Boolean(options.passive),\n once: optionsIsObj && Boolean(options.once),\n next: null,\n }\n\n // Set it as the first node if the first node is null.\n let node = listeners.get(eventName)\n if (node === undefined) {\n listeners.set(eventName, newNode)\n return\n }\n\n // Traverse to the tail while checking duplication..\n let prev = null\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n // Should ignore duplication.\n return\n }\n prev = node\n node = node.next\n }\n\n // Add it.\n prev.next = newNode\n },\n\n /**\n * Remove a given listener from this event target.\n * @param {string} eventName The event name to remove.\n * @param {Function} listener The listener to remove.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n removeEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n\n const listeners = getListeners(this)\n const capture = isObject(options)\n ? Boolean(options.capture)\n : Boolean(options)\n const listenerType = capture ? CAPTURE : BUBBLE\n\n let prev = null\n let node = listeners.get(eventName)\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n return\n }\n\n prev = node\n node = node.next\n }\n },\n\n /**\n * Dispatch a given event.\n * @param {Event|{type:string}} event The event to dispatch.\n * @returns {boolean} `false` if canceled.\n */\n dispatchEvent(event) {\n if (event == null || typeof event.type !== \"string\") {\n throw new TypeError('\"event.type\" should be a string.')\n }\n\n // If listeners aren't registered, terminate.\n const listeners = getListeners(this)\n const eventName = event.type\n let node = listeners.get(eventName)\n if (node == null) {\n return true\n }\n\n // Since we cannot rewrite several properties, so wrap object.\n const wrappedEvent = wrapEvent(this, event)\n\n // This doesn't process capturing phase and bubbling phase.\n // This isn't participating in a tree.\n let prev = null\n while (node != null) {\n // Remove this listener if it's once\n if (node.once) {\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n } else {\n prev = node\n }\n\n // Call this listener\n setPassiveListener(\n wrappedEvent,\n node.passive ? node.listener : null\n )\n if (typeof node.listener === \"function\") {\n try {\n node.listener.call(this, wrappedEvent)\n } catch (err) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(err)\n }\n }\n } else if (\n node.listenerType !== ATTRIBUTE &&\n typeof node.listener.handleEvent === \"function\"\n ) {\n node.listener.handleEvent(wrappedEvent)\n }\n\n // Break if `event.stopImmediatePropagation` was called.\n if (isStopped(wrappedEvent)) {\n break\n }\n\n node = node.next\n }\n setPassiveListener(wrappedEvent, null)\n setEventPhase(wrappedEvent, 0)\n setCurrentTarget(wrappedEvent, null)\n\n return !wrappedEvent.defaultPrevented\n },\n}\n\n// `constructor` is not enumerable.\nObject.defineProperty(EventTarget.prototype, \"constructor\", {\n value: EventTarget,\n configurable: true,\n writable: true,\n})\n\n// Ensure `eventTarget instanceof window.EventTarget` is `true`.\nif (\n typeof window !== \"undefined\" &&\n typeof window.EventTarget !== \"undefined\"\n) {\n Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype)\n}\n\nexport { defineEventAttribute, EventTarget }\nexport default EventTarget\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;AAmBA,MAAM,WAAW,GAAG,IAAI,OAAO,GAAE;;;;;;;AAOjC,MAAM,QAAQ,GAAG,IAAI,OAAO,GAAE;;;;;;;;AAQ9B,SAAS,EAAE,CAAC,KAAK,EAAE;IACf,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,KAAK,EAAC;IACnC,OAAO,CAAC,MAAM;QACV,IAAI,IAAI,IAAI;QACZ,6CAA6C;QAC7C,KAAK;MACR;IACD,OAAO,IAAI;CACd;;;;;;AAMD,SAAS,aAAa,CAAC,IAAI,EAAE;IACzB,IAAI,IAAI,CAAC,eAAe,IAAI,IAAI,EAAE;QAC9B;YACI,OAAO,OAAO,KAAK,WAAW;YAC9B,OAAO,OAAO,CAAC,KAAK,KAAK,UAAU;UACrC;YACE,OAAO,CAAC,KAAK;gBACT,oEAAoE;gBACpE,IAAI,CAAC,eAAe;cACvB;SACJ;QACD,MAAM;KACT;IACD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE;QACxB,MAAM;KACT;;IAED,IAAI,CAAC,QAAQ,GAAG,KAAI;IACpB,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,KAAK,UAAU,EAAE;QACjD,IAAI,CAAC,KAAK,CAAC,cAAc,GAAE;KAC9B;CACJ;;;;;;;;;;;;AAYD,SAAS,KAAK,CAAC,WAAW,EAAE,KAAK,EAAE;IAC/B,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE;QAClB,WAAW;QACX,KAAK;QACL,UAAU,EAAE,CAAC;QACb,aAAa,EAAE,WAAW;QAC1B,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,KAAK;QACd,gBAAgB,EAAE,KAAK;QACvB,eAAe,EAAE,IAAI;QACrB,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,GAAG,EAAE;KAC3C,EAAC;;;IAGF,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,EAAC;;;IAG5E,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAC;IAC/B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;QAClC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,EAAC;QACnB,IAAI,EAAE,GAAG,IAAI,IAAI,CAAC,EAAE;YAChB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,wBAAwB,CAAC,GAAG,CAAC,EAAC;SAClE;KACJ;CACJ;;;AAGD,KAAK,CAAC,SAAS,GAAG;;;;;IAKd,IAAI,IAAI,GAAG;QACP,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI;KAC7B;;;;;;IAMD,IAAI,MAAM,GAAG;QACT,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW;KAC9B;;;;;;IAMD,IAAI,aAAa,GAAG;QAChB,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,aAAa;KAChC;;;;;IAKD,YAAY,GAAG;QACX,MAAM,aAAa,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,cAAa;QAC5C,IAAI,aAAa,IAAI,IAAI,EAAE;YACvB,OAAO,EAAE;SACZ;QACD,OAAO,CAAC,aAAa,CAAC;KACzB;;;;;;IAMD,IAAI,IAAI,GAAG;QACP,OAAO,CAAC;KACX;;;;;;IAMD,IAAI,eAAe,GAAG;QAClB,OAAO,CAAC;KACX;;;;;;IAMD,IAAI,SAAS,GAAG;QACZ,OAAO,CAAC;KACX;;;;;;IAMD,IAAI,cAAc,GAAG;QACjB,OAAO,CAAC;KACX;;;;;;IAMD,IAAI,UAAU,GAAG;QACb,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU;KAC7B;;;;;;IAMD,eAAe,GAAG;QACd,MAAM,IAAI,GAAG,EAAE,CAAC,IAAI,EAAC;;QAErB,IAAI,CAAC,OAAO,GAAG,KAAI;QACnB,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,eAAe,KAAK,UAAU,EAAE;YAClD,IAAI,CAAC,KAAK,CAAC,eAAe,GAAE;SAC/B;KACJ;;;;;;IAMD,wBAAwB,GAAG;QACvB,MAAM,IAAI,GAAG,EAAE,CAAC,IAAI,EAAC;;QAErB,IAAI,CAAC,OAAO,GAAG,KAAI;QACnB,IAAI,CAAC,gBAAgB,GAAG,KAAI;QAC5B,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,wBAAwB,KAAK,UAAU,EAAE;YAC3D,IAAI,CAAC,KAAK,CAAC,wBAAwB,GAAE;SACxC;KACJ;;;;;;IAMD,IAAI,OAAO,GAAG;QACV,OAAO,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC;KACzC;;;;;;IAMD,IAAI,UAAU,GAAG;QACb,OAAO,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;KAC5C;;;;;;IAMD,cAAc,GAAG;QACb,aAAa,CAAC,EAAE,CAAC,IAAI,CAAC,EAAC;KAC1B;;;;;;IAMD,IAAI,gBAAgB,GAAG;QACnB,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,QAAQ;KAC3B;;;;;;IAMD,IAAI,QAAQ,GAAG;QACX,OAAO,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;KAC1C;;;;;;IAMD,IAAI,SAAS,GAAG;QACZ,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS;KAC5B;;;;;;;IAOD,IAAI,UAAU,GAAG;QACb,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW;KAC9B;;;;;;;IAOD,IAAI,YAAY,GAAG;QACf,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,OAAO;KAC1B;IACD,IAAI,YAAY,CAAC,KAAK,EAAE;QACpB,IAAI,CAAC,KAAK,EAAE;YACR,MAAM;SACT;QACD,MAAM,IAAI,GAAG,EAAE,CAAC,IAAI,EAAC;;QAErB,IAAI,CAAC,OAAO,GAAG,KAAI;QACnB,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,KAAK,SAAS,EAAE;YAC9C,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,KAAI;SACjC;KACJ;;;;;;;IAOD,IAAI,WAAW,GAAG;QACd,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,QAAQ;KAC5B;IACD,IAAI,WAAW,CAAC,KAAK,EAAE;QACnB,IAAI,CAAC,KAAK,EAAE;YACR,aAAa,CAAC,EAAE,CAAC,IAAI,CAAC,EAAC;SAC1B;KACJ;;;;;;;;;IASD,SAAS,GAAG;;KAEX;EACJ;;;AAGD,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,SAAS,EAAE,aAAa,EAAE;IAClD,KAAK,EAAE,KAAK;IACZ,YAAY,EAAE,IAAI;IAClB,QAAQ,EAAE,IAAI;CACjB,EAAC;;;AAGF,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,WAAW,EAAE;IACtE,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS,EAAC;;;IAG9D,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,EAAC;CAC9C;;;;;;;;AAQD,SAAS,wBAAwB,CAAC,GAAG,EAAE;IACnC,OAAO;QACH,GAAG,GAAG;YACF,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;SAC7B;QACD,GAAG,CAAC,KAAK,EAAE;YACP,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,MAAK;SAC9B;QACD,YAAY,EAAE,IAAI;QAClB,UAAU,EAAE,IAAI;KACnB;CACJ;;;;;;;;AAQD,SAAS,oBAAoB,CAAC,GAAG,EAAE;IAC/B,OAAO;QACH,KAAK,GAAG;YACJ,MAAM,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,MAAK;YAC5B,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,CAAC;SAC5C;QACD,YAAY,EAAE,IAAI;QAClB,UAAU,EAAE,IAAI;KACnB;CACJ;;;;;;;;;AASD,SAAS,aAAa,CAAC,SAAS,EAAE,KAAK,EAAE;IACrC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAC;IAC/B,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACnB,OAAO,SAAS;KACnB;;;IAGD,SAAS,WAAW,CAAC,WAAW,EAAE,KAAK,EAAE;QACrC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAC;KAC3C;;IAED,WAAW,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE;QACvD,WAAW,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC1E,EAAC;;;IAGF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;QAClC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,EAAC;QACnB,IAAI,EAAE,GAAG,IAAI,SAAS,CAAC,SAAS,CAAC,EAAE;YAC/B,MAAM,UAAU,GAAG,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,GAAG,EAAC;YAC9D,MAAM,MAAM,GAAG,OAAO,UAAU,CAAC,KAAK,KAAK,WAAU;YACrD,MAAM,CAAC,cAAc;gBACjB,WAAW,CAAC,SAAS;gBACrB,GAAG;gBACH,MAAM;sBACA,oBAAoB,CAAC,GAAG,CAAC;sBACzB,wBAAwB,CAAC,GAAG,CAAC;cACtC;SACJ;KACJ;;IAED,OAAO,WAAW;CACrB;;;;;;;;AAQD,SAAS,UAAU,CAAC,KAAK,EAAE;IACvB,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,KAAK,MAAM,CAAC,SAAS,EAAE;QAC7C,OAAO,KAAK;KACf;;IAED,IAAI,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAC;IACjC,IAAI,OAAO,IAAI,IAAI,EAAE;QACjB,OAAO,GAAG,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,EAAC;QACxE,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,EAAC;KAC/B;IACD,OAAO,OAAO;CACjB;;;;;;;;;AASD,AAAO,SAAS,SAAS,CAAC,WAAW,EAAE,KAAK,EAAE;IAC1C,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,EAAC;IACxD,OAAO,IAAI,OAAO,CAAC,WAAW,EAAE,KAAK,CAAC;CACzC;;;;;;;;AAQD,AAAO,SAAS,SAAS,CAAC,KAAK,EAAE;IAC7B,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,gBAAgB;CACpC;;;;;;;;;AASD,AAAO,SAAS,aAAa,CAAC,KAAK,EAAE,UAAU,EAAE;IAC7C,EAAE,CAAC,KAAK,CAAC,CAAC,UAAU,GAAG,WAAU;CACpC;;;;;;;;;AASD,AAAO,SAAS,gBAAgB,CAAC,KAAK,EAAE,aAAa,EAAE;IACnD,EAAE,CAAC,KAAK,CAAC,CAAC,aAAa,GAAG,cAAa;CAC1C;;;;;;;;;AASD,AAAO,SAAS,kBAAkB,CAAC,KAAK,EAAE,eAAe,EAAE;IACvD,EAAE,CAAC,KAAK,CAAC,CAAC,eAAe,GAAG,gBAAe;CAC9C;;ACtdD;;;;;;;;;;;;;;AAcA,MAAM,YAAY,GAAG,IAAI,OAAO,GAAE;;;AAGlC,MAAM,OAAO,GAAG,EAAC;AACjB,MAAM,MAAM,GAAG,EAAC;AAChB,MAAM,SAAS,GAAG,EAAC;;;;;;;AAOnB,SAAS,QAAQ,CAAC,CAAC,EAAE;IACjB,OAAO,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ;CAC7C;;;;;;;;AAQD,SAAS,YAAY,CAAC,WAAW,EAAE;IAC/B,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,CAAC,WAAW,EAAC;IAC/C,IAAI,SAAS,IAAI,IAAI,EAAE;QACnB,MAAM,IAAI,SAAS;YACf,kEAAkE;SACrE;KACJ;IACD,OAAO,SAAS;CACnB;;;;;;;;AAQD,SAAS,8BAA8B,CAAC,SAAS,EAAE;IAC/C,OAAO;QACH,GAAG,GAAG;YACF,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,EAAC;YACpC,IAAI,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,SAAS,EAAC;YACnC,OAAO,IAAI,IAAI,IAAI,EAAE;gBACjB,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE;oBACjC,OAAO,IAAI,CAAC,QAAQ;iBACvB;gBACD,IAAI,GAAG,IAAI,CAAC,KAAI;aACnB;YACD,OAAO,IAAI;SACd;;QAED,GAAG,CAAC,QAAQ,EAAE;YACV,IAAI,OAAO,QAAQ,KAAK,UAAU,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;gBACvD,QAAQ,GAAG,KAAI;aAClB;YACD,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,EAAC;;;YAGpC,IAAI,IAAI,GAAG,KAAI;YACf,IAAI,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,SAAS,EAAC;YACnC,OAAO,IAAI,IAAI,IAAI,EAAE;gBACjB,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE;;oBAEjC,IAAI,IAAI,KAAK,IAAI,EAAE;wBACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAI;qBACxB,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,EAAE;wBAC3B,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,EAAC;qBACtC,MAAM;wBACH,SAAS,CAAC,MAAM,CAAC,SAAS,EAAC;qBAC9B;iBACJ,MAAM;oBACH,IAAI,GAAG,KAAI;iBACd;;gBAED,IAAI,GAAG,IAAI,CAAC,KAAI;aACnB;;;YAGD,IAAI,QAAQ,KAAK,IAAI,EAAE;gBACnB,MAAM,OAAO,GAAG;oBACZ,QAAQ;oBACR,YAAY,EAAE,SAAS;oBACvB,OAAO,EAAE,KAAK;oBACd,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,IAAI;kBACb;gBACD,IAAI,IAAI,KAAK,IAAI,EAAE;oBACf,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,EAAC;iBACpC,MAAM;oBACH,IAAI,CAAC,IAAI,GAAG,QAAO;iBACtB;aACJ;SACJ;QACD,YAAY,EAAE,IAAI;QAClB,UAAU,EAAE,IAAI;KACnB;CACJ;;;;;;;;AAQD,SAAS,oBAAoB,CAAC,oBAAoB,EAAE,SAAS,EAAE;IAC3D,MAAM,CAAC,cAAc;QACjB,oBAAoB;QACpB,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;QAChB,8BAA8B,CAAC,SAAS,CAAC;MAC5C;CACJ;;;;;;;;AAQD,SAAS,uBAAuB,CAAC,UAAU,EAAE;;IAEzC,SAAS,iBAAiB,GAAG;QACzB,WAAW,CAAC,IAAI,CAAC,IAAI,EAAC;KACzB;;IAED,iBAAiB,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,EAAE;QAC/D,WAAW,EAAE;YACT,KAAK,EAAE,iBAAiB;YACxB,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,IAAI;SACjB;KACJ,EAAC;;IAEF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;QACxC,oBAAoB,CAAC,iBAAiB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,EAAC;KACnE;;IAED,OAAO,iBAAiB;CAC3B;;;;;;;;;;;;;;;AAeD,SAAS,WAAW,GAAG;;IAEnB,IAAI,IAAI,YAAY,WAAW,EAAE;QAC7B,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,EAAE,EAAC;QACjC,MAAM;KACT;IACD,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE;QACvD,OAAO,uBAAuB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;KAC/C;IACD,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE;QACtB,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,EAAC;QACzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;YACvC,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,EAAC;SAC1B;QACD,OAAO,uBAAuB,CAAC,KAAK,CAAC;KACxC;IACD,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC;;CAE3D;;;AAGD,WAAW,CAAC,SAAS,GAAG;;;;;;;;IAQpB,gBAAgB,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE;QAC3C,IAAI,QAAQ,IAAI,IAAI,EAAE;YAClB,MAAM;SACT;QACD,IAAI,OAAO,QAAQ,KAAK,UAAU,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;YACvD,MAAM,IAAI,SAAS,CAAC,+CAA+C,CAAC;SACvE;;QAED,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,EAAC;QACpC,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,EAAC;QACtC,MAAM,OAAO,GAAG,YAAY;cACtB,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;cACxB,OAAO,CAAC,OAAO,EAAC;QACtB,MAAM,YAAY,GAAG,OAAO,GAAG,OAAO,GAAG,OAAM;QAC/C,MAAM,OAAO,GAAG;YACZ,QAAQ;YACR,YAAY;YACZ,OAAO,EAAE,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;YACjD,IAAI,EAAE,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC;YAC3C,IAAI,EAAE,IAAI;UACb;;;QAGD,IAAI,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,SAAS,EAAC;QACnC,IAAI,IAAI,KAAK,SAAS,EAAE;YACpB,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,EAAC;YACjC,MAAM;SACT;;;QAGD,IAAI,IAAI,GAAG,KAAI;QACf,OAAO,IAAI,IAAI,IAAI,EAAE;YACjB;gBACI,IAAI,CAAC,QAAQ,KAAK,QAAQ;gBAC1B,IAAI,CAAC,YAAY,KAAK,YAAY;cACpC;;gBAEE,MAAM;aACT;YACD,IAAI,GAAG,KAAI;YACX,IAAI,GAAG,IAAI,CAAC,KAAI;SACnB;;;QAGD,IAAI,CAAC,IAAI,GAAG,QAAO;KACtB;;;;;;;;;IASD,mBAAmB,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE;QAC9C,IAAI,QAAQ,IAAI,IAAI,EAAE;YAClB,MAAM;SACT;;QAED,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,EAAC;QACpC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;cAC3B,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;cACxB,OAAO,CAAC,OAAO,EAAC;QACtB,MAAM,YAAY,GAAG,OAAO,GAAG,OAAO,GAAG,OAAM;;QAE/C,IAAI,IAAI,GAAG,KAAI;QACf,IAAI,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,SAAS,EAAC;QACnC,OAAO,IAAI,IAAI,IAAI,EAAE;YACjB;gBACI,IAAI,CAAC,QAAQ,KAAK,QAAQ;gBAC1B,IAAI,CAAC,YAAY,KAAK,YAAY;cACpC;gBACE,IAAI,IAAI,KAAK,IAAI,EAAE;oBACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAI;iBACxB,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,EAAE;oBAC3B,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,EAAC;iBACtC,MAAM;oBACH,SAAS,CAAC,MAAM,CAAC,SAAS,EAAC;iBAC9B;gBACD,MAAM;aACT;;YAED,IAAI,GAAG,KAAI;YACX,IAAI,GAAG,IAAI,CAAC,KAAI;SACnB;KACJ;;;;;;;IAOD,aAAa,CAAC,KAAK,EAAE;QACjB,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;YACjD,MAAM,IAAI,SAAS,CAAC,kCAAkC,CAAC;SAC1D;;;QAGD,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,EAAC;QACpC,MAAM,SAAS,GAAG,KAAK,CAAC,KAAI;QAC5B,IAAI,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,SAAS,EAAC;QACnC,IAAI,IAAI,IAAI,IAAI,EAAE;YACd,OAAO,IAAI;SACd;;;QAGD,MAAM,YAAY,GAAG,SAAS,CAAC,IAAI,EAAE,KAAK,EAAC;;;;QAI3C,IAAI,IAAI,GAAG,KAAI;QACf,OAAO,IAAI,IAAI,IAAI,EAAE;;YAEjB,IAAI,IAAI,CAAC,IAAI,EAAE;gBACX,IAAI,IAAI,KAAK,IAAI,EAAE;oBACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAI;iBACxB,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,EAAE;oBAC3B,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,EAAC;iBACtC,MAAM;oBACH,SAAS,CAAC,MAAM,CAAC,SAAS,EAAC;iBAC9B;aACJ,MAAM;gBACH,IAAI,GAAG,KAAI;aACd;;;YAGD,kBAAkB;gBACd,YAAY;gBACZ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI;cACtC;YACD,IAAI,OAAO,IAAI,CAAC,QAAQ,KAAK,UAAU,EAAE;gBACrC,IAAI;oBACA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,EAAC;iBACzC,CAAC,OAAO,GAAG,EAAE;oBACV;wBACI,OAAO,OAAO,KAAK,WAAW;wBAC9B,OAAO,OAAO,CAAC,KAAK,KAAK,UAAU;sBACrC;wBACE,OAAO,CAAC,KAAK,CAAC,GAAG,EAAC;qBACrB;iBACJ;aACJ,MAAM;gBACH,IAAI,CAAC,YAAY,KAAK,SAAS;gBAC/B,OAAO,IAAI,CAAC,QAAQ,CAAC,WAAW,KAAK,UAAU;cACjD;gBACE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,YAAY,EAAC;aAC1C;;;YAGD,IAAI,SAAS,CAAC,YAAY,CAAC,EAAE;gBACzB,KAAK;aACR;;YAED,IAAI,GAAG,IAAI,CAAC,KAAI;SACnB;QACD,kBAAkB,CAAC,YAAY,EAAE,IAAI,EAAC;QACtC,aAAa,CAAC,YAAY,EAAE,CAAC,EAAC;QAC9B,gBAAgB,CAAC,YAAY,EAAE,IAAI,EAAC;;QAEpC,OAAO,CAAC,YAAY,CAAC,gBAAgB;KACxC;EACJ;;;AAGD,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,SAAS,EAAE,aAAa,EAAE;IACxD,KAAK,EAAE,WAAW;IAClB,YAAY,EAAE,IAAI;IAClB,QAAQ,EAAE,IAAI;CACjB,EAAC;;;AAGF;IACI,OAAO,MAAM,KAAK,WAAW;IAC7B,OAAO,MAAM,CAAC,WAAW,KAAK,WAAW;EAC3C;IACE,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,SAAS,EAAC;CAC7E;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/event-target-shim/dist/event-target-shim.mjs b/node_modules/event-target-shim/dist/event-target-shim.mjs new file mode 100644 index 0000000000000..114f3a1711059 --- /dev/null +++ b/node_modules/event-target-shim/dist/event-target-shim.mjs @@ -0,0 +1,862 @@ +/** + * @author Toru Nagashima <https://github.com/mysticatea> + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +/** + * @typedef {object} PrivateData + * @property {EventTarget} eventTarget The event target. + * @property {{type:string}} event The original event object. + * @property {number} eventPhase The current event phase. + * @property {EventTarget|null} currentTarget The current event target. + * @property {boolean} canceled The flag to prevent default. + * @property {boolean} stopped The flag to stop propagation. + * @property {boolean} immediateStopped The flag to stop propagation immediately. + * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null. + * @property {number} timeStamp The unix time. + * @private + */ + +/** + * Private data for event wrappers. + * @type {WeakMap<Event, PrivateData>} + * @private + */ +const privateData = new WeakMap(); + +/** + * Cache for wrapper classes. + * @type {WeakMap<Object, Function>} + * @private + */ +const wrappers = new WeakMap(); + +/** + * Get private data. + * @param {Event} event The event object to get private data. + * @returns {PrivateData} The private data of the event. + * @private + */ +function pd(event) { + const retv = privateData.get(event); + console.assert( + retv != null, + "'this' is expected an Event object, but got", + event + ); + return retv +} + +/** + * https://dom.spec.whatwg.org/#set-the-canceled-flag + * @param data {PrivateData} private data. + */ +function setCancelFlag(data) { + if (data.passiveListener != null) { + if ( + typeof console !== "undefined" && + typeof console.error === "function" + ) { + console.error( + "Unable to preventDefault inside passive event listener invocation.", + data.passiveListener + ); + } + return + } + if (!data.event.cancelable) { + return + } + + data.canceled = true; + if (typeof data.event.preventDefault === "function") { + data.event.preventDefault(); + } +} + +/** + * @see https://dom.spec.whatwg.org/#interface-event + * @private + */ +/** + * The event wrapper. + * @constructor + * @param {EventTarget} eventTarget The event target of this dispatching. + * @param {Event|{type:string}} event The original event to wrap. + */ +function Event(eventTarget, event) { + privateData.set(this, { + eventTarget, + event, + eventPhase: 2, + currentTarget: eventTarget, + canceled: false, + stopped: false, + immediateStopped: false, + passiveListener: null, + timeStamp: event.timeStamp || Date.now(), + }); + + // https://heycam.github.io/webidl/#Unforgeable + Object.defineProperty(this, "isTrusted", { value: false, enumerable: true }); + + // Define accessors + const keys = Object.keys(event); + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + if (!(key in this)) { + Object.defineProperty(this, key, defineRedirectDescriptor(key)); + } + } +} + +// Should be enumerable, but class methods are not enumerable. +Event.prototype = { + /** + * The type of this event. + * @type {string} + */ + get type() { + return pd(this).event.type + }, + + /** + * The target of this event. + * @type {EventTarget} + */ + get target() { + return pd(this).eventTarget + }, + + /** + * The target of this event. + * @type {EventTarget} + */ + get currentTarget() { + return pd(this).currentTarget + }, + + /** + * @returns {EventTarget[]} The composed path of this event. + */ + composedPath() { + const currentTarget = pd(this).currentTarget; + if (currentTarget == null) { + return [] + } + return [currentTarget] + }, + + /** + * Constant of NONE. + * @type {number} + */ + get NONE() { + return 0 + }, + + /** + * Constant of CAPTURING_PHASE. + * @type {number} + */ + get CAPTURING_PHASE() { + return 1 + }, + + /** + * Constant of AT_TARGET. + * @type {number} + */ + get AT_TARGET() { + return 2 + }, + + /** + * Constant of BUBBLING_PHASE. + * @type {number} + */ + get BUBBLING_PHASE() { + return 3 + }, + + /** + * The target of this event. + * @type {number} + */ + get eventPhase() { + return pd(this).eventPhase + }, + + /** + * Stop event bubbling. + * @returns {void} + */ + stopPropagation() { + const data = pd(this); + + data.stopped = true; + if (typeof data.event.stopPropagation === "function") { + data.event.stopPropagation(); + } + }, + + /** + * Stop event bubbling. + * @returns {void} + */ + stopImmediatePropagation() { + const data = pd(this); + + data.stopped = true; + data.immediateStopped = true; + if (typeof data.event.stopImmediatePropagation === "function") { + data.event.stopImmediatePropagation(); + } + }, + + /** + * The flag to be bubbling. + * @type {boolean} + */ + get bubbles() { + return Boolean(pd(this).event.bubbles) + }, + + /** + * The flag to be cancelable. + * @type {boolean} + */ + get cancelable() { + return Boolean(pd(this).event.cancelable) + }, + + /** + * Cancel this event. + * @returns {void} + */ + preventDefault() { + setCancelFlag(pd(this)); + }, + + /** + * The flag to indicate cancellation state. + * @type {boolean} + */ + get defaultPrevented() { + return pd(this).canceled + }, + + /** + * The flag to be composed. + * @type {boolean} + */ + get composed() { + return Boolean(pd(this).event.composed) + }, + + /** + * The unix time of this event. + * @type {number} + */ + get timeStamp() { + return pd(this).timeStamp + }, + + /** + * The target of this event. + * @type {EventTarget} + * @deprecated + */ + get srcElement() { + return pd(this).eventTarget + }, + + /** + * The flag to stop event bubbling. + * @type {boolean} + * @deprecated + */ + get cancelBubble() { + return pd(this).stopped + }, + set cancelBubble(value) { + if (!value) { + return + } + const data = pd(this); + + data.stopped = true; + if (typeof data.event.cancelBubble === "boolean") { + data.event.cancelBubble = true; + } + }, + + /** + * The flag to indicate cancellation state. + * @type {boolean} + * @deprecated + */ + get returnValue() { + return !pd(this).canceled + }, + set returnValue(value) { + if (!value) { + setCancelFlag(pd(this)); + } + }, + + /** + * Initialize this event object. But do nothing under event dispatching. + * @param {string} type The event type. + * @param {boolean} [bubbles=false] The flag to be possible to bubble up. + * @param {boolean} [cancelable=false] The flag to be possible to cancel. + * @deprecated + */ + initEvent() { + // Do nothing. + }, +}; + +// `constructor` is not enumerable. +Object.defineProperty(Event.prototype, "constructor", { + value: Event, + configurable: true, + writable: true, +}); + +// Ensure `event instanceof window.Event` is `true`. +if (typeof window !== "undefined" && typeof window.Event !== "undefined") { + Object.setPrototypeOf(Event.prototype, window.Event.prototype); + + // Make association for wrappers. + wrappers.set(window.Event.prototype, Event); +} + +/** + * Get the property descriptor to redirect a given property. + * @param {string} key Property name to define property descriptor. + * @returns {PropertyDescriptor} The property descriptor to redirect the property. + * @private + */ +function defineRedirectDescriptor(key) { + return { + get() { + return pd(this).event[key] + }, + set(value) { + pd(this).event[key] = value; + }, + configurable: true, + enumerable: true, + } +} + +/** + * Get the property descriptor to call a given method property. + * @param {string} key Property name to define property descriptor. + * @returns {PropertyDescriptor} The property descriptor to call the method property. + * @private + */ +function defineCallDescriptor(key) { + return { + value() { + const event = pd(this).event; + return event[key].apply(event, arguments) + }, + configurable: true, + enumerable: true, + } +} + +/** + * Define new wrapper class. + * @param {Function} BaseEvent The base wrapper class. + * @param {Object} proto The prototype of the original event. + * @returns {Function} The defined wrapper class. + * @private + */ +function defineWrapper(BaseEvent, proto) { + const keys = Object.keys(proto); + if (keys.length === 0) { + return BaseEvent + } + + /** CustomEvent */ + function CustomEvent(eventTarget, event) { + BaseEvent.call(this, eventTarget, event); + } + + CustomEvent.prototype = Object.create(BaseEvent.prototype, { + constructor: { value: CustomEvent, configurable: true, writable: true }, + }); + + // Define accessors. + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + if (!(key in BaseEvent.prototype)) { + const descriptor = Object.getOwnPropertyDescriptor(proto, key); + const isFunc = typeof descriptor.value === "function"; + Object.defineProperty( + CustomEvent.prototype, + key, + isFunc + ? defineCallDescriptor(key) + : defineRedirectDescriptor(key) + ); + } + } + + return CustomEvent +} + +/** + * Get the wrapper class of a given prototype. + * @param {Object} proto The prototype of the original event to get its wrapper. + * @returns {Function} The wrapper class. + * @private + */ +function getWrapper(proto) { + if (proto == null || proto === Object.prototype) { + return Event + } + + let wrapper = wrappers.get(proto); + if (wrapper == null) { + wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto); + wrappers.set(proto, wrapper); + } + return wrapper +} + +/** + * Wrap a given event to management a dispatching. + * @param {EventTarget} eventTarget The event target of this dispatching. + * @param {Object} event The event to wrap. + * @returns {Event} The wrapper instance. + * @private + */ +function wrapEvent(eventTarget, event) { + const Wrapper = getWrapper(Object.getPrototypeOf(event)); + return new Wrapper(eventTarget, event) +} + +/** + * Get the immediateStopped flag of a given event. + * @param {Event} event The event to get. + * @returns {boolean} The flag to stop propagation immediately. + * @private + */ +function isStopped(event) { + return pd(event).immediateStopped +} + +/** + * Set the current event phase of a given event. + * @param {Event} event The event to set current target. + * @param {number} eventPhase New event phase. + * @returns {void} + * @private + */ +function setEventPhase(event, eventPhase) { + pd(event).eventPhase = eventPhase; +} + +/** + * Set the current target of a given event. + * @param {Event} event The event to set current target. + * @param {EventTarget|null} currentTarget New current target. + * @returns {void} + * @private + */ +function setCurrentTarget(event, currentTarget) { + pd(event).currentTarget = currentTarget; +} + +/** + * Set a passive listener of a given event. + * @param {Event} event The event to set current target. + * @param {Function|null} passiveListener New passive listener. + * @returns {void} + * @private + */ +function setPassiveListener(event, passiveListener) { + pd(event).passiveListener = passiveListener; +} + +/** + * @typedef {object} ListenerNode + * @property {Function} listener + * @property {1|2|3} listenerType + * @property {boolean} passive + * @property {boolean} once + * @property {ListenerNode|null} next + * @private + */ + +/** + * @type {WeakMap<object, Map<string, ListenerNode>>} + * @private + */ +const listenersMap = new WeakMap(); + +// Listener types +const CAPTURE = 1; +const BUBBLE = 2; +const ATTRIBUTE = 3; + +/** + * Check whether a given value is an object or not. + * @param {any} x The value to check. + * @returns {boolean} `true` if the value is an object. + */ +function isObject(x) { + return x !== null && typeof x === "object" //eslint-disable-line no-restricted-syntax +} + +/** + * Get listeners. + * @param {EventTarget} eventTarget The event target to get. + * @returns {Map<string, ListenerNode>} The listeners. + * @private + */ +function getListeners(eventTarget) { + const listeners = listenersMap.get(eventTarget); + if (listeners == null) { + throw new TypeError( + "'this' is expected an EventTarget object, but got another value." + ) + } + return listeners +} + +/** + * Get the property descriptor for the event attribute of a given event. + * @param {string} eventName The event name to get property descriptor. + * @returns {PropertyDescriptor} The property descriptor. + * @private + */ +function defineEventAttributeDescriptor(eventName) { + return { + get() { + const listeners = getListeners(this); + let node = listeners.get(eventName); + while (node != null) { + if (node.listenerType === ATTRIBUTE) { + return node.listener + } + node = node.next; + } + return null + }, + + set(listener) { + if (typeof listener !== "function" && !isObject(listener)) { + listener = null; // eslint-disable-line no-param-reassign + } + const listeners = getListeners(this); + + // Traverse to the tail while removing old value. + let prev = null; + let node = listeners.get(eventName); + while (node != null) { + if (node.listenerType === ATTRIBUTE) { + // Remove old value. + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + } else { + prev = node; + } + + node = node.next; + } + + // Add new value. + if (listener !== null) { + const newNode = { + listener, + listenerType: ATTRIBUTE, + passive: false, + once: false, + next: null, + }; + if (prev === null) { + listeners.set(eventName, newNode); + } else { + prev.next = newNode; + } + } + }, + configurable: true, + enumerable: true, + } +} + +/** + * Define an event attribute (e.g. `eventTarget.onclick`). + * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite. + * @param {string} eventName The event name to define. + * @returns {void} + */ +function defineEventAttribute(eventTargetPrototype, eventName) { + Object.defineProperty( + eventTargetPrototype, + `on${eventName}`, + defineEventAttributeDescriptor(eventName) + ); +} + +/** + * Define a custom EventTarget with event attributes. + * @param {string[]} eventNames Event names for event attributes. + * @returns {EventTarget} The custom EventTarget. + * @private + */ +function defineCustomEventTarget(eventNames) { + /** CustomEventTarget */ + function CustomEventTarget() { + EventTarget.call(this); + } + + CustomEventTarget.prototype = Object.create(EventTarget.prototype, { + constructor: { + value: CustomEventTarget, + configurable: true, + writable: true, + }, + }); + + for (let i = 0; i < eventNames.length; ++i) { + defineEventAttribute(CustomEventTarget.prototype, eventNames[i]); + } + + return CustomEventTarget +} + +/** + * EventTarget. + * + * - This is constructor if no arguments. + * - This is a function which returns a CustomEventTarget constructor if there are arguments. + * + * For example: + * + * class A extends EventTarget {} + * class B extends EventTarget("message") {} + * class C extends EventTarget("message", "error") {} + * class D extends EventTarget(["message", "error"]) {} + */ +function EventTarget() { + /*eslint-disable consistent-return */ + if (this instanceof EventTarget) { + listenersMap.set(this, new Map()); + return + } + if (arguments.length === 1 && Array.isArray(arguments[0])) { + return defineCustomEventTarget(arguments[0]) + } + if (arguments.length > 0) { + const types = new Array(arguments.length); + for (let i = 0; i < arguments.length; ++i) { + types[i] = arguments[i]; + } + return defineCustomEventTarget(types) + } + throw new TypeError("Cannot call a class as a function") + /*eslint-enable consistent-return */ +} + +// Should be enumerable, but class methods are not enumerable. +EventTarget.prototype = { + /** + * Add a given listener to this event target. + * @param {string} eventName The event name to add. + * @param {Function} listener The listener to add. + * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. + * @returns {void} + */ + addEventListener(eventName, listener, options) { + if (listener == null) { + return + } + if (typeof listener !== "function" && !isObject(listener)) { + throw new TypeError("'listener' should be a function or an object.") + } + + const listeners = getListeners(this); + const optionsIsObj = isObject(options); + const capture = optionsIsObj + ? Boolean(options.capture) + : Boolean(options); + const listenerType = capture ? CAPTURE : BUBBLE; + const newNode = { + listener, + listenerType, + passive: optionsIsObj && Boolean(options.passive), + once: optionsIsObj && Boolean(options.once), + next: null, + }; + + // Set it as the first node if the first node is null. + let node = listeners.get(eventName); + if (node === undefined) { + listeners.set(eventName, newNode); + return + } + + // Traverse to the tail while checking duplication.. + let prev = null; + while (node != null) { + if ( + node.listener === listener && + node.listenerType === listenerType + ) { + // Should ignore duplication. + return + } + prev = node; + node = node.next; + } + + // Add it. + prev.next = newNode; + }, + + /** + * Remove a given listener from this event target. + * @param {string} eventName The event name to remove. + * @param {Function} listener The listener to remove. + * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. + * @returns {void} + */ + removeEventListener(eventName, listener, options) { + if (listener == null) { + return + } + + const listeners = getListeners(this); + const capture = isObject(options) + ? Boolean(options.capture) + : Boolean(options); + const listenerType = capture ? CAPTURE : BUBBLE; + + let prev = null; + let node = listeners.get(eventName); + while (node != null) { + if ( + node.listener === listener && + node.listenerType === listenerType + ) { + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + return + } + + prev = node; + node = node.next; + } + }, + + /** + * Dispatch a given event. + * @param {Event|{type:string}} event The event to dispatch. + * @returns {boolean} `false` if canceled. + */ + dispatchEvent(event) { + if (event == null || typeof event.type !== "string") { + throw new TypeError('"event.type" should be a string.') + } + + // If listeners aren't registered, terminate. + const listeners = getListeners(this); + const eventName = event.type; + let node = listeners.get(eventName); + if (node == null) { + return true + } + + // Since we cannot rewrite several properties, so wrap object. + const wrappedEvent = wrapEvent(this, event); + + // This doesn't process capturing phase and bubbling phase. + // This isn't participating in a tree. + let prev = null; + while (node != null) { + // Remove this listener if it's once + if (node.once) { + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + } else { + prev = node; + } + + // Call this listener + setPassiveListener( + wrappedEvent, + node.passive ? node.listener : null + ); + if (typeof node.listener === "function") { + try { + node.listener.call(this, wrappedEvent); + } catch (err) { + if ( + typeof console !== "undefined" && + typeof console.error === "function" + ) { + console.error(err); + } + } + } else if ( + node.listenerType !== ATTRIBUTE && + typeof node.listener.handleEvent === "function" + ) { + node.listener.handleEvent(wrappedEvent); + } + + // Break if `event.stopImmediatePropagation` was called. + if (isStopped(wrappedEvent)) { + break + } + + node = node.next; + } + setPassiveListener(wrappedEvent, null); + setEventPhase(wrappedEvent, 0); + setCurrentTarget(wrappedEvent, null); + + return !wrappedEvent.defaultPrevented + }, +}; + +// `constructor` is not enumerable. +Object.defineProperty(EventTarget.prototype, "constructor", { + value: EventTarget, + configurable: true, + writable: true, +}); + +// Ensure `eventTarget instanceof window.EventTarget` is `true`. +if ( + typeof window !== "undefined" && + typeof window.EventTarget !== "undefined" +) { + Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype); +} + +export default EventTarget; +export { defineEventAttribute, EventTarget }; +//# sourceMappingURL=event-target-shim.mjs.map diff --git a/node_modules/event-target-shim/dist/event-target-shim.mjs.map b/node_modules/event-target-shim/dist/event-target-shim.mjs.map new file mode 100644 index 0000000000000..57b3e8f7c028d --- /dev/null +++ b/node_modules/event-target-shim/dist/event-target-shim.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"event-target-shim.mjs","sources":["../src/event.mjs","../src/event-target.mjs"],"sourcesContent":["/**\n * @typedef {object} PrivateData\n * @property {EventTarget} eventTarget The event target.\n * @property {{type:string}} event The original event object.\n * @property {number} eventPhase The current event phase.\n * @property {EventTarget|null} currentTarget The current event target.\n * @property {boolean} canceled The flag to prevent default.\n * @property {boolean} stopped The flag to stop propagation.\n * @property {boolean} immediateStopped The flag to stop propagation immediately.\n * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null.\n * @property {number} timeStamp The unix time.\n * @private\n */\n\n/**\n * Private data for event wrappers.\n * @type {WeakMap<Event, PrivateData>}\n * @private\n */\nconst privateData = new WeakMap()\n\n/**\n * Cache for wrapper classes.\n * @type {WeakMap<Object, Function>}\n * @private\n */\nconst wrappers = new WeakMap()\n\n/**\n * Get private data.\n * @param {Event} event The event object to get private data.\n * @returns {PrivateData} The private data of the event.\n * @private\n */\nfunction pd(event) {\n const retv = privateData.get(event)\n console.assert(\n retv != null,\n \"'this' is expected an Event object, but got\",\n event\n )\n return retv\n}\n\n/**\n * https://dom.spec.whatwg.org/#set-the-canceled-flag\n * @param data {PrivateData} private data.\n */\nfunction setCancelFlag(data) {\n if (data.passiveListener != null) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(\n \"Unable to preventDefault inside passive event listener invocation.\",\n data.passiveListener\n )\n }\n return\n }\n if (!data.event.cancelable) {\n return\n }\n\n data.canceled = true\n if (typeof data.event.preventDefault === \"function\") {\n data.event.preventDefault()\n }\n}\n\n/**\n * @see https://dom.spec.whatwg.org/#interface-event\n * @private\n */\n/**\n * The event wrapper.\n * @constructor\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Event|{type:string}} event The original event to wrap.\n */\nfunction Event(eventTarget, event) {\n privateData.set(this, {\n eventTarget,\n event,\n eventPhase: 2,\n currentTarget: eventTarget,\n canceled: false,\n stopped: false,\n immediateStopped: false,\n passiveListener: null,\n timeStamp: event.timeStamp || Date.now(),\n })\n\n // https://heycam.github.io/webidl/#Unforgeable\n Object.defineProperty(this, \"isTrusted\", { value: false, enumerable: true })\n\n // Define accessors\n const keys = Object.keys(event)\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n if (!(key in this)) {\n Object.defineProperty(this, key, defineRedirectDescriptor(key))\n }\n }\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEvent.prototype = {\n /**\n * The type of this event.\n * @type {string}\n */\n get type() {\n return pd(this).event.type\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get target() {\n return pd(this).eventTarget\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get currentTarget() {\n return pd(this).currentTarget\n },\n\n /**\n * @returns {EventTarget[]} The composed path of this event.\n */\n composedPath() {\n const currentTarget = pd(this).currentTarget\n if (currentTarget == null) {\n return []\n }\n return [currentTarget]\n },\n\n /**\n * Constant of NONE.\n * @type {number}\n */\n get NONE() {\n return 0\n },\n\n /**\n * Constant of CAPTURING_PHASE.\n * @type {number}\n */\n get CAPTURING_PHASE() {\n return 1\n },\n\n /**\n * Constant of AT_TARGET.\n * @type {number}\n */\n get AT_TARGET() {\n return 2\n },\n\n /**\n * Constant of BUBBLING_PHASE.\n * @type {number}\n */\n get BUBBLING_PHASE() {\n return 3\n },\n\n /**\n * The target of this event.\n * @type {number}\n */\n get eventPhase() {\n return pd(this).eventPhase\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopPropagation() {\n const data = pd(this)\n\n data.stopped = true\n if (typeof data.event.stopPropagation === \"function\") {\n data.event.stopPropagation()\n }\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopImmediatePropagation() {\n const data = pd(this)\n\n data.stopped = true\n data.immediateStopped = true\n if (typeof data.event.stopImmediatePropagation === \"function\") {\n data.event.stopImmediatePropagation()\n }\n },\n\n /**\n * The flag to be bubbling.\n * @type {boolean}\n */\n get bubbles() {\n return Boolean(pd(this).event.bubbles)\n },\n\n /**\n * The flag to be cancelable.\n * @type {boolean}\n */\n get cancelable() {\n return Boolean(pd(this).event.cancelable)\n },\n\n /**\n * Cancel this event.\n * @returns {void}\n */\n preventDefault() {\n setCancelFlag(pd(this))\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n */\n get defaultPrevented() {\n return pd(this).canceled\n },\n\n /**\n * The flag to be composed.\n * @type {boolean}\n */\n get composed() {\n return Boolean(pd(this).event.composed)\n },\n\n /**\n * The unix time of this event.\n * @type {number}\n */\n get timeStamp() {\n return pd(this).timeStamp\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n * @deprecated\n */\n get srcElement() {\n return pd(this).eventTarget\n },\n\n /**\n * The flag to stop event bubbling.\n * @type {boolean}\n * @deprecated\n */\n get cancelBubble() {\n return pd(this).stopped\n },\n set cancelBubble(value) {\n if (!value) {\n return\n }\n const data = pd(this)\n\n data.stopped = true\n if (typeof data.event.cancelBubble === \"boolean\") {\n data.event.cancelBubble = true\n }\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n * @deprecated\n */\n get returnValue() {\n return !pd(this).canceled\n },\n set returnValue(value) {\n if (!value) {\n setCancelFlag(pd(this))\n }\n },\n\n /**\n * Initialize this event object. But do nothing under event dispatching.\n * @param {string} type The event type.\n * @param {boolean} [bubbles=false] The flag to be possible to bubble up.\n * @param {boolean} [cancelable=false] The flag to be possible to cancel.\n * @deprecated\n */\n initEvent() {\n // Do nothing.\n },\n}\n\n// `constructor` is not enumerable.\nObject.defineProperty(Event.prototype, \"constructor\", {\n value: Event,\n configurable: true,\n writable: true,\n})\n\n// Ensure `event instanceof window.Event` is `true`.\nif (typeof window !== \"undefined\" && typeof window.Event !== \"undefined\") {\n Object.setPrototypeOf(Event.prototype, window.Event.prototype)\n\n // Make association for wrappers.\n wrappers.set(window.Event.prototype, Event)\n}\n\n/**\n * Get the property descriptor to redirect a given property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to redirect the property.\n * @private\n */\nfunction defineRedirectDescriptor(key) {\n return {\n get() {\n return pd(this).event[key]\n },\n set(value) {\n pd(this).event[key] = value\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Get the property descriptor to call a given method property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to call the method property.\n * @private\n */\nfunction defineCallDescriptor(key) {\n return {\n value() {\n const event = pd(this).event\n return event[key].apply(event, arguments)\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define new wrapper class.\n * @param {Function} BaseEvent The base wrapper class.\n * @param {Object} proto The prototype of the original event.\n * @returns {Function} The defined wrapper class.\n * @private\n */\nfunction defineWrapper(BaseEvent, proto) {\n const keys = Object.keys(proto)\n if (keys.length === 0) {\n return BaseEvent\n }\n\n /** CustomEvent */\n function CustomEvent(eventTarget, event) {\n BaseEvent.call(this, eventTarget, event)\n }\n\n CustomEvent.prototype = Object.create(BaseEvent.prototype, {\n constructor: { value: CustomEvent, configurable: true, writable: true },\n })\n\n // Define accessors.\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n if (!(key in BaseEvent.prototype)) {\n const descriptor = Object.getOwnPropertyDescriptor(proto, key)\n const isFunc = typeof descriptor.value === \"function\"\n Object.defineProperty(\n CustomEvent.prototype,\n key,\n isFunc\n ? defineCallDescriptor(key)\n : defineRedirectDescriptor(key)\n )\n }\n }\n\n return CustomEvent\n}\n\n/**\n * Get the wrapper class of a given prototype.\n * @param {Object} proto The prototype of the original event to get its wrapper.\n * @returns {Function} The wrapper class.\n * @private\n */\nfunction getWrapper(proto) {\n if (proto == null || proto === Object.prototype) {\n return Event\n }\n\n let wrapper = wrappers.get(proto)\n if (wrapper == null) {\n wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto)\n wrappers.set(proto, wrapper)\n }\n return wrapper\n}\n\n/**\n * Wrap a given event to management a dispatching.\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Object} event The event to wrap.\n * @returns {Event} The wrapper instance.\n * @private\n */\nexport function wrapEvent(eventTarget, event) {\n const Wrapper = getWrapper(Object.getPrototypeOf(event))\n return new Wrapper(eventTarget, event)\n}\n\n/**\n * Get the immediateStopped flag of a given event.\n * @param {Event} event The event to get.\n * @returns {boolean} The flag to stop propagation immediately.\n * @private\n */\nexport function isStopped(event) {\n return pd(event).immediateStopped\n}\n\n/**\n * Set the current event phase of a given event.\n * @param {Event} event The event to set current target.\n * @param {number} eventPhase New event phase.\n * @returns {void}\n * @private\n */\nexport function setEventPhase(event, eventPhase) {\n pd(event).eventPhase = eventPhase\n}\n\n/**\n * Set the current target of a given event.\n * @param {Event} event The event to set current target.\n * @param {EventTarget|null} currentTarget New current target.\n * @returns {void}\n * @private\n */\nexport function setCurrentTarget(event, currentTarget) {\n pd(event).currentTarget = currentTarget\n}\n\n/**\n * Set a passive listener of a given event.\n * @param {Event} event The event to set current target.\n * @param {Function|null} passiveListener New passive listener.\n * @returns {void}\n * @private\n */\nexport function setPassiveListener(event, passiveListener) {\n pd(event).passiveListener = passiveListener\n}\n","import {\n isStopped,\n setCurrentTarget,\n setEventPhase,\n setPassiveListener,\n wrapEvent,\n} from \"./event.mjs\"\n\n/**\n * @typedef {object} ListenerNode\n * @property {Function} listener\n * @property {1|2|3} listenerType\n * @property {boolean} passive\n * @property {boolean} once\n * @property {ListenerNode|null} next\n * @private\n */\n\n/**\n * @type {WeakMap<object, Map<string, ListenerNode>>}\n * @private\n */\nconst listenersMap = new WeakMap()\n\n// Listener types\nconst CAPTURE = 1\nconst BUBBLE = 2\nconst ATTRIBUTE = 3\n\n/**\n * Check whether a given value is an object or not.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is an object.\n */\nfunction isObject(x) {\n return x !== null && typeof x === \"object\" //eslint-disable-line no-restricted-syntax\n}\n\n/**\n * Get listeners.\n * @param {EventTarget} eventTarget The event target to get.\n * @returns {Map<string, ListenerNode>} The listeners.\n * @private\n */\nfunction getListeners(eventTarget) {\n const listeners = listenersMap.get(eventTarget)\n if (listeners == null) {\n throw new TypeError(\n \"'this' is expected an EventTarget object, but got another value.\"\n )\n }\n return listeners\n}\n\n/**\n * Get the property descriptor for the event attribute of a given event.\n * @param {string} eventName The event name to get property descriptor.\n * @returns {PropertyDescriptor} The property descriptor.\n * @private\n */\nfunction defineEventAttributeDescriptor(eventName) {\n return {\n get() {\n const listeners = getListeners(this)\n let node = listeners.get(eventName)\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n return node.listener\n }\n node = node.next\n }\n return null\n },\n\n set(listener) {\n if (typeof listener !== \"function\" && !isObject(listener)) {\n listener = null // eslint-disable-line no-param-reassign\n }\n const listeners = getListeners(this)\n\n // Traverse to the tail while removing old value.\n let prev = null\n let node = listeners.get(eventName)\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n // Remove old value.\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n } else {\n prev = node\n }\n\n node = node.next\n }\n\n // Add new value.\n if (listener !== null) {\n const newNode = {\n listener,\n listenerType: ATTRIBUTE,\n passive: false,\n once: false,\n next: null,\n }\n if (prev === null) {\n listeners.set(eventName, newNode)\n } else {\n prev.next = newNode\n }\n }\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define an event attribute (e.g. `eventTarget.onclick`).\n * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite.\n * @param {string} eventName The event name to define.\n * @returns {void}\n */\nfunction defineEventAttribute(eventTargetPrototype, eventName) {\n Object.defineProperty(\n eventTargetPrototype,\n `on${eventName}`,\n defineEventAttributeDescriptor(eventName)\n )\n}\n\n/**\n * Define a custom EventTarget with event attributes.\n * @param {string[]} eventNames Event names for event attributes.\n * @returns {EventTarget} The custom EventTarget.\n * @private\n */\nfunction defineCustomEventTarget(eventNames) {\n /** CustomEventTarget */\n function CustomEventTarget() {\n EventTarget.call(this)\n }\n\n CustomEventTarget.prototype = Object.create(EventTarget.prototype, {\n constructor: {\n value: CustomEventTarget,\n configurable: true,\n writable: true,\n },\n })\n\n for (let i = 0; i < eventNames.length; ++i) {\n defineEventAttribute(CustomEventTarget.prototype, eventNames[i])\n }\n\n return CustomEventTarget\n}\n\n/**\n * EventTarget.\n *\n * - This is constructor if no arguments.\n * - This is a function which returns a CustomEventTarget constructor if there are arguments.\n *\n * For example:\n *\n * class A extends EventTarget {}\n * class B extends EventTarget(\"message\") {}\n * class C extends EventTarget(\"message\", \"error\") {}\n * class D extends EventTarget([\"message\", \"error\"]) {}\n */\nfunction EventTarget() {\n /*eslint-disable consistent-return */\n if (this instanceof EventTarget) {\n listenersMap.set(this, new Map())\n return\n }\n if (arguments.length === 1 && Array.isArray(arguments[0])) {\n return defineCustomEventTarget(arguments[0])\n }\n if (arguments.length > 0) {\n const types = new Array(arguments.length)\n for (let i = 0; i < arguments.length; ++i) {\n types[i] = arguments[i]\n }\n return defineCustomEventTarget(types)\n }\n throw new TypeError(\"Cannot call a class as a function\")\n /*eslint-enable consistent-return */\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEventTarget.prototype = {\n /**\n * Add a given listener to this event target.\n * @param {string} eventName The event name to add.\n * @param {Function} listener The listener to add.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n addEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n if (typeof listener !== \"function\" && !isObject(listener)) {\n throw new TypeError(\"'listener' should be a function or an object.\")\n }\n\n const listeners = getListeners(this)\n const optionsIsObj = isObject(options)\n const capture = optionsIsObj\n ? Boolean(options.capture)\n : Boolean(options)\n const listenerType = capture ? CAPTURE : BUBBLE\n const newNode = {\n listener,\n listenerType,\n passive: optionsIsObj && Boolean(options.passive),\n once: optionsIsObj && Boolean(options.once),\n next: null,\n }\n\n // Set it as the first node if the first node is null.\n let node = listeners.get(eventName)\n if (node === undefined) {\n listeners.set(eventName, newNode)\n return\n }\n\n // Traverse to the tail while checking duplication..\n let prev = null\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n // Should ignore duplication.\n return\n }\n prev = node\n node = node.next\n }\n\n // Add it.\n prev.next = newNode\n },\n\n /**\n * Remove a given listener from this event target.\n * @param {string} eventName The event name to remove.\n * @param {Function} listener The listener to remove.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n removeEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n\n const listeners = getListeners(this)\n const capture = isObject(options)\n ? Boolean(options.capture)\n : Boolean(options)\n const listenerType = capture ? CAPTURE : BUBBLE\n\n let prev = null\n let node = listeners.get(eventName)\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n return\n }\n\n prev = node\n node = node.next\n }\n },\n\n /**\n * Dispatch a given event.\n * @param {Event|{type:string}} event The event to dispatch.\n * @returns {boolean} `false` if canceled.\n */\n dispatchEvent(event) {\n if (event == null || typeof event.type !== \"string\") {\n throw new TypeError('\"event.type\" should be a string.')\n }\n\n // If listeners aren't registered, terminate.\n const listeners = getListeners(this)\n const eventName = event.type\n let node = listeners.get(eventName)\n if (node == null) {\n return true\n }\n\n // Since we cannot rewrite several properties, so wrap object.\n const wrappedEvent = wrapEvent(this, event)\n\n // This doesn't process capturing phase and bubbling phase.\n // This isn't participating in a tree.\n let prev = null\n while (node != null) {\n // Remove this listener if it's once\n if (node.once) {\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n } else {\n prev = node\n }\n\n // Call this listener\n setPassiveListener(\n wrappedEvent,\n node.passive ? node.listener : null\n )\n if (typeof node.listener === \"function\") {\n try {\n node.listener.call(this, wrappedEvent)\n } catch (err) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(err)\n }\n }\n } else if (\n node.listenerType !== ATTRIBUTE &&\n typeof node.listener.handleEvent === \"function\"\n ) {\n node.listener.handleEvent(wrappedEvent)\n }\n\n // Break if `event.stopImmediatePropagation` was called.\n if (isStopped(wrappedEvent)) {\n break\n }\n\n node = node.next\n }\n setPassiveListener(wrappedEvent, null)\n setEventPhase(wrappedEvent, 0)\n setCurrentTarget(wrappedEvent, null)\n\n return !wrappedEvent.defaultPrevented\n },\n}\n\n// `constructor` is not enumerable.\nObject.defineProperty(EventTarget.prototype, \"constructor\", {\n value: EventTarget,\n configurable: true,\n writable: true,\n})\n\n// Ensure `eventTarget instanceof window.EventTarget` is `true`.\nif (\n typeof window !== \"undefined\" &&\n typeof window.EventTarget !== \"undefined\"\n) {\n Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype)\n}\n\nexport { defineEventAttribute, EventTarget }\nexport default EventTarget\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;;;;;;;;;;;;;AAmBA,MAAM,WAAW,GAAG,IAAI,OAAO,GAAE;;;;;;;AAOjC,MAAM,QAAQ,GAAG,IAAI,OAAO,GAAE;;;;;;;;AAQ9B,SAAS,EAAE,CAAC,KAAK,EAAE;IACf,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,KAAK,EAAC;IACnC,OAAO,CAAC,MAAM;QACV,IAAI,IAAI,IAAI;QACZ,6CAA6C;QAC7C,KAAK;MACR;IACD,OAAO,IAAI;CACd;;;;;;AAMD,SAAS,aAAa,CAAC,IAAI,EAAE;IACzB,IAAI,IAAI,CAAC,eAAe,IAAI,IAAI,EAAE;QAC9B;YACI,OAAO,OAAO,KAAK,WAAW;YAC9B,OAAO,OAAO,CAAC,KAAK,KAAK,UAAU;UACrC;YACE,OAAO,CAAC,KAAK;gBACT,oEAAoE;gBACpE,IAAI,CAAC,eAAe;cACvB;SACJ;QACD,MAAM;KACT;IACD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE;QACxB,MAAM;KACT;;IAED,IAAI,CAAC,QAAQ,GAAG,KAAI;IACpB,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,KAAK,UAAU,EAAE;QACjD,IAAI,CAAC,KAAK,CAAC,cAAc,GAAE;KAC9B;CACJ;;;;;;;;;;;;AAYD,SAAS,KAAK,CAAC,WAAW,EAAE,KAAK,EAAE;IAC/B,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE;QAClB,WAAW;QACX,KAAK;QACL,UAAU,EAAE,CAAC;QACb,aAAa,EAAE,WAAW;QAC1B,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,KAAK;QACd,gBAAgB,EAAE,KAAK;QACvB,eAAe,EAAE,IAAI;QACrB,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,GAAG,EAAE;KAC3C,EAAC;;;IAGF,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,EAAC;;;IAG5E,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAC;IAC/B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;QAClC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,EAAC;QACnB,IAAI,EAAE,GAAG,IAAI,IAAI,CAAC,EAAE;YAChB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,wBAAwB,CAAC,GAAG,CAAC,EAAC;SAClE;KACJ;CACJ;;;AAGD,KAAK,CAAC,SAAS,GAAG;;;;;IAKd,IAAI,IAAI,GAAG;QACP,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI;KAC7B;;;;;;IAMD,IAAI,MAAM,GAAG;QACT,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW;KAC9B;;;;;;IAMD,IAAI,aAAa,GAAG;QAChB,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,aAAa;KAChC;;;;;IAKD,YAAY,GAAG;QACX,MAAM,aAAa,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,cAAa;QAC5C,IAAI,aAAa,IAAI,IAAI,EAAE;YACvB,OAAO,EAAE;SACZ;QACD,OAAO,CAAC,aAAa,CAAC;KACzB;;;;;;IAMD,IAAI,IAAI,GAAG;QACP,OAAO,CAAC;KACX;;;;;;IAMD,IAAI,eAAe,GAAG;QAClB,OAAO,CAAC;KACX;;;;;;IAMD,IAAI,SAAS,GAAG;QACZ,OAAO,CAAC;KACX;;;;;;IAMD,IAAI,cAAc,GAAG;QACjB,OAAO,CAAC;KACX;;;;;;IAMD,IAAI,UAAU,GAAG;QACb,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU;KAC7B;;;;;;IAMD,eAAe,GAAG;QACd,MAAM,IAAI,GAAG,EAAE,CAAC,IAAI,EAAC;;QAErB,IAAI,CAAC,OAAO,GAAG,KAAI;QACnB,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,eAAe,KAAK,UAAU,EAAE;YAClD,IAAI,CAAC,KAAK,CAAC,eAAe,GAAE;SAC/B;KACJ;;;;;;IAMD,wBAAwB,GAAG;QACvB,MAAM,IAAI,GAAG,EAAE,CAAC,IAAI,EAAC;;QAErB,IAAI,CAAC,OAAO,GAAG,KAAI;QACnB,IAAI,CAAC,gBAAgB,GAAG,KAAI;QAC5B,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,wBAAwB,KAAK,UAAU,EAAE;YAC3D,IAAI,CAAC,KAAK,CAAC,wBAAwB,GAAE;SACxC;KACJ;;;;;;IAMD,IAAI,OAAO,GAAG;QACV,OAAO,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC;KACzC;;;;;;IAMD,IAAI,UAAU,GAAG;QACb,OAAO,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;KAC5C;;;;;;IAMD,cAAc,GAAG;QACb,aAAa,CAAC,EAAE,CAAC,IAAI,CAAC,EAAC;KAC1B;;;;;;IAMD,IAAI,gBAAgB,GAAG;QACnB,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,QAAQ;KAC3B;;;;;;IAMD,IAAI,QAAQ,GAAG;QACX,OAAO,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;KAC1C;;;;;;IAMD,IAAI,SAAS,GAAG;QACZ,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS;KAC5B;;;;;;;IAOD,IAAI,UAAU,GAAG;QACb,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW;KAC9B;;;;;;;IAOD,IAAI,YAAY,GAAG;QACf,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,OAAO;KAC1B;IACD,IAAI,YAAY,CAAC,KAAK,EAAE;QACpB,IAAI,CAAC,KAAK,EAAE;YACR,MAAM;SACT;QACD,MAAM,IAAI,GAAG,EAAE,CAAC,IAAI,EAAC;;QAErB,IAAI,CAAC,OAAO,GAAG,KAAI;QACnB,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,KAAK,SAAS,EAAE;YAC9C,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,KAAI;SACjC;KACJ;;;;;;;IAOD,IAAI,WAAW,GAAG;QACd,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,QAAQ;KAC5B;IACD,IAAI,WAAW,CAAC,KAAK,EAAE;QACnB,IAAI,CAAC,KAAK,EAAE;YACR,aAAa,CAAC,EAAE,CAAC,IAAI,CAAC,EAAC;SAC1B;KACJ;;;;;;;;;IASD,SAAS,GAAG;;KAEX;EACJ;;;AAGD,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,SAAS,EAAE,aAAa,EAAE;IAClD,KAAK,EAAE,KAAK;IACZ,YAAY,EAAE,IAAI;IAClB,QAAQ,EAAE,IAAI;CACjB,EAAC;;;AAGF,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,WAAW,EAAE;IACtE,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS,EAAC;;;IAG9D,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,EAAC;CAC9C;;;;;;;;AAQD,SAAS,wBAAwB,CAAC,GAAG,EAAE;IACnC,OAAO;QACH,GAAG,GAAG;YACF,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;SAC7B;QACD,GAAG,CAAC,KAAK,EAAE;YACP,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,MAAK;SAC9B;QACD,YAAY,EAAE,IAAI;QAClB,UAAU,EAAE,IAAI;KACnB;CACJ;;;;;;;;AAQD,SAAS,oBAAoB,CAAC,GAAG,EAAE;IAC/B,OAAO;QACH,KAAK,GAAG;YACJ,MAAM,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,MAAK;YAC5B,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,CAAC;SAC5C;QACD,YAAY,EAAE,IAAI;QAClB,UAAU,EAAE,IAAI;KACnB;CACJ;;;;;;;;;AASD,SAAS,aAAa,CAAC,SAAS,EAAE,KAAK,EAAE;IACrC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAC;IAC/B,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACnB,OAAO,SAAS;KACnB;;;IAGD,SAAS,WAAW,CAAC,WAAW,EAAE,KAAK,EAAE;QACrC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAC;KAC3C;;IAED,WAAW,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE;QACvD,WAAW,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC1E,EAAC;;;IAGF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;QAClC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,EAAC;QACnB,IAAI,EAAE,GAAG,IAAI,SAAS,CAAC,SAAS,CAAC,EAAE;YAC/B,MAAM,UAAU,GAAG,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,GAAG,EAAC;YAC9D,MAAM,MAAM,GAAG,OAAO,UAAU,CAAC,KAAK,KAAK,WAAU;YACrD,MAAM,CAAC,cAAc;gBACjB,WAAW,CAAC,SAAS;gBACrB,GAAG;gBACH,MAAM;sBACA,oBAAoB,CAAC,GAAG,CAAC;sBACzB,wBAAwB,CAAC,GAAG,CAAC;cACtC;SACJ;KACJ;;IAED,OAAO,WAAW;CACrB;;;;;;;;AAQD,SAAS,UAAU,CAAC,KAAK,EAAE;IACvB,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,KAAK,MAAM,CAAC,SAAS,EAAE;QAC7C,OAAO,KAAK;KACf;;IAED,IAAI,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAC;IACjC,IAAI,OAAO,IAAI,IAAI,EAAE;QACjB,OAAO,GAAG,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,EAAC;QACxE,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,EAAC;KAC/B;IACD,OAAO,OAAO;CACjB;;;;;;;;;AASD,AAAO,SAAS,SAAS,CAAC,WAAW,EAAE,KAAK,EAAE;IAC1C,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,EAAC;IACxD,OAAO,IAAI,OAAO,CAAC,WAAW,EAAE,KAAK,CAAC;CACzC;;;;;;;;AAQD,AAAO,SAAS,SAAS,CAAC,KAAK,EAAE;IAC7B,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,gBAAgB;CACpC;;;;;;;;;AASD,AAAO,SAAS,aAAa,CAAC,KAAK,EAAE,UAAU,EAAE;IAC7C,EAAE,CAAC,KAAK,CAAC,CAAC,UAAU,GAAG,WAAU;CACpC;;;;;;;;;AASD,AAAO,SAAS,gBAAgB,CAAC,KAAK,EAAE,aAAa,EAAE;IACnD,EAAE,CAAC,KAAK,CAAC,CAAC,aAAa,GAAG,cAAa;CAC1C;;;;;;;;;AASD,AAAO,SAAS,kBAAkB,CAAC,KAAK,EAAE,eAAe,EAAE;IACvD,EAAE,CAAC,KAAK,CAAC,CAAC,eAAe,GAAG,gBAAe;CAC9C;;ACtdD;;;;;;;;;;;;;;AAcA,MAAM,YAAY,GAAG,IAAI,OAAO,GAAE;;;AAGlC,MAAM,OAAO,GAAG,EAAC;AACjB,MAAM,MAAM,GAAG,EAAC;AAChB,MAAM,SAAS,GAAG,EAAC;;;;;;;AAOnB,SAAS,QAAQ,CAAC,CAAC,EAAE;IACjB,OAAO,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ;CAC7C;;;;;;;;AAQD,SAAS,YAAY,CAAC,WAAW,EAAE;IAC/B,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,CAAC,WAAW,EAAC;IAC/C,IAAI,SAAS,IAAI,IAAI,EAAE;QACnB,MAAM,IAAI,SAAS;YACf,kEAAkE;SACrE;KACJ;IACD,OAAO,SAAS;CACnB;;;;;;;;AAQD,SAAS,8BAA8B,CAAC,SAAS,EAAE;IAC/C,OAAO;QACH,GAAG,GAAG;YACF,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,EAAC;YACpC,IAAI,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,SAAS,EAAC;YACnC,OAAO,IAAI,IAAI,IAAI,EAAE;gBACjB,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE;oBACjC,OAAO,IAAI,CAAC,QAAQ;iBACvB;gBACD,IAAI,GAAG,IAAI,CAAC,KAAI;aACnB;YACD,OAAO,IAAI;SACd;;QAED,GAAG,CAAC,QAAQ,EAAE;YACV,IAAI,OAAO,QAAQ,KAAK,UAAU,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;gBACvD,QAAQ,GAAG,KAAI;aAClB;YACD,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,EAAC;;;YAGpC,IAAI,IAAI,GAAG,KAAI;YACf,IAAI,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,SAAS,EAAC;YACnC,OAAO,IAAI,IAAI,IAAI,EAAE;gBACjB,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE;;oBAEjC,IAAI,IAAI,KAAK,IAAI,EAAE;wBACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAI;qBACxB,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,EAAE;wBAC3B,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,EAAC;qBACtC,MAAM;wBACH,SAAS,CAAC,MAAM,CAAC,SAAS,EAAC;qBAC9B;iBACJ,MAAM;oBACH,IAAI,GAAG,KAAI;iBACd;;gBAED,IAAI,GAAG,IAAI,CAAC,KAAI;aACnB;;;YAGD,IAAI,QAAQ,KAAK,IAAI,EAAE;gBACnB,MAAM,OAAO,GAAG;oBACZ,QAAQ;oBACR,YAAY,EAAE,SAAS;oBACvB,OAAO,EAAE,KAAK;oBACd,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,IAAI;kBACb;gBACD,IAAI,IAAI,KAAK,IAAI,EAAE;oBACf,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,EAAC;iBACpC,MAAM;oBACH,IAAI,CAAC,IAAI,GAAG,QAAO;iBACtB;aACJ;SACJ;QACD,YAAY,EAAE,IAAI;QAClB,UAAU,EAAE,IAAI;KACnB;CACJ;;;;;;;;AAQD,SAAS,oBAAoB,CAAC,oBAAoB,EAAE,SAAS,EAAE;IAC3D,MAAM,CAAC,cAAc;QACjB,oBAAoB;QACpB,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;QAChB,8BAA8B,CAAC,SAAS,CAAC;MAC5C;CACJ;;;;;;;;AAQD,SAAS,uBAAuB,CAAC,UAAU,EAAE;;IAEzC,SAAS,iBAAiB,GAAG;QACzB,WAAW,CAAC,IAAI,CAAC,IAAI,EAAC;KACzB;;IAED,iBAAiB,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,EAAE;QAC/D,WAAW,EAAE;YACT,KAAK,EAAE,iBAAiB;YACxB,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,IAAI;SACjB;KACJ,EAAC;;IAEF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;QACxC,oBAAoB,CAAC,iBAAiB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,EAAC;KACnE;;IAED,OAAO,iBAAiB;CAC3B;;;;;;;;;;;;;;;AAeD,SAAS,WAAW,GAAG;;IAEnB,IAAI,IAAI,YAAY,WAAW,EAAE;QAC7B,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,EAAE,EAAC;QACjC,MAAM;KACT;IACD,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE;QACvD,OAAO,uBAAuB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;KAC/C;IACD,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE;QACtB,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,EAAC;QACzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;YACvC,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,EAAC;SAC1B;QACD,OAAO,uBAAuB,CAAC,KAAK,CAAC;KACxC;IACD,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC;;CAE3D;;;AAGD,WAAW,CAAC,SAAS,GAAG;;;;;;;;IAQpB,gBAAgB,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE;QAC3C,IAAI,QAAQ,IAAI,IAAI,EAAE;YAClB,MAAM;SACT;QACD,IAAI,OAAO,QAAQ,KAAK,UAAU,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;YACvD,MAAM,IAAI,SAAS,CAAC,+CAA+C,CAAC;SACvE;;QAED,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,EAAC;QACpC,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,EAAC;QACtC,MAAM,OAAO,GAAG,YAAY;cACtB,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;cACxB,OAAO,CAAC,OAAO,EAAC;QACtB,MAAM,YAAY,GAAG,OAAO,GAAG,OAAO,GAAG,OAAM;QAC/C,MAAM,OAAO,GAAG;YACZ,QAAQ;YACR,YAAY;YACZ,OAAO,EAAE,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;YACjD,IAAI,EAAE,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC;YAC3C,IAAI,EAAE,IAAI;UACb;;;QAGD,IAAI,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,SAAS,EAAC;QACnC,IAAI,IAAI,KAAK,SAAS,EAAE;YACpB,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,EAAC;YACjC,MAAM;SACT;;;QAGD,IAAI,IAAI,GAAG,KAAI;QACf,OAAO,IAAI,IAAI,IAAI,EAAE;YACjB;gBACI,IAAI,CAAC,QAAQ,KAAK,QAAQ;gBAC1B,IAAI,CAAC,YAAY,KAAK,YAAY;cACpC;;gBAEE,MAAM;aACT;YACD,IAAI,GAAG,KAAI;YACX,IAAI,GAAG,IAAI,CAAC,KAAI;SACnB;;;QAGD,IAAI,CAAC,IAAI,GAAG,QAAO;KACtB;;;;;;;;;IASD,mBAAmB,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE;QAC9C,IAAI,QAAQ,IAAI,IAAI,EAAE;YAClB,MAAM;SACT;;QAED,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,EAAC;QACpC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;cAC3B,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;cACxB,OAAO,CAAC,OAAO,EAAC;QACtB,MAAM,YAAY,GAAG,OAAO,GAAG,OAAO,GAAG,OAAM;;QAE/C,IAAI,IAAI,GAAG,KAAI;QACf,IAAI,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,SAAS,EAAC;QACnC,OAAO,IAAI,IAAI,IAAI,EAAE;YACjB;gBACI,IAAI,CAAC,QAAQ,KAAK,QAAQ;gBAC1B,IAAI,CAAC,YAAY,KAAK,YAAY;cACpC;gBACE,IAAI,IAAI,KAAK,IAAI,EAAE;oBACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAI;iBACxB,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,EAAE;oBAC3B,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,EAAC;iBACtC,MAAM;oBACH,SAAS,CAAC,MAAM,CAAC,SAAS,EAAC;iBAC9B;gBACD,MAAM;aACT;;YAED,IAAI,GAAG,KAAI;YACX,IAAI,GAAG,IAAI,CAAC,KAAI;SACnB;KACJ;;;;;;;IAOD,aAAa,CAAC,KAAK,EAAE;QACjB,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;YACjD,MAAM,IAAI,SAAS,CAAC,kCAAkC,CAAC;SAC1D;;;QAGD,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,EAAC;QACpC,MAAM,SAAS,GAAG,KAAK,CAAC,KAAI;QAC5B,IAAI,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,SAAS,EAAC;QACnC,IAAI,IAAI,IAAI,IAAI,EAAE;YACd,OAAO,IAAI;SACd;;;QAGD,MAAM,YAAY,GAAG,SAAS,CAAC,IAAI,EAAE,KAAK,EAAC;;;;QAI3C,IAAI,IAAI,GAAG,KAAI;QACf,OAAO,IAAI,IAAI,IAAI,EAAE;;YAEjB,IAAI,IAAI,CAAC,IAAI,EAAE;gBACX,IAAI,IAAI,KAAK,IAAI,EAAE;oBACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAI;iBACxB,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,EAAE;oBAC3B,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,EAAC;iBACtC,MAAM;oBACH,SAAS,CAAC,MAAM,CAAC,SAAS,EAAC;iBAC9B;aACJ,MAAM;gBACH,IAAI,GAAG,KAAI;aACd;;;YAGD,kBAAkB;gBACd,YAAY;gBACZ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI;cACtC;YACD,IAAI,OAAO,IAAI,CAAC,QAAQ,KAAK,UAAU,EAAE;gBACrC,IAAI;oBACA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,EAAC;iBACzC,CAAC,OAAO,GAAG,EAAE;oBACV;wBACI,OAAO,OAAO,KAAK,WAAW;wBAC9B,OAAO,OAAO,CAAC,KAAK,KAAK,UAAU;sBACrC;wBACE,OAAO,CAAC,KAAK,CAAC,GAAG,EAAC;qBACrB;iBACJ;aACJ,MAAM;gBACH,IAAI,CAAC,YAAY,KAAK,SAAS;gBAC/B,OAAO,IAAI,CAAC,QAAQ,CAAC,WAAW,KAAK,UAAU;cACjD;gBACE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,YAAY,EAAC;aAC1C;;;YAGD,IAAI,SAAS,CAAC,YAAY,CAAC,EAAE;gBACzB,KAAK;aACR;;YAED,IAAI,GAAG,IAAI,CAAC,KAAI;SACnB;QACD,kBAAkB,CAAC,YAAY,EAAE,IAAI,EAAC;QACtC,aAAa,CAAC,YAAY,EAAE,CAAC,EAAC;QAC9B,gBAAgB,CAAC,YAAY,EAAE,IAAI,EAAC;;QAEpC,OAAO,CAAC,YAAY,CAAC,gBAAgB;KACxC;EACJ;;;AAGD,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,SAAS,EAAE,aAAa,EAAE;IACxD,KAAK,EAAE,WAAW;IAClB,YAAY,EAAE,IAAI;IAClB,QAAQ,EAAE,IAAI;CACjB,EAAC;;;AAGF;IACI,OAAO,MAAM,KAAK,WAAW;IAC7B,OAAO,MAAM,CAAC,WAAW,KAAK,WAAW;EAC3C;IACE,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,SAAS,EAAC;CAC7E;;;;;"} \ No newline at end of file diff --git a/node_modules/event-target-shim/dist/event-target-shim.umd.js b/node_modules/event-target-shim/dist/event-target-shim.umd.js new file mode 100644 index 0000000000000..e7cf5d4d5885f --- /dev/null +++ b/node_modules/event-target-shim/dist/event-target-shim.umd.js @@ -0,0 +1,6 @@ +/** + * @author Toru Nagashima <https://github.com/mysticatea> + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports):"function"==typeof define&&define.amd?define(["exports"],b):(a=a||self,b(a.EventTargetShim={}))})(this,function(a){"use strict";function b(a){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},b(a)}function c(a){var b=u.get(a);return console.assert(null!=b,"'this' is expected an Event object, but got",a),b}function d(a){return null==a.passiveListener?void(!a.event.cancelable||(a.canceled=!0,"function"==typeof a.event.preventDefault&&a.event.preventDefault())):void("undefined"!=typeof console&&"function"==typeof console.error&&console.error("Unable to preventDefault inside passive event listener invocation.",a.passiveListener))}function e(a,b){u.set(this,{eventTarget:a,event:b,eventPhase:2,currentTarget:a,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:b.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});for(var c,d=Object.keys(b),e=0;e<d.length;++e)c=d[e],c in this||Object.defineProperty(this,c,f(c))}function f(a){return{get:function(){return c(this).event[a]},set:function(b){c(this).event[a]=b},configurable:!0,enumerable:!0}}function g(a){return{value:function(){var b=c(this).event;return b[a].apply(b,arguments)},configurable:!0,enumerable:!0}}function h(a,b){function c(b,c){a.call(this,b,c)}var d=Object.keys(b);if(0===d.length)return a;c.prototype=Object.create(a.prototype,{constructor:{value:c,configurable:!0,writable:!0}});for(var e,h=0;h<d.length;++h)if(e=d[h],!(e in a.prototype)){var j=Object.getOwnPropertyDescriptor(b,e),k="function"==typeof j.value;Object.defineProperty(c.prototype,e,k?g(e):f(e))}return c}function i(a){if(null==a||a===Object.prototype)return e;var b=v.get(a);return null==b&&(b=h(i(Object.getPrototypeOf(a)),a),v.set(a,b)),b}function j(a,b){var c=i(Object.getPrototypeOf(b));return new c(a,b)}function k(a){return c(a).immediateStopped}function l(a,b){c(a).eventPhase=b}function m(a,b){c(a).currentTarget=b}function n(a,b){c(a).passiveListener=b}function o(a){return null!==a&&"object"===b(a)}function p(a){var b=w.get(a);if(null==b)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return b}function q(a){return{get:function(){for(var b=p(this),c=b.get(a);null!=c;){if(3===c.listenerType)return c.listener;c=c.next}return null},set:function(b){"function"==typeof b||o(b)||(b=null);for(var c=p(this),d=null,e=c.get(a);null!=e;)3===e.listenerType?null===d?null===e.next?c.delete(a):c.set(a,e.next):d.next=e.next:d=e,e=e.next;if(null!==b){var f={listener:b,listenerType:3,passive:!1,once:!1,next:null};null===d?c.set(a,f):d.next=f}},configurable:!0,enumerable:!0}}function r(a,b){Object.defineProperty(a,"on".concat(b),q(b))}function s(a){function b(){t.call(this)}b.prototype=Object.create(t.prototype,{constructor:{value:b,configurable:!0,writable:!0}});for(var c=0;c<a.length;++c)r(b.prototype,a[c]);return b}function t(){if(this instanceof t)return void w.set(this,new Map);if(1===arguments.length&&Array.isArray(arguments[0]))return s(arguments[0]);if(0<arguments.length){for(var a=Array(arguments.length),b=0;b<arguments.length;++b)a[b]=arguments[b];return s(a)}throw new TypeError("Cannot call a class as a function")}var u=new WeakMap,v=new WeakMap;e.prototype={get type(){return c(this).event.type},get target(){return c(this).eventTarget},get currentTarget(){return c(this).currentTarget},composedPath:function(){var a=c(this).currentTarget;return null==a?[]:[a]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return c(this).eventPhase},stopPropagation:function(){var a=c(this);a.stopped=!0,"function"==typeof a.event.stopPropagation&&a.event.stopPropagation()},stopImmediatePropagation:function(){var a=c(this);a.stopped=!0,a.immediateStopped=!0,"function"==typeof a.event.stopImmediatePropagation&&a.event.stopImmediatePropagation()},get bubbles(){return!!c(this).event.bubbles},get cancelable(){return!!c(this).event.cancelable},preventDefault:function(){d(c(this))},get defaultPrevented(){return c(this).canceled},get composed(){return!!c(this).event.composed},get timeStamp(){return c(this).timeStamp},get srcElement(){return c(this).eventTarget},get cancelBubble(){return c(this).stopped},set cancelBubble(a){if(a){var b=c(this);b.stopped=!0,"boolean"==typeof b.event.cancelBubble&&(b.event.cancelBubble=!0)}},get returnValue(){return!c(this).canceled},set returnValue(a){a||d(c(this))},initEvent:function(){}},Object.defineProperty(e.prototype,"constructor",{value:e,configurable:!0,writable:!0}),"undefined"!=typeof window&&"undefined"!=typeof window.Event&&(Object.setPrototypeOf(e.prototype,window.Event.prototype),v.set(window.Event.prototype,e));var w=new WeakMap,x=1,y=2;if(t.prototype={addEventListener:function(a,b,c){if(null!=b){if("function"!=typeof b&&!o(b))throw new TypeError("'listener' should be a function or an object.");var d=p(this),e=o(c),f=e?!!c.capture:!!c,g=f?x:y,h={listener:b,listenerType:g,passive:e&&!!c.passive,once:e&&!!c.once,next:null},i=d.get(a);if(void 0===i)return void d.set(a,h);for(var j=null;null!=i;){if(i.listener===b&&i.listenerType===g)return;j=i,i=i.next}j.next=h}},removeEventListener:function(a,b,c){if(null!=b)for(var d=p(this),e=o(c)?!!c.capture:!!c,f=e?x:y,g=null,h=d.get(a);null!=h;){if(h.listener===b&&h.listenerType===f)return void(null===g?null===h.next?d.delete(a):d.set(a,h.next):g.next=h.next);g=h,h=h.next}},dispatchEvent:function(a){if(null==a||"string"!=typeof a.type)throw new TypeError("\"event.type\" should be a string.");var b=p(this),c=a.type,d=b.get(c);if(null==d)return!0;for(var e=j(this,a),f=null;null!=d;){if(d.once?null===f?null===d.next?b.delete(c):b.set(c,d.next):f.next=d.next:f=d,n(e,d.passive?d.listener:null),"function"==typeof d.listener)try{d.listener.call(this,e)}catch(a){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(a)}else d.listenerType!==3&&"function"==typeof d.listener.handleEvent&&d.listener.handleEvent(e);if(k(e))break;d=d.next}return n(e,null),l(e,0),m(e,null),!e.defaultPrevented}},Object.defineProperty(t.prototype,"constructor",{value:t,configurable:!0,writable:!0}),"undefined"!=typeof window&&"undefined"!=typeof window.EventTarget&&Object.setPrototypeOf(t.prototype,window.EventTarget.prototype),a.defineEventAttribute=r,a.EventTarget=t,a.default=t,Object.defineProperty(a,"__esModule",{value:!0}),"undefined"==typeof module&&"undefined"==typeof define){var z=Function("return this")();z.EventTargetShim=t,z.EventTargetShim.defineEventAttribute=r}}); +//# sourceMappingURL=event-target-shim.umd.js.map diff --git a/node_modules/event-target-shim/dist/event-target-shim.umd.js.map b/node_modules/event-target-shim/dist/event-target-shim.umd.js.map new file mode 100644 index 0000000000000..c5b2b60a85f0a --- /dev/null +++ b/node_modules/event-target-shim/dist/event-target-shim.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"event-target-shim.umd.js","sources":["../src/event.mjs","../src/event-target.mjs"],"sourcesContent":["/**\n * @typedef {object} PrivateData\n * @property {EventTarget} eventTarget The event target.\n * @property {{type:string}} event The original event object.\n * @property {number} eventPhase The current event phase.\n * @property {EventTarget|null} currentTarget The current event target.\n * @property {boolean} canceled The flag to prevent default.\n * @property {boolean} stopped The flag to stop propagation.\n * @property {boolean} immediateStopped The flag to stop propagation immediately.\n * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null.\n * @property {number} timeStamp The unix time.\n * @private\n */\n\n/**\n * Private data for event wrappers.\n * @type {WeakMap<Event, PrivateData>}\n * @private\n */\nconst privateData = new WeakMap()\n\n/**\n * Cache for wrapper classes.\n * @type {WeakMap<Object, Function>}\n * @private\n */\nconst wrappers = new WeakMap()\n\n/**\n * Get private data.\n * @param {Event} event The event object to get private data.\n * @returns {PrivateData} The private data of the event.\n * @private\n */\nfunction pd(event) {\n const retv = privateData.get(event)\n console.assert(\n retv != null,\n \"'this' is expected an Event object, but got\",\n event\n )\n return retv\n}\n\n/**\n * https://dom.spec.whatwg.org/#set-the-canceled-flag\n * @param data {PrivateData} private data.\n */\nfunction setCancelFlag(data) {\n if (data.passiveListener != null) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(\n \"Unable to preventDefault inside passive event listener invocation.\",\n data.passiveListener\n )\n }\n return\n }\n if (!data.event.cancelable) {\n return\n }\n\n data.canceled = true\n if (typeof data.event.preventDefault === \"function\") {\n data.event.preventDefault()\n }\n}\n\n/**\n * @see https://dom.spec.whatwg.org/#interface-event\n * @private\n */\n/**\n * The event wrapper.\n * @constructor\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Event|{type:string}} event The original event to wrap.\n */\nfunction Event(eventTarget, event) {\n privateData.set(this, {\n eventTarget,\n event,\n eventPhase: 2,\n currentTarget: eventTarget,\n canceled: false,\n stopped: false,\n immediateStopped: false,\n passiveListener: null,\n timeStamp: event.timeStamp || Date.now(),\n })\n\n // https://heycam.github.io/webidl/#Unforgeable\n Object.defineProperty(this, \"isTrusted\", { value: false, enumerable: true })\n\n // Define accessors\n const keys = Object.keys(event)\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n if (!(key in this)) {\n Object.defineProperty(this, key, defineRedirectDescriptor(key))\n }\n }\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEvent.prototype = {\n /**\n * The type of this event.\n * @type {string}\n */\n get type() {\n return pd(this).event.type\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get target() {\n return pd(this).eventTarget\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get currentTarget() {\n return pd(this).currentTarget\n },\n\n /**\n * @returns {EventTarget[]} The composed path of this event.\n */\n composedPath() {\n const currentTarget = pd(this).currentTarget\n if (currentTarget == null) {\n return []\n }\n return [currentTarget]\n },\n\n /**\n * Constant of NONE.\n * @type {number}\n */\n get NONE() {\n return 0\n },\n\n /**\n * Constant of CAPTURING_PHASE.\n * @type {number}\n */\n get CAPTURING_PHASE() {\n return 1\n },\n\n /**\n * Constant of AT_TARGET.\n * @type {number}\n */\n get AT_TARGET() {\n return 2\n },\n\n /**\n * Constant of BUBBLING_PHASE.\n * @type {number}\n */\n get BUBBLING_PHASE() {\n return 3\n },\n\n /**\n * The target of this event.\n * @type {number}\n */\n get eventPhase() {\n return pd(this).eventPhase\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopPropagation() {\n const data = pd(this)\n\n data.stopped = true\n if (typeof data.event.stopPropagation === \"function\") {\n data.event.stopPropagation()\n }\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopImmediatePropagation() {\n const data = pd(this)\n\n data.stopped = true\n data.immediateStopped = true\n if (typeof data.event.stopImmediatePropagation === \"function\") {\n data.event.stopImmediatePropagation()\n }\n },\n\n /**\n * The flag to be bubbling.\n * @type {boolean}\n */\n get bubbles() {\n return Boolean(pd(this).event.bubbles)\n },\n\n /**\n * The flag to be cancelable.\n * @type {boolean}\n */\n get cancelable() {\n return Boolean(pd(this).event.cancelable)\n },\n\n /**\n * Cancel this event.\n * @returns {void}\n */\n preventDefault() {\n setCancelFlag(pd(this))\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n */\n get defaultPrevented() {\n return pd(this).canceled\n },\n\n /**\n * The flag to be composed.\n * @type {boolean}\n */\n get composed() {\n return Boolean(pd(this).event.composed)\n },\n\n /**\n * The unix time of this event.\n * @type {number}\n */\n get timeStamp() {\n return pd(this).timeStamp\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n * @deprecated\n */\n get srcElement() {\n return pd(this).eventTarget\n },\n\n /**\n * The flag to stop event bubbling.\n * @type {boolean}\n * @deprecated\n */\n get cancelBubble() {\n return pd(this).stopped\n },\n set cancelBubble(value) {\n if (!value) {\n return\n }\n const data = pd(this)\n\n data.stopped = true\n if (typeof data.event.cancelBubble === \"boolean\") {\n data.event.cancelBubble = true\n }\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n * @deprecated\n */\n get returnValue() {\n return !pd(this).canceled\n },\n set returnValue(value) {\n if (!value) {\n setCancelFlag(pd(this))\n }\n },\n\n /**\n * Initialize this event object. But do nothing under event dispatching.\n * @param {string} type The event type.\n * @param {boolean} [bubbles=false] The flag to be possible to bubble up.\n * @param {boolean} [cancelable=false] The flag to be possible to cancel.\n * @deprecated\n */\n initEvent() {\n // Do nothing.\n },\n}\n\n// `constructor` is not enumerable.\nObject.defineProperty(Event.prototype, \"constructor\", {\n value: Event,\n configurable: true,\n writable: true,\n})\n\n// Ensure `event instanceof window.Event` is `true`.\nif (typeof window !== \"undefined\" && typeof window.Event !== \"undefined\") {\n Object.setPrototypeOf(Event.prototype, window.Event.prototype)\n\n // Make association for wrappers.\n wrappers.set(window.Event.prototype, Event)\n}\n\n/**\n * Get the property descriptor to redirect a given property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to redirect the property.\n * @private\n */\nfunction defineRedirectDescriptor(key) {\n return {\n get() {\n return pd(this).event[key]\n },\n set(value) {\n pd(this).event[key] = value\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Get the property descriptor to call a given method property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to call the method property.\n * @private\n */\nfunction defineCallDescriptor(key) {\n return {\n value() {\n const event = pd(this).event\n return event[key].apply(event, arguments)\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define new wrapper class.\n * @param {Function} BaseEvent The base wrapper class.\n * @param {Object} proto The prototype of the original event.\n * @returns {Function} The defined wrapper class.\n * @private\n */\nfunction defineWrapper(BaseEvent, proto) {\n const keys = Object.keys(proto)\n if (keys.length === 0) {\n return BaseEvent\n }\n\n /** CustomEvent */\n function CustomEvent(eventTarget, event) {\n BaseEvent.call(this, eventTarget, event)\n }\n\n CustomEvent.prototype = Object.create(BaseEvent.prototype, {\n constructor: { value: CustomEvent, configurable: true, writable: true },\n })\n\n // Define accessors.\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n if (!(key in BaseEvent.prototype)) {\n const descriptor = Object.getOwnPropertyDescriptor(proto, key)\n const isFunc = typeof descriptor.value === \"function\"\n Object.defineProperty(\n CustomEvent.prototype,\n key,\n isFunc\n ? defineCallDescriptor(key)\n : defineRedirectDescriptor(key)\n )\n }\n }\n\n return CustomEvent\n}\n\n/**\n * Get the wrapper class of a given prototype.\n * @param {Object} proto The prototype of the original event to get its wrapper.\n * @returns {Function} The wrapper class.\n * @private\n */\nfunction getWrapper(proto) {\n if (proto == null || proto === Object.prototype) {\n return Event\n }\n\n let wrapper = wrappers.get(proto)\n if (wrapper == null) {\n wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto)\n wrappers.set(proto, wrapper)\n }\n return wrapper\n}\n\n/**\n * Wrap a given event to management a dispatching.\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Object} event The event to wrap.\n * @returns {Event} The wrapper instance.\n * @private\n */\nexport function wrapEvent(eventTarget, event) {\n const Wrapper = getWrapper(Object.getPrototypeOf(event))\n return new Wrapper(eventTarget, event)\n}\n\n/**\n * Get the immediateStopped flag of a given event.\n * @param {Event} event The event to get.\n * @returns {boolean} The flag to stop propagation immediately.\n * @private\n */\nexport function isStopped(event) {\n return pd(event).immediateStopped\n}\n\n/**\n * Set the current event phase of a given event.\n * @param {Event} event The event to set current target.\n * @param {number} eventPhase New event phase.\n * @returns {void}\n * @private\n */\nexport function setEventPhase(event, eventPhase) {\n pd(event).eventPhase = eventPhase\n}\n\n/**\n * Set the current target of a given event.\n * @param {Event} event The event to set current target.\n * @param {EventTarget|null} currentTarget New current target.\n * @returns {void}\n * @private\n */\nexport function setCurrentTarget(event, currentTarget) {\n pd(event).currentTarget = currentTarget\n}\n\n/**\n * Set a passive listener of a given event.\n * @param {Event} event The event to set current target.\n * @param {Function|null} passiveListener New passive listener.\n * @returns {void}\n * @private\n */\nexport function setPassiveListener(event, passiveListener) {\n pd(event).passiveListener = passiveListener\n}\n","import {\n isStopped,\n setCurrentTarget,\n setEventPhase,\n setPassiveListener,\n wrapEvent,\n} from \"./event.mjs\"\n\n/**\n * @typedef {object} ListenerNode\n * @property {Function} listener\n * @property {1|2|3} listenerType\n * @property {boolean} passive\n * @property {boolean} once\n * @property {ListenerNode|null} next\n * @private\n */\n\n/**\n * @type {WeakMap<object, Map<string, ListenerNode>>}\n * @private\n */\nconst listenersMap = new WeakMap()\n\n// Listener types\nconst CAPTURE = 1\nconst BUBBLE = 2\nconst ATTRIBUTE = 3\n\n/**\n * Check whether a given value is an object or not.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is an object.\n */\nfunction isObject(x) {\n return x !== null && typeof x === \"object\" //eslint-disable-line no-restricted-syntax\n}\n\n/**\n * Get listeners.\n * @param {EventTarget} eventTarget The event target to get.\n * @returns {Map<string, ListenerNode>} The listeners.\n * @private\n */\nfunction getListeners(eventTarget) {\n const listeners = listenersMap.get(eventTarget)\n if (listeners == null) {\n throw new TypeError(\n \"'this' is expected an EventTarget object, but got another value.\"\n )\n }\n return listeners\n}\n\n/**\n * Get the property descriptor for the event attribute of a given event.\n * @param {string} eventName The event name to get property descriptor.\n * @returns {PropertyDescriptor} The property descriptor.\n * @private\n */\nfunction defineEventAttributeDescriptor(eventName) {\n return {\n get() {\n const listeners = getListeners(this)\n let node = listeners.get(eventName)\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n return node.listener\n }\n node = node.next\n }\n return null\n },\n\n set(listener) {\n if (typeof listener !== \"function\" && !isObject(listener)) {\n listener = null // eslint-disable-line no-param-reassign\n }\n const listeners = getListeners(this)\n\n // Traverse to the tail while removing old value.\n let prev = null\n let node = listeners.get(eventName)\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n // Remove old value.\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n } else {\n prev = node\n }\n\n node = node.next\n }\n\n // Add new value.\n if (listener !== null) {\n const newNode = {\n listener,\n listenerType: ATTRIBUTE,\n passive: false,\n once: false,\n next: null,\n }\n if (prev === null) {\n listeners.set(eventName, newNode)\n } else {\n prev.next = newNode\n }\n }\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define an event attribute (e.g. `eventTarget.onclick`).\n * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite.\n * @param {string} eventName The event name to define.\n * @returns {void}\n */\nfunction defineEventAttribute(eventTargetPrototype, eventName) {\n Object.defineProperty(\n eventTargetPrototype,\n `on${eventName}`,\n defineEventAttributeDescriptor(eventName)\n )\n}\n\n/**\n * Define a custom EventTarget with event attributes.\n * @param {string[]} eventNames Event names for event attributes.\n * @returns {EventTarget} The custom EventTarget.\n * @private\n */\nfunction defineCustomEventTarget(eventNames) {\n /** CustomEventTarget */\n function CustomEventTarget() {\n EventTarget.call(this)\n }\n\n CustomEventTarget.prototype = Object.create(EventTarget.prototype, {\n constructor: {\n value: CustomEventTarget,\n configurable: true,\n writable: true,\n },\n })\n\n for (let i = 0; i < eventNames.length; ++i) {\n defineEventAttribute(CustomEventTarget.prototype, eventNames[i])\n }\n\n return CustomEventTarget\n}\n\n/**\n * EventTarget.\n *\n * - This is constructor if no arguments.\n * - This is a function which returns a CustomEventTarget constructor if there are arguments.\n *\n * For example:\n *\n * class A extends EventTarget {}\n * class B extends EventTarget(\"message\") {}\n * class C extends EventTarget(\"message\", \"error\") {}\n * class D extends EventTarget([\"message\", \"error\"]) {}\n */\nfunction EventTarget() {\n /*eslint-disable consistent-return */\n if (this instanceof EventTarget) {\n listenersMap.set(this, new Map())\n return\n }\n if (arguments.length === 1 && Array.isArray(arguments[0])) {\n return defineCustomEventTarget(arguments[0])\n }\n if (arguments.length > 0) {\n const types = new Array(arguments.length)\n for (let i = 0; i < arguments.length; ++i) {\n types[i] = arguments[i]\n }\n return defineCustomEventTarget(types)\n }\n throw new TypeError(\"Cannot call a class as a function\")\n /*eslint-enable consistent-return */\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEventTarget.prototype = {\n /**\n * Add a given listener to this event target.\n * @param {string} eventName The event name to add.\n * @param {Function} listener The listener to add.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n addEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n if (typeof listener !== \"function\" && !isObject(listener)) {\n throw new TypeError(\"'listener' should be a function or an object.\")\n }\n\n const listeners = getListeners(this)\n const optionsIsObj = isObject(options)\n const capture = optionsIsObj\n ? Boolean(options.capture)\n : Boolean(options)\n const listenerType = capture ? CAPTURE : BUBBLE\n const newNode = {\n listener,\n listenerType,\n passive: optionsIsObj && Boolean(options.passive),\n once: optionsIsObj && Boolean(options.once),\n next: null,\n }\n\n // Set it as the first node if the first node is null.\n let node = listeners.get(eventName)\n if (node === undefined) {\n listeners.set(eventName, newNode)\n return\n }\n\n // Traverse to the tail while checking duplication..\n let prev = null\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n // Should ignore duplication.\n return\n }\n prev = node\n node = node.next\n }\n\n // Add it.\n prev.next = newNode\n },\n\n /**\n * Remove a given listener from this event target.\n * @param {string} eventName The event name to remove.\n * @param {Function} listener The listener to remove.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n removeEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n\n const listeners = getListeners(this)\n const capture = isObject(options)\n ? Boolean(options.capture)\n : Boolean(options)\n const listenerType = capture ? CAPTURE : BUBBLE\n\n let prev = null\n let node = listeners.get(eventName)\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n return\n }\n\n prev = node\n node = node.next\n }\n },\n\n /**\n * Dispatch a given event.\n * @param {Event|{type:string}} event The event to dispatch.\n * @returns {boolean} `false` if canceled.\n */\n dispatchEvent(event) {\n if (event == null || typeof event.type !== \"string\") {\n throw new TypeError('\"event.type\" should be a string.')\n }\n\n // If listeners aren't registered, terminate.\n const listeners = getListeners(this)\n const eventName = event.type\n let node = listeners.get(eventName)\n if (node == null) {\n return true\n }\n\n // Since we cannot rewrite several properties, so wrap object.\n const wrappedEvent = wrapEvent(this, event)\n\n // This doesn't process capturing phase and bubbling phase.\n // This isn't participating in a tree.\n let prev = null\n while (node != null) {\n // Remove this listener if it's once\n if (node.once) {\n if (prev !== null) {\n prev.next = node.next\n } else if (node.next !== null) {\n listeners.set(eventName, node.next)\n } else {\n listeners.delete(eventName)\n }\n } else {\n prev = node\n }\n\n // Call this listener\n setPassiveListener(\n wrappedEvent,\n node.passive ? node.listener : null\n )\n if (typeof node.listener === \"function\") {\n try {\n node.listener.call(this, wrappedEvent)\n } catch (err) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(err)\n }\n }\n } else if (\n node.listenerType !== ATTRIBUTE &&\n typeof node.listener.handleEvent === \"function\"\n ) {\n node.listener.handleEvent(wrappedEvent)\n }\n\n // Break if `event.stopImmediatePropagation` was called.\n if (isStopped(wrappedEvent)) {\n break\n }\n\n node = node.next\n }\n setPassiveListener(wrappedEvent, null)\n setEventPhase(wrappedEvent, 0)\n setCurrentTarget(wrappedEvent, null)\n\n return !wrappedEvent.defaultPrevented\n },\n}\n\n// `constructor` is not enumerable.\nObject.defineProperty(EventTarget.prototype, \"constructor\", {\n value: EventTarget,\n configurable: true,\n writable: true,\n})\n\n// Ensure `eventTarget instanceof window.EventTarget` is `true`.\nif (\n typeof window !== \"undefined\" &&\n typeof window.EventTarget !== \"undefined\"\n) {\n Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype)\n}\n\nexport { defineEventAttribute, EventTarget }\nexport default EventTarget\n"],"names":["pd","event","retv","privateData","get","console","assert","setCancelFlag","data","passiveListener","cancelable","canceled","preventDefault","error","Event","eventTarget","set","eventPhase","currentTarget","stopped","immediateStopped","timeStamp","Date","now","Object","defineProperty","value","enumerable","key","keys","i","length","defineRedirectDescriptor","configurable","defineCallDescriptor","apply","arguments","defineWrapper","BaseEvent","proto","CustomEvent","call","prototype","create","constructor","writable","descriptor","getOwnPropertyDescriptor","isFunc","getWrapper","wrapper","wrappers","getPrototypeOf","wrapEvent","Wrapper","isStopped","setEventPhase","setCurrentTarget","setPassiveListener","isObject","x","_typeof","getListeners","listeners","listenersMap","TypeError","defineEventAttributeDescriptor","eventName","node","listenerType","listener","next","prev","delete","newNode","passive","once","defineEventAttribute","eventTargetPrototype","defineCustomEventTarget","eventNames","CustomEventTarget","EventTarget","Map","Array","isArray","types","WeakMap","type","target","composedPath","NONE","CAPTURING_PHASE","AT_TARGET","BUBBLING_PHASE","stopPropagation","stopImmediatePropagation","bubbles","defaultPrevented","composed","srcElement","cancelBubble","returnValue","initEvent","window","setPrototypeOf","CAPTURE","BUBBLE","addEventListener","options","optionsIsObj","capture","removeEventListener","dispatchEvent","wrappedEvent","err","handleEvent"],"mappings":";;;;wbAkCA,QAASA,CAAAA,CAAT,CAAYC,CAAZ,CAAmB,IACTC,CAAAA,CAAI,CAAGC,CAAW,CAACC,GAAZD,CAAgBF,CAAhBE,QACbE,CAAAA,OAAO,CAACC,MAARD,CACY,IAARH,EAAAA,CADJG,CAEI,6CAFJA,CAGIJ,CAHJI,EAKOH,EAOX,QAASK,CAAAA,CAAT,CAAuBC,CAAvB,CAA6B,OACG,KAAxBA,EAAAA,CAAI,CAACC,eADgB,MAarB,CAACD,CAAI,CAACP,KAALO,CAAWE,UAbS,GAiBzBF,CAAI,CAACG,QAALH,GAjByB,CAkBgB,UAArC,QAAOA,CAAAA,CAAI,CAACP,KAALO,CAAWI,cAlBG,EAmBrBJ,CAAI,CAACP,KAALO,CAAWI,cAAXJ,EAnBqB,QAGE,WAAnB,QAAOH,CAAAA,OAAP,EACyB,UAAzB,QAAOA,CAAAA,OAAO,CAACQ,KAJE,EAMjBR,OAAO,CAACQ,KAARR,CACI,oEADJA,CAEIG,CAAI,CAACC,eAFTJ,CANiB,EAiC7B,QAASS,CAAAA,CAAT,CAAeC,CAAf,CAA4Bd,CAA5B,CAAmC,CAC/BE,CAAW,CAACa,GAAZb,CAAgB,IAAhBA,CAAsB,CAClBY,WAAW,CAAXA,CADkB,CAElBd,KAAK,CAALA,CAFkB,CAGlBgB,UAAU,CAAE,CAHM,CAIlBC,aAAa,CAAEH,CAJG,CAKlBJ,QAAQ,GALU,CAMlBQ,OAAO,GANW,CAOlBC,gBAAgB,GAPE,CAQlBX,eAAe,CAAE,IARC,CASlBY,SAAS,CAAEpB,CAAK,CAACoB,SAANpB,EAAmBqB,IAAI,CAACC,GAALD,EATZ,CAAtBnB,CAD+B,CAc/BqB,MAAM,CAACC,cAAPD,CAAsB,IAAtBA,CAA4B,WAA5BA,CAAyC,CAAEE,KAAK,GAAP,CAAgBC,UAAU,GAA1B,CAAzCH,CAd+B,QAmBrBI,CAAAA,EAFJC,CAAI,CAAGL,MAAM,CAACK,IAAPL,CAAYvB,CAAZuB,EACJM,CAAC,CAAG,EAAGA,CAAC,CAAGD,CAAI,CAACE,OAAQ,EAAED,EACzBF,EAAMC,CAAI,CAACC,CAAD,EACVF,CAAG,GAAI,OACTJ,MAAM,CAACC,cAAPD,CAAsB,IAAtBA,CAA4BI,CAA5BJ,CAAiCQ,CAAwB,CAACJ,CAAD,CAAzDJ,EAyOZ,QAASQ,CAAAA,CAAT,CAAkCJ,CAAlC,CAAuC,OAC5B,CACHxB,GADG,WACG,OACKJ,CAAAA,CAAE,CAAC,IAAD,CAAFA,CAASC,KAATD,CAAe4B,CAAf5B,CAFR,CAAA,CAIHgB,GAJG,UAICU,EAAO,CACP1B,CAAE,CAAC,IAAD,CAAFA,CAASC,KAATD,CAAe4B,CAAf5B,EAAsB0B,CALvB,CAAA,CAOHO,YAAY,GAPT,CAQHN,UAAU,GARP,EAkBX,QAASO,CAAAA,CAAT,CAA8BN,CAA9B,CAAmC,OACxB,CACHF,KADG,WACK,IACEzB,CAAAA,CAAK,CAAGD,CAAE,CAAC,IAAD,CAAFA,CAASC,YAChBA,CAAAA,CAAK,CAAC2B,CAAD,CAAL3B,CAAWkC,KAAXlC,CAAiBA,CAAjBA,CAAwBmC,SAAxBnC,CAHR,CAAA,CAKHgC,YAAY,GALT,CAMHN,UAAU,GANP,EAiBX,QAASU,CAAAA,CAAT,CAAuBC,CAAvB,CAAkCC,CAAlC,CAAyC,SAO5BC,CAAAA,EAAYzB,EAAad,EAAO,CACrCqC,CAAS,CAACG,IAAVH,CAAe,IAAfA,CAAqBvB,CAArBuB,CAAkCrC,CAAlCqC,KAPET,CAAAA,CAAI,CAAGL,MAAM,CAACK,IAAPL,CAAYe,CAAZf,KACO,CAAhBK,GAAAA,CAAI,CAACE,aACEO,CAAAA,EAQXE,CAAW,CAACE,SAAZF,CAAwBhB,MAAM,CAACmB,MAAPnB,CAAcc,CAAS,CAACI,SAAxBlB,CAAmC,CACvDoB,WAAW,CAAE,CAAElB,KAAK,CAAEc,CAAT,CAAsBP,YAAY,GAAlC,CAA0CY,QAAQ,GAAlD,CAD0C,CAAnCrB,CAXa,KAgBhC,GACKI,CAAAA,CADL,CAAIE,CAAC,CAAG,EAAGA,CAAC,CAAGD,CAAI,CAACE,OAAQ,EAAED,KACzBF,EAAMC,CAAI,CAACC,CAAD,EACZ,EAAEF,CAAG,GAAIU,CAAAA,CAAS,CAACI,SAAnB,EAA+B,IACzBI,CAAAA,CAAU,CAAGtB,MAAM,CAACuB,wBAAPvB,CAAgCe,CAAhCf,CAAuCI,CAAvCJ,CADY,CAEzBwB,CAAM,CAA+B,UAA5B,QAAOF,CAAAA,CAAU,CAACpB,KAFF,CAG/BF,MAAM,CAACC,cAAPD,CACIgB,CAAW,CAACE,SADhBlB,CAEII,CAFJJ,CAGIwB,CAAM,CACAd,CAAoB,CAACN,CAAD,CADpB,CAEAI,CAAwB,CAACJ,CAAD,CALlCJ,QAUDgB,CAAAA,EASX,QAASS,CAAAA,CAAT,CAAoBV,CAApB,CAA2B,IACV,IAATA,EAAAA,CAAK,EAAYA,CAAK,GAAKf,MAAM,CAACkB,gBAC3B5B,CAAAA,KAGPoC,CAAAA,CAAO,CAAGC,CAAQ,CAAC/C,GAAT+C,CAAaZ,CAAbY,QACC,KAAXD,EAAAA,IACAA,CAAO,CAAGb,CAAa,CAACY,CAAU,CAACzB,MAAM,CAAC4B,cAAP5B,CAAsBe,CAAtBf,CAAD,CAAX,CAA2Ce,CAA3C,EACvBY,CAAQ,CAACnC,GAATmC,CAAaZ,CAAbY,CAAoBD,CAApBC,GAEGD,EAUJ,QAASG,CAAAA,CAAT,CAAmBtC,CAAnB,CAAgCd,CAAhC,CAAuC,IACpCqD,CAAAA,CAAO,CAAGL,CAAU,CAACzB,MAAM,CAAC4B,cAAP5B,CAAsBvB,CAAtBuB,CAAD,QACnB,IAAI8B,CAAAA,CAAJ,CAAYvC,CAAZ,CAAyBd,CAAzB,EASJ,QAASsD,CAAAA,CAAT,CAAmBtD,CAAnB,CAA0B,OACtBD,CAAAA,CAAE,CAACC,CAAD,CAAFD,CAAUoB,iBAUd,QAASoC,CAAAA,CAAT,CAAuBvD,CAAvB,CAA8BgB,CAA9B,CAA0C,CAC7CjB,CAAE,CAACC,CAAD,CAAFD,CAAUiB,UAAVjB,CAAuBiB,EAUpB,QAASwC,CAAAA,CAAT,CAA0BxD,CAA1B,CAAiCiB,CAAjC,CAAgD,CACnDlB,CAAE,CAACC,CAAD,CAAFD,CAAUkB,aAAVlB,CAA0BkB,EAUvB,QAASwC,CAAAA,CAAT,CAA4BzD,CAA5B,CAAmCQ,CAAnC,CAAoD,CACvDT,CAAE,CAACC,CAAD,CAAFD,CAAUS,eAAVT,CAA4BS,EC3bhC,QAASkD,CAAAA,CAAT,CAAkBC,CAAlB,CAAqB,OACJ,KAANA,GAAAA,CAAC,EAA0B,QAAb,GAAAC,EAAOD,GAShC,QAASE,CAAAA,CAAT,CAAsB/C,CAAtB,CAAmC,IACzBgD,CAAAA,CAAS,CAAGC,CAAY,CAAC5D,GAAb4D,CAAiBjD,CAAjBiD,KACD,IAAbD,EAAAA,OACM,IAAIE,CAAAA,SAAJ,CACF,kEADE,QAIHF,CAAAA,EASX,QAASG,CAAAA,CAAT,CAAwCC,CAAxC,CAAmD,OACxC,CACH/D,GADG,WACG,QACI2D,CAAAA,CAAS,CAAGD,CAAY,CAAC,IAAD,CAD5B,CAEEM,CAAI,CAAGL,CAAS,CAAC3D,GAAV2D,CAAcI,CAAdJ,CAFT,CAGa,IAARK,EAAAA,CAHL,EAGmB,IACbA,IAAAA,CAAI,CAACC,mBACED,CAAAA,CAAI,CAACE,SAEhBF,CAAI,CAAGA,CAAI,CAACG,WAET,KAVR,CAAA,CAaHvD,GAbG,UAaCsD,EAAU,CACc,UAApB,QAAOA,CAAAA,CAAP,EAAmCX,CAAQ,CAACW,CAAD,CADrC,GAENA,CAAQ,CAAG,IAFL,SAIJP,CAAAA,CAAS,CAAGD,CAAY,CAAC,IAAD,CAJpB,CAONU,CAAI,CAAG,IAPD,CAQNJ,CAAI,CAAGL,CAAS,CAAC3D,GAAV2D,CAAcI,CAAdJ,CARD,CASK,IAARK,EAAAA,CATG,EAUFA,IAAAA,CAAI,CAACC,YAVH,CAYW,IAATG,GAAAA,CAZF,CAcuB,IAAdJ,GAAAA,CAAI,CAACG,IAdd,CAiBER,CAAS,CAACU,MAAVV,CAAiBI,CAAjBJ,CAjBF,CAeEA,CAAS,CAAC/C,GAAV+C,CAAcI,CAAdJ,CAAyBK,CAAI,CAACG,IAA9BR,CAfF,CAaES,CAAI,CAACD,IAALC,CAAYJ,CAAI,CAACG,IAbnB,CAoBFC,CAAI,CAAGJ,CApBL,CAuBNA,CAAI,CAAGA,CAAI,CAACG,IAvBN,IA2BO,IAAbD,GAAAA,EAAmB,IACbI,CAAAA,CAAO,CAAG,CACZJ,QAAQ,CAARA,CADY,CAEZD,YAAY,EAFA,CAGZM,OAAO,GAHK,CAIZC,IAAI,GAJQ,CAKZL,IAAI,CAAE,IALM,EAOH,IAATC,GAAAA,CARe,CASfT,CAAS,CAAC/C,GAAV+C,CAAcI,CAAdJ,CAAyBW,CAAzBX,CATe,CAWfS,CAAI,CAACD,IAALC,CAAYE,EAnDrB,CAAA,CAuDHzC,YAAY,GAvDT,CAwDHN,UAAU,GAxDP,EAkEX,QAASkD,CAAAA,CAAT,CAA8BC,CAA9B,CAAoDX,CAApD,CAA+D,CAC3D3C,MAAM,CAACC,cAAPD,CACIsD,CADJtD,aAES2C,EAFT3C,CAGI0C,CAA8B,CAACC,CAAD,CAHlC3C,EAaJ,QAASuD,CAAAA,CAAT,CAAiCC,CAAjC,CAA6C,SAEhCC,CAAAA,GAAoB,CACzBC,CAAW,CAACzC,IAAZyC,CAAiB,IAAjBA,EAGJD,CAAiB,CAACvC,SAAlBuC,CAA8BzD,MAAM,CAACmB,MAAPnB,CAAc0D,CAAW,CAACxC,SAA1BlB,CAAqC,CAC/DoB,WAAW,CAAE,CACTlB,KAAK,CAAEuD,CADE,CAEThD,YAAY,GAFH,CAGTY,QAAQ,GAHC,CADkD,CAArCrB,CANW,KAcpC,GAAIM,CAAAA,CAAC,CAAG,EAAGA,CAAC,CAAGkD,CAAU,CAACjD,OAAQ,EAAED,EACrC+C,CAAoB,CAACI,CAAiB,CAACvC,SAAnB,CAA8BsC,CAAU,CAAClD,CAAD,CAAxC,CAApB+C,OAGGI,CAAAA,EAgBX,QAASC,CAAAA,CAAT,EAAuB,IAEf,eAAgBA,CAAAA,aAChBlB,CAAAA,CAAY,CAAChD,GAAbgD,CAAiB,IAAjBA,CAAuB,GAAImB,CAAAA,GAA3BnB,KAGqB,CAArB5B,GAAAA,SAAS,CAACL,MAAVK,EAA0BgD,KAAK,CAACC,OAAND,CAAchD,SAAS,CAAC,CAAD,CAAvBgD,QACnBL,CAAAA,CAAuB,CAAC3C,SAAS,CAAC,CAAD,CAAV,KAEX,CAAnBA,CAAAA,SAAS,CAACL,OAAY,QAChBuD,CAAAA,CAAK,CAAOF,KAAP,CAAahD,SAAS,CAACL,MAAvB,EACFD,CAAC,CAAG,EAAGA,CAAC,CAAGM,SAAS,CAACL,OAAQ,EAAED,EACpCwD,CAAK,CAACxD,CAAD,CAALwD,CAAWlD,SAAS,CAACN,CAAD,CAApBwD,OAEGP,CAAAA,CAAuB,CAACO,CAAD,OAE5B,IAAIrB,CAAAA,SAAJ,CAAc,mCAAd,KD5KJ9D,CAAAA,CAAW,CAAG,GAAIoF,CAAAA,QAOlBpC,CAAQ,CAAG,GAAIoC,CAAAA,QAkFrBzE,CAAK,CAAC4B,SAAN5B,CAAkB,IAKV0E,CAAAA,MAAO,OACAxF,CAAAA,CAAE,CAAC,IAAD,CAAFA,CAASC,KAATD,CAAewF,IANZ,CAAA,IAaVC,CAAAA,QAAS,OACFzF,CAAAA,CAAE,CAAC,IAAD,CAAFA,CAASe,WAdN,CAAA,IAqBVG,CAAAA,eAAgB,OACTlB,CAAAA,CAAE,CAAC,IAAD,CAAFA,CAASkB,aAtBN,CAAA,CA4BdwE,YA5Bc,WA4BC,IACLxE,CAAAA,CAAa,CAAGlB,CAAE,CAAC,IAAD,CAAFA,CAASkB,cADpB,MAEU,KAAjBA,EAAAA,CAFO,CAGA,EAHA,CAKJ,CAACA,CAAD,CAjCG,CAAA,IAwCVyE,CAAAA,MAAO,OACA,EAzCG,CAAA,IAgDVC,CAAAA,iBAAkB,OACX,EAjDG,CAAA,IAwDVC,CAAAA,WAAY,OACL,EAzDG,CAAA,IAgEVC,CAAAA,gBAAiB,OACV,EAjEG,CAAA,IAwEV7E,CAAAA,YAAa,OACNjB,CAAAA,CAAE,CAAC,IAAD,CAAFA,CAASiB,UAzEN,CAAA,CAgFd8E,eAhFc,WAgFI,IACRvF,CAAAA,CAAI,CAAGR,CAAE,CAAC,IAAD,EAEfQ,CAAI,CAACW,OAALX,GAHc,CAI4B,UAAtC,QAAOA,CAAAA,CAAI,CAACP,KAALO,CAAWuF,eAJR,EAKVvF,CAAI,CAACP,KAALO,CAAWuF,eAAXvF,EArFM,CAAA,CA6FdwF,wBA7Fc,WA6Fa,IACjBxF,CAAAA,CAAI,CAAGR,CAAE,CAAC,IAAD,EAEfQ,CAAI,CAACW,OAALX,GAHuB,CAIvBA,CAAI,CAACY,gBAALZ,GAJuB,CAK4B,UAA/C,QAAOA,CAAAA,CAAI,CAACP,KAALO,CAAWwF,wBALC,EAMnBxF,CAAI,CAACP,KAALO,CAAWwF,wBAAXxF,EAnGM,CAAA,IA2GVyF,CAAAA,SAAU,SACKjG,CAAE,CAAC,IAAD,CAAFA,CAASC,KAATD,CAAeiG,OA5GpB,CAAA,IAmHVvF,CAAAA,YAAa,SACEV,CAAE,CAAC,IAAD,CAAFA,CAASC,KAATD,CAAeU,UApHpB,CAAA,CA2HdE,cA3Hc,WA2HG,CACbL,CAAa,CAACP,CAAE,CAAC,IAAD,CAAH,CA5HH,CAAA,IAmIVkG,CAAAA,kBAAmB,OACZlG,CAAAA,CAAE,CAAC,IAAD,CAAFA,CAASW,QApIN,CAAA,IA2IVwF,CAAAA,UAAW,SACInG,CAAE,CAAC,IAAD,CAAFA,CAASC,KAATD,CAAemG,QA5IpB,CAAA,IAmJV9E,CAAAA,WAAY,OACLrB,CAAAA,CAAE,CAAC,IAAD,CAAFA,CAASqB,SApJN,CAAA,IA4JV+E,CAAAA,YAAa,OACNpG,CAAAA,CAAE,CAAC,IAAD,CAAFA,CAASe,WA7JN,CAAA,IAqKVsF,CAAAA,cAAe,OACRrG,CAAAA,CAAE,CAAC,IAAD,CAAFA,CAASmB,OAtKN,CAAA,IAwKVkF,CAAAA,aAAa3E,EAAO,IACfA,MAGClB,CAAAA,CAAI,CAAGR,CAAE,CAAC,IAAD,EAEfQ,CAAI,CAACW,OAALX,IACuC,SAAnC,QAAOA,CAAAA,CAAI,CAACP,KAALO,CAAW6F,eAClB7F,CAAI,CAACP,KAALO,CAAW6F,YAAX7F,KAhLM,CAAA,IAyLV8F,CAAAA,aAAc,OACP,CAACtG,CAAE,CAAC,IAAD,CAAFA,CAASW,QA1LP,CAAA,IA4LV2F,CAAAA,YAAY5E,EAAO,CACdA,CADc,EAEfnB,CAAa,CAACP,CAAE,CAAC,IAAD,CAAH,CA9LP,CAAA,CAyMduG,SAzMc,WAyMF,EAzME,EA+MlB/E,MAAM,CAACC,cAAPD,CAAsBV,CAAK,CAAC4B,SAA5BlB,CAAuC,aAAvCA,CAAsD,CAClDE,KAAK,CAAEZ,CAD2C,CAElDmB,YAAY,GAFsC,CAGlDY,QAAQ,GAH0C,CAAtDrB,EAOsB,WAAlB,QAAOgF,CAAAA,MAAP,EAAyD,WAAxB,QAAOA,CAAAA,MAAM,CAAC1F,QAC/CU,MAAM,CAACiF,cAAPjF,CAAsBV,CAAK,CAAC4B,SAA5BlB,CAAuCgF,MAAM,CAAC1F,KAAP0F,CAAa9D,SAApDlB,EAGA2B,CAAQ,CAACnC,GAATmC,CAAaqD,MAAM,CAAC1F,KAAP0F,CAAa9D,SAA1BS,CAAqCrC,CAArCqC,MChTEa,CAAAA,CAAY,CAAG,GAAIuB,CAAAA,QAGnBmB,CAAO,CAAG,EACVC,CAAM,CAAG,KA0KfzB,CAAW,CAACxC,SAAZwC,CAAwB,CAQpB0B,gBARoB,UAQHzC,EAAWG,EAAUuC,EAAS,IAC3B,IAAZvC,EAAAA,MAGoB,UAApB,QAAOA,CAAAA,CAAP,EAAkC,CAACX,CAAQ,CAACW,CAAD,OACrC,IAAIL,CAAAA,SAAJ,CAAc,+CAAd,KAGJF,CAAAA,CAAS,CAAGD,CAAY,CAAC,IAAD,EACxBgD,CAAY,CAAGnD,CAAQ,CAACkD,CAAD,EACvBE,CAAO,CAAGD,CAAY,GACdD,CAAO,CAACE,OADM,GAEdF,EACRxC,CAAY,CAAG0C,CAAO,CAAGL,CAAH,CAAaC,EACnCjC,CAAO,CAAG,CACZJ,QAAQ,CAARA,CADY,CAEZD,YAAY,CAAZA,CAFY,CAGZM,OAAO,CAAEmC,CAAY,IAAYD,CAAO,CAAClC,OAH7B,CAIZC,IAAI,CAAEkC,CAAY,IAAYD,CAAO,CAACjC,IAJ1B,CAKZL,IAAI,CAAE,IALM,EASZH,CAAI,CAAGL,CAAS,CAAC3D,GAAV2D,CAAcI,CAAdJ,KACPK,SAAAA,aACAL,CAAAA,CAAS,CAAC/C,GAAV+C,CAAcI,CAAdJ,CAAyBW,CAAzBX,SAKAS,CAAAA,CAAI,CAAG,KACI,IAARJ,EAAAA,GAAc,IAEbA,CAAI,CAACE,QAALF,GAAkBE,CAAlBF,EACAA,CAAI,CAACC,YAALD,GAAsBC,SAK1BG,CAAI,CAAGJ,CARU,CASjBA,CAAI,CAAGA,CAAI,CAACG,IAxC2B,CA4C3CC,CAAI,CAACD,IAALC,CAAYE,EApDI,CAAA,CA8DpBsC,mBA9DoB,UA8DA7C,EAAWG,EAAUuC,EAAS,IAC9B,IAAZvC,EAAAA,SAIEP,CAAAA,CAAS,CAAGD,CAAY,CAAC,IAAD,EACxBiD,CAAO,CAAGpD,CAAQ,CAACkD,CAAD,CAARlD,GACFkD,CAAO,CAACE,OADNpD,GAEFkD,EACRxC,CAAY,CAAG0C,CAAO,CAAGL,CAAH,CAAaC,EAErCnC,CAAI,CAAG,KACPJ,CAAI,CAAGL,CAAS,CAAC3D,GAAV2D,CAAcI,CAAdJ,EACI,IAARK,EAAAA,GAAc,IAEbA,CAAI,CAACE,QAALF,GAAkBE,CAAlBF,EACAA,CAAI,CAACC,YAALD,GAAsBC,cAET,IAATG,GAAAA,EAEqB,IAAdJ,GAAAA,CAAI,CAACG,KAGZR,CAAS,CAACU,MAAVV,CAAiBI,CAAjBJ,EAFAA,CAAS,CAAC/C,GAAV+C,CAAcI,CAAdJ,CAAyBK,CAAI,CAACG,IAA9BR,EAFAS,CAAI,CAACD,IAALC,CAAYJ,CAAI,CAACG,MASzBC,CAAI,CAAGJ,CAfU,CAgBjBA,CAAI,CAAGA,CAAI,CAACG,KA3FA,CAAA,CAoGpB0C,aApGoB,UAoGNhH,EAAO,IACJ,IAATA,EAAAA,CAAK,EAAkC,QAAtB,QAAOA,CAAAA,CAAK,CAACuF,UACxB,IAAIvB,CAAAA,SAAJ,CAAc,oCAAd,EAFO,GAMXF,CAAAA,CAAS,CAAGD,CAAY,CAAC,IAAD,CANb,CAOXK,CAAS,CAAGlE,CAAK,CAACuF,IAPP,CAQbpB,CAAI,CAAGL,CAAS,CAAC3D,GAAV2D,CAAcI,CAAdJ,CARM,IASL,IAARK,EAAAA,WATa,OAcX8C,CAAAA,CAAY,CAAG7D,CAAS,CAAC,IAAD,CAAOpD,CAAP,CAdb,CAkBbuE,CAAI,CAAG,IAlBM,CAmBF,IAARJ,EAAAA,CAnBU,EAmBI,IAEbA,CAAI,CAACQ,KACQ,IAATJ,GAAAA,EAEqB,IAAdJ,GAAAA,CAAI,CAACG,KAGZR,CAAS,CAACU,MAAVV,CAAiBI,CAAjBJ,EAFAA,CAAS,CAAC/C,GAAV+C,CAAcI,CAAdJ,CAAyBK,CAAI,CAACG,IAA9BR,EAFAS,CAAI,CAACD,IAALC,CAAYJ,CAAI,CAACG,KAOrBC,CAAI,CAAGJ,EAIXV,CAAkB,CACdwD,CADc,CAEd9C,CAAI,CAACO,OAALP,CAAeA,CAAI,CAACE,QAApBF,CAA+B,IAFjB,EAIW,UAAzB,QAAOA,CAAAA,CAAI,CAACE,YACR,CACAF,CAAI,CAACE,QAALF,CAAc3B,IAAd2B,CAAmB,IAAnBA,CAAyB8C,CAAzB9C,CADJ,CAEE,MAAO+C,CAAP,CAAY,CAEa,WAAnB,QAAO9G,CAAAA,OAAP,EACyB,UAAzB,QAAOA,CAAAA,OAAO,CAACQ,KAHT,EAKNR,OAAO,CAACQ,KAARR,CAAc8G,CAAd9G,MAIR+D,CAAAA,CAAI,CAACC,YAALD,GA/TE,CA+TFA,EACqC,UAArC,QAAOA,CAAAA,CAAI,CAACE,QAALF,CAAcgD,aAErBhD,CAAI,CAACE,QAALF,CAAcgD,WAAdhD,CAA0B8C,CAA1B9C,KAIAb,CAAS,CAAC2D,CAAD,QAIb9C,CAAI,CAAGA,CAAI,CAACG,WAEhBb,CAAAA,CAAkB,CAACwD,CAAD,CAAe,IAAf,EAClB1D,CAAa,CAAC0D,CAAD,CAAe,CAAf,EACbzD,CAAgB,CAACyD,CAAD,CAAe,IAAf,EAET,CAACA,CAAY,CAAChB,iBAvKL,EA4KxB1E,MAAM,CAACC,cAAPD,CAAsB0D,CAAW,CAACxC,SAAlClB,CAA6C,aAA7CA,CAA4D,CACxDE,KAAK,CAAEwD,CADiD,CAExDjD,YAAY,GAF4C,CAGxDY,QAAQ,GAHgD,CAA5DrB,EAQsB,WAAlB,QAAOgF,CAAAA,MAAP,EAC8B,WAA9B,QAAOA,CAAAA,MAAM,CAACtB,aAEd1D,MAAM,CAACiF,cAAPjF,CAAsB0D,CAAW,CAACxC,SAAlClB,CAA6CgF,MAAM,CAACtB,WAAPsB,CAAmB9D,SAAhElB"} \ No newline at end of file diff --git a/node_modules/event-target-shim/index.d.ts b/node_modules/event-target-shim/index.d.ts new file mode 100644 index 0000000000000..a30309782f93c --- /dev/null +++ b/node_modules/event-target-shim/index.d.ts @@ -0,0 +1,399 @@ +export as namespace EventTargetShim + +/** + * `Event` interface. + * @see https://dom.spec.whatwg.org/#event + */ +export interface Event { + /** + * The type of this event. + */ + readonly type: string + + /** + * The target of this event. + */ + readonly target: EventTarget<{}, {}, "standard"> | null + + /** + * The current target of this event. + */ + readonly currentTarget: EventTarget<{}, {}, "standard"> | null + + /** + * The target of this event. + * @deprecated + */ + readonly srcElement: any | null + + /** + * The composed path of this event. + */ + composedPath(): EventTarget<{}, {}, "standard">[] + + /** + * Constant of NONE. + */ + readonly NONE: number + + /** + * Constant of CAPTURING_PHASE. + */ + readonly CAPTURING_PHASE: number + + /** + * Constant of BUBBLING_PHASE. + */ + readonly BUBBLING_PHASE: number + + /** + * Constant of AT_TARGET. + */ + readonly AT_TARGET: number + + /** + * Indicates which phase of the event flow is currently being evaluated. + */ + readonly eventPhase: number + + /** + * Stop event bubbling. + */ + stopPropagation(): void + + /** + * Stop event bubbling. + */ + stopImmediatePropagation(): void + + /** + * Initialize event. + * @deprecated + */ + initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void + + /** + * The flag indicating bubbling. + */ + readonly bubbles: boolean + + /** + * Stop event bubbling. + * @deprecated + */ + cancelBubble: boolean + + /** + * Set or get cancellation flag. + * @deprecated + */ + returnValue: boolean + + /** + * The flag indicating whether the event can be canceled. + */ + readonly cancelable: boolean + + /** + * Cancel this event. + */ + preventDefault(): void + + /** + * The flag to indicating whether the event was canceled. + */ + readonly defaultPrevented: boolean + + /** + * The flag to indicating if event is composed. + */ + readonly composed: boolean + + /** + * Indicates whether the event was dispatched by the user agent. + */ + readonly isTrusted: boolean + + /** + * The unix time of this event. + */ + readonly timeStamp: number +} + +/** + * The constructor of `EventTarget` interface. + */ +export type EventTargetConstructor< + TEvents extends EventTarget.EventDefinition = {}, + TEventAttributes extends EventTarget.EventDefinition = {}, + TMode extends EventTarget.Mode = "loose" +> = { + prototype: EventTarget<TEvents, TEventAttributes, TMode> + new(): EventTarget<TEvents, TEventAttributes, TMode> +} + +/** + * `EventTarget` interface. + * @see https://dom.spec.whatwg.org/#interface-eventtarget + */ +export type EventTarget< + TEvents extends EventTarget.EventDefinition = {}, + TEventAttributes extends EventTarget.EventDefinition = {}, + TMode extends EventTarget.Mode = "loose" +> = EventTarget.EventAttributes<TEventAttributes> & { + /** + * Add a given listener to this event target. + * @param eventName The event name to add. + * @param listener The listener to add. + * @param options The options for this listener. + */ + addEventListener<TEventType extends EventTarget.EventType<TEvents, TMode>>( + type: TEventType, + listener: + | EventTarget.Listener<EventTarget.PickEvent<TEvents, TEventType>> + | null, + options?: boolean | EventTarget.AddOptions + ): void + + /** + * Remove a given listener from this event target. + * @param eventName The event name to remove. + * @param listener The listener to remove. + * @param options The options for this listener. + */ + removeEventListener<TEventType extends EventTarget.EventType<TEvents, TMode>>( + type: TEventType, + listener: + | EventTarget.Listener<EventTarget.PickEvent<TEvents, TEventType>> + | null, + options?: boolean | EventTarget.RemoveOptions + ): void + + /** + * Dispatch a given event. + * @param event The event to dispatch. + * @returns `false` if canceled. + */ + dispatchEvent<TEventType extends EventTarget.EventType<TEvents, TMode>>( + event: EventTarget.EventData<TEvents, TEventType, TMode> + ): boolean +} + +export const EventTarget: EventTargetConstructor & { + /** + * Create an `EventTarget` instance with detailed event definition. + * + * The detailed event definition requires to use `defineEventAttribute()` + * function later. + * + * Unfortunately, the second type parameter `TEventAttributes` was needed + * because we cannot compute string literal types. + * + * @example + * const signal = new EventTarget<{ abort: Event }, { onabort: Event }>() + * defineEventAttribute(signal, "abort") + */ + new < + TEvents extends EventTarget.EventDefinition, + TEventAttributes extends EventTarget.EventDefinition, + TMode extends EventTarget.Mode = "loose" + >(): EventTarget<TEvents, TEventAttributes, TMode> + + /** + * Define an `EventTarget` constructor with attribute events and detailed event definition. + * + * Unfortunately, the second type parameter `TEventAttributes` was needed + * because we cannot compute string literal types. + * + * @example + * class AbortSignal extends EventTarget<{ abort: Event }, { onabort: Event }>("abort") { + * abort(): void {} + * } + * + * @param events Optional event attributes (e.g. passing in `"click"` adds `onclick` to prototype). + */ + < + TEvents extends EventTarget.EventDefinition = {}, + TEventAttributes extends EventTarget.EventDefinition = {}, + TMode extends EventTarget.Mode = "loose" + >(events: string[]): EventTargetConstructor< + TEvents, + TEventAttributes, + TMode + > + + /** + * Define an `EventTarget` constructor with attribute events and detailed event definition. + * + * Unfortunately, the second type parameter `TEventAttributes` was needed + * because we cannot compute string literal types. + * + * @example + * class AbortSignal extends EventTarget<{ abort: Event }, { onabort: Event }>("abort") { + * abort(): void {} + * } + * + * @param events Optional event attributes (e.g. passing in `"click"` adds `onclick` to prototype). + */ + < + TEvents extends EventTarget.EventDefinition = {}, + TEventAttributes extends EventTarget.EventDefinition = {}, + TMode extends EventTarget.Mode = "loose" + >(event0: string, ...events: string[]): EventTargetConstructor< + TEvents, + TEventAttributes, + TMode + > +} + +export namespace EventTarget { + /** + * Options of `removeEventListener()` method. + */ + export interface RemoveOptions { + /** + * The flag to indicate that the listener is for the capturing phase. + */ + capture?: boolean + } + + /** + * Options of `addEventListener()` method. + */ + export interface AddOptions extends RemoveOptions { + /** + * The flag to indicate that the listener doesn't support + * `event.preventDefault()` operation. + */ + passive?: boolean + /** + * The flag to indicate that the listener will be removed on the first + * event. + */ + once?: boolean + } + + /** + * The type of regular listeners. + */ + export interface FunctionListener<TEvent> { + (event: TEvent): void + } + + /** + * The type of object listeners. + */ + export interface ObjectListener<TEvent> { + handleEvent(event: TEvent): void + } + + /** + * The type of listeners. + */ + export type Listener<TEvent> = + | FunctionListener<TEvent> + | ObjectListener<TEvent> + + /** + * Event definition. + */ + export type EventDefinition = { + readonly [key: string]: Event + } + + /** + * Mapped type for event attributes. + */ + export type EventAttributes<TEventAttributes extends EventDefinition> = { + [P in keyof TEventAttributes]: + | FunctionListener<TEventAttributes[P]> + | null + } + + /** + * The type of event data for `dispatchEvent()` method. + */ + export type EventData< + TEvents extends EventDefinition, + TEventType extends keyof TEvents | string, + TMode extends Mode + > = + TEventType extends keyof TEvents + ? ( + // Require properties which are not generated automatically. + & Pick< + TEvents[TEventType], + Exclude<keyof TEvents[TEventType], OmittableEventKeys> + > + // Properties which are generated automatically are optional. + & Partial<Pick<Event, OmittableEventKeys>> + ) + : ( + TMode extends "standard" + ? Event + : Event | NonStandardEvent + ) + + /** + * The string literal types of the properties which are generated + * automatically in `dispatchEvent()` method. + */ + export type OmittableEventKeys = Exclude<keyof Event, "type"> + + /** + * The type of event data. + */ + export type NonStandardEvent = { + [key: string]: any + type: string + } + + /** + * The type of listeners. + */ + export type PickEvent< + TEvents extends EventDefinition, + TEventType extends keyof TEvents | string, + > = + TEventType extends keyof TEvents + ? TEvents[TEventType] + : Event + + /** + * Event type candidates. + */ + export type EventType< + TEvents extends EventDefinition, + TMode extends Mode + > = + TMode extends "strict" + ? keyof TEvents + : keyof TEvents | string + + /** + * - `"strict"` ..... Methods don't accept unknown events. + * `dispatchEvent()` accepts partial objects. + * - `"loose"` ...... Methods accept unknown events. + * `dispatchEvent()` accepts partial objects. + * - `"standard"` ... Methods accept unknown events. + * `dispatchEvent()` doesn't accept partial objects. + */ + export type Mode = "strict" | "standard" | "loose" +} + +/** + * Specialized `type` property. + */ +export type Type<T extends string> = { type: T } + +/** + * Define an event attribute (e.g. `eventTarget.onclick`). + * @param prototype The event target prototype to define an event attribute. + * @param eventName The event name to define. + */ +export function defineEventAttribute( + prototype: EventTarget, + eventName: string +): void + +export default EventTarget diff --git a/node_modules/event-target-shim/package.json b/node_modules/event-target-shim/package.json new file mode 100644 index 0000000000000..40326f3d74ad4 --- /dev/null +++ b/node_modules/event-target-shim/package.json @@ -0,0 +1,82 @@ +{ + "name": "event-target-shim", + "version": "5.0.1", + "description": "An implementation of WHATWG EventTarget interface.", + "main": "dist/event-target-shim", + "types": "index.d.ts", + "files": [ + "dist", + "index.d.ts" + ], + "engines": { + "node": ">=6" + }, + "scripts": { + "preversion": "npm test", + "version": "npm run build && git add dist/*", + "postversion": "git push && git push --tags", + "clean": "rimraf .nyc_output coverage", + "coverage": "nyc report --reporter lcov && opener coverage/lcov-report/index.html", + "lint": "eslint src test scripts --ext .js,.mjs", + "build": "rollup -c scripts/rollup.config.js", + "pretest": "npm run lint", + "test": "run-s test:*", + "test:mocha": "nyc --require ./scripts/babel-register mocha test/*.mjs", + "test:karma": "karma start scripts/karma.conf.js --single-run", + "watch": "run-p watch:*", + "watch:mocha": "mocha test/*.mjs --require ./scripts/babel-register --watch --watch-extensions js,mjs --growl", + "watch:karma": "karma start scripts/karma.conf.js --watch", + "codecov": "codecov" + }, + "devDependencies": { + "@babel/core": "^7.2.2", + "@babel/plugin-transform-modules-commonjs": "^7.2.0", + "@babel/preset-env": "^7.2.3", + "@babel/register": "^7.0.0", + "@mysticatea/eslint-plugin": "^8.0.1", + "@mysticatea/spy": "^0.1.2", + "assert": "^1.4.1", + "codecov": "^3.1.0", + "eslint": "^5.12.1", + "karma": "^3.1.4", + "karma-chrome-launcher": "^2.2.0", + "karma-coverage": "^1.1.2", + "karma-firefox-launcher": "^1.0.0", + "karma-growl-reporter": "^1.0.0", + "karma-ie-launcher": "^1.0.0", + "karma-mocha": "^1.3.0", + "karma-rollup-preprocessor": "^7.0.0-rc.2", + "mocha": "^5.2.0", + "npm-run-all": "^4.1.5", + "nyc": "^13.1.0", + "opener": "^1.5.1", + "rimraf": "^2.6.3", + "rollup": "^1.1.1", + "rollup-plugin-babel": "^4.3.2", + "rollup-plugin-babel-minify": "^7.0.0", + "rollup-plugin-commonjs": "^9.2.0", + "rollup-plugin-json": "^3.1.0", + "rollup-plugin-node-resolve": "^4.0.0", + "rollup-watch": "^4.3.1", + "type-tester": "^1.0.0", + "typescript": "^3.2.4" + }, + "repository": { + "type": "git", + "url": "https://github.com/mysticatea/event-target-shim.git" + }, + "keywords": [ + "w3c", + "whatwg", + "eventtarget", + "event", + "events", + "shim" + ], + "author": "Toru Nagashima", + "license": "MIT", + "bugs": { + "url": "https://github.com/mysticatea/event-target-shim/issues" + }, + "homepage": "https://github.com/mysticatea/event-target-shim" +} diff --git a/node_modules/events/.airtap.yml b/node_modules/events/.airtap.yml new file mode 100644 index 0000000000000..c7a8a87d5e99d --- /dev/null +++ b/node_modules/events/.airtap.yml @@ -0,0 +1,15 @@ +sauce_connect: true +loopback: airtap.local +browsers: + - name: chrome + version: latest + - name: firefox + version: latest + - name: safari + version: 9..latest + - name: iphone + version: latest + - name: ie + version: 9..latest + - name: microsoftedge + version: 13..latest diff --git a/node_modules/events/History.md b/node_modules/events/History.md new file mode 100644 index 0000000000000..f48bf210da3ea --- /dev/null +++ b/node_modules/events/History.md @@ -0,0 +1,118 @@ +# 3.3.0 + + - Support EventTarget emitters in `events.once` from Node.js 12.11.0. + + Now you can use the `events.once` function with objects that implement the EventTarget interface. This interface is used widely in + the DOM and other web APIs. + + ```js + var events = require('events'); + var assert = require('assert'); + + async function connect() { + var ws = new WebSocket('wss://example.com'); + await events.once(ws, 'open'); + assert(ws.readyState === WebSocket.OPEN); + } + + async function onClick() { + await events.once(document.body, 'click'); + alert('you clicked the page!'); + } + ``` + +# 3.2.0 + + - Add `events.once` from Node.js 11.13.0. + + To use this function, Promises must be supported in the environment. Use a polyfill like `es6-promise` if you support older browsers. + +# 3.1.0 (2020-01-08) + +`events` now matches the Node.js 11.12.0 API. + + - pass through return value in wrapped `emitter.once()` listeners + + Now, this works: + ```js + emitter.once('myevent', function () { return 1; }); + var listener = emitter.rawListeners('myevent')[0] + assert(listener() === 1); + ``` + Previously, `listener()` would return undefined regardless of the implementation. + + Ported from https://github.com/nodejs/node/commit/acc506c2d2771dab8d7bba6d3452bc5180dff7cf + + - Reduce code duplication in listener type check ([#67](https://github.com/Gozala/events/pull/67) by [@friederbluemle](https://github.com/friederbluemle)). + - Improve `emitter.once()` performance in some engines + +# 3.0.0 (2018-05-25) + +**This version drops support for IE8.** `events` no longer includes polyfills +for ES5 features. If you need to support older environments, use an ES5 shim +like [es5-shim](https://npmjs.com/package/es5-shim). Both the shim and sham +versions of es5-shim are necessary. + + - Update to events code from Node.js 10.x + - (semver major) Adds `off()` method + - Port more tests from Node.js + - Switch browser tests to airtap, making things more reliable + +# 2.1.0 (2018-05-25) + + - add Emitter#rawListeners from Node.js v9.4 + +# 2.0.0 (2018-02-02) + + - Update to events code from node.js 8.x + - Adds `prependListener()` and `prependOnceListener()` + - Adds `eventNames()` method + - (semver major) Unwrap `once()` listeners in `listeners()` + - copy tests from node.js + +Note that this version doubles the gzipped size, jumping from 1.1KB to 2.1KB, +due to new methods and runtime performance improvements. Be aware of that when +upgrading. + +# 1.1.1 (2016-06-22) + + - add more context to errors if they are not instanceof Error + +# 1.1.0 (2015-09-29) + + - add Emitter#listerCount (to match node v4 api) + +# 1.0.2 (2014-08-28) + + - remove un-reachable code + - update devDeps + +## 1.0.1 / 2014-05-11 + + - check for console.trace before using it + +## 1.0.0 / 2013-12-10 + + - Update to latest events code from node.js 0.10 + - copy tests from node.js + +## 0.4.0 / 2011-07-03 ## + + - Switching to graphquire@0.8.0 + +## 0.3.0 / 2011-07-03 ## + + - Switching to URL based module require. + +## 0.2.0 / 2011-06-10 ## + + - Simplified package structure. + - Graphquire for dependency management. + +## 0.1.1 / 2011-05-16 ## + + - Unhandled errors are logged via console.error + +## 0.1.0 / 2011-04-22 ## + + - Initial release diff --git a/node_modules/events/LICENSE b/node_modules/events/LICENSE new file mode 100644 index 0000000000000..52ed3b0a63274 --- /dev/null +++ b/node_modules/events/LICENSE @@ -0,0 +1,22 @@ +MIT + +Copyright Joyent, Inc. and other Node contributors. + +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. diff --git a/node_modules/events/events.js b/node_modules/events/events.js new file mode 100644 index 0000000000000..34b69a0b4a6e1 --- /dev/null +++ b/node_modules/events/events.js @@ -0,0 +1,497 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +'use strict'; + +var R = typeof Reflect === 'object' ? Reflect : null +var ReflectApply = R && typeof R.apply === 'function' + ? R.apply + : function ReflectApply(target, receiver, args) { + return Function.prototype.apply.call(target, receiver, args); + } + +var ReflectOwnKeys +if (R && typeof R.ownKeys === 'function') { + ReflectOwnKeys = R.ownKeys +} else if (Object.getOwnPropertySymbols) { + ReflectOwnKeys = function ReflectOwnKeys(target) { + return Object.getOwnPropertyNames(target) + .concat(Object.getOwnPropertySymbols(target)); + }; +} else { + ReflectOwnKeys = function ReflectOwnKeys(target) { + return Object.getOwnPropertyNames(target); + }; +} + +function ProcessEmitWarning(warning) { + if (console && console.warn) console.warn(warning); +} + +var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) { + return value !== value; +} + +function EventEmitter() { + EventEmitter.init.call(this); +} +module.exports = EventEmitter; +module.exports.once = once; + +// Backwards-compat with node 0.10.x +EventEmitter.EventEmitter = EventEmitter; + +EventEmitter.prototype._events = undefined; +EventEmitter.prototype._eventsCount = 0; +EventEmitter.prototype._maxListeners = undefined; + +// By default EventEmitters will print a warning if more than 10 listeners are +// added to it. This is a useful default which helps finding memory leaks. +var defaultMaxListeners = 10; + +function checkListener(listener) { + if (typeof listener !== 'function') { + throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); + } +} + +Object.defineProperty(EventEmitter, 'defaultMaxListeners', { + enumerable: true, + get: function() { + return defaultMaxListeners; + }, + set: function(arg) { + if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) { + throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.'); + } + defaultMaxListeners = arg; + } +}); + +EventEmitter.init = function() { + + if (this._events === undefined || + this._events === Object.getPrototypeOf(this)._events) { + this._events = Object.create(null); + this._eventsCount = 0; + } + + this._maxListeners = this._maxListeners || undefined; +}; + +// Obviously not all Emitters should be limited to 10. This function allows +// that to be increased. Set to zero for unlimited. +EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { + if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) { + throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.'); + } + this._maxListeners = n; + return this; +}; + +function _getMaxListeners(that) { + if (that._maxListeners === undefined) + return EventEmitter.defaultMaxListeners; + return that._maxListeners; +} + +EventEmitter.prototype.getMaxListeners = function getMaxListeners() { + return _getMaxListeners(this); +}; + +EventEmitter.prototype.emit = function emit(type) { + var args = []; + for (var i = 1; i < arguments.length; i++) args.push(arguments[i]); + var doError = (type === 'error'); + + var events = this._events; + if (events !== undefined) + doError = (doError && events.error === undefined); + else if (!doError) + return false; + + // If there is no 'error' event listener then throw. + if (doError) { + var er; + if (args.length > 0) + er = args[0]; + if (er instanceof Error) { + // Note: The comments on the `throw` lines are intentional, they show + // up in Node's output if this results in an unhandled exception. + throw er; // Unhandled 'error' event + } + // At least give some kind of context to the user + var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : '')); + err.context = er; + throw err; // Unhandled 'error' event + } + + var handler = events[type]; + + if (handler === undefined) + return false; + + if (typeof handler === 'function') { + ReflectApply(handler, this, args); + } else { + var len = handler.length; + var listeners = arrayClone(handler, len); + for (var i = 0; i < len; ++i) + ReflectApply(listeners[i], this, args); + } + + return true; +}; + +function _addListener(target, type, listener, prepend) { + var m; + var events; + var existing; + + checkListener(listener); + + events = target._events; + if (events === undefined) { + events = target._events = Object.create(null); + target._eventsCount = 0; + } else { + // To avoid recursion in the case that type === "newListener"! Before + // adding it to the listeners, first emit "newListener". + if (events.newListener !== undefined) { + target.emit('newListener', type, + listener.listener ? listener.listener : listener); + + // Re-assign `events` because a newListener handler could have caused the + // this._events to be assigned to a new object + events = target._events; + } + existing = events[type]; + } + + if (existing === undefined) { + // Optimize the case of one listener. Don't need the extra array object. + existing = events[type] = listener; + ++target._eventsCount; + } else { + if (typeof existing === 'function') { + // Adding the second element, need to change to array. + existing = events[type] = + prepend ? [listener, existing] : [existing, listener]; + // If we've already got an array, just append. + } else if (prepend) { + existing.unshift(listener); + } else { + existing.push(listener); + } + + // Check for listener leak + m = _getMaxListeners(target); + if (m > 0 && existing.length > m && !existing.warned) { + existing.warned = true; + // No error code for this since it is a Warning + // eslint-disable-next-line no-restricted-syntax + var w = new Error('Possible EventEmitter memory leak detected. ' + + existing.length + ' ' + String(type) + ' listeners ' + + 'added. Use emitter.setMaxListeners() to ' + + 'increase limit'); + w.name = 'MaxListenersExceededWarning'; + w.emitter = target; + w.type = type; + w.count = existing.length; + ProcessEmitWarning(w); + } + } + + return target; +} + +EventEmitter.prototype.addListener = function addListener(type, listener) { + return _addListener(this, type, listener, false); +}; + +EventEmitter.prototype.on = EventEmitter.prototype.addListener; + +EventEmitter.prototype.prependListener = + function prependListener(type, listener) { + return _addListener(this, type, listener, true); + }; + +function onceWrapper() { + if (!this.fired) { + this.target.removeListener(this.type, this.wrapFn); + this.fired = true; + if (arguments.length === 0) + return this.listener.call(this.target); + return this.listener.apply(this.target, arguments); + } +} + +function _onceWrap(target, type, listener) { + var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener }; + var wrapped = onceWrapper.bind(state); + wrapped.listener = listener; + state.wrapFn = wrapped; + return wrapped; +} + +EventEmitter.prototype.once = function once(type, listener) { + checkListener(listener); + this.on(type, _onceWrap(this, type, listener)); + return this; +}; + +EventEmitter.prototype.prependOnceListener = + function prependOnceListener(type, listener) { + checkListener(listener); + this.prependListener(type, _onceWrap(this, type, listener)); + return this; + }; + +// Emits a 'removeListener' event if and only if the listener was removed. +EventEmitter.prototype.removeListener = + function removeListener(type, listener) { + var list, events, position, i, originalListener; + + checkListener(listener); + + events = this._events; + if (events === undefined) + return this; + + list = events[type]; + if (list === undefined) + return this; + + if (list === listener || list.listener === listener) { + if (--this._eventsCount === 0) + this._events = Object.create(null); + else { + delete events[type]; + if (events.removeListener) + this.emit('removeListener', type, list.listener || listener); + } + } else if (typeof list !== 'function') { + position = -1; + + for (i = list.length - 1; i >= 0; i--) { + if (list[i] === listener || list[i].listener === listener) { + originalListener = list[i].listener; + position = i; + break; + } + } + + if (position < 0) + return this; + + if (position === 0) + list.shift(); + else { + spliceOne(list, position); + } + + if (list.length === 1) + events[type] = list[0]; + + if (events.removeListener !== undefined) + this.emit('removeListener', type, originalListener || listener); + } + + return this; + }; + +EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + +EventEmitter.prototype.removeAllListeners = + function removeAllListeners(type) { + var listeners, events, i; + + events = this._events; + if (events === undefined) + return this; + + // not listening for removeListener, no need to emit + if (events.removeListener === undefined) { + if (arguments.length === 0) { + this._events = Object.create(null); + this._eventsCount = 0; + } else if (events[type] !== undefined) { + if (--this._eventsCount === 0) + this._events = Object.create(null); + else + delete events[type]; + } + return this; + } + + // emit removeListener for all listeners on all events + if (arguments.length === 0) { + var keys = Object.keys(events); + var key; + for (i = 0; i < keys.length; ++i) { + key = keys[i]; + if (key === 'removeListener') continue; + this.removeAllListeners(key); + } + this.removeAllListeners('removeListener'); + this._events = Object.create(null); + this._eventsCount = 0; + return this; + } + + listeners = events[type]; + + if (typeof listeners === 'function') { + this.removeListener(type, listeners); + } else if (listeners !== undefined) { + // LIFO order + for (i = listeners.length - 1; i >= 0; i--) { + this.removeListener(type, listeners[i]); + } + } + + return this; + }; + +function _listeners(target, type, unwrap) { + var events = target._events; + + if (events === undefined) + return []; + + var evlistener = events[type]; + if (evlistener === undefined) + return []; + + if (typeof evlistener === 'function') + return unwrap ? [evlistener.listener || evlistener] : [evlistener]; + + return unwrap ? + unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length); +} + +EventEmitter.prototype.listeners = function listeners(type) { + return _listeners(this, type, true); +}; + +EventEmitter.prototype.rawListeners = function rawListeners(type) { + return _listeners(this, type, false); +}; + +EventEmitter.listenerCount = function(emitter, type) { + if (typeof emitter.listenerCount === 'function') { + return emitter.listenerCount(type); + } else { + return listenerCount.call(emitter, type); + } +}; + +EventEmitter.prototype.listenerCount = listenerCount; +function listenerCount(type) { + var events = this._events; + + if (events !== undefined) { + var evlistener = events[type]; + + if (typeof evlistener === 'function') { + return 1; + } else if (evlistener !== undefined) { + return evlistener.length; + } + } + + return 0; +} + +EventEmitter.prototype.eventNames = function eventNames() { + return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : []; +}; + +function arrayClone(arr, n) { + var copy = new Array(n); + for (var i = 0; i < n; ++i) + copy[i] = arr[i]; + return copy; +} + +function spliceOne(list, index) { + for (; index + 1 < list.length; index++) + list[index] = list[index + 1]; + list.pop(); +} + +function unwrapListeners(arr) { + var ret = new Array(arr.length); + for (var i = 0; i < ret.length; ++i) { + ret[i] = arr[i].listener || arr[i]; + } + return ret; +} + +function once(emitter, name) { + return new Promise(function (resolve, reject) { + function errorListener(err) { + emitter.removeListener(name, resolver); + reject(err); + } + + function resolver() { + if (typeof emitter.removeListener === 'function') { + emitter.removeListener('error', errorListener); + } + resolve([].slice.call(arguments)); + }; + + eventTargetAgnosticAddListener(emitter, name, resolver, { once: true }); + if (name !== 'error') { + addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true }); + } + }); +} + +function addErrorHandlerIfEventEmitter(emitter, handler, flags) { + if (typeof emitter.on === 'function') { + eventTargetAgnosticAddListener(emitter, 'error', handler, flags); + } +} + +function eventTargetAgnosticAddListener(emitter, name, listener, flags) { + if (typeof emitter.on === 'function') { + if (flags.once) { + emitter.once(name, listener); + } else { + emitter.on(name, listener); + } + } else if (typeof emitter.addEventListener === 'function') { + // EventTarget does not have `error` event semantics like Node + // EventEmitters, we do not listen for `error` events here. + emitter.addEventListener(name, function wrapListener(arg) { + // IE does not have builtin `{ once: true }` support so we + // have to do it manually. + if (flags.once) { + emitter.removeEventListener(name, wrapListener); + } + listener(arg); + }); + } else { + throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter); + } +} diff --git a/node_modules/events/package.json b/node_modules/events/package.json new file mode 100644 index 0000000000000..b9580d88142d2 --- /dev/null +++ b/node_modules/events/package.json @@ -0,0 +1,37 @@ +{ + "name": "events", + "version": "3.3.0", + "description": "Node's event emitter for all engines.", + "keywords": [ + "events", + "eventEmitter", + "eventDispatcher", + "listeners" + ], + "author": "Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)", + "repository": { + "type": "git", + "url": "git://github.com/Gozala/events.git", + "web": "https://github.com/Gozala/events" + }, + "bugs": { + "url": "http://github.com/Gozala/events/issues/" + }, + "main": "./events.js", + "engines": { + "node": ">=0.8.x" + }, + "devDependencies": { + "airtap": "^1.0.0", + "functions-have-names": "^1.2.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "isarray": "^2.0.5", + "tape": "^5.0.0" + }, + "scripts": { + "test": "node tests/index.js", + "test:browsers": "airtap -- tests/index.js" + }, + "license": "MIT" +} diff --git a/node_modules/events/security.md b/node_modules/events/security.md new file mode 100644 index 0000000000000..a14ace6a57db7 --- /dev/null +++ b/node_modules/events/security.md @@ -0,0 +1,10 @@ +# Security Policy + +## Supported Versions +Only the latest major version is supported at any given time. + +## Reporting a Vulnerability + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. diff --git a/node_modules/events/tests/add-listeners.js b/node_modules/events/tests/add-listeners.js new file mode 100644 index 0000000000000..9b578272ba889 --- /dev/null +++ b/node_modules/events/tests/add-listeners.js @@ -0,0 +1,111 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +var common = require('./common'); +var assert = require('assert'); +var EventEmitter = require('../'); + +{ + var ee = new EventEmitter(); + var events_new_listener_emitted = []; + var listeners_new_listener_emitted = []; + + // Sanity check + assert.strictEqual(ee.addListener, ee.on); + + ee.on('newListener', function(event, listener) { + // Don't track newListener listeners. + if (event === 'newListener') + return; + + events_new_listener_emitted.push(event); + listeners_new_listener_emitted.push(listener); + }); + + var hello = common.mustCall(function(a, b) { + assert.strictEqual('a', a); + assert.strictEqual('b', b); + }); + + ee.once('newListener', function(name, listener) { + assert.strictEqual(name, 'hello'); + assert.strictEqual(listener, hello); + + var listeners = this.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); + }); + + ee.on('hello', hello); + ee.once('foo', assert.fail); + + assert.ok(Array.isArray(events_new_listener_emitted)); + assert.strictEqual(events_new_listener_emitted.length, 2); + assert.strictEqual(events_new_listener_emitted[0], 'hello'); + assert.strictEqual(events_new_listener_emitted[1], 'foo'); + + assert.ok(Array.isArray(listeners_new_listener_emitted)); + assert.strictEqual(listeners_new_listener_emitted.length, 2); + assert.strictEqual(listeners_new_listener_emitted[0], hello); + assert.strictEqual(listeners_new_listener_emitted[1], assert.fail); + + ee.emit('hello', 'a', 'b'); +} + +// just make sure that this doesn't throw: +{ + var f = new EventEmitter(); + + f.setMaxListeners(0); +} + +{ + var listen1 = function() {}; + var listen2 = function() {}; + var ee = new EventEmitter(); + + ee.once('newListener', function() { + var listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); + ee.once('newListener', function() { + var listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); + }); + ee.on('hello', listen2); + }); + ee.on('hello', listen1); + // The order of listeners on an event is not always the order in which the + // listeners were added. + var listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 2); + assert.strictEqual(listeners[0], listen2); + assert.strictEqual(listeners[1], listen1); +} + +// Verify that the listener must be a function +assert.throws(function() { + var ee = new EventEmitter(); + + ee.on('foo', null); +}, /^TypeError: The "listener" argument must be of type Function. Received type object$/); diff --git a/node_modules/events/tests/check-listener-leaks.js b/node_modules/events/tests/check-listener-leaks.js new file mode 100644 index 0000000000000..7fce48f37bf24 --- /dev/null +++ b/node_modules/events/tests/check-listener-leaks.js @@ -0,0 +1,101 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +var common = require('./common'); +var assert = require('assert'); +var events = require('../'); + +// Redirect warning output to tape. +var consoleWarn = console.warn; +console.warn = common.test.comment; + +common.test.on('end', function () { + console.warn = consoleWarn; +}); + +// default +{ + var e = new events.EventEmitter(); + + for (var i = 0; i < 10; i++) { + e.on('default', common.mustNotCall()); + } + assert.ok(!e._events['default'].hasOwnProperty('warned')); + e.on('default', common.mustNotCall()); + assert.ok(e._events['default'].warned); + + // specific + e.setMaxListeners(5); + for (var i = 0; i < 5; i++) { + e.on('specific', common.mustNotCall()); + } + assert.ok(!e._events['specific'].hasOwnProperty('warned')); + e.on('specific', common.mustNotCall()); + assert.ok(e._events['specific'].warned); + + // only one + e.setMaxListeners(1); + e.on('only one', common.mustNotCall()); + assert.ok(!e._events['only one'].hasOwnProperty('warned')); + e.on('only one', common.mustNotCall()); + assert.ok(e._events['only one'].hasOwnProperty('warned')); + + // unlimited + e.setMaxListeners(0); + for (var i = 0; i < 1000; i++) { + e.on('unlimited', common.mustNotCall()); + } + assert.ok(!e._events['unlimited'].hasOwnProperty('warned')); +} + +// process-wide +{ + events.EventEmitter.defaultMaxListeners = 42; + var e = new events.EventEmitter(); + + for (var i = 0; i < 42; ++i) { + e.on('fortytwo', common.mustNotCall()); + } + assert.ok(!e._events['fortytwo'].hasOwnProperty('warned')); + e.on('fortytwo', common.mustNotCall()); + assert.ok(e._events['fortytwo'].hasOwnProperty('warned')); + delete e._events['fortytwo'].warned; + + events.EventEmitter.defaultMaxListeners = 44; + e.on('fortytwo', common.mustNotCall()); + assert.ok(!e._events['fortytwo'].hasOwnProperty('warned')); + e.on('fortytwo', common.mustNotCall()); + assert.ok(e._events['fortytwo'].hasOwnProperty('warned')); +} + +// but _maxListeners still has precedence over defaultMaxListeners +{ + events.EventEmitter.defaultMaxListeners = 42; + var e = new events.EventEmitter(); + e.setMaxListeners(1); + e.on('uno', common.mustNotCall()); + assert.ok(!e._events['uno'].hasOwnProperty('warned')); + e.on('uno', common.mustNotCall()); + assert.ok(e._events['uno'].hasOwnProperty('warned')); + + // chainable + assert.strictEqual(e, e.setMaxListeners(1)); +} diff --git a/node_modules/events/tests/common.js b/node_modules/events/tests/common.js new file mode 100644 index 0000000000000..49569b05f59d5 --- /dev/null +++ b/node_modules/events/tests/common.js @@ -0,0 +1,104 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +var test = require('tape'); +var assert = require('assert'); + +var noop = function() {}; + +var mustCallChecks = []; + +function runCallChecks(exitCode) { + if (exitCode !== 0) return; + + var failed = filter(mustCallChecks, function(context) { + if ('minimum' in context) { + context.messageSegment = 'at least ' + context.minimum; + return context.actual < context.minimum; + } else { + context.messageSegment = 'exactly ' + context.exact; + return context.actual !== context.exact; + } + }); + + for (var i = 0; i < failed.length; i++) { + var context = failed[i]; + console.log('Mismatched %s function calls. Expected %s, actual %d.', + context.name, + context.messageSegment, + context.actual); + // IE8 has no .stack + if (context.stack) console.log(context.stack.split('\n').slice(2).join('\n')); + } + + assert.strictEqual(failed.length, 0); +} + +exports.mustCall = function(fn, exact) { + return _mustCallInner(fn, exact, 'exact'); +}; + +function _mustCallInner(fn, criteria, field) { + if (typeof criteria == 'undefined') criteria = 1; + + if (typeof fn === 'number') { + criteria = fn; + fn = noop; + } else if (fn === undefined) { + fn = noop; + } + + if (typeof criteria !== 'number') + throw new TypeError('Invalid ' + field + ' value: ' + criteria); + + var context = { + actual: 0, + stack: (new Error()).stack, + name: fn.name || '<anonymous>' + }; + + context[field] = criteria; + + // add the exit listener only once to avoid listener leak warnings + if (mustCallChecks.length === 0) test.onFinish(function() { runCallChecks(0); }); + + mustCallChecks.push(context); + + return function() { + context.actual++; + return fn.apply(this, arguments); + }; +} + +exports.mustNotCall = function(msg) { + return function mustNotCall() { + assert.fail(msg || 'function should not have been called'); + }; +}; + +function filter(arr, fn) { + if (arr.filter) return arr.filter(fn); + var filtered = []; + for (var i = 0; i < arr.length; i++) { + if (fn(arr[i], i, arr)) filtered.push(arr[i]); + } + return filtered +} diff --git a/node_modules/events/tests/errors.js b/node_modules/events/tests/errors.js new file mode 100644 index 0000000000000..a23df437f05d3 --- /dev/null +++ b/node_modules/events/tests/errors.js @@ -0,0 +1,13 @@ +'use strict'; +var assert = require('assert'); +var EventEmitter = require('../'); + +var EE = new EventEmitter(); + +assert.throws(function () { + EE.emit('error', 'Accepts a string'); +}, 'Error: Unhandled error. (Accepts a string)'); + +assert.throws(function () { + EE.emit('error', { message: 'Error!' }); +}, 'Unhandled error. ([object Object])'); diff --git a/node_modules/events/tests/events-list.js b/node_modules/events/tests/events-list.js new file mode 100644 index 0000000000000..08aa62177e2c2 --- /dev/null +++ b/node_modules/events/tests/events-list.js @@ -0,0 +1,28 @@ +'use strict'; + +var EventEmitter = require('../'); +var assert = require('assert'); + +var EE = new EventEmitter(); +var m = function() {}; +EE.on('foo', function() {}); +assert.equal(1, EE.eventNames().length); +assert.equal('foo', EE.eventNames()[0]); +EE.on('bar', m); +assert.equal(2, EE.eventNames().length); +assert.equal('foo', EE.eventNames()[0]); +assert.equal('bar', EE.eventNames()[1]); +EE.removeListener('bar', m); +assert.equal(1, EE.eventNames().length); +assert.equal('foo', EE.eventNames()[0]); + +if (typeof Symbol !== 'undefined') { + var s = Symbol('s'); + EE.on(s, m); + assert.equal(2, EE.eventNames().length); + assert.equal('foo', EE.eventNames()[0]); + assert.equal(s, EE.eventNames()[1]); + EE.removeListener(s, m); + assert.equal(1, EE.eventNames().length); + assert.equal('foo', EE.eventNames()[0]); +} diff --git a/node_modules/events/tests/events-once.js b/node_modules/events/tests/events-once.js new file mode 100644 index 0000000000000..dae864963daae --- /dev/null +++ b/node_modules/events/tests/events-once.js @@ -0,0 +1,234 @@ +'use strict'; + +var common = require('./common'); +var EventEmitter = require('../').EventEmitter; +var once = require('../').once; +var has = require('has'); +var assert = require('assert'); + +function Event(type) { + this.type = type; +} + +function EventTargetMock() { + this.events = {}; + + this.addEventListener = common.mustCall(this.addEventListener); + this.removeEventListener = common.mustCall(this.removeEventListener); +} + +EventTargetMock.prototype.addEventListener = function addEventListener(name, listener, options) { + if (!(name in this.events)) { + this.events[name] = { listeners: [], options: options || {} } + } + this.events[name].listeners.push(listener); +}; + +EventTargetMock.prototype.removeEventListener = function removeEventListener(name, callback) { + if (!(name in this.events)) { + return; + } + var event = this.events[name]; + var stack = event.listeners; + + for (var i = 0, l = stack.length; i < l; i++) { + if (stack[i] === callback) { + stack.splice(i, 1); + if (stack.length === 0) { + delete this.events[name]; + } + return; + } + } +}; + +EventTargetMock.prototype.dispatchEvent = function dispatchEvent(arg) { + if (!(arg.type in this.events)) { + return true; + } + + var event = this.events[arg.type]; + var stack = event.listeners.slice(); + + for (var i = 0, l = stack.length; i < l; i++) { + stack[i].call(null, arg); + if (event.options.once) { + this.removeEventListener(arg.type, stack[i]); + } + } + return !arg.defaultPrevented; +}; + +function onceAnEvent() { + var ee = new EventEmitter(); + + process.nextTick(function () { + ee.emit('myevent', 42); + }); + + return once(ee, 'myevent').then(function (args) { + var value = args[0] + assert.strictEqual(value, 42); + assert.strictEqual(ee.listenerCount('error'), 0); + assert.strictEqual(ee.listenerCount('myevent'), 0); + }); +} + +function onceAnEventWithTwoArgs() { + var ee = new EventEmitter(); + + process.nextTick(function () { + ee.emit('myevent', 42, 24); + }); + + return once(ee, 'myevent').then(function (value) { + assert.strictEqual(value.length, 2); + assert.strictEqual(value[0], 42); + assert.strictEqual(value[1], 24); + }); +} + +function catchesErrors() { + var ee = new EventEmitter(); + + var expected = new Error('kaboom'); + var err; + process.nextTick(function () { + ee.emit('error', expected); + }); + + return once(ee, 'myevent').then(function () { + throw new Error('should reject') + }, function (err) { + assert.strictEqual(err, expected); + assert.strictEqual(ee.listenerCount('error'), 0); + assert.strictEqual(ee.listenerCount('myevent'), 0); + }); +} + +function stopListeningAfterCatchingError() { + var ee = new EventEmitter(); + + var expected = new Error('kaboom'); + var err; + process.nextTick(function () { + ee.emit('error', expected); + ee.emit('myevent', 42, 24); + }); + + // process.on('multipleResolves', common.mustNotCall()); + + return once(ee, 'myevent').then(common.mustNotCall, function (err) { + // process.removeAllListeners('multipleResolves'); + assert.strictEqual(err, expected); + assert.strictEqual(ee.listenerCount('error'), 0); + assert.strictEqual(ee.listenerCount('myevent'), 0); + }); +} + +function onceError() { + var ee = new EventEmitter(); + + var expected = new Error('kaboom'); + process.nextTick(function () { + ee.emit('error', expected); + }); + + var promise = once(ee, 'error'); + assert.strictEqual(ee.listenerCount('error'), 1); + return promise.then(function (args) { + var err = args[0] + assert.strictEqual(err, expected); + assert.strictEqual(ee.listenerCount('error'), 0); + assert.strictEqual(ee.listenerCount('myevent'), 0); + }); +} + +function onceWithEventTarget() { + var et = new EventTargetMock(); + var event = new Event('myevent'); + process.nextTick(function () { + et.dispatchEvent(event); + }); + return once(et, 'myevent').then(function (args) { + var value = args[0]; + assert.strictEqual(value, event); + assert.strictEqual(has(et.events, 'myevent'), false); + }); +} + +function onceWithEventTargetError() { + var et = new EventTargetMock(); + var error = new Event('error'); + process.nextTick(function () { + et.dispatchEvent(error); + }); + return once(et, 'error').then(function (args) { + var err = args[0]; + assert.strictEqual(err, error); + assert.strictEqual(has(et.events, 'error'), false); + }); +} + +function prioritizesEventEmitter() { + var ee = new EventEmitter(); + ee.addEventListener = assert.fail; + ee.removeAllListeners = assert.fail; + process.nextTick(function () { + ee.emit('foo'); + }); + return once(ee, 'foo'); +} + +var allTests = [ + onceAnEvent(), + onceAnEventWithTwoArgs(), + catchesErrors(), + stopListeningAfterCatchingError(), + onceError(), + onceWithEventTarget(), + onceWithEventTargetError(), + prioritizesEventEmitter() +]; + +var hasBrowserEventTarget = false; +try { + hasBrowserEventTarget = typeof (new window.EventTarget().addEventListener) === 'function' && + new window.Event('xyz').type === 'xyz'; +} catch (err) {} + +if (hasBrowserEventTarget) { + var onceWithBrowserEventTarget = function onceWithBrowserEventTarget() { + var et = new window.EventTarget(); + var event = new window.Event('myevent'); + process.nextTick(function () { + et.dispatchEvent(event); + }); + return once(et, 'myevent').then(function (args) { + var value = args[0]; + assert.strictEqual(value, event); + assert.strictEqual(has(et.events, 'myevent'), false); + }); + } + + var onceWithBrowserEventTargetError = function onceWithBrowserEventTargetError() { + var et = new window.EventTarget(); + var error = new window.Event('error'); + process.nextTick(function () { + et.dispatchEvent(error); + }); + return once(et, 'error').then(function (args) { + var err = args[0]; + assert.strictEqual(err, error); + assert.strictEqual(has(et.events, 'error'), false); + }); + } + + common.test.comment('Testing with browser built-in EventTarget'); + allTests.push([ + onceWithBrowserEventTarget(), + onceWithBrowserEventTargetError() + ]); +} + +module.exports = Promise.all(allTests); diff --git a/node_modules/events/tests/index.js b/node_modules/events/tests/index.js new file mode 100644 index 0000000000000..2d739e670ca02 --- /dev/null +++ b/node_modules/events/tests/index.js @@ -0,0 +1,64 @@ +var test = require('tape'); +var functionsHaveNames = require('functions-have-names'); +var hasSymbols = require('has-symbols'); + +require('./legacy-compat'); +var common = require('./common'); + +// we do this to easily wrap each file in a mocha test +// and also have browserify be able to statically analyze this file +var orig_require = require; +var require = function(file) { + test(file, function(t) { + // Store the tape object so tests can access it. + t.on('end', function () { delete common.test; }); + common.test = t; + + try { + var exp = orig_require(file); + if (exp && exp.then) { + exp.then(function () { t.end(); }, t.fail); + return; + } + } catch (err) { + t.fail(err); + } + t.end(); + }); +}; + +require('./add-listeners.js'); +require('./check-listener-leaks.js'); +require('./errors.js'); +require('./events-list.js'); +if (typeof Promise === 'function') { + require('./events-once.js'); +} else { + // Promise support is not available. + test('./events-once.js', { skip: true }, function () {}); +} +require('./listener-count.js'); +require('./listeners-side-effects.js'); +require('./listeners.js'); +require('./max-listeners.js'); +if (functionsHaveNames()) { + require('./method-names.js'); +} else { + // Function.name is not supported in IE + test('./method-names.js', { skip: true }, function () {}); +} +require('./modify-in-emit.js'); +require('./num-args.js'); +require('./once.js'); +require('./prepend.js'); +require('./set-max-listeners-side-effects.js'); +require('./special-event-names.js'); +require('./subclass.js'); +if (hasSymbols()) { + require('./symbols.js'); +} else { + // Symbol is not available. + test('./symbols.js', { skip: true }, function () {}); +} +require('./remove-all-listeners.js'); +require('./remove-listeners.js'); diff --git a/node_modules/events/tests/legacy-compat.js b/node_modules/events/tests/legacy-compat.js new file mode 100644 index 0000000000000..a402be6e2f42d --- /dev/null +++ b/node_modules/events/tests/legacy-compat.js @@ -0,0 +1,16 @@ +// sigh... life is hard +if (!global.console) { + console = {} +} + +var fns = ['log', 'error', 'trace']; +for (var i=0 ; i<fns.length ; ++i) { + var fn = fns[i]; + if (!console[fn]) { + console[fn] = function() {}; + } +} + +if (!Array.isArray) { + Array.isArray = require('isarray'); +} diff --git a/node_modules/events/tests/listener-count.js b/node_modules/events/tests/listener-count.js new file mode 100644 index 0000000000000..9d422d872a4dd --- /dev/null +++ b/node_modules/events/tests/listener-count.js @@ -0,0 +1,37 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +require('./common'); +var assert = require('assert'); +var EventEmitter = require('../'); + +var emitter = new EventEmitter(); +emitter.on('foo', function() {}); +emitter.on('foo', function() {}); +emitter.on('baz', function() {}); +// Allow any type +emitter.on(123, function() {}); + +assert.strictEqual(EventEmitter.listenerCount(emitter, 'foo'), 2); +assert.strictEqual(emitter.listenerCount('foo'), 2); +assert.strictEqual(emitter.listenerCount('bar'), 0); +assert.strictEqual(emitter.listenerCount('baz'), 1); +assert.strictEqual(emitter.listenerCount(123), 1); diff --git a/node_modules/events/tests/listeners-side-effects.js b/node_modules/events/tests/listeners-side-effects.js new file mode 100644 index 0000000000000..180f833128b07 --- /dev/null +++ b/node_modules/events/tests/listeners-side-effects.js @@ -0,0 +1,56 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +require('./common'); +var assert = require('assert'); + +var EventEmitter = require('../').EventEmitter; + +var e = new EventEmitter(); +var fl; // foo listeners + +fl = e.listeners('foo'); +assert.ok(Array.isArray(fl)); +assert.strictEqual(fl.length, 0); +if (Object.create) assert.ok(!(e._events instanceof Object)); +assert.strictEqual(Object.keys(e._events).length, 0); + +e.on('foo', assert.fail); +fl = e.listeners('foo'); +assert.strictEqual(e._events.foo, assert.fail); +assert.ok(Array.isArray(fl)); +assert.strictEqual(fl.length, 1); +assert.strictEqual(fl[0], assert.fail); + +e.listeners('bar'); + +e.on('foo', assert.ok); +fl = e.listeners('foo'); + +assert.ok(Array.isArray(e._events.foo)); +assert.strictEqual(e._events.foo.length, 2); +assert.strictEqual(e._events.foo[0], assert.fail); +assert.strictEqual(e._events.foo[1], assert.ok); + +assert.ok(Array.isArray(fl)); +assert.strictEqual(fl.length, 2); +assert.strictEqual(fl[0], assert.fail); +assert.strictEqual(fl[1], assert.ok); diff --git a/node_modules/events/tests/listeners.js b/node_modules/events/tests/listeners.js new file mode 100644 index 0000000000000..1909d2dfe2d18 --- /dev/null +++ b/node_modules/events/tests/listeners.js @@ -0,0 +1,168 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +require('./common'); +var assert = require('assert'); +var events = require('../'); +var util = require('util'); + +function listener() {} +function listener2() {} +function listener3() { + return 0; +} +function listener4() { + return 1; +} + +function TestStream() {} +util.inherits(TestStream, events.EventEmitter); + +{ + var ee = new events.EventEmitter(); + ee.on('foo', listener); + var fooListeners = ee.listeners('foo'); + + var listeners = ee.listeners('foo'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 1); + assert.strictEqual(listeners[0], listener); + + ee.removeAllListeners('foo'); + listeners = ee.listeners('foo'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); + + assert.ok(Array.isArray(fooListeners)); + assert.strictEqual(fooListeners.length, 1); + assert.strictEqual(fooListeners[0], listener); +} + +{ + var ee = new events.EventEmitter(); + ee.on('foo', listener); + + var eeListenersCopy = ee.listeners('foo'); + assert.ok(Array.isArray(eeListenersCopy)); + assert.strictEqual(eeListenersCopy.length, 1); + assert.strictEqual(eeListenersCopy[0], listener); + + var listeners = ee.listeners('foo'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 1); + assert.strictEqual(listeners[0], listener); + + eeListenersCopy.push(listener2); + listeners = ee.listeners('foo'); + + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 1); + assert.strictEqual(listeners[0], listener); + + assert.strictEqual(eeListenersCopy.length, 2); + assert.strictEqual(eeListenersCopy[0], listener); + assert.strictEqual(eeListenersCopy[1], listener2); +} + +{ + var ee = new events.EventEmitter(); + ee.on('foo', listener); + var eeListenersCopy = ee.listeners('foo'); + ee.on('foo', listener2); + + var listeners = ee.listeners('foo'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 2); + assert.strictEqual(listeners[0], listener); + assert.strictEqual(listeners[1], listener2); + + assert.ok(Array.isArray(eeListenersCopy)); + assert.strictEqual(eeListenersCopy.length, 1); + assert.strictEqual(eeListenersCopy[0], listener); +} + +{ + var ee = new events.EventEmitter(); + ee.once('foo', listener); + var listeners = ee.listeners('foo'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 1); + assert.strictEqual(listeners[0], listener); +} + +{ + var ee = new events.EventEmitter(); + ee.on('foo', listener); + ee.once('foo', listener2); + + var listeners = ee.listeners('foo'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 2); + assert.strictEqual(listeners[0], listener); + assert.strictEqual(listeners[1], listener2); +} + +{ + var ee = new events.EventEmitter(); + ee._events = undefined; + var listeners = ee.listeners('foo'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); +} + +{ + var s = new TestStream(); + var listeners = s.listeners('foo'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); +} + + +{ + var ee = new events.EventEmitter(); + ee.on('foo', listener); + var wrappedListener = ee.rawListeners('foo'); + assert.strictEqual(wrappedListener.length, 1); + assert.strictEqual(wrappedListener[0], listener); + assert.notStrictEqual(wrappedListener, ee.rawListeners('foo')); + ee.once('foo', listener); + var wrappedListeners = ee.rawListeners('foo'); + assert.strictEqual(wrappedListeners.length, 2); + assert.strictEqual(wrappedListeners[0], listener); + assert.notStrictEqual(wrappedListeners[1], listener); + assert.strictEqual(wrappedListeners[1].listener, listener); + assert.notStrictEqual(wrappedListeners, ee.rawListeners('foo')); + ee.emit('foo'); + assert.strictEqual(wrappedListeners.length, 2); + assert.strictEqual(wrappedListeners[1].listener, listener); +} + +{ + var ee = new events.EventEmitter(); + ee.once('foo', listener3); + ee.on('foo', listener4); + var rawListeners = ee.rawListeners('foo'); + assert.strictEqual(rawListeners.length, 2); + assert.strictEqual(rawListeners[0](), 0); + var rawListener = ee.rawListeners('foo'); + assert.strictEqual(rawListener.length, 1); + assert.strictEqual(rawListener[0](), 1); +} diff --git a/node_modules/events/tests/max-listeners.js b/node_modules/events/tests/max-listeners.js new file mode 100644 index 0000000000000..0b43953853252 --- /dev/null +++ b/node_modules/events/tests/max-listeners.js @@ -0,0 +1,47 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +var common = require('./common'); +var assert = require('assert'); +var events = require('../'); +var e = new events.EventEmitter(); + +var hasDefineProperty = !!Object.defineProperty; +try { Object.defineProperty({}, 'x', { value: 0 }); } catch (err) { hasDefineProperty = false } + +e.on('maxListeners', common.mustCall()); + +// Should not corrupt the 'maxListeners' queue. +e.setMaxListeners(42); + +var throwsObjs = [NaN, -1, 'and even this']; +var maxError = /^RangeError: The value of "n" is out of range\. It must be a non-negative number\./; +var defError = /^RangeError: The value of "defaultMaxListeners" is out of range\. It must be a non-negative number\./; + +for (var i = 0; i < throwsObjs.length; i++) { + var obj = throwsObjs[i]; + assert.throws(function() { e.setMaxListeners(obj); }, maxError); + if (hasDefineProperty) { + assert.throws(function() { events.defaultMaxListeners = obj; }, defError); + } +} + +e.emit('maxListeners'); diff --git a/node_modules/events/tests/method-names.js b/node_modules/events/tests/method-names.js new file mode 100644 index 0000000000000..364a161fece00 --- /dev/null +++ b/node_modules/events/tests/method-names.js @@ -0,0 +1,35 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +'use strict'; +require('./common'); +var assert = require('assert'); +var events = require('../'); + +var E = events.EventEmitter.prototype; +assert.strictEqual(E.constructor.name, 'EventEmitter'); +assert.strictEqual(E.on, E.addListener); // Same method. +assert.strictEqual(E.off, E.removeListener); // Same method. +Object.getOwnPropertyNames(E).forEach(function(name) { + if (name === 'constructor' || name === 'on' || name === 'off') return; + if (typeof E[name] !== 'function') return; + assert.strictEqual(E[name].name, name); +}); diff --git a/node_modules/events/tests/modify-in-emit.js b/node_modules/events/tests/modify-in-emit.js new file mode 100644 index 0000000000000..53fa63395c620 --- /dev/null +++ b/node_modules/events/tests/modify-in-emit.js @@ -0,0 +1,90 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +require('./common'); +var assert = require('assert'); +var events = require('../'); + +var callbacks_called = []; + +var e = new events.EventEmitter(); + +function callback1() { + callbacks_called.push('callback1'); + e.on('foo', callback2); + e.on('foo', callback3); + e.removeListener('foo', callback1); +} + +function callback2() { + callbacks_called.push('callback2'); + e.removeListener('foo', callback2); +} + +function callback3() { + callbacks_called.push('callback3'); + e.removeListener('foo', callback3); +} + +e.on('foo', callback1); +assert.strictEqual(e.listeners('foo').length, 1); + +e.emit('foo'); +assert.strictEqual(e.listeners('foo').length, 2); +assert.ok(Array.isArray(callbacks_called)); +assert.strictEqual(callbacks_called.length, 1); +assert.strictEqual(callbacks_called[0], 'callback1'); + +e.emit('foo'); +assert.strictEqual(e.listeners('foo').length, 0); +assert.ok(Array.isArray(callbacks_called)); +assert.strictEqual(callbacks_called.length, 3); +assert.strictEqual(callbacks_called[0], 'callback1'); +assert.strictEqual(callbacks_called[1], 'callback2'); +assert.strictEqual(callbacks_called[2], 'callback3'); + +e.emit('foo'); +assert.strictEqual(e.listeners('foo').length, 0); +assert.ok(Array.isArray(callbacks_called)); +assert.strictEqual(callbacks_called.length, 3); +assert.strictEqual(callbacks_called[0], 'callback1'); +assert.strictEqual(callbacks_called[1], 'callback2'); +assert.strictEqual(callbacks_called[2], 'callback3'); + +e.on('foo', callback1); +e.on('foo', callback2); +assert.strictEqual(e.listeners('foo').length, 2); +e.removeAllListeners('foo'); +assert.strictEqual(e.listeners('foo').length, 0); + +// Verify that removing callbacks while in emit allows emits to propagate to +// all listeners +callbacks_called = []; + +e.on('foo', callback2); +e.on('foo', callback3); +assert.strictEqual(2, e.listeners('foo').length); +e.emit('foo'); +assert.ok(Array.isArray(callbacks_called)); +assert.strictEqual(callbacks_called.length, 2); +assert.strictEqual(callbacks_called[0], 'callback2'); +assert.strictEqual(callbacks_called[1], 'callback3'); +assert.strictEqual(0, e.listeners('foo').length); diff --git a/node_modules/events/tests/num-args.js b/node_modules/events/tests/num-args.js new file mode 100644 index 0000000000000..c9b0deb9c960b --- /dev/null +++ b/node_modules/events/tests/num-args.js @@ -0,0 +1,60 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +require('./common'); +var assert = require('assert'); +var events = require('../'); + +var e = new events.EventEmitter(); +var num_args_emitted = []; + +e.on('numArgs', function() { + var numArgs = arguments.length; + num_args_emitted.push(numArgs); +}); + +e.on('foo', function() { + num_args_emitted.push(arguments.length); +}); + +e.on('foo', function() { + num_args_emitted.push(arguments.length); +}); + +e.emit('numArgs'); +e.emit('numArgs', null); +e.emit('numArgs', null, null); +e.emit('numArgs', null, null, null); +e.emit('numArgs', null, null, null, null); +e.emit('numArgs', null, null, null, null, null); + +e.emit('foo', null, null, null, null); + +assert.ok(Array.isArray(num_args_emitted)); +assert.strictEqual(num_args_emitted.length, 8); +assert.strictEqual(num_args_emitted[0], 0); +assert.strictEqual(num_args_emitted[1], 1); +assert.strictEqual(num_args_emitted[2], 2); +assert.strictEqual(num_args_emitted[3], 3); +assert.strictEqual(num_args_emitted[4], 4); +assert.strictEqual(num_args_emitted[5], 5); +assert.strictEqual(num_args_emitted[6], 4); +assert.strictEqual(num_args_emitted[6], 4); diff --git a/node_modules/events/tests/once.js b/node_modules/events/tests/once.js new file mode 100644 index 0000000000000..4b36c055e4e31 --- /dev/null +++ b/node_modules/events/tests/once.js @@ -0,0 +1,83 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +var common = require('./common'); +var assert = require('assert'); +var EventEmitter = require('../'); + +var e = new EventEmitter(); + +e.once('hello', common.mustCall()); + +e.emit('hello', 'a', 'b'); +e.emit('hello', 'a', 'b'); +e.emit('hello', 'a', 'b'); +e.emit('hello', 'a', 'b'); + +function remove() { + assert.fail('once->foo should not be emitted'); +} + +e.once('foo', remove); +e.removeListener('foo', remove); +e.emit('foo'); + +e.once('e', common.mustCall(function() { + e.emit('e'); +})); + +e.once('e', common.mustCall()); + +e.emit('e'); + +// Verify that the listener must be a function +assert.throws(function() { + var ee = new EventEmitter(); + + ee.once('foo', null); +}, /^TypeError: The "listener" argument must be of type Function. Received type object$/); + +{ + // once() has different code paths based on the number of arguments being + // emitted. Verify that all of the cases are covered. + var maxArgs = 4; + + for (var i = 0; i <= maxArgs; ++i) { + var ee = new EventEmitter(); + var args = ['foo']; + + for (var j = 0; j < i; ++j) + args.push(j); + + ee.once('foo', common.mustCall(function() { + var params = Array.prototype.slice.call(arguments); + var restArgs = args.slice(1); + assert.ok(Array.isArray(params)); + assert.strictEqual(params.length, restArgs.length); + for (var index = 0; index < params.length; index++) { + var param = params[index]; + assert.strictEqual(param, restArgs[index]); + } + })); + + EventEmitter.prototype.emit.apply(ee, args); + } +} diff --git a/node_modules/events/tests/prepend.js b/node_modules/events/tests/prepend.js new file mode 100644 index 0000000000000..79afde0bf3971 --- /dev/null +++ b/node_modules/events/tests/prepend.js @@ -0,0 +1,31 @@ +'use strict'; + +var common = require('./common'); +var EventEmitter = require('../'); +var assert = require('assert'); + +var myEE = new EventEmitter(); +var m = 0; +// This one comes last. +myEE.on('foo', common.mustCall(function () { + assert.strictEqual(m, 2); +})); + +// This one comes second. +myEE.prependListener('foo', common.mustCall(function () { + assert.strictEqual(m++, 1); +})); + +// This one comes first. +myEE.prependOnceListener('foo', + common.mustCall(function () { + assert.strictEqual(m++, 0); + })); + +myEE.emit('foo'); + +// Verify that the listener must be a function +assert.throws(function () { + var ee = new EventEmitter(); + ee.prependOnceListener('foo', null); +}, 'TypeError: The "listener" argument must be of type Function. Received type object'); diff --git a/node_modules/events/tests/remove-all-listeners.js b/node_modules/events/tests/remove-all-listeners.js new file mode 100644 index 0000000000000..622941cfa604c --- /dev/null +++ b/node_modules/events/tests/remove-all-listeners.js @@ -0,0 +1,133 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +var common = require('./common'); +var assert = require('assert'); +var events = require('../'); +var test = require('tape'); + +function expect(expected) { + var actual = []; + test.onFinish(function() { + var sortedActual = actual.sort(); + var sortedExpected = expected.sort(); + assert.strictEqual(sortedActual.length, sortedExpected.length); + for (var index = 0; index < sortedActual.length; index++) { + var value = sortedActual[index]; + assert.strictEqual(value, sortedExpected[index]); + } + }); + function listener(name) { + actual.push(name); + } + return common.mustCall(listener, expected.length); +} + +{ + var ee = new events.EventEmitter(); + var noop = common.mustNotCall(); + ee.on('foo', noop); + ee.on('bar', noop); + ee.on('baz', noop); + ee.on('baz', noop); + var fooListeners = ee.listeners('foo'); + var barListeners = ee.listeners('bar'); + var bazListeners = ee.listeners('baz'); + ee.on('removeListener', expect(['bar', 'baz', 'baz'])); + ee.removeAllListeners('bar'); + ee.removeAllListeners('baz'); + + var listeners = ee.listeners('foo'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 1); + assert.strictEqual(listeners[0], noop); + + listeners = ee.listeners('bar'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); + listeners = ee.listeners('baz'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); + // After calling removeAllListeners(), + // the old listeners array should stay unchanged. + assert.strictEqual(fooListeners.length, 1); + assert.strictEqual(fooListeners[0], noop); + assert.strictEqual(barListeners.length, 1); + assert.strictEqual(barListeners[0], noop); + assert.strictEqual(bazListeners.length, 2); + assert.strictEqual(bazListeners[0], noop); + assert.strictEqual(bazListeners[1], noop); + // After calling removeAllListeners(), + // new listeners arrays is different from the old. + assert.notStrictEqual(ee.listeners('bar'), barListeners); + assert.notStrictEqual(ee.listeners('baz'), bazListeners); +} + +{ + var ee = new events.EventEmitter(); + ee.on('foo', common.mustNotCall()); + ee.on('bar', common.mustNotCall()); + // Expect LIFO order + ee.on('removeListener', expect(['foo', 'bar', 'removeListener'])); + ee.on('removeListener', expect(['foo', 'bar'])); + ee.removeAllListeners(); + + var listeners = ee.listeners('foo'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); + listeners = ee.listeners('bar'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); +} + +{ + var ee = new events.EventEmitter(); + ee.on('removeListener', common.mustNotCall()); + // Check for regression where removeAllListeners() throws when + // there exists a 'removeListener' listener, but there exists + // no listeners for the provided event type. + assert.doesNotThrow(function () { ee.removeAllListeners(ee, 'foo') }); +} + +{ + var ee = new events.EventEmitter(); + var expectLength = 2; + ee.on('removeListener', function() { + assert.strictEqual(expectLength--, this.listeners('baz').length); + }); + ee.on('baz', common.mustNotCall()); + ee.on('baz', common.mustNotCall()); + ee.on('baz', common.mustNotCall()); + assert.strictEqual(ee.listeners('baz').length, expectLength + 1); + ee.removeAllListeners('baz'); + assert.strictEqual(ee.listeners('baz').length, 0); +} + +{ + var ee = new events.EventEmitter(); + assert.strictEqual(ee, ee.removeAllListeners()); +} + +{ + var ee = new events.EventEmitter(); + ee._events = undefined; + assert.strictEqual(ee, ee.removeAllListeners()); +} diff --git a/node_modules/events/tests/remove-listeners.js b/node_modules/events/tests/remove-listeners.js new file mode 100644 index 0000000000000..18e4d1651fa25 --- /dev/null +++ b/node_modules/events/tests/remove-listeners.js @@ -0,0 +1,212 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +var common = require('./common'); +var assert = require('assert'); +var EventEmitter = require('../'); + +var listener1 = function listener1() {}; +var listener2 = function listener2() {}; + +{ + var ee = new EventEmitter(); + ee.on('hello', listener1); + ee.on('removeListener', common.mustCall(function(name, cb) { + assert.strictEqual(name, 'hello'); + assert.strictEqual(cb, listener1); + })); + ee.removeListener('hello', listener1); + var listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); +} + +{ + var ee = new EventEmitter(); + ee.on('hello', listener1); + ee.on('removeListener', common.mustNotCall()); + ee.removeListener('hello', listener2); + + var listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 1); + assert.strictEqual(listeners[0], listener1); +} + +{ + var ee = new EventEmitter(); + ee.on('hello', listener1); + ee.on('hello', listener2); + + var listeners; + ee.once('removeListener', common.mustCall(function(name, cb) { + assert.strictEqual(name, 'hello'); + assert.strictEqual(cb, listener1); + listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 1); + assert.strictEqual(listeners[0], listener2); + })); + ee.removeListener('hello', listener1); + listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 1); + assert.strictEqual(listeners[0], listener2); + ee.once('removeListener', common.mustCall(function(name, cb) { + assert.strictEqual(name, 'hello'); + assert.strictEqual(cb, listener2); + listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); + })); + ee.removeListener('hello', listener2); + listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); +} + +{ + var ee = new EventEmitter(); + + function remove1() { + assert.fail('remove1 should not have been called'); + } + + function remove2() { + assert.fail('remove2 should not have been called'); + } + + ee.on('removeListener', common.mustCall(function(name, cb) { + if (cb !== remove1) return; + this.removeListener('quux', remove2); + this.emit('quux'); + }, 2)); + ee.on('quux', remove1); + ee.on('quux', remove2); + ee.removeListener('quux', remove1); +} + +{ + var ee = new EventEmitter(); + ee.on('hello', listener1); + ee.on('hello', listener2); + + var listeners; + ee.once('removeListener', common.mustCall(function(name, cb) { + assert.strictEqual(name, 'hello'); + assert.strictEqual(cb, listener1); + listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 1); + assert.strictEqual(listeners[0], listener2); + ee.once('removeListener', common.mustCall(function(name, cb) { + assert.strictEqual(name, 'hello'); + assert.strictEqual(cb, listener2); + listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); + })); + ee.removeListener('hello', listener2); + listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); + })); + ee.removeListener('hello', listener1); + listeners = ee.listeners('hello'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 0); +} + +{ + var ee = new EventEmitter(); + var listener3 = common.mustCall(function() { + ee.removeListener('hello', listener4); + }, 2); + var listener4 = common.mustCall(); + + ee.on('hello', listener3); + ee.on('hello', listener4); + + // listener4 will still be called although it is removed by listener 3. + ee.emit('hello'); + // This is so because the interal listener array at time of emit + // was [listener3,listener4] + + // Interal listener array [listener3] + ee.emit('hello'); +} + +{ + var ee = new EventEmitter(); + + ee.once('hello', listener1); + ee.on('removeListener', common.mustCall(function(eventName, listener) { + assert.strictEqual(eventName, 'hello'); + assert.strictEqual(listener, listener1); + })); + ee.emit('hello'); +} + +{ + var ee = new EventEmitter(); + + assert.strictEqual(ee, ee.removeListener('foo', function() {})); +} + +// Verify that the removed listener must be a function +assert.throws(function() { + var ee = new EventEmitter(); + + ee.removeListener('foo', null); +}, /^TypeError: The "listener" argument must be of type Function\. Received type object$/); + +{ + var ee = new EventEmitter(); + var listener = function() {}; + ee._events = undefined; + var e = ee.removeListener('foo', listener); + assert.strictEqual(e, ee); +} + +{ + var ee = new EventEmitter(); + + ee.on('foo', listener1); + ee.on('foo', listener2); + var listeners = ee.listeners('foo'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 2); + assert.strictEqual(listeners[0], listener1); + assert.strictEqual(listeners[1], listener2); + + ee.removeListener('foo', listener1); + assert.strictEqual(ee._events.foo, listener2); + + ee.on('foo', listener1); + listeners = ee.listeners('foo'); + assert.ok(Array.isArray(listeners)); + assert.strictEqual(listeners.length, 2); + assert.strictEqual(listeners[0], listener2); + assert.strictEqual(listeners[1], listener1); + + ee.removeListener('foo', listener1); + assert.strictEqual(ee._events.foo, listener2); +} diff --git a/node_modules/events/tests/set-max-listeners-side-effects.js b/node_modules/events/tests/set-max-listeners-side-effects.js new file mode 100644 index 0000000000000..13dbb671e9024 --- /dev/null +++ b/node_modules/events/tests/set-max-listeners-side-effects.js @@ -0,0 +1,31 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +require('./common'); +var assert = require('assert'); +var events = require('../'); + +var e = new events.EventEmitter(); + +if (Object.create) assert.ok(!(e._events instanceof Object)); +assert.strictEqual(Object.keys(e._events).length, 0); +e.setMaxListeners(5); +assert.strictEqual(Object.keys(e._events).length, 0); diff --git a/node_modules/events/tests/special-event-names.js b/node_modules/events/tests/special-event-names.js new file mode 100644 index 0000000000000..a2f0b744a706c --- /dev/null +++ b/node_modules/events/tests/special-event-names.js @@ -0,0 +1,45 @@ +'use strict'; + +var common = require('./common'); +var EventEmitter = require('../'); +var assert = require('assert'); + +var ee = new EventEmitter(); +var handler = function() {}; + +assert.strictEqual(ee.eventNames().length, 0); + +assert.strictEqual(ee._events.hasOwnProperty, undefined); +assert.strictEqual(ee._events.toString, undefined); + +ee.on('__defineGetter__', handler); +ee.on('toString', handler); +ee.on('__proto__', handler); + +assert.strictEqual(ee.eventNames()[0], '__defineGetter__'); +assert.strictEqual(ee.eventNames()[1], 'toString'); + +assert.strictEqual(ee.listeners('__defineGetter__').length, 1); +assert.strictEqual(ee.listeners('__defineGetter__')[0], handler); +assert.strictEqual(ee.listeners('toString').length, 1); +assert.strictEqual(ee.listeners('toString')[0], handler); + +// Only run __proto__ tests if that property can actually be set +if ({ __proto__: 'ok' }.__proto__ === 'ok') { + assert.strictEqual(ee.eventNames().length, 3); + assert.strictEqual(ee.eventNames()[2], '__proto__'); + assert.strictEqual(ee.listeners('__proto__').length, 1); + assert.strictEqual(ee.listeners('__proto__')[0], handler); + + ee.on('__proto__', common.mustCall(function(val) { + assert.strictEqual(val, 1); + })); + ee.emit('__proto__', 1); + + process.on('__proto__', common.mustCall(function(val) { + assert.strictEqual(val, 1); + })); + process.emit('__proto__', 1); +} else { + console.log('# skipped __proto__') +} diff --git a/node_modules/events/tests/subclass.js b/node_modules/events/tests/subclass.js new file mode 100644 index 0000000000000..bd033fff4d266 --- /dev/null +++ b/node_modules/events/tests/subclass.js @@ -0,0 +1,66 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +var common = require('./common'); +var test = require('tape'); +var assert = require('assert'); +var EventEmitter = require('../').EventEmitter; +var util = require('util'); + +util.inherits(MyEE, EventEmitter); + +function MyEE(cb) { + this.once(1, cb); + this.emit(1); + this.removeAllListeners(); + EventEmitter.call(this); +} + +var myee = new MyEE(common.mustCall()); + + +util.inherits(ErrorEE, EventEmitter); +function ErrorEE() { + this.emit('error', new Error('blerg')); +} + +assert.throws(function() { + new ErrorEE(); +}, /blerg/); + +test.onFinish(function() { + assert.ok(!(myee._events instanceof Object)); + assert.strictEqual(Object.keys(myee._events).length, 0); +}); + + +function MyEE2() { + EventEmitter.call(this); +} + +MyEE2.prototype = new EventEmitter(); + +var ee1 = new MyEE2(); +var ee2 = new MyEE2(); + +ee1.on('x', function() {}); + +assert.strictEqual(ee2.listenerCount('x'), 0); diff --git a/node_modules/events/tests/symbols.js b/node_modules/events/tests/symbols.js new file mode 100644 index 0000000000000..0721f0ec0b5d6 --- /dev/null +++ b/node_modules/events/tests/symbols.js @@ -0,0 +1,25 @@ +'use strict'; + +var common = require('./common'); +var EventEmitter = require('../'); +var assert = require('assert'); + +var ee = new EventEmitter(); +var foo = Symbol('foo'); +var listener = common.mustCall(); + +ee.on(foo, listener); +assert.strictEqual(ee.listeners(foo).length, 1); +assert.strictEqual(ee.listeners(foo)[0], listener); + +ee.emit(foo); + +ee.removeAllListeners(); +assert.strictEqual(ee.listeners(foo).length, 0); + +ee.on(foo, listener); +assert.strictEqual(ee.listeners(foo).length, 1); +assert.strictEqual(ee.listeners(foo)[0], listener); + +ee.removeListener(foo, listener); +assert.strictEqual(ee.listeners(foo).length, 0); diff --git a/node_modules/gauge/package.json b/node_modules/gauge/package.json index bce3e68a33f69..9e62510298b55 100644 --- a/node_modules/gauge/package.json +++ b/node_modules/gauge/package.json @@ -1,6 +1,6 @@ { "name": "gauge", - "version": "4.0.4", + "version": "5.0.0", "description": "A terminal based horizontal gauge", "main": "lib", "scripts": { @@ -8,9 +8,6 @@ "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", "lintfix": "npm run lint -- --fix", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "snap": "tap", "posttest": "npm run lint", "template-oss-apply": "template-oss-apply --force" @@ -42,8 +39,8 @@ }, "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.2.0", - "readable-stream": "^3.6.0", + "@npmcli/template-oss": "4.5.1", + "readable-stream": "^4.0.0", "tap": "^16.0.1" }, "files": [ @@ -51,16 +48,20 @@ "lib/" ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "tap": { "branches": 79, "statements": 89, "functions": 92, - "lines": 90 + "lines": 90, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.2.0" + "version": "4.5.1" } } diff --git a/node_modules/hosted-git-info/lib/from-url.js b/node_modules/hosted-git-info/lib/from-url.js new file mode 100644 index 0000000000000..b3e519e1f0751 --- /dev/null +++ b/node_modules/hosted-git-info/lib/from-url.js @@ -0,0 +1,196 @@ +'use strict' + +const url = require('url') + +const safeUrl = (u) => { + try { + return new url.URL(u) + } catch { + // this fn should never throw + } +} + +const lastIndexOfBefore = (str, char, beforeChar) => { + const startPosition = str.indexOf(beforeChar) + return str.lastIndexOf(char, startPosition > -1 ? startPosition : Infinity) +} + +// accepts input like git:github.com:user/repo and inserts the // after the first : +const correctProtocol = (arg, protocols) => { + const firstColon = arg.indexOf(':') + const proto = arg.slice(0, firstColon + 1) + if (Object.prototype.hasOwnProperty.call(protocols, proto)) { + return arg + } + + const firstAt = arg.indexOf('@') + if (firstAt > -1) { + if (firstAt > firstColon) { + return `git+ssh://${arg}` + } else { + return arg + } + } + + const doubleSlash = arg.indexOf('//') + if (doubleSlash === firstColon + 1) { + return arg + } + + return `${arg.slice(0, firstColon + 1)}//${arg.slice(firstColon + 1)}` +} + +// look for github shorthand inputs, such as npm/cli +const isGitHubShorthand = (arg) => { + // it cannot contain whitespace before the first # + // it cannot start with a / because that's probably an absolute file path + // but it must include a slash since repos are username/repository + // it cannot start with a . because that's probably a relative file path + // it cannot start with an @ because that's a scoped package if it passes the other tests + // it cannot contain a : before a # because that tells us that there's a protocol + // a second / may not exist before a # + const firstHash = arg.indexOf('#') + const firstSlash = arg.indexOf('/') + const secondSlash = arg.indexOf('/', firstSlash + 1) + const firstColon = arg.indexOf(':') + const firstSpace = /\s/.exec(arg) + const firstAt = arg.indexOf('@') + + const spaceOnlyAfterHash = !firstSpace || (firstHash > -1 && firstSpace.index > firstHash) + const atOnlyAfterHash = firstAt === -1 || (firstHash > -1 && firstAt > firstHash) + const colonOnlyAfterHash = firstColon === -1 || (firstHash > -1 && firstColon > firstHash) + const secondSlashOnlyAfterHash = secondSlash === -1 || (firstHash > -1 && secondSlash > firstHash) + const hasSlash = firstSlash > 0 + // if a # is found, what we really want to know is that the character + // immediately before # is not a / + const doesNotEndWithSlash = firstHash > -1 ? arg[firstHash - 1] !== '/' : !arg.endsWith('/') + const doesNotStartWithDot = !arg.startsWith('.') + + return spaceOnlyAfterHash && hasSlash && doesNotEndWithSlash && + doesNotStartWithDot && atOnlyAfterHash && colonOnlyAfterHash && + secondSlashOnlyAfterHash +} + +// attempt to correct an scp style url so that it will parse with `new URL()` +const correctUrl = (giturl) => { + // ignore @ that come after the first hash since the denotes the start + // of a committish which can contain @ characters + const firstAt = lastIndexOfBefore(giturl, '@', '#') + // ignore colons that come after the hash since that could include colons such as: + // git@github.com:user/package-2#semver:^1.0.0 + const lastColonBeforeHash = lastIndexOfBefore(giturl, ':', '#') + + if (lastColonBeforeHash > firstAt) { + // the last : comes after the first @ (or there is no @) + // like it would in: + // proto://hostname.com:user/repo + // username@hostname.com:user/repo + // :password@hostname.com:user/repo + // username:password@hostname.com:user/repo + // proto://username@hostname.com:user/repo + // proto://:password@hostname.com:user/repo + // proto://username:password@hostname.com:user/repo + // then we replace the last : with a / to create a valid path + giturl = giturl.slice(0, lastColonBeforeHash) + '/' + giturl.slice(lastColonBeforeHash + 1) + } + + if (lastIndexOfBefore(giturl, ':', '#') === -1 && giturl.indexOf('//') === -1) { + // we have no : at all + // as it would be in: + // username@hostname.com/user/repo + // then we prepend a protocol + giturl = `git+ssh://${giturl}` + } + + return giturl +} + +module.exports = (giturl, opts, { gitHosts, protocols }) => { + if (!giturl) { + return + } + + const correctedUrl = isGitHubShorthand(giturl) + ? `github:${giturl}` + : correctProtocol(giturl, protocols) + const parsed = safeUrl(correctedUrl) || safeUrl(correctUrl(correctedUrl)) + if (!parsed) { + return + } + + const gitHostShortcut = gitHosts.byShortcut[parsed.protocol] + const gitHostDomain = gitHosts.byDomain[parsed.hostname.startsWith('www.') + ? parsed.hostname.slice(4) + : parsed.hostname] + const gitHostName = gitHostShortcut || gitHostDomain + if (!gitHostName) { + return + } + + const gitHostInfo = gitHosts[gitHostShortcut || gitHostDomain] + let auth = null + if (protocols[parsed.protocol]?.auth && (parsed.username || parsed.password)) { + auth = `${parsed.username}${parsed.password ? ':' + parsed.password : ''}` + } + + let committish = null + let user = null + let project = null + let defaultRepresentation = null + + try { + if (gitHostShortcut) { + let pathname = parsed.pathname.startsWith('/') ? parsed.pathname.slice(1) : parsed.pathname + const firstAt = pathname.indexOf('@') + // we ignore auth for shortcuts, so just trim it out + if (firstAt > -1) { + pathname = pathname.slice(firstAt + 1) + } + + const lastSlash = pathname.lastIndexOf('/') + if (lastSlash > -1) { + user = decodeURIComponent(pathname.slice(0, lastSlash)) + // we want nulls only, never empty strings + if (!user) { + user = null + } + project = decodeURIComponent(pathname.slice(lastSlash + 1)) + } else { + project = decodeURIComponent(pathname) + } + + if (project.endsWith('.git')) { + project = project.slice(0, -4) + } + + if (parsed.hash) { + committish = decodeURIComponent(parsed.hash.slice(1)) + } + + defaultRepresentation = 'shortcut' + } else { + if (!gitHostInfo.protocols.includes(parsed.protocol)) { + return + } + + const segments = gitHostInfo.extract(parsed) + if (!segments) { + return + } + + user = segments.user && decodeURIComponent(segments.user) + project = decodeURIComponent(segments.project) + committish = decodeURIComponent(segments.committish) + defaultRepresentation = protocols[parsed.protocol]?.name || parsed.protocol.slice(0, -1) + } + } catch (err) { + /* istanbul ignore else */ + if (err instanceof URIError) { + return + } else { + throw err + } + } + + return [gitHostName, user, auth, project, committish, defaultRepresentation, opts] +} diff --git a/node_modules/hosted-git-info/lib/git-host-info.js b/node_modules/hosted-git-info/lib/git-host-info.js deleted file mode 100644 index cdc1e4601acff..0000000000000 --- a/node_modules/hosted-git-info/lib/git-host-info.js +++ /dev/null @@ -1,192 +0,0 @@ -/* eslint-disable max-len */ -'use strict' -const maybeJoin = (...args) => args.every(arg => arg) ? args.join('') : '' -const maybeEncode = (arg) => arg ? encodeURIComponent(arg) : '' - -const defaults = { - sshtemplate: ({ domain, user, project, committish }) => `git@${domain}:${user}/${project}.git${maybeJoin('#', committish)}`, - sshurltemplate: ({ domain, user, project, committish }) => `git+ssh://git@${domain}/${user}/${project}.git${maybeJoin('#', committish)}`, - edittemplate: ({ domain, user, project, committish, editpath, path }) => `https://${domain}/${user}/${project}${maybeJoin('/', editpath, '/', maybeEncode(committish || 'master'), '/', path)}`, - browsetemplate: ({ domain, user, project, committish, treepath }) => `https://${domain}/${user}/${project}${maybeJoin('/', treepath, '/', maybeEncode(committish))}`, - browsefiletemplate: ({ domain, user, project, committish, treepath, path, fragment, hashformat }) => `https://${domain}/${user}/${project}/${treepath}/${maybeEncode(committish || 'master')}/${path}${maybeJoin('#', hashformat(fragment || ''))}`, - docstemplate: ({ domain, user, project, treepath, committish }) => `https://${domain}/${user}/${project}${maybeJoin('/', treepath, '/', maybeEncode(committish))}#readme`, - httpstemplate: ({ auth, domain, user, project, committish }) => `git+https://${maybeJoin(auth, '@')}${domain}/${user}/${project}.git${maybeJoin('#', committish)}`, - filetemplate: ({ domain, user, project, committish, path }) => `https://${domain}/${user}/${project}/raw/${maybeEncode(committish) || 'master'}/${path}`, - shortcuttemplate: ({ type, user, project, committish }) => `${type}:${user}/${project}${maybeJoin('#', committish)}`, - pathtemplate: ({ user, project, committish }) => `${user}/${project}${maybeJoin('#', committish)}`, - bugstemplate: ({ domain, user, project }) => `https://${domain}/${user}/${project}/issues`, - hashformat: formatHashFragment, -} - -const gitHosts = {} -gitHosts.github = Object.assign({}, defaults, { - // First two are insecure and generally shouldn't be used any more, but - // they are still supported. - protocols: ['git:', 'http:', 'git+ssh:', 'git+https:', 'ssh:', 'https:'], - domain: 'github.com', - treepath: 'tree', - editpath: 'edit', - filetemplate: ({ auth, user, project, committish, path }) => `https://${maybeJoin(auth, '@')}raw.githubusercontent.com/${user}/${project}/${maybeEncode(committish) || 'master'}/${path}`, - gittemplate: ({ auth, domain, user, project, committish }) => `git://${maybeJoin(auth, '@')}${domain}/${user}/${project}.git${maybeJoin('#', committish)}`, - tarballtemplate: ({ domain, user, project, committish }) => `https://codeload.${domain}/${user}/${project}/tar.gz/${maybeEncode(committish) || 'master'}`, - extract: (url) => { - let [, user, project, type, committish] = url.pathname.split('/', 5) - if (type && type !== 'tree') { - return - } - - if (!type) { - committish = url.hash.slice(1) - } - - if (project && project.endsWith('.git')) { - project = project.slice(0, -4) - } - - if (!user || !project) { - return - } - - return { user, project, committish } - }, -}) - -gitHosts.bitbucket = Object.assign({}, defaults, { - protocols: ['git+ssh:', 'git+https:', 'ssh:', 'https:'], - domain: 'bitbucket.org', - treepath: 'src', - editpath: '?mode=edit', - edittemplate: ({ domain, user, project, committish, treepath, path, editpath }) => `https://${domain}/${user}/${project}${maybeJoin('/', treepath, '/', maybeEncode(committish || 'master'), '/', path, editpath)}`, - tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/get/${maybeEncode(committish) || 'master'}.tar.gz`, - extract: (url) => { - let [, user, project, aux] = url.pathname.split('/', 4) - if (['get'].includes(aux)) { - return - } - - if (project && project.endsWith('.git')) { - project = project.slice(0, -4) - } - - if (!user || !project) { - return - } - - return { user, project, committish: url.hash.slice(1) } - }, -}) - -gitHosts.gitlab = Object.assign({}, defaults, { - protocols: ['git+ssh:', 'git+https:', 'ssh:', 'https:'], - domain: 'gitlab.com', - treepath: 'tree', - editpath: '-/edit', - httpstemplate: ({ auth, domain, user, project, committish }) => `git+https://${maybeJoin(auth, '@')}${domain}/${user}/${project}.git${maybeJoin('#', committish)}`, - tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/repository/archive.tar.gz?ref=${maybeEncode(committish) || 'master'}`, - extract: (url) => { - const path = url.pathname.slice(1) - if (path.includes('/-/') || path.includes('/archive.tar.gz')) { - return - } - - const segments = path.split('/') - let project = segments.pop() - if (project.endsWith('.git')) { - project = project.slice(0, -4) - } - - const user = segments.join('/') - if (!user || !project) { - return - } - - return { user, project, committish: url.hash.slice(1) } - }, -}) - -gitHosts.gist = Object.assign({}, defaults, { - protocols: ['git:', 'git+ssh:', 'git+https:', 'ssh:', 'https:'], - domain: 'gist.github.com', - editpath: 'edit', - sshtemplate: ({ domain, project, committish }) => `git@${domain}:${project}.git${maybeJoin('#', committish)}`, - sshurltemplate: ({ domain, project, committish }) => `git+ssh://git@${domain}/${project}.git${maybeJoin('#', committish)}`, - edittemplate: ({ domain, user, project, committish, editpath }) => `https://${domain}/${user}/${project}${maybeJoin('/', maybeEncode(committish))}/${editpath}`, - browsetemplate: ({ domain, project, committish }) => `https://${domain}/${project}${maybeJoin('/', maybeEncode(committish))}`, - browsefiletemplate: ({ domain, project, committish, path, hashformat }) => `https://${domain}/${project}${maybeJoin('/', maybeEncode(committish))}${maybeJoin('#', hashformat(path))}`, - docstemplate: ({ domain, project, committish }) => `https://${domain}/${project}${maybeJoin('/', maybeEncode(committish))}`, - httpstemplate: ({ domain, project, committish }) => `git+https://${domain}/${project}.git${maybeJoin('#', committish)}`, - filetemplate: ({ user, project, committish, path }) => `https://gist.githubusercontent.com/${user}/${project}/raw${maybeJoin('/', maybeEncode(committish))}/${path}`, - shortcuttemplate: ({ type, project, committish }) => `${type}:${project}${maybeJoin('#', committish)}`, - pathtemplate: ({ project, committish }) => `${project}${maybeJoin('#', committish)}`, - bugstemplate: ({ domain, project }) => `https://${domain}/${project}`, - gittemplate: ({ domain, project, committish }) => `git://${domain}/${project}.git${maybeJoin('#', committish)}`, - tarballtemplate: ({ project, committish }) => `https://codeload.github.com/gist/${project}/tar.gz/${maybeEncode(committish) || 'master'}`, - extract: (url) => { - let [, user, project, aux] = url.pathname.split('/', 4) - if (aux === 'raw') { - return - } - - if (!project) { - if (!user) { - return - } - - project = user - user = null - } - - if (project.endsWith('.git')) { - project = project.slice(0, -4) - } - - return { user, project, committish: url.hash.slice(1) } - }, - hashformat: function (fragment) { - return fragment && 'file-' + formatHashFragment(fragment) - }, -}) - -gitHosts.sourcehut = Object.assign({}, defaults, { - protocols: ['git+ssh:', 'https:'], - domain: 'git.sr.ht', - treepath: 'tree', - browsefiletemplate: ({ domain, user, project, committish, treepath, path, fragment, hashformat }) => `https://${domain}/${user}/${project}/${treepath}/${maybeEncode(committish || 'main')}/${path}${maybeJoin('#', hashformat(fragment || ''))}`, - filetemplate: ({ domain, user, project, committish, path }) => `https://${domain}/${user}/${project}/blob/${maybeEncode(committish) || 'main'}/${path}`, - httpstemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}.git${maybeJoin('#', committish)}`, - tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/archive/${maybeEncode(committish) || 'main'}.tar.gz`, - bugstemplate: ({ domain, user, project }) => `https://todo.sr.ht/${user}/${project}`, - docstemplate: ({ domain, user, project, treepath, committish }) => `https://${domain}/${user}/${project}${maybeJoin('/', treepath, '/', maybeEncode(committish))}#readme`, - extract: (url) => { - let [, user, project, aux] = url.pathname.split('/', 4) - - // tarball url - if (['archive'].includes(aux)) { - return - } - - if (project && project.endsWith('.git')) { - project = project.slice(0, -4) - } - - if (!user || !project) { - return - } - - return { user, project, committish: url.hash.slice(1) } - }, -}) - -const names = Object.keys(gitHosts) -gitHosts.byShortcut = {} -gitHosts.byDomain = {} -for (const name of names) { - gitHosts.byShortcut[`${name}:`] = name - gitHosts.byDomain[gitHosts[name].domain] = name -} - -function formatHashFragment (fragment) { - return fragment.toLowerCase().replace(/^\W+|\/|\W+$/g, '').replace(/\W+/g, '-') -} - -module.exports = gitHosts diff --git a/node_modules/hosted-git-info/lib/git-host.js b/node_modules/hosted-git-info/lib/git-host.js deleted file mode 100644 index bb65d4d992aa7..0000000000000 --- a/node_modules/hosted-git-info/lib/git-host.js +++ /dev/null @@ -1,114 +0,0 @@ -'use strict' -const gitHosts = require('./git-host-info.js') - -class GitHost { - constructor (type, user, auth, project, committish, defaultRepresentation, opts = {}) { - Object.assign(this, gitHosts[type]) - this.type = type - this.user = user - this.auth = auth - this.project = project - this.committish = committish - this.default = defaultRepresentation - this.opts = opts - } - - hash () { - return this.committish ? `#${this.committish}` : '' - } - - ssh (opts) { - return this._fill(this.sshtemplate, opts) - } - - _fill (template, opts) { - if (typeof template === 'function') { - const options = { ...this, ...this.opts, ...opts } - - // the path should always be set so we don't end up with 'undefined' in urls - if (!options.path) { - options.path = '' - } - - // template functions will insert the leading slash themselves - if (options.path.startsWith('/')) { - options.path = options.path.slice(1) - } - - if (options.noCommittish) { - options.committish = null - } - - const result = template(options) - return options.noGitPlus && result.startsWith('git+') ? result.slice(4) : result - } - - return null - } - - sshurl (opts) { - return this._fill(this.sshurltemplate, opts) - } - - browse (path, fragment, opts) { - // not a string, treat path as opts - if (typeof path !== 'string') { - return this._fill(this.browsetemplate, path) - } - - if (typeof fragment !== 'string') { - opts = fragment - fragment = null - } - return this._fill(this.browsefiletemplate, { ...opts, fragment, path }) - } - - docs (opts) { - return this._fill(this.docstemplate, opts) - } - - bugs (opts) { - return this._fill(this.bugstemplate, opts) - } - - https (opts) { - return this._fill(this.httpstemplate, opts) - } - - git (opts) { - return this._fill(this.gittemplate, opts) - } - - shortcut (opts) { - return this._fill(this.shortcuttemplate, opts) - } - - path (opts) { - return this._fill(this.pathtemplate, opts) - } - - tarball (opts) { - return this._fill(this.tarballtemplate, { ...opts, noCommittish: false }) - } - - file (path, opts) { - return this._fill(this.filetemplate, { ...opts, path }) - } - - edit (path, opts) { - return this._fill(this.edittemplate, { ...opts, path }) - } - - getDefaultRepresentation () { - return this.default - } - - toString (opts) { - if (this.default && typeof this[this.default] === 'function') { - return this[this.default](opts) - } - - return this.sshurl(https://github.com/opts) - } -} -module.exports = GitHost diff --git a/node_modules/hosted-git-info/lib/hosts.js b/node_modules/hosted-git-info/lib/hosts.js new file mode 100644 index 0000000000000..013712b7842c8 --- /dev/null +++ b/node_modules/hosted-git-info/lib/hosts.js @@ -0,0 +1,228 @@ +/* eslint-disable max-len */ + +'use strict' + +const maybeJoin = (...args) => args.every(arg => arg) ? args.join('') : '' +const maybeEncode = (arg) => arg ? encodeURIComponent(arg) : '' +const formatHashFragment = (f) => f.toLowerCase().replace(/^\W+|\/|\W+$/g, '').replace(/\W+/g, '-') + +const defaults = { + sshtemplate: ({ domain, user, project, committish }) => + `git@${domain}:${user}/${project}.git${maybeJoin('#', committish)}`, + sshurltemplate: ({ domain, user, project, committish }) => + `git+ssh://git@${domain}/${user}/${project}.git${maybeJoin('#', committish)}`, + edittemplate: ({ domain, user, project, committish, editpath, path }) => + `https://${domain}/${user}/${project}${maybeJoin('/', editpath, '/', maybeEncode(committish || 'HEAD'), '/', path)}`, + browsetemplate: ({ domain, user, project, committish, treepath }) => + `https://${domain}/${user}/${project}${maybeJoin('/', treepath, '/', maybeEncode(committish))}`, + browsetreetemplate: ({ domain, user, project, committish, treepath, path, fragment, hashformat }) => + `https://${domain}/${user}/${project}/${treepath}/${maybeEncode(committish || 'HEAD')}/${path}${maybeJoin('#', hashformat(fragment || ''))}`, + browseblobtemplate: ({ domain, user, project, committish, blobpath, path, fragment, hashformat }) => + `https://${domain}/${user}/${project}/${blobpath}/${maybeEncode(committish || 'HEAD')}/${path}${maybeJoin('#', hashformat(fragment || ''))}`, + docstemplate: ({ domain, user, project, treepath, committish }) => + `https://${domain}/${user}/${project}${maybeJoin('/', treepath, '/', maybeEncode(committish))}#readme`, + httpstemplate: ({ auth, domain, user, project, committish }) => + `git+https://${maybeJoin(auth, '@')}${domain}/${user}/${project}.git${maybeJoin('#', committish)}`, + filetemplate: ({ domain, user, project, committish, path }) => + `https://${domain}/${user}/${project}/raw/${maybeEncode(committish || 'HEAD')}/${path}`, + shortcuttemplate: ({ type, user, project, committish }) => + `${type}:${user}/${project}${maybeJoin('#', committish)}`, + pathtemplate: ({ user, project, committish }) => + `${user}/${project}${maybeJoin('#', committish)}`, + bugstemplate: ({ domain, user, project }) => + `https://${domain}/${user}/${project}/issues`, + hashformat: formatHashFragment, +} + +const hosts = {} +hosts.github = { + // First two are insecure and generally shouldn't be used any more, but + // they are still supported. + protocols: ['git:', 'http:', 'git+ssh:', 'git+https:', 'ssh:', 'https:'], + domain: 'github.com', + treepath: 'tree', + blobpath: 'blob', + editpath: 'edit', + filetemplate: ({ auth, user, project, committish, path }) => + `https://${maybeJoin(auth, '@')}raw.githubusercontent.com/${user}/${project}/${maybeEncode(committish || 'HEAD')}/${path}`, + gittemplate: ({ auth, domain, user, project, committish }) => + `git://${maybeJoin(auth, '@')}${domain}/${user}/${project}.git${maybeJoin('#', committish)}`, + tarballtemplate: ({ domain, user, project, committish }) => + `https://codeload.${domain}/${user}/${project}/tar.gz/${maybeEncode(committish || 'HEAD')}`, + extract: (url) => { + let [, user, project, type, committish] = url.pathname.split('/', 5) + if (type && type !== 'tree') { + return + } + + if (!type) { + committish = url.hash.slice(1) + } + + if (project && project.endsWith('.git')) { + project = project.slice(0, -4) + } + + if (!user || !project) { + return + } + + return { user, project, committish } + }, +} + +hosts.bitbucket = { + protocols: ['git+ssh:', 'git+https:', 'ssh:', 'https:'], + domain: 'bitbucket.org', + treepath: 'src', + blobpath: 'src', + editpath: '?mode=edit', + edittemplate: ({ domain, user, project, committish, treepath, path, editpath }) => + `https://${domain}/${user}/${project}${maybeJoin('/', treepath, '/', maybeEncode(committish || 'HEAD'), '/', path, editpath)}`, + tarballtemplate: ({ domain, user, project, committish }) => + `https://${domain}/${user}/${project}/get/${maybeEncode(committish || 'HEAD')}.tar.gz`, + extract: (url) => { + let [, user, project, aux] = url.pathname.split('/', 4) + if (['get'].includes(aux)) { + return + } + + if (project && project.endsWith('.git')) { + project = project.slice(0, -4) + } + + if (!user || !project) { + return + } + + return { user, project, committish: url.hash.slice(1) } + }, +} + +hosts.gitlab = { + protocols: ['git+ssh:', 'git+https:', 'ssh:', 'https:'], + domain: 'gitlab.com', + treepath: 'tree', + blobpath: 'tree', + editpath: '-/edit', + httpstemplate: ({ auth, domain, user, project, committish }) => + `git+https://${maybeJoin(auth, '@')}${domain}/${user}/${project}.git${maybeJoin('#', committish)}`, + tarballtemplate: ({ domain, user, project, committish }) => + `https://${domain}/${user}/${project}/repository/archive.tar.gz?ref=${maybeEncode(committish || 'HEAD')}`, + extract: (url) => { + const path = url.pathname.slice(1) + if (path.includes('/-/') || path.includes('/archive.tar.gz')) { + return + } + + const segments = path.split('/') + let project = segments.pop() + if (project.endsWith('.git')) { + project = project.slice(0, -4) + } + + const user = segments.join('/') + if (!user || !project) { + return + } + + return { user, project, committish: url.hash.slice(1) } + }, +} + +hosts.gist = { + protocols: ['git:', 'git+ssh:', 'git+https:', 'ssh:', 'https:'], + domain: 'gist.github.com', + editpath: 'edit', + sshtemplate: ({ domain, project, committish }) => + `git@${domain}:${project}.git${maybeJoin('#', committish)}`, + sshurltemplate: ({ domain, project, committish }) => + `git+ssh://git@${domain}/${project}.git${maybeJoin('#', committish)}`, + edittemplate: ({ domain, user, project, committish, editpath }) => + `https://${domain}/${user}/${project}${maybeJoin('/', maybeEncode(committish))}/${editpath}`, + browsetemplate: ({ domain, project, committish }) => + `https://${domain}/${project}${maybeJoin('/', maybeEncode(committish))}`, + browsetreetemplate: ({ domain, project, committish, path, hashformat }) => + `https://${domain}/${project}${maybeJoin('/', maybeEncode(committish))}${maybeJoin('#', hashformat(path))}`, + browseblobtemplate: ({ domain, project, committish, path, hashformat }) => + `https://${domain}/${project}${maybeJoin('/', maybeEncode(committish))}${maybeJoin('#', hashformat(path))}`, + docstemplate: ({ domain, project, committish }) => + `https://${domain}/${project}${maybeJoin('/', maybeEncode(committish))}`, + httpstemplate: ({ domain, project, committish }) => + `git+https://${domain}/${project}.git${maybeJoin('#', committish)}`, + filetemplate: ({ user, project, committish, path }) => + `https://gist.githubusercontent.com/${user}/${project}/raw${maybeJoin('/', maybeEncode(committish))}/${path}`, + shortcuttemplate: ({ type, project, committish }) => + `${type}:${project}${maybeJoin('#', committish)}`, + pathtemplate: ({ project, committish }) => + `${project}${maybeJoin('#', committish)}`, + bugstemplate: ({ domain, project }) => + `https://${domain}/${project}`, + gittemplate: ({ domain, project, committish }) => + `git://${domain}/${project}.git${maybeJoin('#', committish)}`, + tarballtemplate: ({ project, committish }) => + `https://codeload.github.com/gist/${project}/tar.gz/${maybeEncode(committish || 'HEAD')}`, + extract: (url) => { + let [, user, project, aux] = url.pathname.split('/', 4) + if (aux === 'raw') { + return + } + + if (!project) { + if (!user) { + return + } + + project = user + user = null + } + + if (project.endsWith('.git')) { + project = project.slice(0, -4) + } + + return { user, project, committish: url.hash.slice(1) } + }, + hashformat: function (fragment) { + return fragment && 'file-' + formatHashFragment(fragment) + }, +} + +hosts.sourcehut = { + protocols: ['git+ssh:', 'https:'], + domain: 'git.sr.ht', + treepath: 'tree', + blobpath: 'tree', + filetemplate: ({ domain, user, project, committish, path }) => + `https://${domain}/${user}/${project}/blob/${maybeEncode(committish) || 'HEAD'}/${path}`, + httpstemplate: ({ domain, user, project, committish }) => + `https://${domain}/${user}/${project}.git${maybeJoin('#', committish)}`, + tarballtemplate: ({ domain, user, project, committish }) => + `https://${domain}/${user}/${project}/archive/${maybeEncode(committish) || 'HEAD'}.tar.gz`, + bugstemplate: ({ user, project }) => + `https://todo.sr.ht/${user}/${project}`, + extract: (url) => { + let [, user, project, aux] = url.pathname.split('/', 4) + + // tarball url + if (['archive'].includes(aux)) { + return + } + + if (project && project.endsWith('.git')) { + project = project.slice(0, -4) + } + + if (!user || !project) { + return + } + + return { user, project, committish: url.hash.slice(1) } + }, +} + +for (const [name, host] of Object.entries(hosts)) { + hosts[name] = Object.assign({}, defaults, host) +} + +module.exports = hosts diff --git a/node_modules/hosted-git-info/lib/index.js b/node_modules/hosted-git-info/lib/index.js index d5d63c66839b0..89805ebb41304 100644 --- a/node_modules/hosted-git-info/lib/index.js +++ b/node_modules/hosted-git-info/lib/index.js @@ -1,248 +1,174 @@ 'use strict' -const url = require('url') -const gitHosts = require('./git-host-info.js') -const GitHost = module.exports = require('./git-host.js') + const LRU = require('lru-cache') +const hosts = require('./hosts.js') +const fromUrl = require('./from-url.js') + const cache = new LRU({ max: 1000 }) -const protocolToRepresentationMap = { - 'git+ssh:': 'sshurl', - 'git+https:': 'https', - 'ssh:': 'sshurl', - 'git:': 'git', -} +class GitHost { + constructor (type, user, auth, project, committish, defaultRepresentation, opts = {}) { + Object.assign(this, GitHost.#gitHosts[type], { + type, + user, + auth, + project, + committish, + default: defaultRepresentation, + opts, + }) + } -function protocolToRepresentation (protocol) { - return protocolToRepresentationMap[protocol] || protocol.slice(0, -1) -} + static #gitHosts = { byShortcut: {}, byDomain: {} } + static #protocols = { + 'git+ssh:': { name: 'sshurl' }, + 'ssh:': { name: 'sshurl' }, + 'git+https:': { name: 'https', auth: true }, + 'git:': { auth: true }, + 'http:': { auth: true }, + 'https:': { auth: true }, + 'git+http:': { auth: true }, + } -const authProtocols = { - 'git:': true, - 'https:': true, - 'git+https:': true, - 'http:': true, - 'git+http:': true, -} + static addHost (name, host) { + GitHost.#gitHosts[name] = host + GitHost.#gitHosts.byDomain[host.domain] = name + GitHost.#gitHosts.byShortcut[`${name}:`] = name + GitHost.#protocols[`${name}:`] = { name } + } -const knownProtocols = Object.keys(gitHosts.byShortcut) - .concat(['http:', 'https:', 'git:', 'git+ssh:', 'git+https:', 'ssh:']) + static fromUrl (giturl, opts) { + if (typeof giturl !== 'string') { + return + } -module.exports.fromUrl = function (giturl, opts) { - if (typeof giturl !== 'string') { - return - } + const key = giturl + JSON.stringify(opts || {}) - const key = giturl + JSON.stringify(opts || {}) + if (!cache.has(key)) { + const hostArgs = fromUrl(giturl, opts, { + gitHosts: GitHost.#gitHosts, + protocols: GitHost.#protocols, + }) + cache.set(key, hostArgs ? new GitHost(...hostArgs) : undefined) + } - if (!cache.has(key)) { - cache.set(key, fromUrl(giturl, opts)) + return cache.get(key) } - return cache.get(key) -} + #fill (template, opts) { + if (typeof template !== 'function') { + return null + } + + const options = { ...this, ...this.opts, ...opts } -function fromUrl (giturl, opts) { - if (!giturl) { - return - } - - const correctedUrl = isGitHubShorthand(giturl) ? 'github:' + giturl : correctProtocol(giturl) - const parsed = parseGitUrl(correctedUrl) - if (!parsed) { - return parsed - } - - const gitHostShortcut = gitHosts.byShortcut[parsed.protocol] - const gitHostDomain = - gitHosts.byDomain[parsed.hostname.startsWith('www.') ? - parsed.hostname.slice(4) : - parsed.hostname] - const gitHostName = gitHostShortcut || gitHostDomain - if (!gitHostName) { - return - } - - const gitHostInfo = gitHosts[gitHostShortcut || gitHostDomain] - let auth = null - if (authProtocols[parsed.protocol] && (parsed.username || parsed.password)) { - auth = `${parsed.username}${parsed.password ? ':' + parsed.password : ''}` - } - - let committish = null - let user = null - let project = null - let defaultRepresentation = null - - try { - if (gitHostShortcut) { - let pathname = parsed.pathname.startsWith('/') ? parsed.pathname.slice(1) : parsed.pathname - const firstAt = pathname.indexOf('@') - // we ignore auth for shortcuts, so just trim it out - if (firstAt > -1) { - pathname = pathname.slice(firstAt + 1) - } - - const lastSlash = pathname.lastIndexOf('/') - if (lastSlash > -1) { - user = decodeURIComponent(pathname.slice(0, lastSlash)) - // we want nulls only, never empty strings - if (!user) { - user = null - } - project = decodeURIComponent(pathname.slice(lastSlash + 1)) - } else { - project = decodeURIComponent(pathname) - } - - if (project.endsWith('.git')) { - project = project.slice(0, -4) - } - - if (parsed.hash) { - committish = decodeURIComponent(parsed.hash.slice(1)) - } - - defaultRepresentation = 'shortcut' - } else { - if (!gitHostInfo.protocols.includes(parsed.protocol)) { - return - } - - const segments = gitHostInfo.extract(parsed) - if (!segments) { - return - } - - user = segments.user && decodeURIComponent(segments.user) - project = decodeURIComponent(segments.project) - committish = decodeURIComponent(segments.committish) - defaultRepresentation = protocolToRepresentation(parsed.protocol) + // the path should always be set so we don't end up with 'undefined' in urls + if (!options.path) { + options.path = '' } - } catch (err) { - /* istanbul ignore else */ - if (err instanceof URIError) { - return - } else { - throw err + + // template functions will insert the leading slash themselves + if (options.path.startsWith('/')) { + options.path = options.path.slice(1) + } + + if (options.noCommittish) { + options.committish = null } + + const result = template(options) + return options.noGitPlus && result.startsWith('git+') ? result.slice(4) : result } - return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation, opts) -} + hash () { + return this.committish ? `#${this.committish}` : '' + } -// accepts input like git:github.com:user/repo and inserts the // after the first : -const correctProtocol = (arg) => { - const firstColon = arg.indexOf(':') - const proto = arg.slice(0, firstColon + 1) - if (knownProtocols.includes(proto)) { - return arg + ssh (opts) { + return this.#fill(this.sshtemplate, opts) } - const firstAt = arg.indexOf('@') - if (firstAt > -1) { - if (firstAt > firstColon) { - return `git+ssh://${arg}` - } else { - return arg + sshurl (opts) { + return this.#fill(this.sshurltemplate, opts) + } + + browse (path, ...args) { + // not a string, treat path as opts + if (typeof path !== 'string') { + return this.#fill(this.browsetemplate, path) } + + if (typeof args[0] !== 'string') { + return this.#fill(this.browsetreetemplate, { ...args[0], path }) + } + + return this.#fill(this.browsetreetemplate, { ...args[1], fragment: args[0], path }) } - const doubleSlash = arg.indexOf('//') - if (doubleSlash === firstColon + 1) { - return arg + // If the path is known to be a file, then browseFile should be used. For some hosts + // the url is the same as browse, but for others like GitHub a file can use both `/tree/` + // and `/blob/` in the path. When using a default committish of `HEAD` then the `/tree/` + // path will redirect to a specific commit. Using the `/blob/` path avoids this and + // does not redirect to a different commit. + browseFile (path, ...args) { + if (typeof args[0] !== 'string') { + return this.#fill(this.browseblobtemplate, { ...args[0], path }) + } + + return this.#fill(this.browseblobtemplate, { ...args[1], fragment: args[0], path }) } - return arg.slice(0, firstColon + 1) + '//' + arg.slice(firstColon + 1) -} + docs (opts) { + return this.#fill(this.docstemplate, opts) + } -// look for github shorthand inputs, such as npm/cli -const isGitHubShorthand = (arg) => { - // it cannot contain whitespace before the first # - // it cannot start with a / because that's probably an absolute file path - // but it must include a slash since repos are username/repository - // it cannot start with a . because that's probably a relative file path - // it cannot start with an @ because that's a scoped package if it passes the other tests - // it cannot contain a : before a # because that tells us that there's a protocol - // a second / may not exist before a # - const firstHash = arg.indexOf('#') - const firstSlash = arg.indexOf('/') - const secondSlash = arg.indexOf('/', firstSlash + 1) - const firstColon = arg.indexOf(':') - const firstSpace = /\s/.exec(arg) - const firstAt = arg.indexOf('@') - - const spaceOnlyAfterHash = !firstSpace || (firstHash > -1 && firstSpace.index > firstHash) - const atOnlyAfterHash = firstAt === -1 || (firstHash > -1 && firstAt > firstHash) - const colonOnlyAfterHash = firstColon === -1 || (firstHash > -1 && firstColon > firstHash) - const secondSlashOnlyAfterHash = secondSlash === -1 || (firstHash > -1 && secondSlash > firstHash) - const hasSlash = firstSlash > 0 - // if a # is found, what we really want to know is that the character - // immediately before # is not a / - const doesNotEndWithSlash = firstHash > -1 ? arg[firstHash - 1] !== '/' : !arg.endsWith('/') - const doesNotStartWithDot = !arg.startsWith('.') - - return spaceOnlyAfterHash && hasSlash && doesNotEndWithSlash && - doesNotStartWithDot && atOnlyAfterHash && colonOnlyAfterHash && - secondSlashOnlyAfterHash -} + bugs (opts) { + return this.#fill(this.bugstemplate, opts) + } -// attempt to correct an scp style url so that it will parse with `new URL()` -const correctUrl = (giturl) => { - const firstAt = giturl.indexOf('@') - const lastHash = giturl.lastIndexOf('#') - let firstColon = giturl.indexOf(':') - let lastColon = giturl.lastIndexOf(':', lastHash > -1 ? lastHash : Infinity) - - let corrected - if (lastColon > firstAt) { - // the last : comes after the first @ (or there is no @) - // like it would in: - // proto://hostname.com:user/repo - // username@hostname.com:user/repo - // :password@hostname.com:user/repo - // username:password@hostname.com:user/repo - // proto://username@hostname.com:user/repo - // proto://:password@hostname.com:user/repo - // proto://username:password@hostname.com:user/repo - // then we replace the last : with a / to create a valid path - corrected = giturl.slice(0, lastColon) + '/' + giturl.slice(lastColon + 1) - // // and we find our new : positions - firstColon = corrected.indexOf(':') - lastColon = corrected.lastIndexOf(':') - } - - if (firstColon === -1 && giturl.indexOf('//') === -1) { - // we have no : at all - // as it would be in: - // username@hostname.com/user/repo - // then we prepend a protocol - corrected = `git+ssh://${corrected}` - } - - return corrected -} + https (opts) { + return this.#fill(this.httpstemplate, opts) + } + + git (opts) { + return this.#fill(this.gittemplate, opts) + } -// try to parse the url as its given to us, if that throws -// then we try to clean the url and parse that result instead -// THIS FUNCTION SHOULD NEVER THROW -const parseGitUrl = (giturl) => { - let result - try { - result = new url.URL(giturl) - } catch { - // this fn should never throw + shortcut (opts) { + return this.#fill(this.shortcuttemplate, opts) } - if (result) { - return result + path (opts) { + return this.#fill(this.pathtemplate, opts) } - const correctedUrl = correctUrl(giturl) - try { - result = new url.URL(correctedUrl) - } catch { - // this fn should never throw + tarball (opts) { + return this.#fill(this.tarballtemplate, { ...opts, noCommittish: false }) } - return result + file (path, opts) { + return this.#fill(this.filetemplate, { ...opts, path }) + } + + edit (path, opts) { + return this.#fill(this.edittemplate, { ...opts, path }) + } + + getDefaultRepresentation () { + return this.default + } + + toString (opts) { + if (this.default && typeof this[this.default] === 'function') { + return this[this.default](opts) + } + + return this.sshurl(https://github.com/opts) + } } + +for (const [name, host] of Object.entries(hosts)) { + GitHost.addHost(name, host) +} + +module.exports = GitHost diff --git a/node_modules/hosted-git-info/package.json b/node_modules/hosted-git-info/package.json index 07a5587ca76ef..35feb7e156d33 100644 --- a/node_modules/hosted-git-info/package.json +++ b/node_modules/hosted-git-info/package.json @@ -1,6 +1,6 @@ { "name": "hosted-git-info", - "version": "5.1.0", + "version": "6.0.0", "description": "Provides metadata and conversions from repository urls for GitHub, Bitbucket and GitLab", "main": "./lib/index.js", "repository": { @@ -21,9 +21,6 @@ "homepage": "https://github.com/npm/hosted-git-info", "scripts": { "posttest": "npm run lint", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "preversion": "npm test", "snap": "tap", "test": "tap", "test:coverage": "tap --coverage-report=html", @@ -37,7 +34,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.5.0", + "@npmcli/template-oss": "4.5.1", "tap": "^16.0.1" }, "files": [ @@ -45,14 +42,18 @@ "lib/" ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "tap": { "color": 1, - "coverage": true + "coverage": true, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.5.0" + "version": "4.5.1" } } diff --git a/node_modules/ieee754/LICENSE b/node_modules/ieee754/LICENSE new file mode 100644 index 0000000000000..5aac82c78c2d9 --- /dev/null +++ b/node_modules/ieee754/LICENSE @@ -0,0 +1,11 @@ +Copyright 2008 Fair Oaks Labs, Inc. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/ieee754/index.d.ts b/node_modules/ieee754/index.d.ts new file mode 100644 index 0000000000000..f1e435487f01d --- /dev/null +++ b/node_modules/ieee754/index.d.ts @@ -0,0 +1,10 @@ +declare namespace ieee754 { + export function read( + buffer: Uint8Array, offset: number, isLE: boolean, mLen: number, + nBytes: number): number; + export function write( + buffer: Uint8Array, value: number, offset: number, isLE: boolean, + mLen: number, nBytes: number): void; + } + + export = ieee754; \ No newline at end of file diff --git a/node_modules/ieee754/index.js b/node_modules/ieee754/index.js new file mode 100644 index 0000000000000..81d26c343c93d --- /dev/null +++ b/node_modules/ieee754/index.js @@ -0,0 +1,85 @@ +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = ((value * c) - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} diff --git a/node_modules/ieee754/package.json b/node_modules/ieee754/package.json new file mode 100644 index 0000000000000..7b23851384185 --- /dev/null +++ b/node_modules/ieee754/package.json @@ -0,0 +1,52 @@ +{ + "name": "ieee754", + "description": "Read/write IEEE754 floating point numbers from/to a Buffer or array-like object", + "version": "1.2.1", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "https://feross.org/" + }, + "contributors": [ + "Romain Beauxis <toots@rastageeks.org>" + ], + "devDependencies": { + "airtap": "^3.0.0", + "standard": "*", + "tape": "^5.0.1" + }, + "keywords": [ + "IEEE 754", + "buffer", + "convert", + "floating point", + "ieee754" + ], + "license": "BSD-3-Clause", + "main": "index.js", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "git://github.com/feross/ieee754.git" + }, + "scripts": { + "test": "standard && npm run test-node && npm run test-browser", + "test-browser": "airtap -- test/*.js", + "test-browser-local": "airtap --local -- test/*.js", + "test-node": "tape test/*.js" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] +} diff --git a/node_modules/ignore-walk/package.json b/node_modules/ignore-walk/package.json index 1bf96eb211bbc..3d977ed4b84f6 100644 --- a/node_modules/ignore-walk/package.json +++ b/node_modules/ignore-walk/package.json @@ -1,11 +1,11 @@ { "name": "ignore-walk", - "version": "5.0.1", + "version": "6.0.0", "description": "Nested/recursive `.gitignore`/`.npmignore` parsing and filtering.", "main": "lib/index.js", "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.2.2", + "@npmcli/template-oss": "4.5.1", "mkdirp": "^1.0.4", "mutate-fs": "^2.1.1", "rimraf": "^3.0.2", @@ -17,14 +17,10 @@ "lint": "eslint \"**/*.js\"", "eslint": "eslint", "lintfix": "npm run lint -- --fix", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags", "npmclilint": "npmcli-lint", "postsnap": "npm run lintfix --", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", - "prepublishOnly": "git push origin --follow-tags", "snap": "tap" }, "keywords": [ @@ -52,14 +48,18 @@ "test-env": "LC_ALL=sk", "before": "test/00-setup.js", "after": "test/zz-cleanup.js", - "jobs": 1 + "jobs": 1, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.2.2", + "version": "4.5.1", "windowsCI": false } } diff --git a/node_modules/init-package-json/package.json b/node_modules/init-package-json/package.json index 91d4b7a109f08..6641323e9f9c0 100644 --- a/node_modules/init-package-json/package.json +++ b/node_modules/init-package-json/package.json @@ -1,12 +1,9 @@ { "name": "init-package-json", - "version": "3.0.2", + "version": "4.0.1", "main": "lib/init-package-json.js", "scripts": { "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", "lintfix": "npm run lint -- --fix", @@ -22,27 +19,31 @@ "license": "ISC", "description": "A node module to get your node module started", "dependencies": { - "npm-package-arg": "^9.0.1", + "npm-package-arg": "^10.0.0", "promzard": "^0.3.0", "read": "^1.0.7", - "read-package-json": "^5.0.0", + "read-package-json": "^6.0.0", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4", - "validate-npm-package-name": "^4.0.0" + "validate-npm-package-name": "^5.0.0" }, "devDependencies": { - "@npmcli/config": "^4.0.1", - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.2.1", + "@npmcli/config": "^6.0.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.1", "tap": "^16.0.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "tap": { "statements": "94", "branches": "83", - "lines": "94" + "lines": "94", + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "keywords": [ "init", @@ -60,6 +61,6 @@ ], "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.2.1" + "version": "4.6.1" } } diff --git a/node_modules/json-parse-even-better-errors/index.js b/node_modules/json-parse-even-better-errors/lib/index.js similarity index 94% rename from node_modules/json-parse-even-better-errors/index.js rename to node_modules/json-parse-even-better-errors/lib/index.js index 86a1fdc1ae809..2b9f3c2bf1d60 100644 --- a/node_modules/json-parse-even-better-errors/index.js +++ b/node_modules/json-parse-even-better-errors/lib/index.js @@ -57,9 +57,15 @@ class JSONParseError extends SyntaxError { this.systemError = er Error.captureStackTrace(this, caller || this.constructor) } - get name () { return this.constructor.name } + + get name () { + return this.constructor.name + } + set name (n) {} - get [Symbol.toStringTag] () { return this.constructor.name } + get [Symbol.toStringTag] () { + return this.constructor.name + } } const kIndent = Symbol.for('indent') @@ -68,7 +74,7 @@ const kNewline = Symbol.for('newline') // things other than objects and arrays aren't indented, so ignore those // Important: in both of these regexps, the $1 capture group is the newline // or undefined, and the $2 capture group is the indent, or undefined. -const formatRE = /^\s*[{\[]((?:\r?\n)+)([\s\t]*)/ +const formatRE = /^\s*[{[]((?:\r?\n)+)([\s\t]*)/ const emptyRE = /^(?:\{\}|\[\])((?:\r?\n)+)?$/ const parseJson = (txt, reviver, context) => { @@ -83,7 +89,7 @@ const parseJson = (txt, reviver, context) => { // if the string is '{}' or '[]', then use the default 2-space indent. const [, newline = '\n', indent = ' '] = parseText.match(emptyRE) || parseText.match(formatRE) || - [, '', ''] + [null, '', ''] const result = JSON.parse(parseText, reviver) if (result && typeof result === 'object') { @@ -117,5 +123,7 @@ parseJson.JSONParseError = JSONParseError parseJson.noExceptions = (txt, reviver) => { try { return JSON.parse(stripBOM(txt), reviver) - } catch (e) {} + } catch (e) { + // no exceptions + } } diff --git a/node_modules/json-parse-even-better-errors/package.json b/node_modules/json-parse-even-better-errors/package.json index ed0fdaf2e0f6f..c496ecbde502e 100644 --- a/node_modules/json-parse-even-better-errors/package.json +++ b/node_modules/json-parse-even-better-errors/package.json @@ -1,33 +1,48 @@ { "name": "json-parse-even-better-errors", - "version": "2.3.1", + "version": "3.0.0", "description": "JSON.parse with context information on error", - "main": "index.js", + "main": "lib/index.js", "files": [ - "*.js" + "bin/", + "lib/" ], "scripts": { - "preversion": "npm t", - "postversion": "npm publish", - "prepublishOnly": "git push --follow-tags", "test": "tap", - "snap": "tap" + "snap": "tap", + "lint": "eslint \"**/*.js\"", + "postlint": "template-oss-check", + "template-oss-apply": "template-oss-apply --force", + "lintfix": "npm run lint -- --fix", + "posttest": "npm run lint" + }, + "repository": { + "type": "git", + "url": "https://github.com/npm/json-parse-even-better-errors.git" }, - "repository": "https://github.com/npm/json-parse-even-better-errors", "keywords": [ "JSON", "parser" ], - "author": { - "name": "Kat Marchán", - "email": "kzm@zkat.tech", - "twitter": "maybekatz" - }, + "author": "GitHub Inc.", "license": "MIT", "devDependencies": { - "tap": "^14.6.5" + "@npmcli/eslint-config": "^3.1.0", + "@npmcli/template-oss": "4.5.1", + "tap": "^16.3.0" }, "tap": { - "check-coverage": true + "check-coverage": true, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "version": "4.5.1" } } diff --git a/node_modules/make-fetch-happen/package.json b/node_modules/make-fetch-happen/package.json index fc491d1152e15..656349a925630 100644 --- a/node_modules/make-fetch-happen/package.json +++ b/node_modules/make-fetch-happen/package.json @@ -1,6 +1,6 @@ { "name": "make-fetch-happen", - "version": "10.2.1", + "version": "11.0.1", "description": "Opinionated, caching, retrying fetch client", "main": "lib/index.js", "files": [ @@ -8,9 +8,6 @@ "lib/" ], "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "test": "tap", "posttest": "npm run lint", "eslint": "eslint", @@ -37,7 +34,7 @@ "license": "ISC", "dependencies": { "agentkeepalive": "^4.2.1", - "cacache": "^16.1.0", + "cacache": "^17.0.0", "http-cache-semantics": "^4.1.0", "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", @@ -45,17 +42,17 @@ "lru-cache": "^7.7.1", "minipass": "^3.1.6", "minipass-collect": "^1.0.2", - "minipass-fetch": "^2.0.3", + "minipass-fetch": "^3.0.0", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "negotiator": "^0.6.3", "promise-retry": "^2.0.1", "socks-proxy-agent": "^7.0.0", - "ssri": "^9.0.0" + "ssri": "^10.0.0" }, "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.5.1", "mkdirp": "^1.0.4", "nock": "^13.2.4", "rimraf": "^3.0.2", @@ -64,16 +61,20 @@ "tap": "^16.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "tap": { "color": 1, "files": "test/*.js", "check-coverage": true, - "timeout": 60 + "timeout": 60, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.5.0" + "version": "4.5.1" } } diff --git a/node_modules/minipass-fetch/lib/body.js b/node_modules/minipass-fetch/lib/body.js index 58893309e63f9..9d1b45de30ce9 100644 --- a/node_modules/minipass-fetch/lib/body.js +++ b/node_modules/minipass-fetch/lib/body.js @@ -72,8 +72,8 @@ class Body { } async json () { + const buf = await this[CONSUME_BODY]() try { - const buf = await this[CONSUME_BODY]() return JSON.parse(buf.toString()) } catch (er) { throw new FetchError( diff --git a/node_modules/minipass-fetch/package.json b/node_modules/minipass-fetch/package.json index b47077adc111a..45bd36ae719fb 100644 --- a/node_modules/minipass-fetch/package.json +++ b/node_modules/minipass-fetch/package.json @@ -1,29 +1,29 @@ { "name": "minipass-fetch", - "version": "2.1.1", + "version": "3.0.0", "description": "An implementation of window.fetch in Node.js using Minipass streams", "license": "MIT", "main": "lib/index.js", "scripts": { "test": "tap", "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags", "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", "lintfix": "npm run lint -- --fix", - "prepublishOnly": "git push origin --follow-tags", "posttest": "npm run lint", "template-oss-apply": "template-oss-apply --force" }, "tap": { "coverage-map": "map.js", - "check-coverage": true + "check-coverage": true, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.5.0", + "@npmcli/eslint-config": "^3.1.0", + "@npmcli/template-oss": "4.5.1", "@ungap/url-search-params": "^0.2.2", "abort-controller": "^3.0.0", "abortcontroller-polyfill": "~1.7.3", @@ -57,11 +57,11 @@ "lib/" ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "author": "GitHub Inc.", "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.5.0" + "version": "4.5.1" } } diff --git a/node_modules/mkdirp-infer-owner/index.js b/node_modules/mkdirp-infer-owner/index.js deleted file mode 100644 index 750743f51a9f9..0000000000000 --- a/node_modules/mkdirp-infer-owner/index.js +++ /dev/null @@ -1,26 +0,0 @@ -const inferOwner = require('infer-owner') -const mkdirp = require('mkdirp') -const {promisify} = require('util') -const chownr = promisify(require('chownr')) - -const platform = process.env.__TESTING_MKDIRP_INFER_OWNER_PLATFORM__ - || process.platform -const isWindows = platform === 'win32' -const isRoot = process.getuid && process.getuid() === 0 -const doChown = !isWindows && isRoot - -module.exports = !doChown ? (path, opts) => mkdirp(path, opts) - : (path, opts) => inferOwner(path).then(({uid, gid}) => - mkdirp(path, opts).then(made => - uid !== 0 || gid !== process.getgid() - ? chownr(made || path, uid, gid).then(() => made) - : made)) - -module.exports.sync = !doChown ? (path, opts) => mkdirp.sync(path, opts) - : (path, opts) => { - const {uid, gid} = inferOwner.sync(path) - const made = mkdirp.sync(path) - if (uid !== 0 || gid !== process.getgid()) - chownr.sync(made || path, uid, gid) - return made - } diff --git a/node_modules/mkdirp-infer-owner/package.json b/node_modules/mkdirp-infer-owner/package.json deleted file mode 100644 index 1f67ad0edf501..0000000000000 --- a/node_modules/mkdirp-infer-owner/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "mkdirp-infer-owner", - "version": "2.0.0", - "files": [ - "index.js" - ], - "description": "mkdirp, but chown to the owner of the containing folder if possible and necessary", - "author": "Isaac Z. Schlueter <i@izs.me> (https://izs.me)", - "license": "ISC", - "scripts": { - "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "snap": "tap" - }, - "tap": { - "check-coverage": true - }, - "devDependencies": { - "require-inject": "^1.4.4", - "tap": "^14.10.6" - }, - "dependencies": { - "chownr": "^2.0.0", - "infer-owner": "^1.0.4", - "mkdirp": "^1.0.3" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/mkdirp-infer-owner" - }, - "engines": { - "node": ">=10" - } -} diff --git a/node_modules/node-gyp/node_modules/@npmcli/fs/LICENSE.md b/node_modules/node-gyp/node_modules/@npmcli/fs/LICENSE.md new file mode 100644 index 0000000000000..5fc208ff122e0 --- /dev/null +++ b/node_modules/node-gyp/node_modules/@npmcli/fs/LICENSE.md @@ -0,0 +1,20 @@ +<!-- This file is automatically added by @npmcli/template-oss. Do not edit. --> + +ISC License + +Copyright npm, Inc. + +Permission to use, copy, modify, and/or distribute this +software for any purpose with or without fee is hereby +granted, provided that the above copyright notice and this +permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO +EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE +USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/node-gyp/node_modules/@npmcli/fs/lib/common/get-options.js b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/common/get-options.js new file mode 100644 index 0000000000000..cb5982f79077a --- /dev/null +++ b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/common/get-options.js @@ -0,0 +1,20 @@ +// given an input that may or may not be an object, return an object that has +// a copy of every defined property listed in 'copy'. if the input is not an +// object, assign it to the property named by 'wrap' +const getOptions = (input, { copy, wrap }) => { + const result = {} + + if (input && typeof input === 'object') { + for (const prop of copy) { + if (input[prop] !== undefined) { + result[prop] = input[prop] + } + } + } else { + result[wrap] = input + } + + return result +} + +module.exports = getOptions diff --git a/node_modules/node-gyp/node_modules/@npmcli/fs/lib/common/node.js b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/common/node.js new file mode 100644 index 0000000000000..4d13bc037359d --- /dev/null +++ b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/common/node.js @@ -0,0 +1,9 @@ +const semver = require('semver') + +const satisfies = (range) => { + return semver.satisfies(process.version, range, { includePrerelease: true }) +} + +module.exports = { + satisfies, +} diff --git a/node_modules/@npmcli/fs/lib/common/owner-sync.js b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/common/owner-sync.js similarity index 100% rename from node_modules/@npmcli/fs/lib/common/owner-sync.js rename to node_modules/node-gyp/node_modules/@npmcli/fs/lib/common/owner-sync.js diff --git a/node_modules/@npmcli/fs/lib/common/owner.js b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/common/owner.js similarity index 100% rename from node_modules/@npmcli/fs/lib/common/owner.js rename to node_modules/node-gyp/node_modules/@npmcli/fs/lib/common/owner.js diff --git a/node_modules/@npmcli/fs/lib/copy-file.js b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/copy-file.js similarity index 100% rename from node_modules/@npmcli/fs/lib/copy-file.js rename to node_modules/node-gyp/node_modules/@npmcli/fs/lib/copy-file.js diff --git a/node_modules/node-gyp/node_modules/@npmcli/fs/lib/cp/LICENSE b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/cp/LICENSE new file mode 100644 index 0000000000000..93546dfb7655b --- /dev/null +++ b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/cp/LICENSE @@ -0,0 +1,15 @@ +(The MIT License) + +Copyright (c) 2011-2017 JP Richardson + +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. diff --git a/node_modules/node-gyp/node_modules/@npmcli/fs/lib/cp/index.js b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/cp/index.js new file mode 100644 index 0000000000000..5da4739bdd528 --- /dev/null +++ b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/cp/index.js @@ -0,0 +1,22 @@ +const fs = require('../fs.js') +const getOptions = require('../common/get-options.js') +const node = require('../common/node.js') +const polyfill = require('./polyfill.js') + +// node 16.7.0 added fs.cp +const useNative = node.satisfies('>=16.7.0') + +const cp = async (src, dest, opts) => { + const options = getOptions(opts, { + copy: ['dereference', 'errorOnExist', 'filter', 'force', 'preserveTimestamps', 'recursive'], + }) + + // the polyfill is tested separately from this module, no need to hack + // process.version to try to trigger it just for coverage + // istanbul ignore next + return useNative + ? fs.cp(src, dest, options) + : polyfill(src, dest, options) +} + +module.exports = cp diff --git a/node_modules/node-gyp/node_modules/@npmcli/fs/lib/cp/polyfill.js b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/cp/polyfill.js new file mode 100644 index 0000000000000..f83ccbf57ecc9 --- /dev/null +++ b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/cp/polyfill.js @@ -0,0 +1,428 @@ +// this file is a modified version of the code in node 17.2.0 +// which is, in turn, a modified version of the fs-extra module on npm +// node core changes: +// - Use of the assert module has been replaced with core's error system. +// - All code related to the glob dependency has been removed. +// - Bring your own custom fs module is not currently supported. +// - Some basic code cleanup. +// changes here: +// - remove all callback related code +// - drop sync support +// - change assertions back to non-internal methods (see options.js) +// - throws ENOTDIR when rmdir gets an ENOENT for a path that exists in Windows +'use strict' + +const { + ERR_FS_CP_DIR_TO_NON_DIR, + ERR_FS_CP_EEXIST, + ERR_FS_CP_EINVAL, + ERR_FS_CP_FIFO_PIPE, + ERR_FS_CP_NON_DIR_TO_DIR, + ERR_FS_CP_SOCKET, + ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY, + ERR_FS_CP_UNKNOWN, + ERR_FS_EISDIR, + ERR_INVALID_ARG_TYPE, +} = require('../errors.js') +const { + constants: { + errno: { + EEXIST, + EISDIR, + EINVAL, + ENOTDIR, + }, + }, +} = require('os') +const { + chmod, + copyFile, + lstat, + mkdir, + readdir, + readlink, + stat, + symlink, + unlink, + utimes, +} = require('../fs.js') +const { + dirname, + isAbsolute, + join, + parse, + resolve, + sep, + toNamespacedPath, +} = require('path') +const { fileURLToPath } = require('url') + +const defaultOptions = { + dereference: false, + errorOnExist: false, + filter: undefined, + force: true, + preserveTimestamps: false, + recursive: false, +} + +async function cp (src, dest, opts) { + if (opts != null && typeof opts !== 'object') { + throw new ERR_INVALID_ARG_TYPE('options', ['Object'], opts) + } + return cpFn( + toNamespacedPath(getValidatedPath(src)), + toNamespacedPath(getValidatedPath(dest)), + { ...defaultOptions, ...opts }) +} + +function getValidatedPath (fileURLOrPath) { + const path = fileURLOrPath != null && fileURLOrPath.href + && fileURLOrPath.origin + ? fileURLToPath(fileURLOrPath) + : fileURLOrPath + return path +} + +async function cpFn (src, dest, opts) { + // Warn about using preserveTimestamps on 32-bit node + // istanbul ignore next + if (opts.preserveTimestamps && process.arch === 'ia32') { + const warning = 'Using the preserveTimestamps option in 32-bit ' + + 'node is not recommended' + process.emitWarning(warning, 'TimestampPrecisionWarning') + } + const stats = await checkPaths(src, dest, opts) + const { srcStat, destStat } = stats + await checkParentPaths(src, srcStat, dest) + if (opts.filter) { + return handleFilter(checkParentDir, destStat, src, dest, opts) + } + return checkParentDir(destStat, src, dest, opts) +} + +async function checkPaths (src, dest, opts) { + const { 0: srcStat, 1: destStat } = await getStats(src, dest, opts) + if (destStat) { + if (areIdentical(srcStat, destStat)) { + throw new ERR_FS_CP_EINVAL({ + message: 'src and dest cannot be the same', + path: dest, + syscall: 'cp', + errno: EINVAL, + }) + } + if (srcStat.isDirectory() && !destStat.isDirectory()) { + throw new ERR_FS_CP_DIR_TO_NON_DIR({ + message: `cannot overwrite directory ${src} ` + + `with non-directory ${dest}`, + path: dest, + syscall: 'cp', + errno: EISDIR, + }) + } + if (!srcStat.isDirectory() && destStat.isDirectory()) { + throw new ERR_FS_CP_NON_DIR_TO_DIR({ + message: `cannot overwrite non-directory ${src} ` + + `with directory ${dest}`, + path: dest, + syscall: 'cp', + errno: ENOTDIR, + }) + } + } + + if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { + throw new ERR_FS_CP_EINVAL({ + message: `cannot copy ${src} to a subdirectory of self ${dest}`, + path: dest, + syscall: 'cp', + errno: EINVAL, + }) + } + return { srcStat, destStat } +} + +function areIdentical (srcStat, destStat) { + return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && + destStat.dev === srcStat.dev +} + +function getStats (src, dest, opts) { + const statFunc = opts.dereference ? + (file) => stat(file, { bigint: true }) : + (file) => lstat(file, { bigint: true }) + return Promise.all([ + statFunc(src), + statFunc(dest).catch((err) => { + // istanbul ignore next: unsure how to cover. + if (err.code === 'ENOENT') { + return null + } + // istanbul ignore next: unsure how to cover. + throw err + }), + ]) +} + +async function checkParentDir (destStat, src, dest, opts) { + const destParent = dirname(dest) + const dirExists = await pathExists(destParent) + if (dirExists) { + return getStatsForCopy(destStat, src, dest, opts) + } + await mkdir(destParent, { recursive: true }) + return getStatsForCopy(destStat, src, dest, opts) +} + +function pathExists (dest) { + return stat(dest).then( + () => true, + // istanbul ignore next: not sure when this would occur + (err) => (err.code === 'ENOENT' ? false : Promise.reject(err))) +} + +// Recursively check if dest parent is a subdirectory of src. +// It works for all file types including symlinks since it +// checks the src and dest inodes. It starts from the deepest +// parent and stops once it reaches the src parent or the root path. +async function checkParentPaths (src, srcStat, dest) { + const srcParent = resolve(dirname(src)) + const destParent = resolve(dirname(dest)) + if (destParent === srcParent || destParent === parse(destParent).root) { + return + } + let destStat + try { + destStat = await stat(destParent, { bigint: true }) + } catch (err) { + // istanbul ignore else: not sure when this would occur + if (err.code === 'ENOENT') { + return + } + // istanbul ignore next: not sure when this would occur + throw err + } + if (areIdentical(srcStat, destStat)) { + throw new ERR_FS_CP_EINVAL({ + message: `cannot copy ${src} to a subdirectory of self ${dest}`, + path: dest, + syscall: 'cp', + errno: EINVAL, + }) + } + return checkParentPaths(src, srcStat, destParent) +} + +const normalizePathToArray = (path) => + resolve(path).split(sep).filter(Boolean) + +// Return true if dest is a subdir of src, otherwise false. +// It only checks the path strings. +function isSrcSubdir (src, dest) { + const srcArr = normalizePathToArray(src) + const destArr = normalizePathToArray(dest) + return srcArr.every((cur, i) => destArr[i] === cur) +} + +async function handleFilter (onInclude, destStat, src, dest, opts, cb) { + const include = await opts.filter(src, dest) + if (include) { + return onInclude(destStat, src, dest, opts, cb) + } +} + +function startCopy (destStat, src, dest, opts) { + if (opts.filter) { + return handleFilter(getStatsForCopy, destStat, src, dest, opts) + } + return getStatsForCopy(destStat, src, dest, opts) +} + +async function getStatsForCopy (destStat, src, dest, opts) { + const statFn = opts.dereference ? stat : lstat + const srcStat = await statFn(src) + // istanbul ignore else: can't portably test FIFO + if (srcStat.isDirectory() && opts.recursive) { + return onDir(srcStat, destStat, src, dest, opts) + } else if (srcStat.isDirectory()) { + throw new ERR_FS_EISDIR({ + message: `${src} is a directory (not copied)`, + path: src, + syscall: 'cp', + errno: EINVAL, + }) + } else if (srcStat.isFile() || + srcStat.isCharacterDevice() || + srcStat.isBlockDevice()) { + return onFile(srcStat, destStat, src, dest, opts) + } else if (srcStat.isSymbolicLink()) { + return onLink(destStat, src, dest) + } else if (srcStat.isSocket()) { + throw new ERR_FS_CP_SOCKET({ + message: `cannot copy a socket file: ${dest}`, + path: dest, + syscall: 'cp', + errno: EINVAL, + }) + } else if (srcStat.isFIFO()) { + throw new ERR_FS_CP_FIFO_PIPE({ + message: `cannot copy a FIFO pipe: ${dest}`, + path: dest, + syscall: 'cp', + errno: EINVAL, + }) + } + // istanbul ignore next: should be unreachable + throw new ERR_FS_CP_UNKNOWN({ + message: `cannot copy an unknown file type: ${dest}`, + path: dest, + syscall: 'cp', + errno: EINVAL, + }) +} + +function onFile (srcStat, destStat, src, dest, opts) { + if (!destStat) { + return _copyFile(srcStat, src, dest, opts) + } + return mayCopyFile(srcStat, src, dest, opts) +} + +async function mayCopyFile (srcStat, src, dest, opts) { + if (opts.force) { + await unlink(dest) + return _copyFile(srcStat, src, dest, opts) + } else if (opts.errorOnExist) { + throw new ERR_FS_CP_EEXIST({ + message: `${dest} already exists`, + path: dest, + syscall: 'cp', + errno: EEXIST, + }) + } +} + +async function _copyFile (srcStat, src, dest, opts) { + await copyFile(src, dest) + if (opts.preserveTimestamps) { + return handleTimestampsAndMode(srcStat.mode, src, dest) + } + return setDestMode(dest, srcStat.mode) +} + +async function handleTimestampsAndMode (srcMode, src, dest) { + // Make sure the file is writable before setting the timestamp + // otherwise open fails with EPERM when invoked with 'r+' + // (through utimes call) + if (fileIsNotWritable(srcMode)) { + await makeFileWritable(dest, srcMode) + return setDestTimestampsAndMode(srcMode, src, dest) + } + return setDestTimestampsAndMode(srcMode, src, dest) +} + +function fileIsNotWritable (srcMode) { + return (srcMode & 0o200) === 0 +} + +function makeFileWritable (dest, srcMode) { + return setDestMode(dest, srcMode | 0o200) +} + +async function setDestTimestampsAndMode (srcMode, src, dest) { + await setDestTimestamps(src, dest) + return setDestMode(dest, srcMode) +} + +function setDestMode (dest, srcMode) { + return chmod(dest, srcMode) +} + +async function setDestTimestamps (src, dest) { + // The initial srcStat.atime cannot be trusted + // because it is modified by the read(2) system call + // (See https://nodejs.org/api/fs.html#fs_stat_time_values) + const updatedSrcStat = await stat(src) + return utimes(dest, updatedSrcStat.atime, updatedSrcStat.mtime) +} + +function onDir (srcStat, destStat, src, dest, opts) { + if (!destStat) { + return mkDirAndCopy(srcStat.mode, src, dest, opts) + } + return copyDir(src, dest, opts) +} + +async function mkDirAndCopy (srcMode, src, dest, opts) { + await mkdir(dest) + await copyDir(src, dest, opts) + return setDestMode(dest, srcMode) +} + +async function copyDir (src, dest, opts) { + const dir = await readdir(src) + for (let i = 0; i < dir.length; i++) { + const item = dir[i] + const srcItem = join(src, item) + const destItem = join(dest, item) + const { destStat } = await checkPaths(srcItem, destItem, opts) + await startCopy(destStat, srcItem, destItem, opts) + } +} + +async function onLink (destStat, src, dest) { + let resolvedSrc = await readlink(src) + if (!isAbsolute(resolvedSrc)) { + resolvedSrc = resolve(dirname(src), resolvedSrc) + } + if (!destStat) { + return symlink(resolvedSrc, dest) + } + let resolvedDest + try { + resolvedDest = await readlink(dest) + } catch (err) { + // Dest exists and is a regular file or directory, + // Windows may throw UNKNOWN error. If dest already exists, + // fs throws error anyway, so no need to guard against it here. + // istanbul ignore next: can only test on windows + if (err.code === 'EINVAL' || err.code === 'UNKNOWN') { + return symlink(resolvedSrc, dest) + } + // istanbul ignore next: should not be possible + throw err + } + if (!isAbsolute(resolvedDest)) { + resolvedDest = resolve(dirname(dest), resolvedDest) + } + if (isSrcSubdir(resolvedSrc, resolvedDest)) { + throw new ERR_FS_CP_EINVAL({ + message: `cannot copy ${resolvedSrc} to a subdirectory of self ` + + `${resolvedDest}`, + path: dest, + syscall: 'cp', + errno: EINVAL, + }) + } + // Do not copy if src is a subdir of dest since unlinking + // dest in this case would result in removing src contents + // and therefore a broken symlink would be created. + const srcStat = await stat(src) + if (srcStat.isDirectory() && isSrcSubdir(resolvedDest, resolvedSrc)) { + throw new ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY({ + message: `cannot overwrite ${resolvedDest} with ${resolvedSrc}`, + path: dest, + syscall: 'cp', + errno: EINVAL, + }) + } + return copyLink(resolvedSrc, dest) +} + +async function copyLink (resolvedSrc, dest) { + await unlink(dest) + return symlink(resolvedSrc, dest) +} + +module.exports = cp diff --git a/node_modules/node-gyp/node_modules/@npmcli/fs/lib/errors.js b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/errors.js new file mode 100644 index 0000000000000..1cd1e05d0c533 --- /dev/null +++ b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/errors.js @@ -0,0 +1,129 @@ +'use strict' +const { inspect } = require('util') + +// adapted from node's internal/errors +// https://github.com/nodejs/node/blob/c8a04049/lib/internal/errors.js + +// close copy of node's internal SystemError class. +class SystemError { + constructor (code, prefix, context) { + // XXX context.code is undefined in all constructors used in cp/polyfill + // that may be a bug copied from node, maybe the constructor should use + // `code` not `errno`? nodejs/node#41104 + let message = `${prefix}: ${context.syscall} returned ` + + `${context.code} (${context.message})` + + if (context.path !== undefined) { + message += ` ${context.path}` + } + if (context.dest !== undefined) { + message += ` => ${context.dest}` + } + + this.code = code + Object.defineProperties(this, { + name: { + value: 'SystemError', + enumerable: false, + writable: true, + configurable: true, + }, + message: { + value: message, + enumerable: false, + writable: true, + configurable: true, + }, + info: { + value: context, + enumerable: true, + configurable: true, + writable: false, + }, + errno: { + get () { + return context.errno + }, + set (value) { + context.errno = value + }, + enumerable: true, + configurable: true, + }, + syscall: { + get () { + return context.syscall + }, + set (value) { + context.syscall = value + }, + enumerable: true, + configurable: true, + }, + }) + + if (context.path !== undefined) { + Object.defineProperty(this, 'path', { + get () { + return context.path + }, + set (value) { + context.path = value + }, + enumerable: true, + configurable: true, + }) + } + + if (context.dest !== undefined) { + Object.defineProperty(this, 'dest', { + get () { + return context.dest + }, + set (value) { + context.dest = value + }, + enumerable: true, + configurable: true, + }) + } + } + + toString () { + return `${this.name} [${this.code}]: ${this.message}` + } + + [Symbol.for('nodejs.util.inspect.custom')] (_recurseTimes, ctx) { + return inspect(this, { + ...ctx, + getters: true, + customInspect: false, + }) + } +} + +function E (code, message) { + module.exports[code] = class NodeError extends SystemError { + constructor (ctx) { + super(code, message, ctx) + } + } +} + +E('ERR_FS_CP_DIR_TO_NON_DIR', 'Cannot overwrite directory with non-directory') +E('ERR_FS_CP_EEXIST', 'Target already exists') +E('ERR_FS_CP_EINVAL', 'Invalid src or dest') +E('ERR_FS_CP_FIFO_PIPE', 'Cannot copy a FIFO pipe') +E('ERR_FS_CP_NON_DIR_TO_DIR', 'Cannot overwrite non-directory with directory') +E('ERR_FS_CP_SOCKET', 'Cannot copy a socket file') +E('ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY', 'Cannot overwrite symlink in subdirectory of self') +E('ERR_FS_CP_UNKNOWN', 'Cannot copy an unknown file type') +E('ERR_FS_EISDIR', 'Path is a directory') + +module.exports.ERR_INVALID_ARG_TYPE = class ERR_INVALID_ARG_TYPE extends Error { + constructor (name, expected, actual) { + super() + this.code = 'ERR_INVALID_ARG_TYPE' + this.message = `The ${name} argument must be ${expected}. Received ${typeof actual}` + } +} diff --git a/node_modules/@npmcli/fs/lib/fs.js b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/fs.js similarity index 100% rename from node_modules/@npmcli/fs/lib/fs.js rename to node_modules/node-gyp/node_modules/@npmcli/fs/lib/fs.js diff --git a/node_modules/node-gyp/node_modules/@npmcli/fs/lib/index.js b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/index.js new file mode 100644 index 0000000000000..3a98648eca9a1 --- /dev/null +++ b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/index.js @@ -0,0 +1,12 @@ +module.exports = { + ...require('./fs.js'), + copyFile: require('./copy-file.js'), + cp: require('./cp/index.js'), + mkdir: require('./mkdir.js'), + mkdtemp: require('./mkdtemp.js'), + rm: require('./rm/index.js'), + withTempDir: require('./with-temp-dir.js'), + withOwner: require('./with-owner.js'), + withOwnerSync: require('./with-owner-sync.js'), + writeFile: require('./write-file.js'), +} diff --git a/node_modules/@npmcli/fs/lib/mkdir.js b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/mkdir.js similarity index 100% rename from node_modules/@npmcli/fs/lib/mkdir.js rename to node_modules/node-gyp/node_modules/@npmcli/fs/lib/mkdir.js diff --git a/node_modules/@npmcli/fs/lib/mkdtemp.js b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/mkdtemp.js similarity index 100% rename from node_modules/@npmcli/fs/lib/mkdtemp.js rename to node_modules/node-gyp/node_modules/@npmcli/fs/lib/mkdtemp.js diff --git a/node_modules/@npmcli/fs/lib/rm/index.js b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/rm/index.js similarity index 100% rename from node_modules/@npmcli/fs/lib/rm/index.js rename to node_modules/node-gyp/node_modules/@npmcli/fs/lib/rm/index.js diff --git a/node_modules/@npmcli/fs/lib/rm/polyfill.js b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/rm/polyfill.js similarity index 100% rename from node_modules/@npmcli/fs/lib/rm/polyfill.js rename to node_modules/node-gyp/node_modules/@npmcli/fs/lib/rm/polyfill.js diff --git a/node_modules/@npmcli/fs/lib/with-owner-sync.js b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/with-owner-sync.js similarity index 100% rename from node_modules/@npmcli/fs/lib/with-owner-sync.js rename to node_modules/node-gyp/node_modules/@npmcli/fs/lib/with-owner-sync.js diff --git a/node_modules/@npmcli/fs/lib/with-owner.js b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/with-owner.js similarity index 100% rename from node_modules/@npmcli/fs/lib/with-owner.js rename to node_modules/node-gyp/node_modules/@npmcli/fs/lib/with-owner.js diff --git a/node_modules/node-gyp/node_modules/@npmcli/fs/lib/with-temp-dir.js b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/with-temp-dir.js new file mode 100644 index 0000000000000..81db59dd054b4 --- /dev/null +++ b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/with-temp-dir.js @@ -0,0 +1,41 @@ +const { join, sep } = require('path') + +const getOptions = require('./common/get-options.js') +const mkdir = require('./mkdir.js') +const mkdtemp = require('./mkdtemp.js') +const rm = require('./rm/index.js') + +// create a temp directory, ensure its permissions match its parent, then call +// the supplied function passing it the path to the directory. clean up after +// the function finishes, whether it throws or not +const withTempDir = async (root, fn, opts) => { + const options = getOptions(opts, { + copy: ['tmpPrefix'], + }) + // create the directory, and fix its ownership + await mkdir(root, { recursive: true, owner: 'inherit' }) + + const target = await mkdtemp(join(`${root}${sep}`, options.tmpPrefix || ''), { owner: 'inherit' }) + let err + let result + + try { + result = await fn(target) + } catch (_err) { + err = _err + } + + try { + await rm(target, { force: true, recursive: true }) + } catch { + // ignore errors + } + + if (err) { + throw err + } + + return result +} + +module.exports = withTempDir diff --git a/node_modules/@npmcli/fs/lib/write-file.js b/node_modules/node-gyp/node_modules/@npmcli/fs/lib/write-file.js similarity index 100% rename from node_modules/@npmcli/fs/lib/write-file.js rename to node_modules/node-gyp/node_modules/@npmcli/fs/lib/write-file.js diff --git a/node_modules/node-gyp/node_modules/@npmcli/fs/package.json b/node_modules/node-gyp/node_modules/@npmcli/fs/package.json new file mode 100644 index 0000000000000..1512fd6e4b0ac --- /dev/null +++ b/node_modules/node-gyp/node_modules/@npmcli/fs/package.json @@ -0,0 +1,50 @@ +{ + "name": "@npmcli/fs", + "version": "2.1.2", + "description": "filesystem utilities for the npm cli", + "main": "lib/index.js", + "files": [ + "bin/", + "lib/" + ], + "scripts": { + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "snap": "tap", + "test": "tap", + "npmclilint": "npmcli-lint", + "lint": "eslint \"**/*.js\"", + "lintfix": "npm run lint -- --fix", + "posttest": "npm run lint", + "postsnap": "npm run lintfix --", + "postlint": "template-oss-check", + "template-oss-apply": "template-oss-apply --force" + }, + "repository": { + "type": "git", + "url": "https://github.com/npm/fs.git" + }, + "keywords": [ + "npm", + "oss" + ], + "author": "GitHub Inc.", + "license": "ISC", + "devDependencies": { + "@npmcli/eslint-config": "^3.0.1", + "@npmcli/template-oss": "3.5.0", + "tap": "^16.0.1" + }, + "dependencies": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + }, + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "version": "3.5.0" + } +} diff --git a/node_modules/node-gyp/node_modules/@npmcli/move-file/LICENSE.md b/node_modules/node-gyp/node_modules/@npmcli/move-file/LICENSE.md new file mode 100644 index 0000000000000..072bf20840acd --- /dev/null +++ b/node_modules/node-gyp/node_modules/@npmcli/move-file/LICENSE.md @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com) +Copyright (c) npm, Inc. + +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. diff --git a/node_modules/node-gyp/node_modules/@npmcli/move-file/lib/index.js b/node_modules/node-gyp/node_modules/@npmcli/move-file/lib/index.js new file mode 100644 index 0000000000000..5789bb127e096 --- /dev/null +++ b/node_modules/node-gyp/node_modules/@npmcli/move-file/lib/index.js @@ -0,0 +1,185 @@ +const { dirname, join, resolve, relative, isAbsolute } = require('path') +const rimraf_ = require('rimraf') +const { promisify } = require('util') +const { + access: access_, + accessSync, + copyFile: copyFile_, + copyFileSync, + readdir: readdir_, + readdirSync, + rename: rename_, + renameSync, + stat: stat_, + statSync, + lstat: lstat_, + lstatSync, + symlink: symlink_, + symlinkSync, + readlink: readlink_, + readlinkSync, +} = require('fs') + +const access = promisify(access_) +const copyFile = promisify(copyFile_) +const readdir = promisify(readdir_) +const rename = promisify(rename_) +const stat = promisify(stat_) +const lstat = promisify(lstat_) +const symlink = promisify(symlink_) +const readlink = promisify(readlink_) +const rimraf = promisify(rimraf_) +const rimrafSync = rimraf_.sync + +const mkdirp = require('mkdirp') + +const pathExists = async path => { + try { + await access(path) + return true + } catch (er) { + return er.code !== 'ENOENT' + } +} + +const pathExistsSync = path => { + try { + accessSync(path) + return true + } catch (er) { + return er.code !== 'ENOENT' + } +} + +const moveFile = async (source, destination, options = {}, root = true, symlinks = []) => { + if (!source || !destination) { + throw new TypeError('`source` and `destination` file required') + } + + options = { + overwrite: true, + ...options, + } + + if (!options.overwrite && await pathExists(destination)) { + throw new Error(`The destination file exists: ${destination}`) + } + + await mkdirp(dirname(destination)) + + try { + await rename(source, destination) + } catch (error) { + if (error.code === 'EXDEV' || error.code === 'EPERM') { + const sourceStat = await lstat(source) + if (sourceStat.isDirectory()) { + const files = await readdir(source) + await Promise.all(files.map((file) => + moveFile(join(source, file), join(destination, file), options, false, symlinks) + )) + } else if (sourceStat.isSymbolicLink()) { + symlinks.push({ source, destination }) + } else { + await copyFile(source, destination) + } + } else { + throw error + } + } + + if (root) { + await Promise.all(symlinks.map(async ({ source: symSource, destination: symDestination }) => { + let target = await readlink(symSource) + // junction symlinks in windows will be absolute paths, so we need to + // make sure they point to the symlink destination + if (isAbsolute(target)) { + target = resolve(symDestination, relative(symSource, target)) + } + // try to determine what the actual file is so we can create the correct + // type of symlink in windows + let targetStat = 'file' + try { + targetStat = await stat(resolve(dirname(symSource), target)) + if (targetStat.isDirectory()) { + targetStat = 'junction' + } + } catch { + // targetStat remains 'file' + } + await symlink( + target, + symDestination, + targetStat + ) + })) + await rimraf(source) + } +} + +const moveFileSync = (source, destination, options = {}, root = true, symlinks = []) => { + if (!source || !destination) { + throw new TypeError('`source` and `destination` file required') + } + + options = { + overwrite: true, + ...options, + } + + if (!options.overwrite && pathExistsSync(destination)) { + throw new Error(`The destination file exists: ${destination}`) + } + + mkdirp.sync(dirname(destination)) + + try { + renameSync(source, destination) + } catch (error) { + if (error.code === 'EXDEV' || error.code === 'EPERM') { + const sourceStat = lstatSync(source) + if (sourceStat.isDirectory()) { + const files = readdirSync(source) + for (const file of files) { + moveFileSync(join(source, file), join(destination, file), options, false, symlinks) + } + } else if (sourceStat.isSymbolicLink()) { + symlinks.push({ source, destination }) + } else { + copyFileSync(source, destination) + } + } else { + throw error + } + } + + if (root) { + for (const { source: symSource, destination: symDestination } of symlinks) { + let target = readlinkSync(symSource) + // junction symlinks in windows will be absolute paths, so we need to + // make sure they point to the symlink destination + if (isAbsolute(target)) { + target = resolve(symDestination, relative(symSource, target)) + } + // try to determine what the actual file is so we can create the correct + // type of symlink in windows + let targetStat = 'file' + try { + targetStat = statSync(resolve(dirname(symSource), target)) + if (targetStat.isDirectory()) { + targetStat = 'junction' + } + } catch { + // targetStat remains 'file' + } + symlinkSync( + target, + symDestination, + targetStat + ) + } + rimrafSync(source) + } +} + +module.exports = moveFile +module.exports.sync = moveFileSync diff --git a/node_modules/read-package-json/node_modules/npm-normalize-package-bin/package.json b/node_modules/node-gyp/node_modules/@npmcli/move-file/package.json similarity index 69% rename from node_modules/read-package-json/node_modules/npm-normalize-package-bin/package.json rename to node_modules/node-gyp/node_modules/@npmcli/move-file/package.json index 02de808d9b702..58793b93a9ca0 100644 --- a/node_modules/read-package-json/node_modules/npm-normalize-package-bin/package.json +++ b/node_modules/node-gyp/node_modules/@npmcli/move-file/package.json @@ -1,39 +1,45 @@ { - "name": "npm-normalize-package-bin", - "version": "2.0.0", - "description": "Turn any flavor of allowable package.json bin into a normalized object", + "name": "@npmcli/move-file", + "version": "2.0.1", + "files": [ + "bin/", + "lib/" + ], "main": "lib/index.js", - "repository": { - "type": "git", - "url": "https://github.com/npm/npm-normalize-package-bin.git" + "description": "move a file (fork of move-file)", + "dependencies": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + }, + "devDependencies": { + "@npmcli/eslint-config": "^3.0.1", + "@npmcli/template-oss": "3.5.0", + "tap": "^16.0.1" }, - "author": "GitHub Inc.", - "license": "ISC", "scripts": { "test": "tap", "snap": "tap", "preversion": "npm test", "postversion": "npm publish", - "postpublish": "git push origin --follow-tags", + "prepublishOnly": "git push origin --follow-tags", "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix", - "prepublishOnly": "git push origin --follow-tags", "posttest": "npm run lint" }, - "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "3.5.0", - "tap": "^16.3.0" + "repository": { + "type": "git", + "url": "https://github.com/npm/move-file.git" }, - "files": [ - "bin/", - "lib/" - ], + "tap": { + "check-coverage": true + }, + "license": "MIT", "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" }, + "author": "GitHub Inc.", "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", "version": "3.5.0" diff --git a/node_modules/node-gyp/node_modules/are-we-there-yet/LICENSE.md b/node_modules/node-gyp/node_modules/are-we-there-yet/LICENSE.md new file mode 100644 index 0000000000000..845be76f64e78 --- /dev/null +++ b/node_modules/node-gyp/node_modules/are-we-there-yet/LICENSE.md @@ -0,0 +1,18 @@ +ISC License + +Copyright npm, Inc. + +Permission to use, copy, modify, and/or distribute this +software for any purpose with or without fee is hereby +granted, provided that the above copyright notice and this +permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO +EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE +USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/node-gyp/node_modules/are-we-there-yet/lib/index.js b/node_modules/node-gyp/node_modules/are-we-there-yet/lib/index.js new file mode 100644 index 0000000000000..57d8743fdad17 --- /dev/null +++ b/node_modules/node-gyp/node_modules/are-we-there-yet/lib/index.js @@ -0,0 +1,4 @@ +'use strict' +exports.TrackerGroup = require('./tracker-group.js') +exports.Tracker = require('./tracker.js') +exports.TrackerStream = require('./tracker-stream.js') diff --git a/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker-base.js b/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker-base.js new file mode 100644 index 0000000000000..6f436875578a7 --- /dev/null +++ b/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker-base.js @@ -0,0 +1,11 @@ +'use strict' +var EventEmitter = require('events').EventEmitter +var util = require('util') + +var trackerId = 0 +var TrackerBase = module.exports = function (name) { + EventEmitter.call(this) + this.id = ++trackerId + this.name = name +} +util.inherits(TrackerBase, EventEmitter) diff --git a/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker-group.js b/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker-group.js new file mode 100644 index 0000000000000..a3c7af804c4d3 --- /dev/null +++ b/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker-group.js @@ -0,0 +1,116 @@ +'use strict' +var util = require('util') +var TrackerBase = require('./tracker-base.js') +var Tracker = require('./tracker.js') +var TrackerStream = require('./tracker-stream.js') + +var TrackerGroup = module.exports = function (name) { + TrackerBase.call(this, name) + this.parentGroup = null + this.trackers = [] + this.completion = {} + this.weight = {} + this.totalWeight = 0 + this.finished = false + this.bubbleChange = bubbleChange(this) +} +util.inherits(TrackerGroup, TrackerBase) + +function bubbleChange (trackerGroup) { + return function (name, completed, tracker) { + trackerGroup.completion[tracker.id] = completed + if (trackerGroup.finished) { + return + } + trackerGroup.emit('change', name || trackerGroup.name, trackerGroup.completed(), trackerGroup) + } +} + +TrackerGroup.prototype.nameInTree = function () { + var names = [] + var from = this + while (from) { + names.unshift(from.name) + from = from.parentGroup + } + return names.join('/') +} + +TrackerGroup.prototype.addUnit = function (unit, weight) { + if (unit.addUnit) { + var toTest = this + while (toTest) { + if (unit === toTest) { + throw new Error( + 'Attempted to add tracker group ' + + unit.name + ' to tree that already includes it ' + + this.nameInTree(this)) + } + toTest = toTest.parentGroup + } + unit.parentGroup = this + } + this.weight[unit.id] = weight || 1 + this.totalWeight += this.weight[unit.id] + this.trackers.push(unit) + this.completion[unit.id] = unit.completed() + unit.on('change', this.bubbleChange) + if (!this.finished) { + this.emit('change', unit.name, this.completion[unit.id], unit) + } + return unit +} + +TrackerGroup.prototype.completed = function () { + if (this.trackers.length === 0) { + return 0 + } + var valPerWeight = 1 / this.totalWeight + var completed = 0 + for (var ii = 0; ii < this.trackers.length; ii++) { + var trackerId = this.trackers[ii].id + completed += + valPerWeight * this.weight[trackerId] * this.completion[trackerId] + } + return completed +} + +TrackerGroup.prototype.newGroup = function (name, weight) { + return this.addUnit(new TrackerGroup(name), weight) +} + +TrackerGroup.prototype.newItem = function (name, todo, weight) { + return this.addUnit(new Tracker(name, todo), weight) +} + +TrackerGroup.prototype.newStream = function (name, todo, weight) { + return this.addUnit(new TrackerStream(name, todo), weight) +} + +TrackerGroup.prototype.finish = function () { + this.finished = true + if (!this.trackers.length) { + this.addUnit(new Tracker(), 1, true) + } + for (var ii = 0; ii < this.trackers.length; ii++) { + var tracker = this.trackers[ii] + tracker.finish() + tracker.removeListener('change', this.bubbleChange) + } + this.emit('change', this.name, 1, this) +} + +var buffer = ' ' +TrackerGroup.prototype.debug = function (depth) { + depth = depth || 0 + var indent = depth ? buffer.slice(0, depth) : '' + var output = indent + (this.name || 'top') + ': ' + this.completed() + '\n' + this.trackers.forEach(function (tracker) { + if (tracker instanceof TrackerGroup) { + output += tracker.debug(depth + 1) + } else { + output += indent + ' ' + tracker.name + ': ' + tracker.completed() + '\n' + } + }) + return output +} diff --git a/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker-stream.js b/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker-stream.js new file mode 100644 index 0000000000000..e1cf85055702a --- /dev/null +++ b/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker-stream.js @@ -0,0 +1,36 @@ +'use strict' +var util = require('util') +var stream = require('readable-stream') +var delegate = require('delegates') +var Tracker = require('./tracker.js') + +var TrackerStream = module.exports = function (name, size, options) { + stream.Transform.call(this, options) + this.tracker = new Tracker(name, size) + this.name = name + this.id = this.tracker.id + this.tracker.on('change', delegateChange(this)) +} +util.inherits(TrackerStream, stream.Transform) + +function delegateChange (trackerStream) { + return function (name, completion, tracker) { + trackerStream.emit('change', name, completion, trackerStream) + } +} + +TrackerStream.prototype._transform = function (data, encoding, cb) { + this.tracker.completeWork(data.length ? data.length : 1) + this.push(data) + cb() +} + +TrackerStream.prototype._flush = function (cb) { + this.tracker.finish() + cb() +} + +delegate(TrackerStream.prototype, 'tracker') + .method('completed') + .method('addWork') + .method('finish') diff --git a/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker.js b/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker.js new file mode 100644 index 0000000000000..a8f8b3ba01391 --- /dev/null +++ b/node_modules/node-gyp/node_modules/are-we-there-yet/lib/tracker.js @@ -0,0 +1,32 @@ +'use strict' +var util = require('util') +var TrackerBase = require('./tracker-base.js') + +var Tracker = module.exports = function (name, todo) { + TrackerBase.call(this, name) + this.workDone = 0 + this.workTodo = todo || 0 +} +util.inherits(Tracker, TrackerBase) + +Tracker.prototype.completed = function () { + return this.workTodo === 0 ? 0 : this.workDone / this.workTodo +} + +Tracker.prototype.addWork = function (work) { + this.workTodo += work + this.emit('change', this.name, this.completed(), this) +} + +Tracker.prototype.completeWork = function (work) { + this.workDone += work + if (this.workDone > this.workTodo) { + this.workDone = this.workTodo + } + this.emit('change', this.name, this.completed(), this) +} + +Tracker.prototype.finish = function () { + this.workTodo = this.workDone = 1 + this.emit('change', this.name, 1, this) +} diff --git a/node_modules/node-gyp/node_modules/are-we-there-yet/package.json b/node_modules/node-gyp/node_modules/are-we-there-yet/package.json new file mode 100644 index 0000000000000..cc3d7504299fa --- /dev/null +++ b/node_modules/node-gyp/node_modules/are-we-there-yet/package.json @@ -0,0 +1,56 @@ +{ + "name": "are-we-there-yet", + "version": "3.0.1", + "description": "Keep track of the overall completion of many disparate processes", + "main": "lib/index.js", + "scripts": { + "test": "tap", + "npmclilint": "npmcli-lint", + "lint": "eslint \"**/*.js\"", + "lintfix": "npm run lint -- --fix", + "posttest": "npm run lint", + "postsnap": "npm run lintfix --", + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "snap": "tap", + "postlint": "template-oss-check", + "template-oss-apply": "template-oss-apply --force" + }, + "repository": { + "type": "git", + "url": "https://github.com/npm/are-we-there-yet.git" + }, + "author": "GitHub Inc.", + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/are-we-there-yet/issues" + }, + "homepage": "https://github.com/npm/are-we-there-yet", + "devDependencies": { + "@npmcli/eslint-config": "^3.0.1", + "@npmcli/template-oss": "3.5.0", + "tap": "^16.0.1" + }, + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "files": [ + "bin/", + "lib/" + ], + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + }, + "tap": { + "branches": 68, + "statements": 92, + "functions": 86, + "lines": 92 + }, + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "version": "3.5.0" + } +} diff --git a/node_modules/node-gyp/node_modules/cacache/LICENSE.md b/node_modules/node-gyp/node_modules/cacache/LICENSE.md new file mode 100644 index 0000000000000..8d28acf866d93 --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/LICENSE.md @@ -0,0 +1,16 @@ +ISC License + +Copyright (c) npm, Inc. + +Permission to use, copy, modify, and/or distribute this software for +any purpose with or without fee is hereby granted, provided that the +above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS +ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE +USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/node-gyp/node_modules/cacache/lib/content/path.js b/node_modules/node-gyp/node_modules/cacache/lib/content/path.js new file mode 100644 index 0000000000000..ad5a76a4f73f2 --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/lib/content/path.js @@ -0,0 +1,29 @@ +'use strict' + +const contentVer = require('../../package.json')['cache-version'].content +const hashToSegments = require('../util/hash-to-segments') +const path = require('path') +const ssri = require('ssri') + +// Current format of content file path: +// +// sha512-BaSE64Hex= -> +// ~/.my-cache/content-v2/sha512/ba/da/55deadbeefc0ffee +// +module.exports = contentPath + +function contentPath (cache, integrity) { + const sri = ssri.parse(integrity, { single: true }) + // contentPath is the *strongest* algo given + return path.join( + contentDir(cache), + sri.algorithm, + ...hashToSegments(sri.hexDigest()) + ) +} + +module.exports.contentDir = contentDir + +function contentDir (cache) { + return path.join(cache, `content-v${contentVer}`) +} diff --git a/node_modules/node-gyp/node_modules/cacache/lib/content/read.js b/node_modules/node-gyp/node_modules/cacache/lib/content/read.js new file mode 100644 index 0000000000000..7c20c75257b4f --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/lib/content/read.js @@ -0,0 +1,241 @@ +'use strict' + +const fs = require('@npmcli/fs') +const fsm = require('fs-minipass') +const ssri = require('ssri') +const contentPath = require('./path') +const Pipeline = require('minipass-pipeline') + +module.exports = read + +const MAX_SINGLE_READ_SIZE = 64 * 1024 * 1024 +async function read (cache, integrity, opts = {}) { + const { size } = opts + const { stat, cpath, sri } = await withContentSri(cache, integrity, async (cpath, sri) => { + // get size + const stat = await fs.stat(cpath) + return { stat, cpath, sri } + }) + if (typeof size === 'number' && stat.size !== size) { + throw sizeError(size, stat.size) + } + + if (stat.size > MAX_SINGLE_READ_SIZE) { + return readPipeline(cpath, stat.size, sri, new Pipeline()).concat() + } + + const data = await fs.readFile(cpath, { encoding: null }) + if (!ssri.checkData(data, sri)) { + throw integrityError(sri, cpath) + } + + return data +} + +const readPipeline = (cpath, size, sri, stream) => { + stream.push( + new fsm.ReadStream(cpath, { + size, + readSize: MAX_SINGLE_READ_SIZE, + }), + ssri.integrityStream({ + integrity: sri, + size, + }) + ) + return stream +} + +module.exports.sync = readSync + +function readSync (cache, integrity, opts = {}) { + const { size } = opts + return withContentSriSync(cache, integrity, (cpath, sri) => { + const data = fs.readFileSync(cpath, { encoding: null }) + if (typeof size === 'number' && size !== data.length) { + throw sizeError(size, data.length) + } + + if (ssri.checkData(data, sri)) { + return data + } + + throw integrityError(sri, cpath) + }) +} + +module.exports.stream = readStream +module.exports.readStream = readStream + +function readStream (cache, integrity, opts = {}) { + const { size } = opts + const stream = new Pipeline() + // Set all this up to run on the stream and then just return the stream + Promise.resolve().then(async () => { + const { stat, cpath, sri } = await withContentSri(cache, integrity, async (cpath, sri) => { + // just stat to ensure it exists + const stat = await fs.stat(cpath) + return { stat, cpath, sri } + }) + if (typeof size === 'number' && size !== stat.size) { + return stream.emit('error', sizeError(size, stat.size)) + } + + return readPipeline(cpath, stat.size, sri, stream) + }).catch(err => stream.emit('error', err)) + + return stream +} + +module.exports.copy = copy +module.exports.copy.sync = copySync + +function copy (cache, integrity, dest) { + return withContentSri(cache, integrity, (cpath, sri) => { + return fs.copyFile(cpath, dest) + }) +} + +function copySync (cache, integrity, dest) { + return withContentSriSync(cache, integrity, (cpath, sri) => { + return fs.copyFileSync(cpath, dest) + }) +} + +module.exports.hasContent = hasContent + +async function hasContent (cache, integrity) { + if (!integrity) { + return false + } + + try { + return await withContentSri(cache, integrity, async (cpath, sri) => { + const stat = await fs.stat(cpath) + return { size: stat.size, sri, stat } + }) + } catch (err) { + if (err.code === 'ENOENT') { + return false + } + + if (err.code === 'EPERM') { + /* istanbul ignore else */ + if (process.platform !== 'win32') { + throw err + } else { + return false + } + } + } +} + +module.exports.hasContent.sync = hasContentSync + +function hasContentSync (cache, integrity) { + if (!integrity) { + return false + } + + return withContentSriSync(cache, integrity, (cpath, sri) => { + try { + const stat = fs.statSync(cpath) + return { size: stat.size, sri, stat } + } catch (err) { + if (err.code === 'ENOENT') { + return false + } + + if (err.code === 'EPERM') { + /* istanbul ignore else */ + if (process.platform !== 'win32') { + throw err + } else { + return false + } + } + } + }) +} + +async function withContentSri (cache, integrity, fn) { + const sri = ssri.parse(integrity) + // If `integrity` has multiple entries, pick the first digest + // with available local data. + const algo = sri.pickAlgorithm() + const digests = sri[algo] + + if (digests.length <= 1) { + const cpath = contentPath(cache, digests[0]) + return fn(cpath, digests[0]) + } else { + // Can't use race here because a generic error can happen before + // a ENOENT error, and can happen before a valid result + const results = await Promise.all(digests.map(async (meta) => { + try { + return await withContentSri(cache, meta, fn) + } catch (err) { + if (err.code === 'ENOENT') { + return Object.assign( + new Error('No matching content found for ' + sri.toString()), + { code: 'ENOENT' } + ) + } + return err + } + })) + // Return the first non error if it is found + const result = results.find((r) => !(r instanceof Error)) + if (result) { + return result + } + + // Throw the No matching content found error + const enoentError = results.find((r) => r.code === 'ENOENT') + if (enoentError) { + throw enoentError + } + + // Throw generic error + throw results.find((r) => r instanceof Error) + } +} + +function withContentSriSync (cache, integrity, fn) { + const sri = ssri.parse(integrity) + // If `integrity` has multiple entries, pick the first digest + // with available local data. + const algo = sri.pickAlgorithm() + const digests = sri[algo] + if (digests.length <= 1) { + const cpath = contentPath(cache, digests[0]) + return fn(cpath, digests[0]) + } else { + let lastErr = null + for (const meta of digests) { + try { + return withContentSriSync(cache, meta, fn) + } catch (err) { + lastErr = err + } + } + throw lastErr + } +} + +function sizeError (expected, found) { + /* eslint-disable-next-line max-len */ + const err = new Error(`Bad data size: expected inserted data to be ${expected} bytes, but got ${found} instead`) + err.expected = expected + err.found = found + err.code = 'EBADSIZE' + return err +} + +function integrityError (sri, path) { + const err = new Error(`Integrity verification failed for ${sri} (${path})`) + err.code = 'EINTEGRITY' + err.sri = sri + err.path = path + return err +} diff --git a/node_modules/node-gyp/node_modules/cacache/lib/content/rm.js b/node_modules/node-gyp/node_modules/cacache/lib/content/rm.js new file mode 100644 index 0000000000000..f7333053b393f --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/lib/content/rm.js @@ -0,0 +1,20 @@ +'use strict' + +const util = require('util') + +const contentPath = require('./path') +const { hasContent } = require('./read') +const rimraf = util.promisify(require('rimraf')) + +module.exports = rm + +async function rm (cache, integrity) { + const content = await hasContent(cache, integrity) + // ~pretty~ sure we can't end up with a content lacking sri, but be safe + if (content && content.sri) { + await rimraf(contentPath(cache, content.sri)) + return true + } else { + return false + } +} diff --git a/node_modules/node-gyp/node_modules/cacache/lib/content/write.js b/node_modules/node-gyp/node_modules/cacache/lib/content/write.js new file mode 100644 index 0000000000000..0e8c0f4936064 --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/lib/content/write.js @@ -0,0 +1,189 @@ +'use strict' + +const events = require('events') +const util = require('util') + +const contentPath = require('./path') +const fixOwner = require('../util/fix-owner') +const fs = require('@npmcli/fs') +const moveFile = require('../util/move-file') +const Minipass = require('minipass') +const Pipeline = require('minipass-pipeline') +const Flush = require('minipass-flush') +const path = require('path') +const rimraf = util.promisify(require('rimraf')) +const ssri = require('ssri') +const uniqueFilename = require('unique-filename') +const fsm = require('fs-minipass') + +module.exports = write + +async function write (cache, data, opts = {}) { + const { algorithms, size, integrity } = opts + if (algorithms && algorithms.length > 1) { + throw new Error('opts.algorithms only supports a single algorithm for now') + } + + if (typeof size === 'number' && data.length !== size) { + throw sizeError(size, data.length) + } + + const sri = ssri.fromData(data, algorithms ? { algorithms } : {}) + if (integrity && !ssri.checkData(data, integrity, opts)) { + throw checksumError(integrity, sri) + } + + const tmp = await makeTmp(cache, opts) + try { + await fs.writeFile(tmp.target, data, { flag: 'wx' }) + await moveToDestination(tmp, cache, sri, opts) + return { integrity: sri, size: data.length } + } finally { + if (!tmp.moved) { + await rimraf(tmp.target) + } + } +} + +module.exports.stream = writeStream + +// writes proxied to the 'inputStream' that is passed to the Promise +// 'end' is deferred until content is handled. +class CacacheWriteStream extends Flush { + constructor (cache, opts) { + super() + this.opts = opts + this.cache = cache + this.inputStream = new Minipass() + this.inputStream.on('error', er => this.emit('error', er)) + this.inputStream.on('drain', () => this.emit('drain')) + this.handleContentP = null + } + + write (chunk, encoding, cb) { + if (!this.handleContentP) { + this.handleContentP = handleContent( + this.inputStream, + this.cache, + this.opts + ) + } + return this.inputStream.write(chunk, encoding, cb) + } + + flush (cb) { + this.inputStream.end(() => { + if (!this.handleContentP) { + const e = new Error('Cache input stream was empty') + e.code = 'ENODATA' + // empty streams are probably emitting end right away. + // defer this one tick by rejecting a promise on it. + return Promise.reject(e).catch(cb) + } + // eslint-disable-next-line promise/catch-or-return + this.handleContentP.then( + (res) => { + res.integrity && this.emit('integrity', res.integrity) + // eslint-disable-next-line promise/always-return + res.size !== null && this.emit('size', res.size) + cb() + }, + (er) => cb(er) + ) + }) + } +} + +function writeStream (cache, opts = {}) { + return new CacacheWriteStream(cache, opts) +} + +async function handleContent (inputStream, cache, opts) { + const tmp = await makeTmp(cache, opts) + try { + const res = await pipeToTmp(inputStream, cache, tmp.target, opts) + await moveToDestination( + tmp, + cache, + res.integrity, + opts + ) + return res + } finally { + if (!tmp.moved) { + await rimraf(tmp.target) + } + } +} + +async function pipeToTmp (inputStream, cache, tmpTarget, opts) { + const outStream = new fsm.WriteStream(tmpTarget, { + flags: 'wx', + }) + + if (opts.integrityEmitter) { + // we need to create these all simultaneously since they can fire in any order + const [integrity, size] = await Promise.all([ + events.once(opts.integrityEmitter, 'integrity').then(res => res[0]), + events.once(opts.integrityEmitter, 'size').then(res => res[0]), + new Pipeline(inputStream, outStream).promise(), + ]) + return { integrity, size } + } + + let integrity + let size + const hashStream = ssri.integrityStream({ + integrity: opts.integrity, + algorithms: opts.algorithms, + size: opts.size, + }) + hashStream.on('integrity', i => { + integrity = i + }) + hashStream.on('size', s => { + size = s + }) + + const pipeline = new Pipeline(inputStream, hashStream, outStream) + await pipeline.promise() + return { integrity, size } +} + +async function makeTmp (cache, opts) { + const tmpTarget = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix) + await fixOwner.mkdirfix(cache, path.dirname(tmpTarget)) + return { + target: tmpTarget, + moved: false, + } +} + +async function moveToDestination (tmp, cache, sri, opts) { + const destination = contentPath(cache, sri) + const destDir = path.dirname(destination) + + await fixOwner.mkdirfix(cache, destDir) + await moveFile(tmp.target, destination) + tmp.moved = true + await fixOwner.chownr(cache, destination) +} + +function sizeError (expected, found) { + /* eslint-disable-next-line max-len */ + const err = new Error(`Bad data size: expected inserted data to be ${expected} bytes, but got ${found} instead`) + err.expected = expected + err.found = found + err.code = 'EBADSIZE' + return err +} + +function checksumError (expected, found) { + const err = new Error(`Integrity check failed: + Wanted: ${expected} + Found: ${found}`) + err.code = 'EINTEGRITY' + err.expected = expected + err.found = found + return err +} diff --git a/node_modules/node-gyp/node_modules/cacache/lib/entry-index.js b/node_modules/node-gyp/node_modules/cacache/lib/entry-index.js new file mode 100644 index 0000000000000..1dc73a93f6b29 --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/lib/entry-index.js @@ -0,0 +1,404 @@ +'use strict' + +const util = require('util') +const crypto = require('crypto') +const fs = require('@npmcli/fs') +const Minipass = require('minipass') +const path = require('path') +const ssri = require('ssri') +const uniqueFilename = require('unique-filename') + +const contentPath = require('./content/path') +const fixOwner = require('./util/fix-owner') +const hashToSegments = require('./util/hash-to-segments') +const indexV = require('../package.json')['cache-version'].index +const moveFile = require('@npmcli/move-file') +const _rimraf = require('rimraf') +const rimraf = util.promisify(_rimraf) +rimraf.sync = _rimraf.sync + +module.exports.NotFoundError = class NotFoundError extends Error { + constructor (cache, key) { + super(`No cache entry for ${key} found in ${cache}`) + this.code = 'ENOENT' + this.cache = cache + this.key = key + } +} + +module.exports.compact = compact + +async function compact (cache, key, matchFn, opts = {}) { + const bucket = bucketPath(cache, key) + const entries = await bucketEntries(bucket) + const newEntries = [] + // we loop backwards because the bottom-most result is the newest + // since we add new entries with appendFile + for (let i = entries.length - 1; i >= 0; --i) { + const entry = entries[i] + // a null integrity could mean either a delete was appended + // or the user has simply stored an index that does not map + // to any content. we determine if the user wants to keep the + // null integrity based on the validateEntry function passed in options. + // if the integrity is null and no validateEntry is provided, we break + // as we consider the null integrity to be a deletion of everything + // that came before it. + if (entry.integrity === null && !opts.validateEntry) { + break + } + + // if this entry is valid, and it is either the first entry or + // the newEntries array doesn't already include an entry that + // matches this one based on the provided matchFn, then we add + // it to the beginning of our list + if ((!opts.validateEntry || opts.validateEntry(entry) === true) && + (newEntries.length === 0 || + !newEntries.find((oldEntry) => matchFn(oldEntry, entry)))) { + newEntries.unshift(entry) + } + } + + const newIndex = '\n' + newEntries.map((entry) => { + const stringified = JSON.stringify(entry) + const hash = hashEntry(stringified) + return `${hash}\t${stringified}` + }).join('\n') + + const setup = async () => { + const target = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix) + await fixOwner.mkdirfix(cache, path.dirname(target)) + return { + target, + moved: false, + } + } + + const teardown = async (tmp) => { + if (!tmp.moved) { + return rimraf(tmp.target) + } + } + + const write = async (tmp) => { + await fs.writeFile(tmp.target, newIndex, { flag: 'wx' }) + await fixOwner.mkdirfix(cache, path.dirname(bucket)) + // we use @npmcli/move-file directly here because we + // want to overwrite the existing file + await moveFile(tmp.target, bucket) + tmp.moved = true + try { + await fixOwner.chownr(cache, bucket) + } catch (err) { + if (err.code !== 'ENOENT') { + throw err + } + } + } + + // write the file atomically + const tmp = await setup() + try { + await write(tmp) + } finally { + await teardown(tmp) + } + + // we reverse the list we generated such that the newest + // entries come first in order to make looping through them easier + // the true passed to formatEntry tells it to keep null + // integrity values, if they made it this far it's because + // validateEntry returned true, and as such we should return it + return newEntries.reverse().map((entry) => formatEntry(cache, entry, true)) +} + +module.exports.insert = insert + +async function insert (cache, key, integrity, opts = {}) { + const { metadata, size } = opts + const bucket = bucketPath(cache, key) + const entry = { + key, + integrity: integrity && ssri.stringify(integrity), + time: Date.now(), + size, + metadata, + } + try { + await fixOwner.mkdirfix(cache, path.dirname(bucket)) + const stringified = JSON.stringify(entry) + // NOTE - Cleverness ahoy! + // + // This works because it's tremendously unlikely for an entry to corrupt + // another while still preserving the string length of the JSON in + // question. So, we just slap the length in there and verify it on read. + // + // Thanks to @isaacs for the whiteboarding session that ended up with + // this. + await fs.appendFile(bucket, `\n${hashEntry(stringified)}\t${stringified}`) + await fixOwner.chownr(cache, bucket) + } catch (err) { + if (err.code === 'ENOENT') { + return undefined + } + + throw err + // There's a class of race conditions that happen when things get deleted + // during fixOwner, or between the two mkdirfix/chownr calls. + // + // It's perfectly fine to just not bother in those cases and lie + // that the index entry was written. Because it's a cache. + } + return formatEntry(cache, entry) +} + +module.exports.insert.sync = insertSync + +function insertSync (cache, key, integrity, opts = {}) { + const { metadata, size } = opts + const bucket = bucketPath(cache, key) + const entry = { + key, + integrity: integrity && ssri.stringify(integrity), + time: Date.now(), + size, + metadata, + } + fixOwner.mkdirfix.sync(cache, path.dirname(bucket)) + const stringified = JSON.stringify(entry) + fs.appendFileSync(bucket, `\n${hashEntry(stringified)}\t${stringified}`) + try { + fixOwner.chownr.sync(cache, bucket) + } catch (err) { + if (err.code !== 'ENOENT') { + throw err + } + } + return formatEntry(cache, entry) +} + +module.exports.find = find + +async function find (cache, key) { + const bucket = bucketPath(cache, key) + try { + const entries = await bucketEntries(bucket) + return entries.reduce((latest, next) => { + if (next && next.key === key) { + return formatEntry(cache, next) + } else { + return latest + } + }, null) + } catch (err) { + if (err.code === 'ENOENT') { + return null + } else { + throw err + } + } +} + +module.exports.find.sync = findSync + +function findSync (cache, key) { + const bucket = bucketPath(cache, key) + try { + return bucketEntriesSync(bucket).reduce((latest, next) => { + if (next && next.key === key) { + return formatEntry(cache, next) + } else { + return latest + } + }, null) + } catch (err) { + if (err.code === 'ENOENT') { + return null + } else { + throw err + } + } +} + +module.exports.delete = del + +function del (cache, key, opts = {}) { + if (!opts.removeFully) { + return insert(cache, key, null, opts) + } + + const bucket = bucketPath(cache, key) + return rimraf(bucket) +} + +module.exports.delete.sync = delSync + +function delSync (cache, key, opts = {}) { + if (!opts.removeFully) { + return insertSync(cache, key, null, opts) + } + + const bucket = bucketPath(cache, key) + return rimraf.sync(bucket) +} + +module.exports.lsStream = lsStream + +function lsStream (cache) { + const indexDir = bucketDir(cache) + const stream = new Minipass({ objectMode: true }) + + // Set all this up to run on the stream and then just return the stream + Promise.resolve().then(async () => { + const buckets = await readdirOrEmpty(indexDir) + await Promise.all(buckets.map(async (bucket) => { + const bucketPath = path.join(indexDir, bucket) + const subbuckets = await readdirOrEmpty(bucketPath) + await Promise.all(subbuckets.map(async (subbucket) => { + const subbucketPath = path.join(bucketPath, subbucket) + + // "/cachename/<bucket 0xFF>/<bucket 0xFF>./*" + const subbucketEntries = await readdirOrEmpty(subbucketPath) + await Promise.all(subbucketEntries.map(async (entry) => { + const entryPath = path.join(subbucketPath, entry) + try { + const entries = await bucketEntries(entryPath) + // using a Map here prevents duplicate keys from showing up + // twice, I guess? + const reduced = entries.reduce((acc, entry) => { + acc.set(entry.key, entry) + return acc + }, new Map()) + // reduced is a map of key => entry + for (const entry of reduced.values()) { + const formatted = formatEntry(cache, entry) + if (formatted) { + stream.write(formatted) + } + } + } catch (err) { + if (err.code === 'ENOENT') { + return undefined + } + throw err + } + })) + })) + })) + stream.end() + return stream + }).catch(err => stream.emit('error', err)) + + return stream +} + +module.exports.ls = ls + +async function ls (cache) { + const entries = await lsStream(cache).collect() + return entries.reduce((acc, xs) => { + acc[xs.key] = xs + return acc + }, {}) +} + +module.exports.bucketEntries = bucketEntries + +async function bucketEntries (bucket, filter) { + const data = await fs.readFile(bucket, 'utf8') + return _bucketEntries(data, filter) +} + +module.exports.bucketEntries.sync = bucketEntriesSync + +function bucketEntriesSync (bucket, filter) { + const data = fs.readFileSync(bucket, 'utf8') + return _bucketEntries(data, filter) +} + +function _bucketEntries (data, filter) { + const entries = [] + data.split('\n').forEach((entry) => { + if (!entry) { + return + } + + const pieces = entry.split('\t') + if (!pieces[1] || hashEntry(pieces[1]) !== pieces[0]) { + // Hash is no good! Corruption or malice? Doesn't matter! + // EJECT EJECT + return + } + let obj + try { + obj = JSON.parse(pieces[1]) + } catch (e) { + // Entry is corrupted! + return + } + if (obj) { + entries.push(obj) + } + }) + return entries +} + +module.exports.bucketDir = bucketDir + +function bucketDir (cache) { + return path.join(cache, `index-v${indexV}`) +} + +module.exports.bucketPath = bucketPath + +function bucketPath (cache, key) { + const hashed = hashKey(key) + return path.join.apply( + path, + [bucketDir(cache)].concat(hashToSegments(hashed)) + ) +} + +module.exports.hashKey = hashKey + +function hashKey (key) { + return hash(key, 'sha256') +} + +module.exports.hashEntry = hashEntry + +function hashEntry (str) { + return hash(str, 'sha1') +} + +function hash (str, digest) { + return crypto + .createHash(digest) + .update(str) + .digest('hex') +} + +function formatEntry (cache, entry, keepAll) { + // Treat null digests as deletions. They'll shadow any previous entries. + if (!entry.integrity && !keepAll) { + return null + } + + return { + key: entry.key, + integrity: entry.integrity, + path: entry.integrity ? contentPath(cache, entry.integrity) : undefined, + size: entry.size, + time: entry.time, + metadata: entry.metadata, + } +} + +function readdirOrEmpty (dir) { + return fs.readdir(dir).catch((err) => { + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') { + return [] + } + + throw err + }) +} diff --git a/node_modules/node-gyp/node_modules/cacache/lib/get.js b/node_modules/node-gyp/node_modules/cacache/lib/get.js new file mode 100644 index 0000000000000..254b4ecc38b57 --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/lib/get.js @@ -0,0 +1,225 @@ +'use strict' + +const Collect = require('minipass-collect') +const Minipass = require('minipass') +const Pipeline = require('minipass-pipeline') + +const index = require('./entry-index') +const memo = require('./memoization') +const read = require('./content/read') + +async function getData (cache, key, opts = {}) { + const { integrity, memoize, size } = opts + const memoized = memo.get(cache, key, opts) + if (memoized && memoize !== false) { + return { + metadata: memoized.entry.metadata, + data: memoized.data, + integrity: memoized.entry.integrity, + size: memoized.entry.size, + } + } + + const entry = await index.find(cache, key, opts) + if (!entry) { + throw new index.NotFoundError(cache, key) + } + const data = await read(cache, entry.integrity, { integrity, size }) + if (memoize) { + memo.put(cache, entry, data, opts) + } + + return { + data, + metadata: entry.metadata, + size: entry.size, + integrity: entry.integrity, + } +} +module.exports = getData + +async function getDataByDigest (cache, key, opts = {}) { + const { integrity, memoize, size } = opts + const memoized = memo.get.byDigest(cache, key, opts) + if (memoized && memoize !== false) { + return memoized + } + + const res = await read(cache, key, { integrity, size }) + if (memoize) { + memo.put.byDigest(cache, key, res, opts) + } + return res +} +module.exports.byDigest = getDataByDigest + +function getDataSync (cache, key, opts = {}) { + const { integrity, memoize, size } = opts + const memoized = memo.get(cache, key, opts) + + if (memoized && memoize !== false) { + return { + metadata: memoized.entry.metadata, + data: memoized.data, + integrity: memoized.entry.integrity, + size: memoized.entry.size, + } + } + const entry = index.find.sync(cache, key, opts) + if (!entry) { + throw new index.NotFoundError(cache, key) + } + const data = read.sync(cache, entry.integrity, { + integrity: integrity, + size: size, + }) + const res = { + metadata: entry.metadata, + data: data, + size: entry.size, + integrity: entry.integrity, + } + if (memoize) { + memo.put(cache, entry, res.data, opts) + } + + return res +} + +module.exports.sync = getDataSync + +function getDataByDigestSync (cache, digest, opts = {}) { + const { integrity, memoize, size } = opts + const memoized = memo.get.byDigest(cache, digest, opts) + + if (memoized && memoize !== false) { + return memoized + } + + const res = read.sync(cache, digest, { + integrity: integrity, + size: size, + }) + if (memoize) { + memo.put.byDigest(cache, digest, res, opts) + } + + return res +} +module.exports.sync.byDigest = getDataByDigestSync + +const getMemoizedStream = (memoized) => { + const stream = new Minipass() + stream.on('newListener', function (ev, cb) { + ev === 'metadata' && cb(memoized.entry.metadata) + ev === 'integrity' && cb(memoized.entry.integrity) + ev === 'size' && cb(memoized.entry.size) + }) + stream.end(memoized.data) + return stream +} + +function getStream (cache, key, opts = {}) { + const { memoize, size } = opts + const memoized = memo.get(cache, key, opts) + if (memoized && memoize !== false) { + return getMemoizedStream(memoized) + } + + const stream = new Pipeline() + // Set all this up to run on the stream and then just return the stream + Promise.resolve().then(async () => { + const entry = await index.find(cache, key) + if (!entry) { + throw new index.NotFoundError(cache, key) + } + + stream.emit('metadata', entry.metadata) + stream.emit('integrity', entry.integrity) + stream.emit('size', entry.size) + stream.on('newListener', function (ev, cb) { + ev === 'metadata' && cb(entry.metadata) + ev === 'integrity' && cb(entry.integrity) + ev === 'size' && cb(entry.size) + }) + + const src = read.readStream( + cache, + entry.integrity, + { ...opts, size: typeof size !== 'number' ? entry.size : size } + ) + + if (memoize) { + const memoStream = new Collect.PassThrough() + memoStream.on('collect', data => memo.put(cache, entry, data, opts)) + stream.unshift(memoStream) + } + stream.unshift(src) + return stream + }).catch((err) => stream.emit('error', err)) + + return stream +} + +module.exports.stream = getStream + +function getStreamDigest (cache, integrity, opts = {}) { + const { memoize } = opts + const memoized = memo.get.byDigest(cache, integrity, opts) + if (memoized && memoize !== false) { + const stream = new Minipass() + stream.end(memoized) + return stream + } else { + const stream = read.readStream(cache, integrity, opts) + if (!memoize) { + return stream + } + + const memoStream = new Collect.PassThrough() + memoStream.on('collect', data => memo.put.byDigest( + cache, + integrity, + data, + opts + )) + return new Pipeline(stream, memoStream) + } +} + +module.exports.stream.byDigest = getStreamDigest + +function info (cache, key, opts = {}) { + const { memoize } = opts + const memoized = memo.get(cache, key, opts) + if (memoized && memoize !== false) { + return Promise.resolve(memoized.entry) + } else { + return index.find(cache, key) + } +} +module.exports.info = info + +async function copy (cache, key, dest, opts = {}) { + const entry = await index.find(cache, key, opts) + if (!entry) { + throw new index.NotFoundError(cache, key) + } + await read.copy(cache, entry.integrity, dest, opts) + return { + metadata: entry.metadata, + size: entry.size, + integrity: entry.integrity, + } +} + +module.exports.copy = copy + +async function copyByDigest (cache, key, dest, opts = {}) { + await read.copy(cache, key, dest, opts) + return key +} + +module.exports.copy.byDigest = copyByDigest + +module.exports.hasContent = read.hasContent diff --git a/node_modules/node-gyp/node_modules/cacache/lib/index.js b/node_modules/node-gyp/node_modules/cacache/lib/index.js new file mode 100644 index 0000000000000..1c56be68dd8fd --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/lib/index.js @@ -0,0 +1,45 @@ +'use strict' + +const get = require('./get.js') +const put = require('./put.js') +const rm = require('./rm.js') +const verify = require('./verify.js') +const { clearMemoized } = require('./memoization.js') +const tmp = require('./util/tmp.js') +const index = require('./entry-index.js') + +module.exports.index = {} +module.exports.index.compact = index.compact +module.exports.index.insert = index.insert + +module.exports.ls = index.ls +module.exports.ls.stream = index.lsStream + +module.exports.get = get +module.exports.get.byDigest = get.byDigest +module.exports.get.sync = get.sync +module.exports.get.sync.byDigest = get.sync.byDigest +module.exports.get.stream = get.stream +module.exports.get.stream.byDigest = get.stream.byDigest +module.exports.get.copy = get.copy +module.exports.get.copy.byDigest = get.copy.byDigest +module.exports.get.info = get.info +module.exports.get.hasContent = get.hasContent +module.exports.get.hasContent.sync = get.hasContent.sync + +module.exports.put = put +module.exports.put.stream = put.stream + +module.exports.rm = rm.entry +module.exports.rm.all = rm.all +module.exports.rm.entry = module.exports.rm +module.exports.rm.content = rm.content + +module.exports.clearMemoized = clearMemoized + +module.exports.tmp = {} +module.exports.tmp.mkdir = tmp.mkdir +module.exports.tmp.withTmp = tmp.withTmp + +module.exports.verify = verify +module.exports.verify.lastRun = verify.lastRun diff --git a/node_modules/node-gyp/node_modules/cacache/lib/memoization.js b/node_modules/node-gyp/node_modules/cacache/lib/memoization.js new file mode 100644 index 0000000000000..0ff604a479c9c --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/lib/memoization.js @@ -0,0 +1,72 @@ +'use strict' + +const LRU = require('lru-cache') + +const MEMOIZED = new LRU({ + max: 500, + maxSize: 50 * 1024 * 1024, // 50MB + ttl: 3 * 60 * 1000, // 3 minutes + sizeCalculation: (entry, key) => key.startsWith('key:') ? entry.data.length : entry.length, +}) + +module.exports.clearMemoized = clearMemoized + +function clearMemoized () { + const old = {} + MEMOIZED.forEach((v, k) => { + old[k] = v + }) + MEMOIZED.clear() + return old +} + +module.exports.put = put + +function put (cache, entry, data, opts) { + pickMem(opts).set(`key:${cache}:${entry.key}`, { entry, data }) + putDigest(cache, entry.integrity, data, opts) +} + +module.exports.put.byDigest = putDigest + +function putDigest (cache, integrity, data, opts) { + pickMem(opts).set(`digest:${cache}:${integrity}`, data) +} + +module.exports.get = get + +function get (cache, key, opts) { + return pickMem(opts).get(`key:${cache}:${key}`) +} + +module.exports.get.byDigest = getDigest + +function getDigest (cache, integrity, opts) { + return pickMem(opts).get(`digest:${cache}:${integrity}`) +} + +class ObjProxy { + constructor (obj) { + this.obj = obj + } + + get (key) { + return this.obj[key] + } + + set (key, val) { + this.obj[key] = val + } +} + +function pickMem (opts) { + if (!opts || !opts.memoize) { + return MEMOIZED + } else if (opts.memoize.get && opts.memoize.set) { + return opts.memoize + } else if (typeof opts.memoize === 'object') { + return new ObjProxy(opts.memoize) + } else { + return MEMOIZED + } +} diff --git a/node_modules/node-gyp/node_modules/cacache/lib/put.js b/node_modules/node-gyp/node_modules/cacache/lib/put.js new file mode 100644 index 0000000000000..9fc932d5f6dec --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/lib/put.js @@ -0,0 +1,80 @@ +'use strict' + +const index = require('./entry-index') +const memo = require('./memoization') +const write = require('./content/write') +const Flush = require('minipass-flush') +const { PassThrough } = require('minipass-collect') +const Pipeline = require('minipass-pipeline') + +const putOpts = (opts) => ({ + algorithms: ['sha512'], + ...opts, +}) + +module.exports = putData + +async function putData (cache, key, data, opts = {}) { + const { memoize } = opts + opts = putOpts(opts) + const res = await write(cache, data, opts) + const entry = await index.insert(cache, key, res.integrity, { ...opts, size: res.size }) + if (memoize) { + memo.put(cache, entry, data, opts) + } + + return res.integrity +} + +module.exports.stream = putStream + +function putStream (cache, key, opts = {}) { + const { memoize } = opts + opts = putOpts(opts) + let integrity + let size + let error + + let memoData + const pipeline = new Pipeline() + // first item in the pipeline is the memoizer, because we need + // that to end first and get the collected data. + if (memoize) { + const memoizer = new PassThrough().on('collect', data => { + memoData = data + }) + pipeline.push(memoizer) + } + + // contentStream is a write-only, not a passthrough + // no data comes out of it. + const contentStream = write.stream(cache, opts) + .on('integrity', (int) => { + integrity = int + }) + .on('size', (s) => { + size = s + }) + .on('error', (err) => { + error = err + }) + + pipeline.push(contentStream) + + // last but not least, we write the index and emit hash and size, + // and memoize if we're doing that + pipeline.push(new Flush({ + async flush () { + if (!error) { + const entry = await index.insert(cache, key, integrity, { ...opts, size }) + if (memoize && memoData) { + memo.put(cache, entry, memoData, opts) + } + pipeline.emit('integrity', integrity) + pipeline.emit('size', size) + } + }, + })) + + return pipeline +} diff --git a/node_modules/node-gyp/node_modules/cacache/lib/rm.js b/node_modules/node-gyp/node_modules/cacache/lib/rm.js new file mode 100644 index 0000000000000..5f00071770b8d --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/lib/rm.js @@ -0,0 +1,31 @@ +'use strict' + +const util = require('util') + +const index = require('./entry-index') +const memo = require('./memoization') +const path = require('path') +const rimraf = util.promisify(require('rimraf')) +const rmContent = require('./content/rm') + +module.exports = entry +module.exports.entry = entry + +function entry (cache, key, opts) { + memo.clearMemoized() + return index.delete(cache, key, opts) +} + +module.exports.content = content + +function content (cache, integrity) { + memo.clearMemoized() + return rmContent(cache, integrity) +} + +module.exports.all = all + +function all (cache) { + memo.clearMemoized() + return rimraf(path.join(cache, '*(content-*|index-*)')) +} diff --git a/node_modules/cacache/lib/util/fix-owner.js b/node_modules/node-gyp/node_modules/cacache/lib/util/fix-owner.js similarity index 100% rename from node_modules/cacache/lib/util/fix-owner.js rename to node_modules/node-gyp/node_modules/cacache/lib/util/fix-owner.js diff --git a/node_modules/node-gyp/node_modules/cacache/lib/util/hash-to-segments.js b/node_modules/node-gyp/node_modules/cacache/lib/util/hash-to-segments.js new file mode 100644 index 0000000000000..445599b503808 --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/lib/util/hash-to-segments.js @@ -0,0 +1,7 @@ +'use strict' + +module.exports = hashToSegments + +function hashToSegments (hash) { + return [hash.slice(0, 2), hash.slice(2, 4), hash.slice(4)] +} diff --git a/node_modules/node-gyp/node_modules/cacache/lib/util/move-file.js b/node_modules/node-gyp/node_modules/cacache/lib/util/move-file.js new file mode 100644 index 0000000000000..a0b40413cb56e --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/lib/util/move-file.js @@ -0,0 +1,56 @@ +'use strict' + +const fs = require('@npmcli/fs') +const move = require('@npmcli/move-file') +const pinflight = require('promise-inflight') + +module.exports = moveFile + +async function moveFile (src, dest) { + const isWindows = process.platform === 'win32' + + // This isn't quite an fs.rename -- the assumption is that + // if `dest` already exists, and we get certain errors while + // trying to move it, we should just not bother. + // + // In the case of cache corruption, users will receive an + // EINTEGRITY error elsewhere, and can remove the offending + // content their own way. + // + // Note that, as the name suggests, this strictly only supports file moves. + try { + await fs.link(src, dest) + } catch (err) { + if (isWindows && err.code === 'EPERM') { + // XXX This is a really weird way to handle this situation, as it + // results in the src file being deleted even though the dest + // might not exist. Since we pretty much always write files to + // deterministic locations based on content hash, this is likely + // ok (or at worst, just ends in a future cache miss). But it would + // be worth investigating at some time in the future if this is + // really what we want to do here. + } else if (err.code === 'EEXIST' || err.code === 'EBUSY') { + // file already exists, so whatever + } else { + throw err + } + } + try { + await Promise.all([ + fs.unlink(src), + !isWindows && fs.chmod(dest, '0444'), + ]) + } catch (e) { + return pinflight('cacache-move-file:' + dest, async () => { + await fs.stat(dest).catch((err) => { + if (err.code !== 'ENOENT') { + // Something else is wrong here. Bail bail bail + throw err + } + }) + // file doesn't already exist! let's try a rename -> copy fallback + // only delete if it successfully copies + return move(src, dest) + }) + } +} diff --git a/node_modules/node-gyp/node_modules/cacache/lib/util/tmp.js b/node_modules/node-gyp/node_modules/cacache/lib/util/tmp.js new file mode 100644 index 0000000000000..b4437cfcbeed6 --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/lib/util/tmp.js @@ -0,0 +1,33 @@ +'use strict' + +const fs = require('@npmcli/fs') + +const fixOwner = require('./fix-owner') +const path = require('path') + +module.exports.mkdir = mktmpdir + +async function mktmpdir (cache, opts = {}) { + const { tmpPrefix } = opts + const tmpDir = path.join(cache, 'tmp') + await fs.mkdir(tmpDir, { recursive: true, owner: 'inherit' }) + // do not use path.join(), it drops the trailing / if tmpPrefix is unset + const target = `${tmpDir}${path.sep}${tmpPrefix || ''}` + return fs.mkdtemp(target, { owner: 'inherit' }) +} + +module.exports.withTmp = withTmp + +function withTmp (cache, opts, cb) { + if (!cb) { + cb = opts + opts = {} + } + return fs.withTempDir(path.join(cache, 'tmp'), cb, opts) +} + +module.exports.fix = fixtmpdir + +function fixtmpdir (cache) { + return fixOwner(cache, path.join(cache, 'tmp')) +} diff --git a/node_modules/node-gyp/node_modules/cacache/lib/verify.js b/node_modules/node-gyp/node_modules/cacache/lib/verify.js new file mode 100644 index 0000000000000..52692a01d192f --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/lib/verify.js @@ -0,0 +1,257 @@ +'use strict' + +const util = require('util') + +const pMap = require('p-map') +const contentPath = require('./content/path') +const fixOwner = require('./util/fix-owner') +const fs = require('@npmcli/fs') +const fsm = require('fs-minipass') +const glob = util.promisify(require('glob')) +const index = require('./entry-index') +const path = require('path') +const rimraf = util.promisify(require('rimraf')) +const ssri = require('ssri') + +const globify = pattern => pattern.split('\\').join('/') + +const hasOwnProperty = (obj, key) => + Object.prototype.hasOwnProperty.call(obj, key) + +const verifyOpts = (opts) => ({ + concurrency: 20, + log: { silly () {} }, + ...opts, +}) + +module.exports = verify + +async function verify (cache, opts) { + opts = verifyOpts(opts) + opts.log.silly('verify', 'verifying cache at', cache) + + const steps = [ + markStartTime, + fixPerms, + garbageCollect, + rebuildIndex, + cleanTmp, + writeVerifile, + markEndTime, + ] + + const stats = {} + for (const step of steps) { + const label = step.name + const start = new Date() + const s = await step(cache, opts) + if (s) { + Object.keys(s).forEach((k) => { + stats[k] = s[k] + }) + } + const end = new Date() + if (!stats.runTime) { + stats.runTime = {} + } + stats.runTime[label] = end - start + } + stats.runTime.total = stats.endTime - stats.startTime + opts.log.silly( + 'verify', + 'verification finished for', + cache, + 'in', + `${stats.runTime.total}ms` + ) + return stats +} + +async function markStartTime (cache, opts) { + return { startTime: new Date() } +} + +async function markEndTime (cache, opts) { + return { endTime: new Date() } +} + +async function fixPerms (cache, opts) { + opts.log.silly('verify', 'fixing cache permissions') + await fixOwner.mkdirfix(cache, cache) + // TODO - fix file permissions too + await fixOwner.chownr(cache, cache) + return null +} + +// Implements a naive mark-and-sweep tracing garbage collector. +// +// The algorithm is basically as follows: +// 1. Read (and filter) all index entries ("pointers") +// 2. Mark each integrity value as "live" +// 3. Read entire filesystem tree in `content-vX/` dir +// 4. If content is live, verify its checksum and delete it if it fails +// 5. If content is not marked as live, rimraf it. +// +async function garbageCollect (cache, opts) { + opts.log.silly('verify', 'garbage collecting content') + const indexStream = index.lsStream(cache) + const liveContent = new Set() + indexStream.on('data', (entry) => { + if (opts.filter && !opts.filter(entry)) { + return + } + + liveContent.add(entry.integrity.toString()) + }) + await new Promise((resolve, reject) => { + indexStream.on('end', resolve).on('error', reject) + }) + const contentDir = contentPath.contentDir(cache) + const files = await glob(globify(path.join(contentDir, '**')), { + follow: false, + nodir: true, + nosort: true, + }) + const stats = { + verifiedContent: 0, + reclaimedCount: 0, + reclaimedSize: 0, + badContentCount: 0, + keptSize: 0, + } + await pMap( + files, + async (f) => { + const split = f.split(/[/\\]/) + const digest = split.slice(split.length - 3).join('') + const algo = split[split.length - 4] + const integrity = ssri.fromHex(digest, algo) + if (liveContent.has(integrity.toString())) { + const info = await verifyContent(f, integrity) + if (!info.valid) { + stats.reclaimedCount++ + stats.badContentCount++ + stats.reclaimedSize += info.size + } else { + stats.verifiedContent++ + stats.keptSize += info.size + } + } else { + // No entries refer to this content. We can delete. + stats.reclaimedCount++ + const s = await fs.stat(f) + await rimraf(f) + stats.reclaimedSize += s.size + } + return stats + }, + { concurrency: opts.concurrency } + ) + return stats +} + +async function verifyContent (filepath, sri) { + const contentInfo = {} + try { + const { size } = await fs.stat(filepath) + contentInfo.size = size + contentInfo.valid = true + await ssri.checkStream(new fsm.ReadStream(filepath), sri) + } catch (err) { + if (err.code === 'ENOENT') { + return { size: 0, valid: false } + } + if (err.code !== 'EINTEGRITY') { + throw err + } + + await rimraf(filepath) + contentInfo.valid = false + } + return contentInfo +} + +async function rebuildIndex (cache, opts) { + opts.log.silly('verify', 'rebuilding index') + const entries = await index.ls(cache) + const stats = { + missingContent: 0, + rejectedEntries: 0, + totalEntries: 0, + } + const buckets = {} + for (const k in entries) { + /* istanbul ignore else */ + if (hasOwnProperty(entries, k)) { + const hashed = index.hashKey(k) + const entry = entries[k] + const excluded = opts.filter && !opts.filter(entry) + excluded && stats.rejectedEntries++ + if (buckets[hashed] && !excluded) { + buckets[hashed].push(entry) + } else if (buckets[hashed] && excluded) { + // skip + } else if (excluded) { + buckets[hashed] = [] + buckets[hashed]._path = index.bucketPath(cache, k) + } else { + buckets[hashed] = [entry] + buckets[hashed]._path = index.bucketPath(cache, k) + } + } + } + await pMap( + Object.keys(buckets), + (key) => { + return rebuildBucket(cache, buckets[key], stats, opts) + }, + { concurrency: opts.concurrency } + ) + return stats +} + +async function rebuildBucket (cache, bucket, stats, opts) { + await fs.truncate(bucket._path) + // This needs to be serialized because cacache explicitly + // lets very racy bucket conflicts clobber each other. + for (const entry of bucket) { + const content = contentPath(cache, entry.integrity) + try { + await fs.stat(content) + await index.insert(cache, entry.key, entry.integrity, { + metadata: entry.metadata, + size: entry.size, + }) + stats.totalEntries++ + } catch (err) { + if (err.code === 'ENOENT') { + stats.rejectedEntries++ + stats.missingContent++ + } else { + throw err + } + } + } +} + +function cleanTmp (cache, opts) { + opts.log.silly('verify', 'cleaning tmp directory') + return rimraf(path.join(cache, 'tmp')) +} + +function writeVerifile (cache, opts) { + const verifile = path.join(cache, '_lastverified') + opts.log.silly('verify', 'writing verifile to ' + verifile) + try { + return fs.writeFile(verifile, `${Date.now()}`) + } finally { + fixOwner.chownr.sync(cache, verifile) + } +} + +module.exports.lastRun = lastRun + +async function lastRun (cache) { + const data = await fs.readFile(path.join(cache, '_lastverified'), { encoding: 'utf8' }) + return new Date(+data) +} diff --git a/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion/LICENSE b/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion/LICENSE new file mode 100644 index 0000000000000..de3226673c387 --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +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. diff --git a/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion/index.js b/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion/index.js new file mode 100644 index 0000000000000..4af9ddee463f4 --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion/index.js @@ -0,0 +1,203 @@ +var balanced = require('balanced-match'); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m) return [str]; + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + if (/\$$/.test(m.pre)) { + for (var k = 0; k < post.length; k++) { + var expansion = pre+ '{' + m.body + '}' + post[k]; + expansions.push(expansion); + } + } else { + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = []; + + for (var j = 0; j < n.length; j++) { + N.push.apply(N, expand(n[j], false)); + } + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + } + + return expansions; +} + diff --git a/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion/package.json b/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion/package.json new file mode 100644 index 0000000000000..7097d41e39de5 --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion/package.json @@ -0,0 +1,46 @@ +{ + "name": "brace-expansion", + "description": "Brace expansion as known from sh/bash", + "version": "2.0.1", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/brace-expansion.git" + }, + "homepage": "https://github.com/juliangruber/brace-expansion", + "main": "index.js", + "scripts": { + "test": "tape test/*.js", + "gentest": "bash test/generate.sh", + "bench": "matcha test/perf/bench.js" + }, + "dependencies": { + "balanced-match": "^1.0.0" + }, + "devDependencies": { + "@c4312/matcha": "^1.3.1", + "tape": "^4.6.0" + }, + "keywords": [], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com/" + }, + "license": "MIT", + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + } +} diff --git a/node_modules/read-package-json/node_modules/npm-normalize-package-bin/LICENSE b/node_modules/node-gyp/node_modules/cacache/node_modules/glob/LICENSE similarity index 92% rename from node_modules/read-package-json/node_modules/npm-normalize-package-bin/LICENSE rename to node_modules/node-gyp/node_modules/cacache/node_modules/glob/LICENSE index 19cec97b18468..39e8fe16f665a 100644 --- a/node_modules/read-package-json/node_modules/npm-normalize-package-bin/LICENSE +++ b/node_modules/node-gyp/node_modules/cacache/node_modules/glob/LICENSE @@ -1,6 +1,6 @@ The ISC License -Copyright (c) npm, Inc. +Copyright (c) 2009-2022 Isaac Z. Schlueter and Contributors Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/node_modules/node-gyp/node_modules/cacache/node_modules/glob/common.js b/node_modules/node-gyp/node_modules/cacache/node_modules/glob/common.js new file mode 100644 index 0000000000000..e094f750472f7 --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/node_modules/glob/common.js @@ -0,0 +1,240 @@ +exports.setopts = setopts +exports.ownProp = ownProp +exports.makeAbs = makeAbs +exports.finish = finish +exports.mark = mark +exports.isIgnored = isIgnored +exports.childrenIgnored = childrenIgnored + +function ownProp (obj, field) { + return Object.prototype.hasOwnProperty.call(obj, field) +} + +var fs = require("fs") +var path = require("path") +var minimatch = require("minimatch") +var isAbsolute = require("path").isAbsolute +var Minimatch = minimatch.Minimatch + +function alphasort (a, b) { + return a.localeCompare(b, 'en') +} + +function setupIgnores (self, options) { + self.ignore = options.ignore || [] + + if (!Array.isArray(self.ignore)) + self.ignore = [self.ignore] + + if (self.ignore.length) { + self.ignore = self.ignore.map(ignoreMap) + } +} + +// ignore patterns are always in dot:true mode. +function ignoreMap (pattern) { + var gmatcher = null + if (pattern.slice(-3) === '/**') { + var gpattern = pattern.replace(/(\/\*\*)+$/, '') + gmatcher = new Minimatch(gpattern, { dot: true }) + } + + return { + matcher: new Minimatch(pattern, { dot: true }), + gmatcher: gmatcher + } +} + +function setopts (self, pattern, options) { + if (!options) + options = {} + + // base-matching: just use globstar for that. + if (options.matchBase && -1 === pattern.indexOf("/")) { + if (options.noglobstar) { + throw new Error("base matching requires globstar") + } + pattern = "**/" + pattern + } + + self.silent = !!options.silent + self.pattern = pattern + self.strict = options.strict !== false + self.realpath = !!options.realpath + self.realpathCache = options.realpathCache || Object.create(null) + self.follow = !!options.follow + self.dot = !!options.dot + self.mark = !!options.mark + self.nodir = !!options.nodir + if (self.nodir) + self.mark = true + self.sync = !!options.sync + self.nounique = !!options.nounique + self.nonull = !!options.nonull + self.nosort = !!options.nosort + self.nocase = !!options.nocase + self.stat = !!options.stat + self.noprocess = !!options.noprocess + self.absolute = !!options.absolute + self.fs = options.fs || fs + + self.maxLength = options.maxLength || Infinity + self.cache = options.cache || Object.create(null) + self.statCache = options.statCache || Object.create(null) + self.symlinks = options.symlinks || Object.create(null) + + setupIgnores(self, options) + + self.changedCwd = false + var cwd = process.cwd() + if (!ownProp(options, "cwd")) + self.cwd = path.resolve(cwd) + else { + self.cwd = path.resolve(options.cwd) + self.changedCwd = self.cwd !== cwd + } + + self.root = options.root || path.resolve(self.cwd, "/") + self.root = path.resolve(self.root) + + // TODO: is an absolute `cwd` supposed to be resolved against `root`? + // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') + self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) + self.nomount = !!options.nomount + + if (process.platform === "win32") { + self.root = self.root.replace(/\\/g, "/") + self.cwd = self.cwd.replace(/\\/g, "/") + self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") + } + + // disable comments and negation in Minimatch. + // Note that they are not supported in Glob itself anyway. + options.nonegate = true + options.nocomment = true + // always treat \ in patterns as escapes, not path separators + options.allowWindowsEscape = true + + self.minimatch = new Minimatch(pattern, options) + self.options = self.minimatch.options +} + +function finish (self) { + var nou = self.nounique + var all = nou ? [] : Object.create(null) + + for (var i = 0, l = self.matches.length; i < l; i ++) { + var matches = self.matches[i] + if (!matches || Object.keys(matches).length === 0) { + if (self.nonull) { + // do like the shell, and spit out the literal glob + var literal = self.minimatch.globSet[i] + if (nou) + all.push(literal) + else + all[literal] = true + } + } else { + // had matches + var m = Object.keys(matches) + if (nou) + all.push.apply(all, m) + else + m.forEach(function (m) { + all[m] = true + }) + } + } + + if (!nou) + all = Object.keys(all) + + if (!self.nosort) + all = all.sort(alphasort) + + // at *some* point we statted all of these + if (self.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self._mark(all[i]) + } + if (self.nodir) { + all = all.filter(function (e) { + var notDir = !(/\/$/.test(e)) + var c = self.cache[e] || self.cache[makeAbs(self, e)] + if (notDir && c) + notDir = c !== 'DIR' && !Array.isArray(c) + return notDir + }) + } + } + + if (self.ignore.length) + all = all.filter(function(m) { + return !isIgnored(self, m) + }) + + self.found = all +} + +function mark (self, p) { + var abs = makeAbs(self, p) + var c = self.cache[abs] + var m = p + if (c) { + var isDir = c === 'DIR' || Array.isArray(c) + var slash = p.slice(-1) === '/' + + if (isDir && !slash) + m += '/' + else if (!isDir && slash) + m = m.slice(0, -1) + + if (m !== p) { + var mabs = makeAbs(self, m) + self.statCache[mabs] = self.statCache[abs] + self.cache[mabs] = self.cache[abs] + } + } + + return m +} + +// lotta situps... +function makeAbs (self, f) { + var abs = f + if (f.charAt(0) === '/') { + abs = path.join(self.root, f) + } else if (isAbsolute(f) || f === '') { + abs = f + } else if (self.changedCwd) { + abs = path.resolve(self.cwd, f) + } else { + abs = path.resolve(f) + } + + if (process.platform === 'win32') + abs = abs.replace(/\\/g, '/') + + return abs +} + + +// Return true, if pattern ends with globstar '**', for the accompanying parent directory. +// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents +function isIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) + }) +} + +function childrenIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return !!(item.gmatcher && item.gmatcher.match(path)) + }) +} diff --git a/node_modules/node-gyp/node_modules/cacache/node_modules/glob/glob.js b/node_modules/node-gyp/node_modules/cacache/node_modules/glob/glob.js new file mode 100644 index 0000000000000..2112a957dc501 --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/node_modules/glob/glob.js @@ -0,0 +1,790 @@ +// Approach: +// +// 1. Get the minimatch set +// 2. For each pattern in the set, PROCESS(pattern, false) +// 3. Store matches per-set, then uniq them +// +// PROCESS(pattern, inGlobStar) +// Get the first [n] items from pattern that are all strings +// Join these together. This is PREFIX. +// If there is no more remaining, then stat(PREFIX) and +// add to matches if it succeeds. END. +// +// If inGlobStar and PREFIX is symlink and points to dir +// set ENTRIES = [] +// else readdir(PREFIX) as ENTRIES +// If fail, END +// +// with ENTRIES +// If pattern[n] is GLOBSTAR +// // handle the case where the globstar match is empty +// // by pruning it out, and testing the resulting pattern +// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) +// // handle other cases. +// for ENTRY in ENTRIES (not dotfiles) +// // attach globstar + tail onto the entry +// // Mark that this entry is a globstar match +// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) +// +// else // not globstar +// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) +// Test ENTRY against pattern[n] +// If fails, continue +// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) +// +// Caveat: +// Cache all stats and readdirs results to minimize syscall. Since all +// we ever care about is existence and directory-ness, we can just keep +// `true` for files, and [children,...] for directories, or `false` for +// things that don't exist. + +module.exports = glob + +var rp = require('fs.realpath') +var minimatch = require('minimatch') +var Minimatch = minimatch.Minimatch +var inherits = require('inherits') +var EE = require('events').EventEmitter +var path = require('path') +var assert = require('assert') +var isAbsolute = require('path').isAbsolute +var globSync = require('./sync.js') +var common = require('./common.js') +var setopts = common.setopts +var ownProp = common.ownProp +var inflight = require('inflight') +var util = require('util') +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +var once = require('once') + +function glob (pattern, options, cb) { + if (typeof options === 'function') cb = options, options = {} + if (!options) options = {} + + if (options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return globSync(pattern, options) + } + + return new Glob(pattern, options, cb) +} + +glob.sync = globSync +var GlobSync = glob.GlobSync = globSync.GlobSync + +// old api surface +glob.glob = glob + +function extend (origin, add) { + if (add === null || typeof add !== 'object') { + return origin + } + + var keys = Object.keys(add) + var i = keys.length + while (i--) { + origin[keys[i]] = add[keys[i]] + } + return origin +} + +glob.hasMagic = function (pattern, options_) { + var options = extend({}, options_) + options.noprocess = true + + var g = new Glob(pattern, options) + var set = g.minimatch.set + + if (!pattern) + return false + + if (set.length > 1) + return true + + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== 'string') + return true + } + + return false +} + +glob.Glob = Glob +inherits(Glob, EE) +function Glob (pattern, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + + if (options && options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return new GlobSync(pattern, options) + } + + if (!(this instanceof Glob)) + return new Glob(pattern, options, cb) + + setopts(this, pattern, options) + this._didRealPath = false + + // process each pattern in the minimatch set + var n = this.minimatch.set.length + + // The matches are stored as {<filename>: true,...} so that + // duplicates are automagically pruned. + // Later, we do an Object.keys() on these. + // Keep them as a list so we can fill in when nonull is set. + this.matches = new Array(n) + + if (typeof cb === 'function') { + cb = once(cb) + this.on('error', cb) + this.on('end', function (matches) { + cb(null, matches) + }) + } + + var self = this + this._processing = 0 + + this._emitQueue = [] + this._processQueue = [] + this.paused = false + + if (this.noprocess) + return this + + if (n === 0) + return done() + + var sync = true + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false, done) + } + sync = false + + function done () { + --self._processing + if (self._processing <= 0) { + if (sync) { + process.nextTick(function () { + self._finish() + }) + } else { + self._finish() + } + } + } +} + +Glob.prototype._finish = function () { + assert(this instanceof Glob) + if (this.aborted) + return + + if (this.realpath && !this._didRealpath) + return this._realpath() + + common.finish(this) + this.emit('end', this.found) +} + +Glob.prototype._realpath = function () { + if (this._didRealpath) + return + + this._didRealpath = true + + var n = this.matches.length + if (n === 0) + return this._finish() + + var self = this + for (var i = 0; i < this.matches.length; i++) + this._realpathSet(i, next) + + function next () { + if (--n === 0) + self._finish() + } +} + +Glob.prototype._realpathSet = function (index, cb) { + var matchset = this.matches[index] + if (!matchset) + return cb() + + var found = Object.keys(matchset) + var self = this + var n = found.length + + if (n === 0) + return cb() + + var set = this.matches[index] = Object.create(null) + found.forEach(function (p, i) { + // If there's a problem with the stat, then it means that + // one or more of the links in the realpath couldn't be + // resolved. just return the abs value in that case. + p = self._makeAbs(p) + rp.realpath(p, self.realpathCache, function (er, real) { + if (!er) + set[real] = true + else if (er.syscall === 'stat') + set[p] = true + else + self.emit('error', er) // srsly wtf right here + + if (--n === 0) { + self.matches[index] = set + cb() + } + }) + }) +} + +Glob.prototype._mark = function (p) { + return common.mark(this, p) +} + +Glob.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} + +Glob.prototype.abort = function () { + this.aborted = true + this.emit('abort') +} + +Glob.prototype.pause = function () { + if (!this.paused) { + this.paused = true + this.emit('pause') + } +} + +Glob.prototype.resume = function () { + if (this.paused) { + this.emit('resume') + this.paused = false + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0) + this._emitQueue.length = 0 + for (var i = 0; i < eq.length; i ++) { + var e = eq[i] + this._emitMatch(e[0], e[1]) + } + } + if (this._processQueue.length) { + var pq = this._processQueue.slice(0) + this._processQueue.length = 0 + for (var i = 0; i < pq.length; i ++) { + var p = pq[i] + this._processing-- + this._process(p[0], p[1], p[2], p[3]) + } + } + } +} + +Glob.prototype._process = function (pattern, index, inGlobStar, cb) { + assert(this instanceof Glob) + assert(typeof cb === 'function') + + if (this.aborted) + return + + this._processing++ + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]) + return + } + + //console.error('PROCESS %d', this._processing, pattern) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // see if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index, cb) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || + isAbsolute(pattern.map(function (p) { + return typeof p === 'string' ? p : '[*]' + }).join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip _processing + if (childrenIgnored(this, read)) + return cb() + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) +} + +Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + +Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return cb() + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return cb() + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return cb() + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + this._process([e].concat(remain), index, inGlobStar, cb) + } + cb() +} + +Glob.prototype._emitMatch = function (index, e) { + if (this.aborted) + return + + if (isIgnored(this, e)) + return + + if (this.paused) { + this._emitQueue.push([index, e]) + return + } + + var abs = isAbsolute(e) ? e : this._makeAbs(e) + + if (this.mark) + e = this._mark(e) + + if (this.absolute) + e = abs + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + + var st = this.statCache[abs] + if (st) + this.emit('stat', e, st) + + this.emit('match', e) +} + +Glob.prototype._readdirInGlobStar = function (abs, cb) { + if (this.aborted) + return + + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false, cb) + + var lstatkey = 'lstat\0' + abs + var self = this + var lstatcb = inflight(lstatkey, lstatcb_) + + if (lstatcb) + self.fs.lstat(abs, lstatcb) + + function lstatcb_ (er, lstat) { + if (er && er.code === 'ENOENT') + return cb() + + var isSym = lstat && lstat.isSymbolicLink() + self.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && lstat && !lstat.isDirectory()) { + self.cache[abs] = 'FILE' + cb() + } else + self._readdir(abs, false, cb) + } +} + +Glob.prototype._readdir = function (abs, inGlobStar, cb) { + if (this.aborted) + return + + cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) + if (!cb) + return + + //console.error('RD %j %j', +inGlobStar, abs) + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs, cb) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return cb() + + if (Array.isArray(c)) + return cb(null, c) + } + + var self = this + self.fs.readdir(abs, readdirCb(this, abs, cb)) +} + +function readdirCb (self, abs, cb) { + return function (er, entries) { + if (er) + self._readdirError(abs, er, cb) + else + self._readdirEntries(abs, entries, cb) + } +} + +Glob.prototype._readdirEntries = function (abs, entries, cb) { + if (this.aborted) + return + + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + return cb(null, entries) +} + +Glob.prototype._readdirError = function (f, er, cb) { + if (this.aborted) + return + + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f) + this.cache[abs] = 'FILE' + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd) + error.path = this.cwd + error.code = er.code + this.emit('error', error) + this.abort() + } + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) { + this.emit('error', er) + // If the error is handled, then we abort + // if not, we threw out of here + this.abort() + } + if (!this.silent) + console.error('glob error', er) + break + } + + return cb() +} + +Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + + +Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + //console.error('pgs2', prefix, remain[0], entries) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return cb() + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false, cb) + + var isSym = this.symlinks[abs] + var len = entries.length + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return cb() + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true, cb) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true, cb) + } + + cb() +} + +Glob.prototype._processSimple = function (prefix, index, cb) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var self = this + this._stat(prefix, function (er, exists) { + self._processSimple2(prefix, index, er, exists, cb) + }) +} +Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { + + //console.error('ps2', prefix, exists) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return cb() + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) + cb() +} + +// Returns either 'DIR', 'FILE', or false +Glob.prototype._stat = function (f, cb) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return cb() + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return cb(null, c) + + if (needDir && c === 'FILE') + return cb() + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (stat !== undefined) { + if (stat === false) + return cb(null, stat) + else { + var type = stat.isDirectory() ? 'DIR' : 'FILE' + if (needDir && type === 'FILE') + return cb() + else + return cb(null, type, stat) + } + } + + var self = this + var statcb = inflight('stat\0' + abs, lstatcb_) + if (statcb) + self.fs.lstat(abs, statcb) + + function lstatcb_ (er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + // If it's a symlink, then treat it as the target, unless + // the target does not exist, then treat it as a file. + return self.fs.stat(abs, function (er, stat) { + if (er) + self._stat2(f, abs, null, lstat, cb) + else + self._stat2(f, abs, er, stat, cb) + }) + } else { + self._stat2(f, abs, er, lstat, cb) + } + } +} + +Glob.prototype._stat2 = function (f, abs, er, stat, cb) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false + return cb() + } + + var needDir = f.slice(-1) === '/' + this.statCache[abs] = stat + + if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) + return cb(null, false, stat) + + var c = true + if (stat) + c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c + + if (needDir && c === 'FILE') + return cb() + + return cb(null, c, stat) +} diff --git a/node_modules/node-gyp/node_modules/cacache/node_modules/glob/package.json b/node_modules/node-gyp/node_modules/cacache/node_modules/glob/package.json new file mode 100644 index 0000000000000..5134253e32226 --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/node_modules/glob/package.json @@ -0,0 +1,55 @@ +{ + "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)", + "name": "glob", + "description": "a little globber", + "version": "8.0.3", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-glob.git" + }, + "main": "glob.js", + "files": [ + "glob.js", + "sync.js", + "common.js" + ], + "engines": { + "node": ">=12" + }, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "devDependencies": { + "memfs": "^3.2.0", + "mkdirp": "0", + "rimraf": "^2.2.8", + "tap": "^16.0.1", + "tick": "0.0.6" + }, + "tap": { + "before": "test/00-setup.js", + "after": "test/zz-cleanup.js", + "statements": 90, + "branches": 90, + "functions": 90, + "lines": 90, + "jobs": 1 + }, + "scripts": { + "prepublish": "npm run benchclean", + "profclean": "rm -f v8.log profile.txt", + "test": "tap", + "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js", + "bench": "bash benchmark.sh", + "prof": "bash prof.sh && cat profile.txt", + "benchclean": "node benchclean.js" + }, + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } +} diff --git a/node_modules/node-gyp/node_modules/cacache/node_modules/glob/sync.js b/node_modules/node-gyp/node_modules/cacache/node_modules/glob/sync.js new file mode 100644 index 0000000000000..af4600dd59508 --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/node_modules/glob/sync.js @@ -0,0 +1,486 @@ +module.exports = globSync +globSync.GlobSync = GlobSync + +var rp = require('fs.realpath') +var minimatch = require('minimatch') +var Minimatch = minimatch.Minimatch +var Glob = require('./glob.js').Glob +var util = require('util') +var path = require('path') +var assert = require('assert') +var isAbsolute = require('path').isAbsolute +var common = require('./common.js') +var setopts = common.setopts +var ownProp = common.ownProp +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +function globSync (pattern, options) { + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + return new GlobSync(pattern, options).found +} + +function GlobSync (pattern, options) { + if (!pattern) + throw new Error('must provide pattern') + + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options) + + setopts(this, pattern, options) + + if (this.noprocess) + return this + + var n = this.minimatch.set.length + this.matches = new Array(n) + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false) + } + this._finish() +} + +GlobSync.prototype._finish = function () { + assert.ok(this instanceof GlobSync) + if (this.realpath) { + var self = this + this.matches.forEach(function (matchset, index) { + var set = self.matches[index] = Object.create(null) + for (var p in matchset) { + try { + p = self._makeAbs(p) + var real = rp.realpathSync(p, self.realpathCache) + set[real] = true + } catch (er) { + if (er.syscall === 'stat') + set[self._makeAbs(p)] = true + else + throw er + } + } + }) + } + common.finish(this) +} + + +GlobSync.prototype._process = function (pattern, index, inGlobStar) { + assert.ok(this instanceof GlobSync) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // See if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || + isAbsolute(pattern.map(function (p) { + return typeof p === 'string' ? p : '[*]' + }).join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip processing + if (childrenIgnored(this, read)) + return + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar) +} + + +GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar) + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix.slice(-1) !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) + newPattern = [prefix, e] + else + newPattern = [e] + this._process(newPattern.concat(remain), index, inGlobStar) + } +} + + +GlobSync.prototype._emitMatch = function (index, e) { + if (isIgnored(this, e)) + return + + var abs = this._makeAbs(e) + + if (this.mark) + e = this._mark(e) + + if (this.absolute) { + e = abs + } + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + + if (this.stat) + this._stat(e) +} + + +GlobSync.prototype._readdirInGlobStar = function (abs) { + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false) + + var entries + var lstat + var stat + try { + lstat = this.fs.lstatSync(abs) + } catch (er) { + if (er.code === 'ENOENT') { + // lstat failed, doesn't exist + return null + } + } + + var isSym = lstat && lstat.isSymbolicLink() + this.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && lstat && !lstat.isDirectory()) + this.cache[abs] = 'FILE' + else + entries = this._readdir(abs, false) + + return entries +} + +GlobSync.prototype._readdir = function (abs, inGlobStar) { + var entries + + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return null + + if (Array.isArray(c)) + return c + } + + try { + return this._readdirEntries(abs, this.fs.readdirSync(abs)) + } catch (er) { + this._readdirError(abs, er) + return null + } +} + +GlobSync.prototype._readdirEntries = function (abs, entries) { + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + + // mark and cache dir-ness + return entries +} + +GlobSync.prototype._readdirError = function (f, er) { + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f) + this.cache[abs] = 'FILE' + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd) + error.path = this.cwd + error.code = er.code + throw error + } + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) + throw er + if (!this.silent) + console.error('glob error', er) + break + } +} + +GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { + + var entries = this._readdir(abs, inGlobStar) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false) + + var len = entries.length + var isSym = this.symlinks[abs] + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true) + } +} + +GlobSync.prototype._processSimple = function (prefix, index) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var exists = this._stat(prefix) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) +} + +// Returns either 'DIR', 'FILE', or false +GlobSync.prototype._stat = function (f) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return false + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return c + + if (needDir && c === 'FILE') + return false + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (!stat) { + var lstat + try { + lstat = this.fs.lstatSync(abs) + } catch (er) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false + return false + } + } + + if (lstat && lstat.isSymbolicLink()) { + try { + stat = this.fs.statSync(abs) + } catch (er) { + stat = lstat + } + } else { + stat = lstat + } + } + + this.statCache[abs] = stat + + var c = true + if (stat) + c = stat.isDirectory() ? 'DIR' : 'FILE' + + this.cache[abs] = this.cache[abs] || c + + if (needDir && c === 'FILE') + return false + + return c +} + +GlobSync.prototype._mark = function (p) { + return common.mark(this, p) +} + +GlobSync.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} diff --git a/node_modules/mkdirp-infer-owner/LICENSE b/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/LICENSE similarity index 92% rename from node_modules/mkdirp-infer-owner/LICENSE rename to node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/LICENSE index 05eeeb88c2ef4..9517b7d995bb0 100644 --- a/node_modules/mkdirp-infer-owner/LICENSE +++ b/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/LICENSE @@ -1,6 +1,6 @@ The ISC License -Copyright (c) Isaac Z. Schlueter +Copyright (c) 2011-2022 Isaac Z. Schlueter and Contributors Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/lib/path.js b/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/lib/path.js new file mode 100644 index 0000000000000..ffe453d9e0557 --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/lib/path.js @@ -0,0 +1,4 @@ +const isWindows = typeof process === 'object' && + process && + process.platform === 'win32' +module.exports = isWindows ? { sep: '\\' } : { sep: '/' } diff --git a/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/minimatch.js b/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/minimatch.js new file mode 100644 index 0000000000000..71c96a1fb71cc --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/minimatch.js @@ -0,0 +1,906 @@ +const minimatch = module.exports = (p, pattern, options = {}) => { + assertValidPattern(pattern) + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + return new Minimatch(pattern, options).match(p) +} + +module.exports = minimatch + +const path = require('./lib/path.js') +minimatch.sep = path.sep + +const GLOBSTAR = Symbol('globstar **') +minimatch.GLOBSTAR = GLOBSTAR +const expand = require('brace-expansion') + +const plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' } +} + +// any single thing other than / +// don't need to escape / when using new RegExp() +const qmark = '[^/]' + +// * => any number of characters +const star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +const twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +const twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// "abc" -> { a:true, b:true, c:true } +const charSet = s => s.split('').reduce((set, c) => { + set[c] = true + return set +}, {}) + +// characters that need to be escaped in RegExp. +const reSpecials = charSet('().*{}+?[]^$\\!') + +// characters that indicate we have to add the pattern start +const addPatternStartSet = charSet('[.(') + +// normalizes slashes. +const slashSplit = /\/+/ + +minimatch.filter = (pattern, options = {}) => + (p, i, list) => minimatch(p, pattern, options) + +const ext = (a, b = {}) => { + const t = {} + Object.keys(a).forEach(k => t[k] = a[k]) + Object.keys(b).forEach(k => t[k] = b[k]) + return t +} + +minimatch.defaults = def => { + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return minimatch + } + + const orig = minimatch + + const m = (p, pattern, options) => orig(p, pattern, ext(def, options)) + m.Minimatch = class Minimatch extends orig.Minimatch { + constructor (pattern, options) { + super(pattern, ext(def, options)) + } + } + m.Minimatch.defaults = options => orig.defaults(ext(def, options)).Minimatch + m.filter = (pattern, options) => orig.filter(pattern, ext(def, options)) + m.defaults = options => orig.defaults(ext(def, options)) + m.makeRe = (pattern, options) => orig.makeRe(pattern, ext(def, options)) + m.braceExpand = (pattern, options) => orig.braceExpand(pattern, ext(def, options)) + m.match = (list, pattern, options) => orig.match(list, pattern, ext(def, options)) + + return m +} + + + + + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = (pattern, options) => braceExpand(pattern, options) + +const braceExpand = (pattern, options = {}) => { + assertValidPattern(pattern) + + // Thanks to Yeting Li <https://github.com/yetingli> for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +const MAX_PATTERN_LENGTH = 1024 * 64 +const assertValidPattern = pattern => { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern') + } + + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long') + } +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +const SUBPARSE = Symbol('subparse') + +minimatch.makeRe = (pattern, options) => + new Minimatch(pattern, options || {}).makeRe() + +minimatch.match = (list, pattern, options = {}) => { + const mm = new Minimatch(pattern, options) + list = list.filter(f => mm.match(f)) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +// replace stuff like \* with * +const globUnescape = s => s.replace(/\\(.)/g, '$1') +const regExpEscape = s => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') + +class Minimatch { + constructor (pattern, options) { + assertValidPattern(pattern) + + if (!options) options = {} + + this.options = options + this.set = [] + this.pattern = pattern + this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || + options.allowWindowsEscape === false + if (this.windowsPathsNoEscape) { + this.pattern = this.pattern.replace(/\\/g, '/') + } + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + this.partial = !!options.partial + + // make the set of regexps etc. + this.make() + } + + debug () {} + + make () { + const pattern = this.pattern + const options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + let set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = (...args) => console.error(...args) + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(s => s.split(slashSplit)) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map((s, si, set) => s.map(this.parse, this)) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(s => s.indexOf(false) === -1) + + this.debug(this.pattern, set) + + this.set = set + } + + parseNegate () { + if (this.options.nonegate) return + + const pattern = this.pattern + let negate = false + let negateOffset = 0 + + for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate + } + + // set partial to true to test if, for example, + // "/a/b" matches the start of "/*/b/*/d" + // Partial means, if you run out of file before you run + // out of pattern, then that's fine, as long as all + // the parts match. + matchOne (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + /* istanbul ignore if */ + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + /* istanbul ignore if */ + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + hit = f === p + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else /* istanbul ignore else */ if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + return (fi === fl - 1) && (file[fi] === '') + } + + // should be unreachable. + /* istanbul ignore next */ + throw new Error('wtf?') + } + + braceExpand () { + return braceExpand(this.pattern, this.options) + } + + parse (pattern, isSub) { + assertValidPattern(pattern) + + const options = this.options + + // shortcuts + if (pattern === '**') { + if (!options.noglobstar) + return GLOBSTAR + else + pattern = '*' + } + if (pattern === '') return '' + + let re = '' + let hasMagic = !!options.nocase + let escaping = false + // ? => one single character + const patternListStack = [] + const negativeLists = [] + let stateChar + let inClass = false + let reClassStart = -1 + let classStart = -1 + let cs + let pl + let sp + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + const patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + + const clearStateChar = () => { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + this.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (let i = 0, c; (i < pattern.length) && (c = pattern.charAt(i)); i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping) { + /* istanbul ignore next - completely not allowed, even escaped. */ + if (c === '/') { + return false + } + + if (reSpecials[c]) { + re += '\\' + } + re += c + escaping = false + continue + } + + switch (c) { + /* istanbul ignore next */ + case '/': { + // Should already be path-split by now. + return false + } + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + this.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + pl = patternListStack.pop() + // negation is (?:(?!js)[^/]*) + // The others are (?:<pattern>)<type> + re += pl.close + if (pl.type === '!') { + negativeLists.push(pl) + } + pl.reEnd = re.length + continue + + case '|': + if (inClass || !patternListStack.length) { + re += '\\|' + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (reSpecials[c] && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + break + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + let tail + tail = re.slice(pl.reStart + pl.open.length) + this.debug('setting tail', re, pl) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, (_, $1, $2) => { + /* istanbul ignore else - should already be done */ + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail, pl, re) + const t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + const addPatternStart = addPatternStartSet[re.charAt(0)] + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (let n = negativeLists.length - 1; n > -1; n--) { + const nl = negativeLists[n] + + const nlBefore = re.slice(0, nl.reStart) + const nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + let nlAfter = re.slice(nl.reEnd) + const nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + const openParensBefore = nlBefore.split('(').length - 1 + let cleanAfter = nlAfter + for (let i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + const dollar = nlAfter === '' && isSub !== SUBPARSE ? '$' : '' + re = nlBefore + nlFirst + nlAfter + dollar + nlLast + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + const flags = options.nocase ? 'i' : '' + try { + return Object.assign(new RegExp('^' + re + '$', flags), { + _glob: pattern, + _src: re, + }) + } catch (er) /* istanbul ignore next - should be impossible */ { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.') + } + } + + makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + const set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + const options = this.options + + const twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + const flags = options.nocase ? 'i' : '' + + // coalesce globstars and regexpify non-globstar patterns + // if it's the only item, then we just do one twoStar + // if it's the first, and there are more, prepend (\/|twoStar\/)? to next + // if it's the last, append (\/twoStar|) to previous + // if it's in the middle, append (\/|\/twoStar\/) to previous + // then filter out GLOBSTAR symbols + let re = set.map(pattern => { + pattern = pattern.map(p => + typeof p === 'string' ? regExpEscape(p) + : p === GLOBSTAR ? GLOBSTAR + : p._src + ).reduce((set, p) => { + if (!(set[set.length - 1] === GLOBSTAR && p === GLOBSTAR)) { + set.push(p) + } + return set + }, []) + pattern.forEach((p, i) => { + if (p !== GLOBSTAR || pattern[i-1] === GLOBSTAR) { + return + } + if (i === 0) { + if (pattern.length > 1) { + pattern[i+1] = '(?:\\\/|' + twoStar + '\\\/)?' + pattern[i+1] + } else { + pattern[i] = twoStar + } + } else if (i === pattern.length - 1) { + pattern[i-1] += '(?:\\\/|' + twoStar + ')?' + } else { + pattern[i-1] += '(?:\\\/|\\\/' + twoStar + '\\\/)' + pattern[i+1] + pattern[i+1] = GLOBSTAR + } + }) + return pattern.filter(p => p !== GLOBSTAR).join('/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) /* istanbul ignore next - should be impossible */ { + this.regexp = false + } + return this.regexp + } + + match (f, partial = this.partial) { + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + const options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + const set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + let filename + for (let i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (let i = 0; i < set.length; i++) { + const pattern = set[i] + let file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + const hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate + } + + static defaults (def) { + return minimatch.defaults(def).Minimatch + } +} + +minimatch.Minimatch = Minimatch diff --git a/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/package.json b/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/package.json new file mode 100644 index 0000000000000..8e1a84285d38f --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch/package.json @@ -0,0 +1,32 @@ +{ + "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)", + "name": "minimatch", + "description": "a glob matcher in javascript", + "version": "5.1.0", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/minimatch.git" + }, + "main": "minimatch.js", + "scripts": { + "test": "tap", + "snap": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags" + }, + "engines": { + "node": ">=10" + }, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "devDependencies": { + "tap": "^15.1.6" + }, + "license": "ISC", + "files": [ + "minimatch.js", + "lib" + ] +} diff --git a/node_modules/node-gyp/node_modules/cacache/package.json b/node_modules/node-gyp/node_modules/cacache/package.json new file mode 100644 index 0000000000000..7dbd407d8fccf --- /dev/null +++ b/node_modules/node-gyp/node_modules/cacache/package.json @@ -0,0 +1,84 @@ +{ + "name": "cacache", + "version": "16.1.3", + "cache-version": { + "content": "2", + "index": "5" + }, + "description": "Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.", + "main": "lib/index.js", + "files": [ + "bin/", + "lib/" + ], + "scripts": { + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "test": "tap", + "snap": "tap", + "coverage": "tap", + "test-docker": "docker run -it --rm --name pacotest -v \"$PWD\":/tmp -w /tmp node:latest npm test", + "lint": "eslint \"**/*.js\"", + "npmclilint": "npmcli-lint", + "lintfix": "npm run lint -- --fix", + "postsnap": "npm run lintfix --", + "postlint": "template-oss-check", + "posttest": "npm run lint", + "template-oss-apply": "template-oss-apply --force" + }, + "repository": { + "type": "git", + "url": "https://github.com/npm/cacache.git" + }, + "keywords": [ + "cache", + "caching", + "content-addressable", + "sri", + "sri hash", + "subresource integrity", + "cache", + "storage", + "store", + "file store", + "filesystem", + "disk cache", + "disk storage" + ], + "license": "ISC", + "dependencies": { + "@npmcli/fs": "^2.1.0", + "@npmcli/move-file": "^2.0.0", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "infer-owner": "^1.0.4", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^9.0.0", + "tar": "^6.1.11", + "unique-filename": "^2.0.0" + }, + "devDependencies": { + "@npmcli/eslint-config": "^3.0.1", + "@npmcli/template-oss": "3.5.0", + "tap": "^16.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + }, + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "windowsCI": false, + "version": "3.5.0" + }, + "author": "GitHub Inc." +} diff --git a/node_modules/node-gyp/node_modules/gauge/LICENSE.md b/node_modules/node-gyp/node_modules/gauge/LICENSE.md new file mode 100644 index 0000000000000..5fc208ff122e0 --- /dev/null +++ b/node_modules/node-gyp/node_modules/gauge/LICENSE.md @@ -0,0 +1,20 @@ +<!-- This file is automatically added by @npmcli/template-oss. Do not edit. --> + +ISC License + +Copyright npm, Inc. + +Permission to use, copy, modify, and/or distribute this +software for any purpose with or without fee is hereby +granted, provided that the above copyright notice and this +permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO +EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE +USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/node-gyp/node_modules/gauge/lib/base-theme.js b/node_modules/node-gyp/node_modules/gauge/lib/base-theme.js new file mode 100644 index 0000000000000..00bf5684cddab --- /dev/null +++ b/node_modules/node-gyp/node_modules/gauge/lib/base-theme.js @@ -0,0 +1,18 @@ +'use strict' +var spin = require('./spin.js') +var progressBar = require('./progress-bar.js') + +module.exports = { + activityIndicator: function (values, theme, width) { + if (values.spun == null) { + return + } + return spin(theme, values.spun) + }, + progressbar: function (values, theme, width) { + if (values.completed == null) { + return + } + return progressBar(theme, width, values.completed) + }, +} diff --git a/node_modules/node-gyp/node_modules/gauge/lib/error.js b/node_modules/node-gyp/node_modules/gauge/lib/error.js new file mode 100644 index 0000000000000..d9914ba5335d2 --- /dev/null +++ b/node_modules/node-gyp/node_modules/gauge/lib/error.js @@ -0,0 +1,24 @@ +'use strict' +var util = require('util') + +var User = exports.User = function User (msg) { + var err = new Error(msg) + Error.captureStackTrace(err, User) + err.code = 'EGAUGE' + return err +} + +exports.MissingTemplateValue = function MissingTemplateValue (item, values) { + var err = new User(util.format('Missing template value "%s"', item.type)) + Error.captureStackTrace(err, MissingTemplateValue) + err.template = item + err.values = values + return err +} + +exports.Internal = function Internal (msg) { + var err = new Error(msg) + Error.captureStackTrace(err, Internal) + err.code = 'EGAUGEINTERNAL' + return err +} diff --git a/node_modules/node-gyp/node_modules/gauge/lib/has-color.js b/node_modules/node-gyp/node_modules/gauge/lib/has-color.js new file mode 100644 index 0000000000000..16cba0eb47d33 --- /dev/null +++ b/node_modules/node-gyp/node_modules/gauge/lib/has-color.js @@ -0,0 +1,4 @@ +'use strict' +var colorSupport = require('color-support') + +module.exports = colorSupport().hasBasic diff --git a/node_modules/node-gyp/node_modules/gauge/lib/index.js b/node_modules/node-gyp/node_modules/gauge/lib/index.js new file mode 100644 index 0000000000000..37fc5ac60a16f --- /dev/null +++ b/node_modules/node-gyp/node_modules/gauge/lib/index.js @@ -0,0 +1,289 @@ +'use strict' +var Plumbing = require('./plumbing.js') +var hasUnicode = require('has-unicode') +var hasColor = require('./has-color.js') +var onExit = require('signal-exit') +var defaultThemes = require('./themes') +var setInterval = require('./set-interval.js') +var process = require('./process.js') +var setImmediate = require('./set-immediate') + +module.exports = Gauge + +function callWith (obj, method) { + return function () { + return method.call(obj) + } +} + +function Gauge (arg1, arg2) { + var options, writeTo + if (arg1 && arg1.write) { + writeTo = arg1 + options = arg2 || {} + } else if (arg2 && arg2.write) { + writeTo = arg2 + options = arg1 || {} + } else { + writeTo = process.stderr + options = arg1 || arg2 || {} + } + + this._status = { + spun: 0, + section: '', + subsection: '', + } + this._paused = false // are we paused for back pressure? + this._disabled = true // are all progress bar updates disabled? + this._showing = false // do we WANT the progress bar on screen + this._onScreen = false // IS the progress bar on screen + this._needsRedraw = false // should we print something at next tick? + this._hideCursor = options.hideCursor == null ? true : options.hideCursor + this._fixedFramerate = options.fixedFramerate == null + ? !(/^v0\.8\./.test(process.version)) + : options.fixedFramerate + this._lastUpdateAt = null + this._updateInterval = options.updateInterval == null ? 50 : options.updateInterval + + this._themes = options.themes || defaultThemes + this._theme = options.theme + var theme = this._computeTheme(options.theme) + var template = options.template || [ + { type: 'progressbar', length: 20 }, + { type: 'activityIndicator', kerning: 1, length: 1 }, + { type: 'section', kerning: 1, default: '' }, + { type: 'subsection', kerning: 1, default: '' }, + ] + this.setWriteTo(writeTo, options.tty) + var PlumbingClass = options.Plumbing || Plumbing + this._gauge = new PlumbingClass(theme, template, this.getWidth()) + + this._$$doRedraw = callWith(this, this._doRedraw) + this._$$handleSizeChange = callWith(this, this._handleSizeChange) + + this._cleanupOnExit = options.cleanupOnExit == null || options.cleanupOnExit + this._removeOnExit = null + + if (options.enabled || (options.enabled == null && this._tty && this._tty.isTTY)) { + this.enable() + } else { + this.disable() + } +} +Gauge.prototype = {} + +Gauge.prototype.isEnabled = function () { + return !this._disabled +} + +Gauge.prototype.setTemplate = function (template) { + this._gauge.setTemplate(template) + if (this._showing) { + this._requestRedraw() + } +} + +Gauge.prototype._computeTheme = function (theme) { + if (!theme) { + theme = {} + } + if (typeof theme === 'string') { + theme = this._themes.getTheme(theme) + } else if ( + Object.keys(theme).length === 0 || theme.hasUnicode != null || theme.hasColor != null + ) { + var useUnicode = theme.hasUnicode == null ? hasUnicode() : theme.hasUnicode + var useColor = theme.hasColor == null ? hasColor : theme.hasColor + theme = this._themes.getDefault({ + hasUnicode: useUnicode, + hasColor: useColor, + platform: theme.platform, + }) + } + return theme +} + +Gauge.prototype.setThemeset = function (themes) { + this._themes = themes + this.setTheme(this._theme) +} + +Gauge.prototype.setTheme = function (theme) { + this._gauge.setTheme(this._computeTheme(theme)) + if (this._showing) { + this._requestRedraw() + } + this._theme = theme +} + +Gauge.prototype._requestRedraw = function () { + this._needsRedraw = true + if (!this._fixedFramerate) { + this._doRedraw() + } +} + +Gauge.prototype.getWidth = function () { + return ((this._tty && this._tty.columns) || 80) - 1 +} + +Gauge.prototype.setWriteTo = function (writeTo, tty) { + var enabled = !this._disabled + if (enabled) { + this.disable() + } + this._writeTo = writeTo + this._tty = tty || + (writeTo === process.stderr && process.stdout.isTTY && process.stdout) || + (writeTo.isTTY && writeTo) || + this._tty + if (this._gauge) { + this._gauge.setWidth(this.getWidth()) + } + if (enabled) { + this.enable() + } +} + +Gauge.prototype.enable = function () { + if (!this._disabled) { + return + } + this._disabled = false + if (this._tty) { + this._enableEvents() + } + if (this._showing) { + this.show() + } +} + +Gauge.prototype.disable = function () { + if (this._disabled) { + return + } + if (this._showing) { + this._lastUpdateAt = null + this._showing = false + this._doRedraw() + this._showing = true + } + this._disabled = true + if (this._tty) { + this._disableEvents() + } +} + +Gauge.prototype._enableEvents = function () { + if (this._cleanupOnExit) { + this._removeOnExit = onExit(callWith(this, this.disable)) + } + this._tty.on('resize', this._$$handleSizeChange) + if (this._fixedFramerate) { + this.redrawTracker = setInterval(this._$$doRedraw, this._updateInterval) + if (this.redrawTracker.unref) { + this.redrawTracker.unref() + } + } +} + +Gauge.prototype._disableEvents = function () { + this._tty.removeListener('resize', this._$$handleSizeChange) + if (this._fixedFramerate) { + clearInterval(this.redrawTracker) + } + if (this._removeOnExit) { + this._removeOnExit() + } +} + +Gauge.prototype.hide = function (cb) { + if (this._disabled) { + return cb && process.nextTick(cb) + } + if (!this._showing) { + return cb && process.nextTick(cb) + } + this._showing = false + this._doRedraw() + cb && setImmediate(cb) +} + +Gauge.prototype.show = function (section, completed) { + this._showing = true + if (typeof section === 'string') { + this._status.section = section + } else if (typeof section === 'object') { + var sectionKeys = Object.keys(section) + for (var ii = 0; ii < sectionKeys.length; ++ii) { + var key = sectionKeys[ii] + this._status[key] = section[key] + } + } + if (completed != null) { + this._status.completed = completed + } + if (this._disabled) { + return + } + this._requestRedraw() +} + +Gauge.prototype.pulse = function (subsection) { + this._status.subsection = subsection || '' + this._status.spun++ + if (this._disabled) { + return + } + if (!this._showing) { + return + } + this._requestRedraw() +} + +Gauge.prototype._handleSizeChange = function () { + this._gauge.setWidth(this._tty.columns - 1) + this._requestRedraw() +} + +Gauge.prototype._doRedraw = function () { + if (this._disabled || this._paused) { + return + } + if (!this._fixedFramerate) { + var now = Date.now() + if (this._lastUpdateAt && now - this._lastUpdateAt < this._updateInterval) { + return + } + this._lastUpdateAt = now + } + if (!this._showing && this._onScreen) { + this._onScreen = false + var result = this._gauge.hide() + if (this._hideCursor) { + result += this._gauge.showCursor() + } + return this._writeTo.write(result) + } + if (!this._showing && !this._onScreen) { + return + } + if (this._showing && !this._onScreen) { + this._onScreen = true + this._needsRedraw = true + if (this._hideCursor) { + this._writeTo.write(this._gauge.hideCursor()) + } + } + if (!this._needsRedraw) { + return + } + if (!this._writeTo.write(this._gauge.show(this._status))) { + this._paused = true + this._writeTo.on('drain', callWith(this, function () { + this._paused = false + this._doRedraw() + })) + } +} diff --git a/node_modules/node-gyp/node_modules/gauge/lib/plumbing.js b/node_modules/node-gyp/node_modules/gauge/lib/plumbing.js new file mode 100644 index 0000000000000..c4dc3e074b95e --- /dev/null +++ b/node_modules/node-gyp/node_modules/gauge/lib/plumbing.js @@ -0,0 +1,50 @@ +'use strict' +var consoleControl = require('console-control-strings') +var renderTemplate = require('./render-template.js') +var validate = require('aproba') + +var Plumbing = module.exports = function (theme, template, width) { + if (!width) { + width = 80 + } + validate('OAN', [theme, template, width]) + this.showing = false + this.theme = theme + this.width = width + this.template = template +} +Plumbing.prototype = {} + +Plumbing.prototype.setTheme = function (theme) { + validate('O', [theme]) + this.theme = theme +} + +Plumbing.prototype.setTemplate = function (template) { + validate('A', [template]) + this.template = template +} + +Plumbing.prototype.setWidth = function (width) { + validate('N', [width]) + this.width = width +} + +Plumbing.prototype.hide = function () { + return consoleControl.gotoSOL() + consoleControl.eraseLine() +} + +Plumbing.prototype.hideCursor = consoleControl.hideCursor + +Plumbing.prototype.showCursor = consoleControl.showCursor + +Plumbing.prototype.show = function (status) { + var values = Object.create(this.theme) + for (var key in status) { + values[key] = status[key] + } + + return renderTemplate(this.width, this.template, values).trim() + + consoleControl.color('reset') + + consoleControl.eraseLine() + consoleControl.gotoSOL() +} diff --git a/node_modules/node-gyp/node_modules/gauge/lib/process.js b/node_modules/node-gyp/node_modules/gauge/lib/process.js new file mode 100644 index 0000000000000..05e85694d755b --- /dev/null +++ b/node_modules/node-gyp/node_modules/gauge/lib/process.js @@ -0,0 +1,3 @@ +'use strict' +// this exists so we can replace it during testing +module.exports = process diff --git a/node_modules/node-gyp/node_modules/gauge/lib/progress-bar.js b/node_modules/node-gyp/node_modules/gauge/lib/progress-bar.js new file mode 100644 index 0000000000000..184ff2500aae4 --- /dev/null +++ b/node_modules/node-gyp/node_modules/gauge/lib/progress-bar.js @@ -0,0 +1,41 @@ +'use strict' +var validate = require('aproba') +var renderTemplate = require('./render-template.js') +var wideTruncate = require('./wide-truncate') +var stringWidth = require('string-width') + +module.exports = function (theme, width, completed) { + validate('ONN', [theme, width, completed]) + if (completed < 0) { + completed = 0 + } + if (completed > 1) { + completed = 1 + } + if (width <= 0) { + return '' + } + var sofar = Math.round(width * completed) + var rest = width - sofar + var template = [ + { type: 'complete', value: repeat(theme.complete, sofar), length: sofar }, + { type: 'remaining', value: repeat(theme.remaining, rest), length: rest }, + ] + return renderTemplate(width, template, theme) +} + +// lodash's way of repeating +function repeat (string, width) { + var result = '' + var n = width + do { + if (n % 2) { + result += string + } + n = Math.floor(n / 2) + /* eslint no-self-assign: 0 */ + string += string + } while (n && stringWidth(result) < width) + + return wideTruncate(result, width) +} diff --git a/node_modules/node-gyp/node_modules/gauge/lib/render-template.js b/node_modules/node-gyp/node_modules/gauge/lib/render-template.js new file mode 100644 index 0000000000000..d1b52c0f48095 --- /dev/null +++ b/node_modules/node-gyp/node_modules/gauge/lib/render-template.js @@ -0,0 +1,222 @@ +'use strict' +var align = require('wide-align') +var validate = require('aproba') +var wideTruncate = require('./wide-truncate') +var error = require('./error') +var TemplateItem = require('./template-item') + +function renderValueWithValues (values) { + return function (item) { + return renderValue(item, values) + } +} + +var renderTemplate = module.exports = function (width, template, values) { + var items = prepareItems(width, template, values) + var rendered = items.map(renderValueWithValues(values)).join('') + return align.left(wideTruncate(rendered, width), width) +} + +function preType (item) { + var cappedTypeName = item.type[0].toUpperCase() + item.type.slice(1) + return 'pre' + cappedTypeName +} + +function postType (item) { + var cappedTypeName = item.type[0].toUpperCase() + item.type.slice(1) + return 'post' + cappedTypeName +} + +function hasPreOrPost (item, values) { + if (!item.type) { + return + } + return values[preType(item)] || values[postType(item)] +} + +function generatePreAndPost (baseItem, parentValues) { + var item = Object.assign({}, baseItem) + var values = Object.create(parentValues) + var template = [] + var pre = preType(item) + var post = postType(item) + if (values[pre]) { + template.push({ value: values[pre] }) + values[pre] = null + } + item.minLength = null + item.length = null + item.maxLength = null + template.push(item) + values[item.type] = values[item.type] + if (values[post]) { + template.push({ value: values[post] }) + values[post] = null + } + return function ($1, $2, length) { + return renderTemplate(length, template, values) + } +} + +function prepareItems (width, template, values) { + function cloneAndObjectify (item, index, arr) { + var cloned = new TemplateItem(item, width) + var type = cloned.type + if (cloned.value == null) { + if (!(type in values)) { + if (cloned.default == null) { + throw new error.MissingTemplateValue(cloned, values) + } else { + cloned.value = cloned.default + } + } else { + cloned.value = values[type] + } + } + if (cloned.value == null || cloned.value === '') { + return null + } + cloned.index = index + cloned.first = index === 0 + cloned.last = index === arr.length - 1 + if (hasPreOrPost(cloned, values)) { + cloned.value = generatePreAndPost(cloned, values) + } + return cloned + } + + var output = template.map(cloneAndObjectify).filter(function (item) { + return item != null + }) + + var remainingSpace = width + var variableCount = output.length + + function consumeSpace (length) { + if (length > remainingSpace) { + length = remainingSpace + } + remainingSpace -= length + } + + function finishSizing (item, length) { + if (item.finished) { + throw new error.Internal('Tried to finish template item that was already finished') + } + if (length === Infinity) { + throw new error.Internal('Length of template item cannot be infinity') + } + if (length != null) { + item.length = length + } + item.minLength = null + item.maxLength = null + --variableCount + item.finished = true + if (item.length == null) { + item.length = item.getBaseLength() + } + if (item.length == null) { + throw new error.Internal('Finished template items must have a length') + } + consumeSpace(item.getLength()) + } + + output.forEach(function (item) { + if (!item.kerning) { + return + } + var prevPadRight = item.first ? 0 : output[item.index - 1].padRight + if (!item.first && prevPadRight < item.kerning) { + item.padLeft = item.kerning - prevPadRight + } + if (!item.last) { + item.padRight = item.kerning + } + }) + + // Finish any that have a fixed (literal or intuited) length + output.forEach(function (item) { + if (item.getBaseLength() == null) { + return + } + finishSizing(item) + }) + + var resized = 0 + var resizing + var hunkSize + do { + resizing = false + hunkSize = Math.round(remainingSpace / variableCount) + output.forEach(function (item) { + if (item.finished) { + return + } + if (!item.maxLength) { + return + } + if (item.getMaxLength() < hunkSize) { + finishSizing(item, item.maxLength) + resizing = true + } + }) + } while (resizing && resized++ < output.length) + if (resizing) { + throw new error.Internal('Resize loop iterated too many times while determining maxLength') + } + + resized = 0 + do { + resizing = false + hunkSize = Math.round(remainingSpace / variableCount) + output.forEach(function (item) { + if (item.finished) { + return + } + if (!item.minLength) { + return + } + if (item.getMinLength() >= hunkSize) { + finishSizing(item, item.minLength) + resizing = true + } + }) + } while (resizing && resized++ < output.length) + if (resizing) { + throw new error.Internal('Resize loop iterated too many times while determining minLength') + } + + hunkSize = Math.round(remainingSpace / variableCount) + output.forEach(function (item) { + if (item.finished) { + return + } + finishSizing(item, hunkSize) + }) + + return output +} + +function renderFunction (item, values, length) { + validate('OON', arguments) + if (item.type) { + return item.value(values, values[item.type + 'Theme'] || {}, length) + } else { + return item.value(values, {}, length) + } +} + +function renderValue (item, values) { + var length = item.getBaseLength() + var value = typeof item.value === 'function' ? renderFunction(item, values, length) : item.value + if (value == null || value === '') { + return '' + } + var alignWith = align[item.align] || align.left + var leftPadding = item.padLeft ? align.left('', item.padLeft) : '' + var rightPadding = item.padRight ? align.right('', item.padRight) : '' + var truncated = wideTruncate(String(value), length) + var aligned = alignWith(truncated, length) + return leftPadding + aligned + rightPadding +} diff --git a/node_modules/node-gyp/node_modules/gauge/lib/set-immediate.js b/node_modules/node-gyp/node_modules/gauge/lib/set-immediate.js new file mode 100644 index 0000000000000..6650a485c4993 --- /dev/null +++ b/node_modules/node-gyp/node_modules/gauge/lib/set-immediate.js @@ -0,0 +1,7 @@ +'use strict' +var process = require('./process') +try { + module.exports = setImmediate +} catch (ex) { + module.exports = process.nextTick +} diff --git a/node_modules/node-gyp/node_modules/gauge/lib/set-interval.js b/node_modules/node-gyp/node_modules/gauge/lib/set-interval.js new file mode 100644 index 0000000000000..576198793c550 --- /dev/null +++ b/node_modules/node-gyp/node_modules/gauge/lib/set-interval.js @@ -0,0 +1,3 @@ +'use strict' +// this exists so we can replace it during testing +module.exports = setInterval diff --git a/node_modules/node-gyp/node_modules/gauge/lib/spin.js b/node_modules/node-gyp/node_modules/gauge/lib/spin.js new file mode 100644 index 0000000000000..34142ee31acc7 --- /dev/null +++ b/node_modules/node-gyp/node_modules/gauge/lib/spin.js @@ -0,0 +1,5 @@ +'use strict' + +module.exports = function spin (spinstr, spun) { + return spinstr[spun % spinstr.length] +} diff --git a/node_modules/node-gyp/node_modules/gauge/lib/template-item.js b/node_modules/node-gyp/node_modules/gauge/lib/template-item.js new file mode 100644 index 0000000000000..e307e9b7421e7 --- /dev/null +++ b/node_modules/node-gyp/node_modules/gauge/lib/template-item.js @@ -0,0 +1,87 @@ +'use strict' +var stringWidth = require('string-width') + +module.exports = TemplateItem + +function isPercent (num) { + if (typeof num !== 'string') { + return false + } + return num.slice(-1) === '%' +} + +function percent (num) { + return Number(num.slice(0, -1)) / 100 +} + +function TemplateItem (values, outputLength) { + this.overallOutputLength = outputLength + this.finished = false + this.type = null + this.value = null + this.length = null + this.maxLength = null + this.minLength = null + this.kerning = null + this.align = 'left' + this.padLeft = 0 + this.padRight = 0 + this.index = null + this.first = null + this.last = null + if (typeof values === 'string') { + this.value = values + } else { + for (var prop in values) { + this[prop] = values[prop] + } + } + // Realize percents + if (isPercent(this.length)) { + this.length = Math.round(this.overallOutputLength * percent(this.length)) + } + if (isPercent(this.minLength)) { + this.minLength = Math.round(this.overallOutputLength * percent(this.minLength)) + } + if (isPercent(this.maxLength)) { + this.maxLength = Math.round(this.overallOutputLength * percent(this.maxLength)) + } + return this +} + +TemplateItem.prototype = {} + +TemplateItem.prototype.getBaseLength = function () { + var length = this.length + if ( + length == null && + typeof this.value === 'string' && + this.maxLength == null && + this.minLength == null + ) { + length = stringWidth(this.value) + } + return length +} + +TemplateItem.prototype.getLength = function () { + var length = this.getBaseLength() + if (length == null) { + return null + } + return length + this.padLeft + this.padRight +} + +TemplateItem.prototype.getMaxLength = function () { + if (this.maxLength == null) { + return null + } + return this.maxLength + this.padLeft + this.padRight +} + +TemplateItem.prototype.getMinLength = function () { + if (this.minLength == null) { + return null + } + return this.minLength + this.padLeft + this.padRight +} diff --git a/node_modules/node-gyp/node_modules/gauge/lib/theme-set.js b/node_modules/node-gyp/node_modules/gauge/lib/theme-set.js new file mode 100644 index 0000000000000..643d7dbb1da34 --- /dev/null +++ b/node_modules/node-gyp/node_modules/gauge/lib/theme-set.js @@ -0,0 +1,122 @@ +'use strict' + +module.exports = function () { + return ThemeSetProto.newThemeSet() +} + +var ThemeSetProto = {} + +ThemeSetProto.baseTheme = require('./base-theme.js') + +ThemeSetProto.newTheme = function (parent, theme) { + if (!theme) { + theme = parent + parent = this.baseTheme + } + return Object.assign({}, parent, theme) +} + +ThemeSetProto.getThemeNames = function () { + return Object.keys(this.themes) +} + +ThemeSetProto.addTheme = function (name, parent, theme) { + this.themes[name] = this.newTheme(parent, theme) +} + +ThemeSetProto.addToAllThemes = function (theme) { + var themes = this.themes + Object.keys(themes).forEach(function (name) { + Object.assign(themes[name], theme) + }) + Object.assign(this.baseTheme, theme) +} + +ThemeSetProto.getTheme = function (name) { + if (!this.themes[name]) { + throw this.newMissingThemeError(name) + } + return this.themes[name] +} + +ThemeSetProto.setDefault = function (opts, name) { + if (name == null) { + name = opts + opts = {} + } + var platform = opts.platform == null ? 'fallback' : opts.platform + var hasUnicode = !!opts.hasUnicode + var hasColor = !!opts.hasColor + if (!this.defaults[platform]) { + this.defaults[platform] = { true: {}, false: {} } + } + this.defaults[platform][hasUnicode][hasColor] = name +} + +ThemeSetProto.getDefault = function (opts) { + if (!opts) { + opts = {} + } + var platformName = opts.platform || process.platform + var platform = this.defaults[platformName] || this.defaults.fallback + var hasUnicode = !!opts.hasUnicode + var hasColor = !!opts.hasColor + if (!platform) { + throw this.newMissingDefaultThemeError(platformName, hasUnicode, hasColor) + } + if (!platform[hasUnicode][hasColor]) { + if (hasUnicode && hasColor && platform[!hasUnicode][hasColor]) { + hasUnicode = false + } else if (hasUnicode && hasColor && platform[hasUnicode][!hasColor]) { + hasColor = false + } else if (hasUnicode && hasColor && platform[!hasUnicode][!hasColor]) { + hasUnicode = false + hasColor = false + } else if (hasUnicode && !hasColor && platform[!hasUnicode][hasColor]) { + hasUnicode = false + } else if (!hasUnicode && hasColor && platform[hasUnicode][!hasColor]) { + hasColor = false + } else if (platform === this.defaults.fallback) { + throw this.newMissingDefaultThemeError(platformName, hasUnicode, hasColor) + } + } + if (platform[hasUnicode][hasColor]) { + return this.getTheme(platform[hasUnicode][hasColor]) + } else { + return this.getDefault(Object.assign({}, opts, { platform: 'fallback' })) + } +} + +ThemeSetProto.newMissingThemeError = function newMissingThemeError (name) { + var err = new Error('Could not find a gauge theme named "' + name + '"') + Error.captureStackTrace.call(err, newMissingThemeError) + err.theme = name + err.code = 'EMISSINGTHEME' + return err +} + +ThemeSetProto.newMissingDefaultThemeError = + function newMissingDefaultThemeError (platformName, hasUnicode, hasColor) { + var err = new Error( + 'Could not find a gauge theme for your platform/unicode/color use combo:\n' + + ' platform = ' + platformName + '\n' + + ' hasUnicode = ' + hasUnicode + '\n' + + ' hasColor = ' + hasColor) + Error.captureStackTrace.call(err, newMissingDefaultThemeError) + err.platform = platformName + err.hasUnicode = hasUnicode + err.hasColor = hasColor + err.code = 'EMISSINGTHEME' + return err + } + +ThemeSetProto.newThemeSet = function () { + var themeset = function (opts) { + return themeset.getDefault(opts) + } + return Object.assign(themeset, ThemeSetProto, { + themes: Object.assign({}, this.themes), + baseTheme: Object.assign({}, this.baseTheme), + defaults: JSON.parse(JSON.stringify(this.defaults || {})), + }) +} diff --git a/node_modules/node-gyp/node_modules/gauge/lib/themes.js b/node_modules/node-gyp/node_modules/gauge/lib/themes.js new file mode 100644 index 0000000000000..d2e62bbccb3d8 --- /dev/null +++ b/node_modules/node-gyp/node_modules/gauge/lib/themes.js @@ -0,0 +1,56 @@ +'use strict' +var color = require('console-control-strings').color +var ThemeSet = require('./theme-set.js') + +var themes = module.exports = new ThemeSet() + +themes.addTheme('ASCII', { + preProgressbar: '[', + postProgressbar: ']', + progressbarTheme: { + complete: '#', + remaining: '.', + }, + activityIndicatorTheme: '-\\|/', + preSubsection: '>', +}) + +themes.addTheme('colorASCII', themes.getTheme('ASCII'), { + progressbarTheme: { + preComplete: color('bgBrightWhite', 'brightWhite'), + complete: '#', + postComplete: color('reset'), + preRemaining: color('bgBrightBlack', 'brightBlack'), + remaining: '.', + postRemaining: color('reset'), + }, +}) + +themes.addTheme('brailleSpinner', { + preProgressbar: '(', + postProgressbar: ')', + progressbarTheme: { + complete: '#', + remaining: '⠂', + }, + activityIndicatorTheme: '⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏', + preSubsection: '>', +}) + +themes.addTheme('colorBrailleSpinner', themes.getTheme('brailleSpinner'), { + progressbarTheme: { + preComplete: color('bgBrightWhite', 'brightWhite'), + complete: '#', + postComplete: color('reset'), + preRemaining: color('bgBrightBlack', 'brightBlack'), + remaining: '⠂', + postRemaining: color('reset'), + }, +}) + +themes.setDefault({}, 'ASCII') +themes.setDefault({ hasColor: true }, 'colorASCII') +themes.setDefault({ platform: 'darwin', hasUnicode: true }, 'brailleSpinner') +themes.setDefault({ platform: 'darwin', hasUnicode: true, hasColor: true }, 'colorBrailleSpinner') +themes.setDefault({ platform: 'linux', hasUnicode: true }, 'brailleSpinner') +themes.setDefault({ platform: 'linux', hasUnicode: true, hasColor: true }, 'colorBrailleSpinner') diff --git a/node_modules/node-gyp/node_modules/gauge/lib/wide-truncate.js b/node_modules/node-gyp/node_modules/gauge/lib/wide-truncate.js new file mode 100644 index 0000000000000..5284a699ac3fb --- /dev/null +++ b/node_modules/node-gyp/node_modules/gauge/lib/wide-truncate.js @@ -0,0 +1,31 @@ +'use strict' +var stringWidth = require('string-width') +var stripAnsi = require('strip-ansi') + +module.exports = wideTruncate + +function wideTruncate (str, target) { + if (stringWidth(str) === 0) { + return str + } + if (target <= 0) { + return '' + } + if (stringWidth(str) <= target) { + return str + } + + // We compute the number of bytes of ansi sequences here and add + // that to our initial truncation to ensure that we don't slice one + // that we want to keep in half. + var noAnsi = stripAnsi(str) + var ansiSize = str.length + noAnsi.length + var truncated = str.slice(0, target + ansiSize) + + // we have to shrink the result to account for our ansi sequence buffer + // (if an ansi sequence was truncated) and double width characters. + while (stringWidth(truncated) > target) { + truncated = truncated.slice(0, -1) + } + return truncated +} diff --git a/node_modules/node-gyp/node_modules/gauge/package.json b/node_modules/node-gyp/node_modules/gauge/package.json new file mode 100644 index 0000000000000..bce3e68a33f69 --- /dev/null +++ b/node_modules/node-gyp/node_modules/gauge/package.json @@ -0,0 +1,66 @@ +{ + "name": "gauge", + "version": "4.0.4", + "description": "A terminal based horizontal gauge", + "main": "lib", + "scripts": { + "test": "tap", + "lint": "eslint \"**/*.js\"", + "postlint": "template-oss-check", + "lintfix": "npm run lint -- --fix", + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "snap": "tap", + "posttest": "npm run lint", + "template-oss-apply": "template-oss-apply --force" + }, + "repository": { + "type": "git", + "url": "https://github.com/npm/gauge.git" + }, + "keywords": [ + "progressbar", + "progress", + "gauge" + ], + "author": "GitHub Inc.", + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/gauge/issues" + }, + "homepage": "https://github.com/npm/gauge", + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + }, + "devDependencies": { + "@npmcli/eslint-config": "^3.0.1", + "@npmcli/template-oss": "3.2.0", + "readable-stream": "^3.6.0", + "tap": "^16.0.1" + }, + "files": [ + "bin/", + "lib/" + ], + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + }, + "tap": { + "branches": 79, + "statements": 89, + "functions": 92, + "lines": 90 + }, + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "version": "3.2.0" + } +} diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/LICENSE b/node_modules/node-gyp/node_modules/make-fetch-happen/LICENSE new file mode 100644 index 0000000000000..1808eb2844231 --- /dev/null +++ b/node_modules/node-gyp/node_modules/make-fetch-happen/LICENSE @@ -0,0 +1,16 @@ +ISC License + +Copyright 2017-2022 (c) npm, Inc. + +Permission to use, copy, modify, and/or distribute this software for +any purpose with or without fee is hereby granted, provided that the +above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS +ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE +USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/agent.js b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/agent.js new file mode 100644 index 0000000000000..dd68492ed7ea7 --- /dev/null +++ b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/agent.js @@ -0,0 +1,214 @@ +'use strict' +const LRU = require('lru-cache') +const url = require('url') +const isLambda = require('is-lambda') +const dns = require('./dns.js') + +const AGENT_CACHE = new LRU({ max: 50 }) +const HttpAgent = require('agentkeepalive') +const HttpsAgent = HttpAgent.HttpsAgent + +module.exports = getAgent + +const getAgentTimeout = timeout => + typeof timeout !== 'number' || !timeout ? 0 : timeout + 1 + +const getMaxSockets = maxSockets => maxSockets || 15 + +function getAgent (uri, opts) { + const parsedUri = new url.URL(typeof uri === 'string' ? uri : uri.url) + const isHttps = parsedUri.protocol === 'https:' + const pxuri = getProxyUri(parsedUri.href, opts) + + // If opts.timeout is zero, set the agentTimeout to zero as well. A timeout + // of zero disables the timeout behavior (OS limits still apply). Else, if + // opts.timeout is a non-zero value, set it to timeout + 1, to ensure that + // the node-fetch-npm timeout will always fire first, giving us more + // consistent errors. + const agentTimeout = getAgentTimeout(opts.timeout) + const agentMaxSockets = getMaxSockets(opts.maxSockets) + + const key = [ + `https:${isHttps}`, + pxuri + ? `proxy:${pxuri.protocol}//${pxuri.host}:${pxuri.port}` + : '>no-proxy<', + `local-address:${opts.localAddress || '>no-local-address<'}`, + `strict-ssl:${isHttps ? opts.rejectUnauthorized : '>no-strict-ssl<'}`, + `ca:${(isHttps && opts.ca) || '>no-ca<'}`, + `cert:${(isHttps && opts.cert) || '>no-cert<'}`, + `key:${(isHttps && opts.key) || '>no-key<'}`, + `timeout:${agentTimeout}`, + `maxSockets:${agentMaxSockets}`, + ].join(':') + + if (opts.agent != null) { // `agent: false` has special behavior! + return opts.agent + } + + // keep alive in AWS lambda makes no sense + const lambdaAgent = !isLambda ? null + : isHttps ? require('https').globalAgent + : require('http').globalAgent + + if (isLambda && !pxuri) { + return lambdaAgent + } + + if (AGENT_CACHE.peek(key)) { + return AGENT_CACHE.get(key) + } + + if (pxuri) { + const pxopts = isLambda ? { + ...opts, + agent: lambdaAgent, + } : opts + const proxy = getProxy(pxuri, pxopts, isHttps) + AGENT_CACHE.set(key, proxy) + return proxy + } + + const agent = isHttps ? new HttpsAgent({ + maxSockets: agentMaxSockets, + ca: opts.ca, + cert: opts.cert, + key: opts.key, + localAddress: opts.localAddress, + rejectUnauthorized: opts.rejectUnauthorized, + timeout: agentTimeout, + freeSocketTimeout: 15000, + lookup: dns.getLookup(opts.dns), + }) : new HttpAgent({ + maxSockets: agentMaxSockets, + localAddress: opts.localAddress, + timeout: agentTimeout, + freeSocketTimeout: 15000, + lookup: dns.getLookup(opts.dns), + }) + AGENT_CACHE.set(key, agent) + return agent +} + +function checkNoProxy (uri, opts) { + const host = new url.URL(uri).hostname.split('.').reverse() + let noproxy = (opts.noProxy || getProcessEnv('no_proxy')) + if (typeof noproxy === 'string') { + noproxy = noproxy.split(',').map(n => n.trim()) + } + + return noproxy && noproxy.some(no => { + const noParts = no.split('.').filter(x => x).reverse() + if (!noParts.length) { + return false + } + for (let i = 0; i < noParts.length; i++) { + if (host[i] !== noParts[i]) { + return false + } + } + return true + }) +} + +module.exports.getProcessEnv = getProcessEnv + +function getProcessEnv (env) { + if (!env) { + return + } + + let value + + if (Array.isArray(env)) { + for (const e of env) { + value = process.env[e] || + process.env[e.toUpperCase()] || + process.env[e.toLowerCase()] + if (typeof value !== 'undefined') { + break + } + } + } + + if (typeof env === 'string') { + value = process.env[env] || + process.env[env.toUpperCase()] || + process.env[env.toLowerCase()] + } + + return value +} + +module.exports.getProxyUri = getProxyUri +function getProxyUri (uri, opts) { + const protocol = new url.URL(uri).protocol + + const proxy = opts.proxy || + ( + protocol === 'https:' && + getProcessEnv('https_proxy') + ) || + ( + protocol === 'http:' && + getProcessEnv(['https_proxy', 'http_proxy', 'proxy']) + ) + if (!proxy) { + return null + } + + const parsedProxy = (typeof proxy === 'string') ? new url.URL(proxy) : proxy + + return !checkNoProxy(uri, opts) && parsedProxy +} + +const getAuth = u => + u.username && u.password ? decodeURIComponent(`${u.username}:${u.password}`) + : u.username ? decodeURIComponent(u.username) + : null + +const getPath = u => u.pathname + u.search + u.hash + +const HttpProxyAgent = require('http-proxy-agent') +const HttpsProxyAgent = require('https-proxy-agent') +const { SocksProxyAgent } = require('socks-proxy-agent') +module.exports.getProxy = getProxy +function getProxy (proxyUrl, opts, isHttps) { + // our current proxy agents do not support an overridden dns lookup method, so will not + // benefit from the dns cache + const popts = { + host: proxyUrl.hostname, + port: proxyUrl.port, + protocol: proxyUrl.protocol, + path: getPath(proxyUrl), + auth: getAuth(proxyUrl), + ca: opts.ca, + cert: opts.cert, + key: opts.key, + timeout: getAgentTimeout(opts.timeout), + localAddress: opts.localAddress, + maxSockets: getMaxSockets(opts.maxSockets), + rejectUnauthorized: opts.rejectUnauthorized, + } + + if (proxyUrl.protocol === 'http:' || proxyUrl.protocol === 'https:') { + if (!isHttps) { + return new HttpProxyAgent(popts) + } else { + return new HttpsProxyAgent(popts) + } + } else if (proxyUrl.protocol.startsWith('socks')) { + // socks-proxy-agent uses hostname not host + popts.hostname = popts.host + delete popts.host + return new SocksProxyAgent(popts) + } else { + throw Object.assign( + new Error(`unsupported proxy protocol: '${proxyUrl.protocol}'`), + { + code: 'EUNSUPPORTEDPROXY', + url: proxyUrl.href, + } + ) + } +} diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/entry.js b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/entry.js new file mode 100644 index 0000000000000..dba89d715d8a5 --- /dev/null +++ b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/entry.js @@ -0,0 +1,444 @@ +const { Request, Response } = require('minipass-fetch') +const Minipass = require('minipass') +const MinipassFlush = require('minipass-flush') +const cacache = require('cacache') +const url = require('url') + +const CachingMinipassPipeline = require('../pipeline.js') +const CachePolicy = require('./policy.js') +const cacheKey = require('./key.js') +const remote = require('../remote.js') + +const hasOwnProperty = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop) + +// allow list for request headers that will be written to the cache index +// note: we will also store any request headers +// that are named in a response's vary header +const KEEP_REQUEST_HEADERS = [ + 'accept-charset', + 'accept-encoding', + 'accept-language', + 'accept', + 'cache-control', +] + +// allow list for response headers that will be written to the cache index +// note: we must not store the real response's age header, or when we load +// a cache policy based on the metadata it will think the cached response +// is always stale +const KEEP_RESPONSE_HEADERS = [ + 'cache-control', + 'content-encoding', + 'content-language', + 'content-type', + 'date', + 'etag', + 'expires', + 'last-modified', + 'link', + 'location', + 'pragma', + 'vary', +] + +// return an object containing all metadata to be written to the index +const getMetadata = (request, response, options) => { + const metadata = { + time: Date.now(), + url: request.url, + reqHeaders: {}, + resHeaders: {}, + + // options on which we must match the request and vary the response + options: { + compress: options.compress != null ? options.compress : request.compress, + }, + } + + // only save the status if it's not a 200 or 304 + if (response.status !== 200 && response.status !== 304) { + metadata.status = response.status + } + + for (const name of KEEP_REQUEST_HEADERS) { + if (request.headers.has(name)) { + metadata.reqHeaders[name] = request.headers.get(name) + } + } + + // if the request's host header differs from the host in the url + // we need to keep it, otherwise it's just noise and we ignore it + const host = request.headers.get('host') + const parsedUrl = new url.URL(request.url) + if (host && parsedUrl.host !== host) { + metadata.reqHeaders.host = host + } + + // if the response has a vary header, make sure + // we store the relevant request headers too + if (response.headers.has('vary')) { + const vary = response.headers.get('vary') + // a vary of "*" means every header causes a different response. + // in that scenario, we do not include any additional headers + // as the freshness check will always fail anyway and we don't + // want to bloat the cache indexes + if (vary !== '*') { + // copy any other request headers that will vary the response + const varyHeaders = vary.trim().toLowerCase().split(/\s*,\s*/) + for (const name of varyHeaders) { + if (request.headers.has(name)) { + metadata.reqHeaders[name] = request.headers.get(name) + } + } + } + } + + for (const name of KEEP_RESPONSE_HEADERS) { + if (response.headers.has(name)) { + metadata.resHeaders[name] = response.headers.get(name) + } + } + + return metadata +} + +// symbols used to hide objects that may be lazily evaluated in a getter +const _request = Symbol('request') +const _response = Symbol('response') +const _policy = Symbol('policy') + +class CacheEntry { + constructor ({ entry, request, response, options }) { + if (entry) { + this.key = entry.key + this.entry = entry + // previous versions of this module didn't write an explicit timestamp in + // the metadata, so fall back to the entry's timestamp. we can't use the + // entry timestamp to determine staleness because cacache will update it + // when it verifies its data + this.entry.metadata.time = this.entry.metadata.time || this.entry.time + } else { + this.key = cacheKey(request) + } + + this.options = options + + // these properties are behind getters that lazily evaluate + this[_request] = request + this[_response] = response + this[_policy] = null + } + + // returns a CacheEntry instance that satisfies the given request + // or undefined if no existing entry satisfies + static async find (request, options) { + try { + // compacts the index and returns an array of unique entries + var matches = await cacache.index.compact(options.cachePath, cacheKey(request), (A, B) => { + const entryA = new CacheEntry({ entry: A, options }) + const entryB = new CacheEntry({ entry: B, options }) + return entryA.policy.satisfies(entryB.request) + }, { + validateEntry: (entry) => { + // clean out entries with a buggy content-encoding value + if (entry.metadata && + entry.metadata.resHeaders && + entry.metadata.resHeaders['content-encoding'] === null) { + return false + } + + // if an integrity is null, it needs to have a status specified + if (entry.integrity === null) { + return !!(entry.metadata && entry.metadata.status) + } + + return true + }, + }) + } catch (err) { + // if the compact request fails, ignore the error and return + return + } + + // a cache mode of 'reload' means to behave as though we have no cache + // on the way to the network. return undefined to allow cacheFetch to + // create a brand new request no matter what. + if (options.cache === 'reload') { + return + } + + // find the specific entry that satisfies the request + let match + for (const entry of matches) { + const _entry = new CacheEntry({ + entry, + options, + }) + + if (_entry.policy.satisfies(request)) { + match = _entry + break + } + } + + return match + } + + // if the user made a PUT/POST/PATCH then we invalidate our + // cache for the same url by deleting the index entirely + static async invalidate (request, options) { + const key = cacheKey(request) + try { + await cacache.rm.entry(options.cachePath, key, { removeFully: true }) + } catch (err) { + // ignore errors + } + } + + get request () { + if (!this[_request]) { + this[_request] = new Request(this.entry.metadata.url, { + method: 'GET', + headers: this.entry.metadata.reqHeaders, + ...this.entry.metadata.options, + }) + } + + return this[_request] + } + + get response () { + if (!this[_response]) { + this[_response] = new Response(null, { + url: this.entry.metadata.url, + counter: this.options.counter, + status: this.entry.metadata.status || 200, + headers: { + ...this.entry.metadata.resHeaders, + 'content-length': this.entry.size, + }, + }) + } + + return this[_response] + } + + get policy () { + if (!this[_policy]) { + this[_policy] = new CachePolicy({ + entry: this.entry, + request: this.request, + response: this.response, + options: this.options, + }) + } + + return this[_policy] + } + + // wraps the response in a pipeline that stores the data + // in the cache while the user consumes it + async store (status) { + // if we got a status other than 200, 301, or 308, + // or the CachePolicy forbid storage, append the + // cache status header and return it untouched + if ( + this.request.method !== 'GET' || + ![200, 301, 308].includes(this.response.status) || + !this.policy.storable() + ) { + this.response.headers.set('x-local-cache-status', 'skip') + return this.response + } + + const size = this.response.headers.get('content-length') + const cacheOpts = { + algorithms: this.options.algorithms, + metadata: getMetadata(this.request, this.response, this.options), + size, + integrity: this.options.integrity, + integrityEmitter: this.response.body.hasIntegrityEmitter && this.response.body, + } + + let body = null + // we only set a body if the status is a 200, redirects are + // stored as metadata only + if (this.response.status === 200) { + let cacheWriteResolve, cacheWriteReject + const cacheWritePromise = new Promise((resolve, reject) => { + cacheWriteResolve = resolve + cacheWriteReject = reject + }) + + body = new CachingMinipassPipeline({ events: ['integrity', 'size'] }, new MinipassFlush({ + flush () { + return cacheWritePromise + }, + })) + // this is always true since if we aren't reusing the one from the remote fetch, we + // are using the one from cacache + body.hasIntegrityEmitter = true + + const onResume = () => { + const tee = new Minipass() + const cacheStream = cacache.put.stream(this.options.cachePath, this.key, cacheOpts) + // re-emit the integrity and size events on our new response body so they can be reused + cacheStream.on('integrity', i => body.emit('integrity', i)) + cacheStream.on('size', s => body.emit('size', s)) + // stick a flag on here so downstream users will know if they can expect integrity events + tee.pipe(cacheStream) + // TODO if the cache write fails, log a warning but return the response anyway + // eslint-disable-next-line promise/catch-or-return + cacheStream.promise().then(cacheWriteResolve, cacheWriteReject) + body.unshift(tee) + body.unshift(this.response.body) + } + + body.once('resume', onResume) + body.once('end', () => body.removeListener('resume', onResume)) + } else { + await cacache.index.insert(this.options.cachePath, this.key, null, cacheOpts) + } + + // note: we do not set the x-local-cache-hash header because we do not know + // the hash value until after the write to the cache completes, which doesn't + // happen until after the response has been sent and it's too late to write + // the header anyway + this.response.headers.set('x-local-cache', encodeURIComponent(this.options.cachePath)) + this.response.headers.set('x-local-cache-key', encodeURIComponent(this.key)) + this.response.headers.set('x-local-cache-mode', 'stream') + this.response.headers.set('x-local-cache-status', status) + this.response.headers.set('x-local-cache-time', new Date().toISOString()) + const newResponse = new Response(body, { + url: this.response.url, + status: this.response.status, + headers: this.response.headers, + counter: this.options.counter, + }) + return newResponse + } + + // use the cached data to create a response and return it + async respond (method, options, status) { + let response + if (method === 'HEAD' || [301, 308].includes(this.response.status)) { + // if the request is a HEAD, or the response is a redirect, + // then the metadata in the entry already includes everything + // we need to build a response + response = this.response + } else { + // we're responding with a full cached response, so create a body + // that reads from cacache and attach it to a new Response + const body = new Minipass() + const headers = { ...this.policy.responseHeaders() } + const onResume = () => { + const cacheStream = cacache.get.stream.byDigest( + this.options.cachePath, this.entry.integrity, { memoize: this.options.memoize } + ) + cacheStream.on('error', async (err) => { + cacheStream.pause() + if (err.code === 'EINTEGRITY') { + await cacache.rm.content( + this.options.cachePath, this.entry.integrity, { memoize: this.options.memoize } + ) + } + if (err.code === 'ENOENT' || err.code === 'EINTEGRITY') { + await CacheEntry.invalidate(this.request, this.options) + } + body.emit('error', err) + cacheStream.resume() + }) + // emit the integrity and size events based on our metadata so we're consistent + body.emit('integrity', this.entry.integrity) + body.emit('size', Number(headers['content-length'])) + cacheStream.pipe(body) + } + + body.once('resume', onResume) + body.once('end', () => body.removeListener('resume', onResume)) + response = new Response(body, { + url: this.entry.metadata.url, + counter: options.counter, + status: 200, + headers, + }) + } + + response.headers.set('x-local-cache', encodeURIComponent(this.options.cachePath)) + response.headers.set('x-local-cache-hash', encodeURIComponent(this.entry.integrity)) + response.headers.set('x-local-cache-key', encodeURIComponent(this.key)) + response.headers.set('x-local-cache-mode', 'stream') + response.headers.set('x-local-cache-status', status) + response.headers.set('x-local-cache-time', new Date(this.entry.metadata.time).toUTCString()) + return response + } + + // use the provided request along with this cache entry to + // revalidate the stored response. returns a response, either + // from the cache or from the update + async revalidate (request, options) { + const revalidateRequest = new Request(request, { + headers: this.policy.revalidationHeaders(request), + }) + + try { + // NOTE: be sure to remove the headers property from the + // user supplied options, since we have already defined + // them on the new request object. if they're still in the + // options then those will overwrite the ones from the policy + var response = await remote(revalidateRequest, { + ...options, + headers: undefined, + }) + } catch (err) { + // if the network fetch fails, return the stale + // cached response unless it has a cache-control + // of 'must-revalidate' + if (!this.policy.mustRevalidate) { + return this.respond(request.method, options, 'stale') + } + + throw err + } + + if (this.policy.revalidated(revalidateRequest, response)) { + // we got a 304, write a new index to the cache and respond from cache + const metadata = getMetadata(request, response, options) + // 304 responses do not include headers that are specific to the response data + // since they do not include a body, so we copy values for headers that were + // in the old cache entry to the new one, if the new metadata does not already + // include that header + for (const name of KEEP_RESPONSE_HEADERS) { + if ( + !hasOwnProperty(metadata.resHeaders, name) && + hasOwnProperty(this.entry.metadata.resHeaders, name) + ) { + metadata.resHeaders[name] = this.entry.metadata.resHeaders[name] + } + } + + try { + await cacache.index.insert(options.cachePath, this.key, this.entry.integrity, { + size: this.entry.size, + metadata, + }) + } catch (err) { + // if updating the cache index fails, we ignore it and + // respond anyway + } + return this.respond(request.method, options, 'revalidated') + } + + // if we got a modified response, create a new entry based on it + const newEntry = new CacheEntry({ + request, + response, + options, + }) + + // respond with the new entry while writing it to the cache + return newEntry.store('updated') + } +} + +module.exports = CacheEntry diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/errors.js b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/errors.js new file mode 100644 index 0000000000000..67a66573bebe6 --- /dev/null +++ b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/errors.js @@ -0,0 +1,11 @@ +class NotCachedError extends Error { + constructor (url) { + /* eslint-disable-next-line max-len */ + super(`request to ${url} failed: cache mode is 'only-if-cached' but no cached response is available.`) + this.code = 'ENOTCACHED' + } +} + +module.exports = { + NotCachedError, +} diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/index.js b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/index.js new file mode 100644 index 0000000000000..0de49d23fb933 --- /dev/null +++ b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/index.js @@ -0,0 +1,49 @@ +const { NotCachedError } = require('./errors.js') +const CacheEntry = require('./entry.js') +const remote = require('../remote.js') + +// do whatever is necessary to get a Response and return it +const cacheFetch = async (request, options) => { + // try to find a cached entry that satisfies this request + const entry = await CacheEntry.find(request, options) + if (!entry) { + // no cached result, if the cache mode is 'only-if-cached' that's a failure + if (options.cache === 'only-if-cached') { + throw new NotCachedError(request.url) + } + + // otherwise, we make a request, store it and return it + const response = await remote(request, options) + const newEntry = new CacheEntry({ request, response, options }) + return newEntry.store('miss') + } + + // we have a cached response that satisfies this request, however if the cache + // mode is 'no-cache' then we send the revalidation request no matter what + if (options.cache === 'no-cache') { + return entry.revalidate(request, options) + } + + // if the cached entry is not stale, or if the cache mode is 'force-cache' or + // 'only-if-cached' we can respond with the cached entry. set the status + // based on the result of needsRevalidation and respond + const _needsRevalidation = entry.policy.needsRevalidation(request) + if (options.cache === 'force-cache' || + options.cache === 'only-if-cached' || + !_needsRevalidation) { + return entry.respond(request.method, options, _needsRevalidation ? 'stale' : 'hit') + } + + // if we got here, the cache entry is stale so revalidate it + return entry.revalidate(request, options) +} + +cacheFetch.invalidate = async (request, options) => { + if (!options.cachePath) { + return + } + + return CacheEntry.invalidate(request, options) +} + +module.exports = cacheFetch diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/key.js b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/key.js new file mode 100644 index 0000000000000..f7684d562b7fa --- /dev/null +++ b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/key.js @@ -0,0 +1,17 @@ +const { URL, format } = require('url') + +// options passed to url.format() when generating a key +const formatOptions = { + auth: false, + fragment: false, + search: true, + unicode: false, +} + +// returns a string to be used as the cache key for the Request +const cacheKey = (request) => { + const parsed = new URL(request.url) + return `make-fetch-happen:request-cache:${format(parsed, formatOptions)}` +} + +module.exports = cacheKey diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/policy.js b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/policy.js new file mode 100644 index 0000000000000..ada3c8600dae9 --- /dev/null +++ b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/policy.js @@ -0,0 +1,161 @@ +const CacheSemantics = require('http-cache-semantics') +const Negotiator = require('negotiator') +const ssri = require('ssri') + +// options passed to http-cache-semantics constructor +const policyOptions = { + shared: false, + ignoreCargoCult: true, +} + +// a fake empty response, used when only testing the +// request for storability +const emptyResponse = { status: 200, headers: {} } + +// returns a plain object representation of the Request +const requestObject = (request) => { + const _obj = { + method: request.method, + url: request.url, + headers: {}, + compress: request.compress, + } + + request.headers.forEach((value, key) => { + _obj.headers[key] = value + }) + + return _obj +} + +// returns a plain object representation of the Response +const responseObject = (response) => { + const _obj = { + status: response.status, + headers: {}, + } + + response.headers.forEach((value, key) => { + _obj.headers[key] = value + }) + + return _obj +} + +class CachePolicy { + constructor ({ entry, request, response, options }) { + this.entry = entry + this.request = requestObject(request) + this.response = responseObject(response) + this.options = options + this.policy = new CacheSemantics(this.request, this.response, policyOptions) + + if (this.entry) { + // if we have an entry, copy the timestamp to the _responseTime + // this is necessary because the CacheSemantics constructor forces + // the value to Date.now() which means a policy created from a + // cache entry is likely to always identify itself as stale + this.policy._responseTime = this.entry.metadata.time + } + } + + // static method to quickly determine if a request alone is storable + static storable (request, options) { + // no cachePath means no caching + if (!options.cachePath) { + return false + } + + // user explicitly asked not to cache + if (options.cache === 'no-store') { + return false + } + + // we only cache GET and HEAD requests + if (!['GET', 'HEAD'].includes(request.method)) { + return false + } + + // otherwise, let http-cache-semantics make the decision + // based on the request's headers + const policy = new CacheSemantics(requestObject(request), emptyResponse, policyOptions) + return policy.storable() + } + + // returns true if the policy satisfies the request + satisfies (request) { + const _req = requestObject(request) + if (this.request.headers.host !== _req.headers.host) { + return false + } + + if (this.request.compress !== _req.compress) { + return false + } + + const negotiatorA = new Negotiator(this.request) + const negotiatorB = new Negotiator(_req) + + if (JSON.stringify(negotiatorA.mediaTypes()) !== JSON.stringify(negotiatorB.mediaTypes())) { + return false + } + + if (JSON.stringify(negotiatorA.languages()) !== JSON.stringify(negotiatorB.languages())) { + return false + } + + if (JSON.stringify(negotiatorA.encodings()) !== JSON.stringify(negotiatorB.encodings())) { + return false + } + + if (this.options.integrity) { + return ssri.parse(this.options.integrity).match(this.entry.integrity) + } + + return true + } + + // returns true if the request and response allow caching + storable () { + return this.policy.storable() + } + + // NOTE: this is a hack to avoid parsing the cache-control + // header ourselves, it returns true if the response's + // cache-control contains must-revalidate + get mustRevalidate () { + return !!this.policy._rescc['must-revalidate'] + } + + // returns true if the cached response requires revalidation + // for the given request + needsRevalidation (request) { + const _req = requestObject(request) + // force method to GET because we only cache GETs + // but can serve a HEAD from a cached GET + _req.method = 'GET' + return !this.policy.satisfiesWithoutRevalidation(_req) + } + + responseHeaders () { + return this.policy.responseHeaders() + } + + // returns a new object containing the appropriate headers + // to send a revalidation request + revalidationHeaders (request) { + const _req = requestObject(request) + return this.policy.revalidationHeaders(_req) + } + + // returns true if the request/response was revalidated + // successfully. returns false if a new response was received + revalidated (request, response) { + const _req = requestObject(request) + const _res = responseObject(response) + const policy = this.policy.revalidatedPolicy(_req, _res) + return !policy.modified + } +} + +module.exports = CachePolicy diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/dns.js b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/dns.js new file mode 100644 index 0000000000000..13102b57c4aa0 --- /dev/null +++ b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/dns.js @@ -0,0 +1,49 @@ +const LRUCache = require('lru-cache') +const dns = require('dns') + +const defaultOptions = exports.defaultOptions = { + family: undefined, + hints: dns.ADDRCONFIG, + all: false, + verbatim: undefined, +} + +const lookupCache = exports.lookupCache = new LRUCache({ max: 50 }) + +// this is a factory so that each request can have its own opts (i.e. ttl) +// while still sharing the cache across all requests +exports.getLookup = (dnsOptions) => { + return (hostname, options, callback) => { + if (typeof options === 'function') { + callback = options + options = null + } else if (typeof options === 'number') { + options = { family: options } + } + + options = { ...defaultOptions, ...options } + + const key = JSON.stringify({ + hostname, + family: options.family, + hints: options.hints, + all: options.all, + verbatim: options.verbatim, + }) + + if (lookupCache.has(key)) { + const [address, family] = lookupCache.get(key) + process.nextTick(callback, null, address, family) + return + } + + dnsOptions.lookup(hostname, options, (err, address, family) => { + if (err) { + return callback(err) + } + + lookupCache.set(key, [address, family], { ttl: dnsOptions.ttl }) + return callback(null, address, family) + }) + } +} diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/fetch.js b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/fetch.js new file mode 100644 index 0000000000000..233ba67e16550 --- /dev/null +++ b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/fetch.js @@ -0,0 +1,118 @@ +'use strict' + +const { FetchError, Request, isRedirect } = require('minipass-fetch') +const url = require('url') + +const CachePolicy = require('./cache/policy.js') +const cache = require('./cache/index.js') +const remote = require('./remote.js') + +// given a Request, a Response and user options +// return true if the response is a redirect that +// can be followed. we throw errors that will result +// in the fetch being rejected if the redirect is +// possible but invalid for some reason +const canFollowRedirect = (request, response, options) => { + if (!isRedirect(response.status)) { + return false + } + + if (options.redirect === 'manual') { + return false + } + + if (options.redirect === 'error') { + throw new FetchError(`redirect mode is set to error: ${request.url}`, + 'no-redirect', { code: 'ENOREDIRECT' }) + } + + if (!response.headers.has('location')) { + throw new FetchError(`redirect location header missing for: ${request.url}`, + 'no-location', { code: 'EINVALIDREDIRECT' }) + } + + if (request.counter >= request.follow) { + throw new FetchError(`maximum redirect reached at: ${request.url}`, + 'max-redirect', { code: 'EMAXREDIRECT' }) + } + + return true +} + +// given a Request, a Response, and the user's options return an object +// with a new Request and a new options object that will be used for +// following the redirect +const getRedirect = (request, response, options) => { + const _opts = { ...options } + const location = response.headers.get('location') + const redirectUrl = new url.URL(location, /^https?:/.test(location) ? undefined : request.url) + // Comment below is used under the following license: + /** + * @license + * Copyright (c) 2010-2012 Mikeal Rogers + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an "AS + * IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + + // Remove authorization if changing hostnames (but not if just + // changing ports or protocols). This matches the behavior of request: + // https://github.com/request/request/blob/b12a6245/lib/redirect.js#L134-L138 + if (new url.URL(request.url).hostname !== redirectUrl.hostname) { + request.headers.delete('authorization') + request.headers.delete('cookie') + } + + // for POST request with 301/302 response, or any request with 303 response, + // use GET when following redirect + if ( + response.status === 303 || + (request.method === 'POST' && [301, 302].includes(response.status)) + ) { + _opts.method = 'GET' + _opts.body = null + request.headers.delete('content-length') + } + + _opts.headers = {} + request.headers.forEach((value, key) => { + _opts.headers[key] = value + }) + + _opts.counter = ++request.counter + const redirectReq = new Request(url.format(redirectUrl), _opts) + return { + request: redirectReq, + options: _opts, + } +} + +const fetch = async (request, options) => { + const response = CachePolicy.storable(request, options) + ? await cache(request, options) + : await remote(request, options) + + // if the request wasn't a GET or HEAD, and the response + // status is between 200 and 399 inclusive, invalidate the + // request url + if (!['GET', 'HEAD'].includes(request.method) && + response.status >= 200 && + response.status <= 399) { + await cache.invalidate(request, options) + } + + if (!canFollowRedirect(request, response, options)) { + return response + } + + const redirect = getRedirect(request, response, options) + return fetch(redirect.request, redirect.options) +} + +module.exports = fetch diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/index.js b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/index.js new file mode 100644 index 0000000000000..2f12e8e1b6113 --- /dev/null +++ b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/index.js @@ -0,0 +1,41 @@ +const { FetchError, Headers, Request, Response } = require('minipass-fetch') + +const configureOptions = require('./options.js') +const fetch = require('./fetch.js') + +const makeFetchHappen = (url, opts) => { + const options = configureOptions(opts) + + const request = new Request(url, options) + return fetch(request, options) +} + +makeFetchHappen.defaults = (defaultUrl, defaultOptions = {}, wrappedFetch = makeFetchHappen) => { + if (typeof defaultUrl === 'object') { + defaultOptions = defaultUrl + defaultUrl = null + } + + const defaultedFetch = (url, options = {}) => { + const finalUrl = url || defaultUrl + const finalOptions = { + ...defaultOptions, + ...options, + headers: { + ...defaultOptions.headers, + ...options.headers, + }, + } + return wrappedFetch(finalUrl, finalOptions) + } + + defaultedFetch.defaults = (defaultUrl1, defaultOptions1 = {}) => + makeFetchHappen.defaults(defaultUrl1, defaultOptions1, defaultedFetch) + return defaultedFetch +} + +module.exports = makeFetchHappen +module.exports.FetchError = FetchError +module.exports.Headers = Headers +module.exports.Request = Request +module.exports.Response = Response diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/options.js b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/options.js new file mode 100644 index 0000000000000..daa9ecd9d5d5f --- /dev/null +++ b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/options.js @@ -0,0 +1,52 @@ +const dns = require('dns') + +const conditionalHeaders = [ + 'if-modified-since', + 'if-none-match', + 'if-unmodified-since', + 'if-match', + 'if-range', +] + +const configureOptions = (opts) => { + const { strictSSL, ...options } = { ...opts } + options.method = options.method ? options.method.toUpperCase() : 'GET' + options.rejectUnauthorized = strictSSL !== false + + if (!options.retry) { + options.retry = { retries: 0 } + } else if (typeof options.retry === 'string') { + const retries = parseInt(options.retry, 10) + if (isFinite(retries)) { + options.retry = { retries } + } else { + options.retry = { retries: 0 } + } + } else if (typeof options.retry === 'number') { + options.retry = { retries: options.retry } + } else { + options.retry = { retries: 0, ...options.retry } + } + + options.dns = { ttl: 5 * 60 * 1000, lookup: dns.lookup, ...options.dns } + + options.cache = options.cache || 'default' + if (options.cache === 'default') { + const hasConditionalHeader = Object.keys(options.headers || {}).some((name) => { + return conditionalHeaders.includes(name.toLowerCase()) + }) + if (hasConditionalHeader) { + options.cache = 'no-store' + } + } + + // cacheManager is deprecated, but if it's set and + // cachePath is not we should copy it to the new field + if (options.cacheManager && !options.cachePath) { + options.cachePath = options.cacheManager + } + + return options +} + +module.exports = configureOptions diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/pipeline.js b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/pipeline.js new file mode 100644 index 0000000000000..b1d221b2d0ce3 --- /dev/null +++ b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/pipeline.js @@ -0,0 +1,41 @@ +'use strict' + +const MinipassPipeline = require('minipass-pipeline') + +class CachingMinipassPipeline extends MinipassPipeline { + #events = [] + #data = new Map() + + constructor (opts, ...streams) { + // CRITICAL: do NOT pass the streams to the call to super(), this will start + // the flow of data and potentially cause the events we need to catch to emit + // before we've finished our own setup. instead we call super() with no args, + // finish our setup, and then push the streams into ourselves to start the + // data flow + super() + this.#events = opts.events + + /* istanbul ignore next - coverage disabled because this is pointless to test here */ + if (streams.length) { + this.push(...streams) + } + } + + on (event, handler) { + if (this.#events.includes(event) && this.#data.has(event)) { + return handler(...this.#data.get(event)) + } + + return super.on(event, handler) + } + + emit (event, ...data) { + if (this.#events.includes(event)) { + this.#data.set(event, data) + } + + return super.emit(event, ...data) + } +} + +module.exports = CachingMinipassPipeline diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/lib/remote.js b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/remote.js new file mode 100644 index 0000000000000..068c73a8a7a7e --- /dev/null +++ b/node_modules/node-gyp/node_modules/make-fetch-happen/lib/remote.js @@ -0,0 +1,121 @@ +const Minipass = require('minipass') +const fetch = require('minipass-fetch') +const promiseRetry = require('promise-retry') +const ssri = require('ssri') + +const CachingMinipassPipeline = require('./pipeline.js') +const getAgent = require('./agent.js') +const pkg = require('../package.json') + +const USER_AGENT = `${pkg.name}/${pkg.version} (+https://npm.im/${pkg.name})` + +const RETRY_ERRORS = [ + 'ECONNRESET', // remote socket closed on us + 'ECONNREFUSED', // remote host refused to open connection + 'EADDRINUSE', // failed to bind to a local port (proxy?) + 'ETIMEDOUT', // someone in the transaction is WAY TOO SLOW + 'ERR_SOCKET_TIMEOUT', // same as above, but this one comes from agentkeepalive + // Known codes we do NOT retry on: + // ENOTFOUND (getaddrinfo failure. Either bad hostname, or offline) +] + +const RETRY_TYPES = [ + 'request-timeout', +] + +// make a request directly to the remote source, +// retrying certain classes of errors as well as +// following redirects (through the cache if necessary) +// and verifying response integrity +const remoteFetch = (request, options) => { + const agent = getAgent(request.url, options) + if (!request.headers.has('connection')) { + request.headers.set('connection', agent ? 'keep-alive' : 'close') + } + + if (!request.headers.has('user-agent')) { + request.headers.set('user-agent', USER_AGENT) + } + + // keep our own options since we're overriding the agent + // and the redirect mode + const _opts = { + ...options, + agent, + redirect: 'manual', + } + + return promiseRetry(async (retryHandler, attemptNum) => { + const req = new fetch.Request(request, _opts) + try { + let res = await fetch(req, _opts) + if (_opts.integrity && res.status === 200) { + // we got a 200 response and the user has specified an expected + // integrity value, so wrap the response in an ssri stream to verify it + const integrityStream = ssri.integrityStream({ + algorithms: _opts.algorithms, + integrity: _opts.integrity, + size: _opts.size, + }) + const pipeline = new CachingMinipassPipeline({ + events: ['integrity', 'size'], + }, res.body, integrityStream) + // we also propagate the integrity and size events out to the pipeline so we can use + // this new response body as an integrityEmitter for cacache + integrityStream.on('integrity', i => pipeline.emit('integrity', i)) + integrityStream.on('size', s => pipeline.emit('size', s)) + res = new fetch.Response(pipeline, res) + // set an explicit flag so we know if our response body will emit integrity and size + res.body.hasIntegrityEmitter = true + } + + res.headers.set('x-fetch-attempts', attemptNum) + + // do not retry POST requests, or requests with a streaming body + // do retry requests with a 408, 420, 429 or 500+ status in the response + const isStream = Minipass.isStream(req.body) + const isRetriable = req.method !== 'POST' && + !isStream && + ([408, 420, 429].includes(res.status) || res.status >= 500) + + if (isRetriable) { + if (typeof options.onRetry === 'function') { + options.onRetry(res) + } + + return retryHandler(res) + } + + return res + } catch (err) { + const code = (err.code === 'EPROMISERETRY') + ? err.retried.code + : err.code + + // err.retried will be the thing that was thrown from above + // if it's a response, we just got a bad status code and we + // can re-throw to allow the retry + const isRetryError = err.retried instanceof fetch.Response || + (RETRY_ERRORS.includes(code) && RETRY_TYPES.includes(err.type)) + + if (req.method === 'POST' || isRetryError) { + throw err + } + + if (typeof options.onRetry === 'function') { + options.onRetry(err) + } + + return retryHandler(err) + } + }, options.retry).catch((err) => { + // don't reject for http errors, just return them + if (err.status >= 400 && err.type !== 'system') { + return err + } + + throw err + }) +} + +module.exports = remoteFetch diff --git a/node_modules/node-gyp/node_modules/make-fetch-happen/package.json b/node_modules/node-gyp/node_modules/make-fetch-happen/package.json new file mode 100644 index 0000000000000..fc491d1152e15 --- /dev/null +++ b/node_modules/node-gyp/node_modules/make-fetch-happen/package.json @@ -0,0 +1,79 @@ +{ + "name": "make-fetch-happen", + "version": "10.2.1", + "description": "Opinionated, caching, retrying fetch client", + "main": "lib/index.js", + "files": [ + "bin/", + "lib/" + ], + "scripts": { + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "test": "tap", + "posttest": "npm run lint", + "eslint": "eslint", + "lint": "eslint \"**/*.js\"", + "lintfix": "npm run lint -- --fix", + "postlint": "template-oss-check", + "snap": "tap", + "template-oss-apply": "template-oss-apply --force" + }, + "repository": { + "type": "git", + "url": "https://github.com/npm/make-fetch-happen.git" + }, + "keywords": [ + "http", + "request", + "fetch", + "mean girls", + "caching", + "cache", + "subresource integrity" + ], + "author": "GitHub Inc.", + "license": "ISC", + "dependencies": { + "agentkeepalive": "^4.2.1", + "cacache": "^16.1.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^2.0.3", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^9.0.0" + }, + "devDependencies": { + "@npmcli/eslint-config": "^3.0.1", + "@npmcli/template-oss": "3.5.0", + "mkdirp": "^1.0.4", + "nock": "^13.2.4", + "rimraf": "^3.0.2", + "safe-buffer": "^5.2.1", + "standard-version": "^9.3.2", + "tap": "^16.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + }, + "tap": { + "color": 1, + "files": "test/*.js", + "check-coverage": true, + "timeout": 60 + }, + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "version": "3.5.0" + } +} diff --git a/node_modules/node-gyp/node_modules/minipass-fetch/LICENSE b/node_modules/node-gyp/node_modules/minipass-fetch/LICENSE new file mode 100644 index 0000000000000..3c3410cdc12ee --- /dev/null +++ b/node_modules/node-gyp/node_modules/minipass-fetch/LICENSE @@ -0,0 +1,28 @@ +The MIT License (MIT) + +Copyright (c) Isaac Z. Schlueter and Contributors +Copyright (c) 2016 David Frank + +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. + +--- + +Note: This is a derivative work based on "node-fetch" by David Frank, +modified and distributed under the terms of the MIT license above. +https://github.com/bitinn/node-fetch diff --git a/node_modules/node-gyp/node_modules/minipass-fetch/lib/abort-error.js b/node_modules/node-gyp/node_modules/minipass-fetch/lib/abort-error.js new file mode 100644 index 0000000000000..b18f643269e37 --- /dev/null +++ b/node_modules/node-gyp/node_modules/minipass-fetch/lib/abort-error.js @@ -0,0 +1,17 @@ +'use strict' +class AbortError extends Error { + constructor (message) { + super(message) + this.code = 'FETCH_ABORTED' + this.type = 'aborted' + Error.captureStackTrace(this, this.constructor) + } + + get name () { + return 'AbortError' + } + + // don't allow name to be overridden, but don't throw either + set name (s) {} +} +module.exports = AbortError diff --git a/node_modules/node-gyp/node_modules/minipass-fetch/lib/blob.js b/node_modules/node-gyp/node_modules/minipass-fetch/lib/blob.js new file mode 100644 index 0000000000000..efe69a34458af --- /dev/null +++ b/node_modules/node-gyp/node_modules/minipass-fetch/lib/blob.js @@ -0,0 +1,97 @@ +'use strict' +const Minipass = require('minipass') +const TYPE = Symbol('type') +const BUFFER = Symbol('buffer') + +class Blob { + constructor (blobParts, options) { + this[TYPE] = '' + + const buffers = [] + let size = 0 + + if (blobParts) { + const a = blobParts + const length = Number(a.length) + for (let i = 0; i < length; i++) { + const element = a[i] + const buffer = element instanceof Buffer ? element + : ArrayBuffer.isView(element) + ? Buffer.from(element.buffer, element.byteOffset, element.byteLength) + : element instanceof ArrayBuffer ? Buffer.from(element) + : element instanceof Blob ? element[BUFFER] + : typeof element === 'string' ? Buffer.from(element) + : Buffer.from(String(element)) + size += buffer.length + buffers.push(buffer) + } + } + + this[BUFFER] = Buffer.concat(buffers, size) + + const type = options && options.type !== undefined + && String(options.type).toLowerCase() + if (type && !/[^\u0020-\u007E]/.test(type)) { + this[TYPE] = type + } + } + + get size () { + return this[BUFFER].length + } + + get type () { + return this[TYPE] + } + + text () { + return Promise.resolve(this[BUFFER].toString()) + } + + arrayBuffer () { + const buf = this[BUFFER] + const off = buf.byteOffset + const len = buf.byteLength + const ab = buf.buffer.slice(off, off + len) + return Promise.resolve(ab) + } + + stream () { + return new Minipass().end(this[BUFFER]) + } + + slice (start, end, type) { + const size = this.size + const relativeStart = start === undefined ? 0 + : start < 0 ? Math.max(size + start, 0) + : Math.min(start, size) + const relativeEnd = end === undefined ? size + : end < 0 ? Math.max(size + end, 0) + : Math.min(end, size) + const span = Math.max(relativeEnd - relativeStart, 0) + + const buffer = this[BUFFER] + const slicedBuffer = buffer.slice( + relativeStart, + relativeStart + span + ) + const blob = new Blob([], { type }) + blob[BUFFER] = slicedBuffer + return blob + } + + get [Symbol.toStringTag] () { + return 'Blob' + } + + static get BUFFER () { + return BUFFER + } +} + +Object.defineProperties(Blob.prototype, { + size: { enumerable: true }, + type: { enumerable: true }, +}) + +module.exports = Blob diff --git a/node_modules/node-gyp/node_modules/minipass-fetch/lib/body.js b/node_modules/node-gyp/node_modules/minipass-fetch/lib/body.js new file mode 100644 index 0000000000000..9d1b45de30ce9 --- /dev/null +++ b/node_modules/node-gyp/node_modules/minipass-fetch/lib/body.js @@ -0,0 +1,350 @@ +'use strict' +const Minipass = require('minipass') +const MinipassSized = require('minipass-sized') + +const Blob = require('./blob.js') +const { BUFFER } = Blob +const FetchError = require('./fetch-error.js') + +// optional dependency on 'encoding' +let convert +try { + convert = require('encoding').convert +} catch (e) { + // defer error until textConverted is called +} + +const INTERNALS = Symbol('Body internals') +const CONSUME_BODY = Symbol('consumeBody') + +class Body { + constructor (bodyArg, options = {}) { + const { size = 0, timeout = 0 } = options + const body = bodyArg === undefined || bodyArg === null ? null + : isURLSearchParams(bodyArg) ? Buffer.from(bodyArg.toString()) + : isBlob(bodyArg) ? bodyArg + : Buffer.isBuffer(bodyArg) ? bodyArg + : Object.prototype.toString.call(bodyArg) === '[object ArrayBuffer]' + ? Buffer.from(bodyArg) + : ArrayBuffer.isView(bodyArg) + ? Buffer.from(bodyArg.buffer, bodyArg.byteOffset, bodyArg.byteLength) + : Minipass.isStream(bodyArg) ? bodyArg + : Buffer.from(String(bodyArg)) + + this[INTERNALS] = { + body, + disturbed: false, + error: null, + } + + this.size = size + this.timeout = timeout + + if (Minipass.isStream(body)) { + body.on('error', er => { + const error = er.name === 'AbortError' ? er + : new FetchError(`Invalid response while trying to fetch ${ + this.url}: ${er.message}`, 'system', er) + this[INTERNALS].error = error + }) + } + } + + get body () { + return this[INTERNALS].body + } + + get bodyUsed () { + return this[INTERNALS].disturbed + } + + arrayBuffer () { + return this[CONSUME_BODY]().then(buf => + buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength)) + } + + blob () { + const ct = this.headers && this.headers.get('content-type') || '' + return this[CONSUME_BODY]().then(buf => Object.assign( + new Blob([], { type: ct.toLowerCase() }), + { [BUFFER]: buf } + )) + } + + async json () { + const buf = await this[CONSUME_BODY]() + try { + return JSON.parse(buf.toString()) + } catch (er) { + throw new FetchError( + `invalid json response body at ${this.url} reason: ${er.message}`, + 'invalid-json' + ) + } + } + + text () { + return this[CONSUME_BODY]().then(buf => buf.toString()) + } + + buffer () { + return this[CONSUME_BODY]() + } + + textConverted () { + return this[CONSUME_BODY]().then(buf => convertBody(buf, this.headers)) + } + + [CONSUME_BODY] () { + if (this[INTERNALS].disturbed) { + return Promise.reject(new TypeError(`body used already for: ${ + this.url}`)) + } + + this[INTERNALS].disturbed = true + + if (this[INTERNALS].error) { + return Promise.reject(this[INTERNALS].error) + } + + // body is null + if (this.body === null) { + return Promise.resolve(Buffer.alloc(0)) + } + + if (Buffer.isBuffer(this.body)) { + return Promise.resolve(this.body) + } + + const upstream = isBlob(this.body) ? this.body.stream() : this.body + + /* istanbul ignore if: should never happen */ + if (!Minipass.isStream(upstream)) { + return Promise.resolve(Buffer.alloc(0)) + } + + const stream = this.size && upstream instanceof MinipassSized ? upstream + : !this.size && upstream instanceof Minipass && + !(upstream instanceof MinipassSized) ? upstream + : this.size ? new MinipassSized({ size: this.size }) + : new Minipass() + + // allow timeout on slow response body, but only if the stream is still writable. this + // makes the timeout center on the socket stream from lib/index.js rather than the + // intermediary minipass stream we create to receive the data + const resTimeout = this.timeout && stream.writable ? setTimeout(() => { + stream.emit('error', new FetchError( + `Response timeout while trying to fetch ${ + this.url} (over ${this.timeout}ms)`, 'body-timeout')) + }, this.timeout) : null + + // do not keep the process open just for this timeout, even + // though we expect it'll get cleared eventually. + if (resTimeout && resTimeout.unref) { + resTimeout.unref() + } + + // do the pipe in the promise, because the pipe() can send too much + // data through right away and upset the MP Sized object + return new Promise((resolve, reject) => { + // if the stream is some other kind of stream, then pipe through a MP + // so we can collect it more easily. + if (stream !== upstream) { + upstream.on('error', er => stream.emit('error', er)) + upstream.pipe(stream) + } + resolve() + }).then(() => stream.concat()).then(buf => { + clearTimeout(resTimeout) + return buf + }).catch(er => { + clearTimeout(resTimeout) + // request was aborted, reject with this Error + if (er.name === 'AbortError' || er.name === 'FetchError') { + throw er + } else if (er.name === 'RangeError') { + throw new FetchError(`Could not create Buffer from response body for ${ + this.url}: ${er.message}`, 'system', er) + } else { + // other errors, such as incorrect content-encoding or content-length + throw new FetchError(`Invalid response body while trying to fetch ${ + this.url}: ${er.message}`, 'system', er) + } + }) + } + + static clone (instance) { + if (instance.bodyUsed) { + throw new Error('cannot clone body after it is used') + } + + const body = instance.body + + // check that body is a stream and not form-data object + // NB: can't clone the form-data object without having it as a dependency + if (Minipass.isStream(body) && typeof body.getBoundary !== 'function') { + // create a dedicated tee stream so that we don't lose data + // potentially sitting in the body stream's buffer by writing it + // immediately to p1 and not having it for p2. + const tee = new Minipass() + const p1 = new Minipass() + const p2 = new Minipass() + tee.on('error', er => { + p1.emit('error', er) + p2.emit('error', er) + }) + body.on('error', er => tee.emit('error', er)) + tee.pipe(p1) + tee.pipe(p2) + body.pipe(tee) + // set instance body to one fork, return the other + instance[INTERNALS].body = p1 + return p2 + } else { + return instance.body + } + } + + static extractContentType (body) { + return body === null || body === undefined ? null + : typeof body === 'string' ? 'text/plain;charset=UTF-8' + : isURLSearchParams(body) + ? 'application/x-www-form-urlencoded;charset=UTF-8' + : isBlob(body) ? body.type || null + : Buffer.isBuffer(body) ? null + : Object.prototype.toString.call(body) === '[object ArrayBuffer]' ? null + : ArrayBuffer.isView(body) ? null + : typeof body.getBoundary === 'function' + ? `multipart/form-data;boundary=${body.getBoundary()}` + : Minipass.isStream(body) ? null + : 'text/plain;charset=UTF-8' + } + + static getTotalBytes (instance) { + const { body } = instance + return (body === null || body === undefined) ? 0 + : isBlob(body) ? body.size + : Buffer.isBuffer(body) ? body.length + : body && typeof body.getLengthSync === 'function' && ( + // detect form data input from form-data module + body._lengthRetrievers && + /* istanbul ignore next */ body._lengthRetrievers.length === 0 || // 1.x + body.hasKnownLength && body.hasKnownLength()) // 2.x + ? body.getLengthSync() + : null + } + + static writeToStream (dest, instance) { + const { body } = instance + + if (body === null || body === undefined) { + dest.end() + } else if (Buffer.isBuffer(body) || typeof body === 'string') { + dest.end(body) + } else { + // body is stream or blob + const stream = isBlob(body) ? body.stream() : body + stream.on('error', er => dest.emit('error', er)).pipe(dest) + } + + return dest + } +} + +Object.defineProperties(Body.prototype, { + body: { enumerable: true }, + bodyUsed: { enumerable: true }, + arrayBuffer: { enumerable: true }, + blob: { enumerable: true }, + json: { enumerable: true }, + text: { enumerable: true }, +}) + +const isURLSearchParams = obj => + // Duck-typing as a necessary condition. + (typeof obj !== 'object' || + typeof obj.append !== 'function' || + typeof obj.delete !== 'function' || + typeof obj.get !== 'function' || + typeof obj.getAll !== 'function' || + typeof obj.has !== 'function' || + typeof obj.set !== 'function') ? false + // Brand-checking and more duck-typing as optional condition. + : obj.constructor.name === 'URLSearchParams' || + Object.prototype.toString.call(obj) === '[object URLSearchParams]' || + typeof obj.sort === 'function' + +const isBlob = obj => + typeof obj === 'object' && + typeof obj.arrayBuffer === 'function' && + typeof obj.type === 'string' && + typeof obj.stream === 'function' && + typeof obj.constructor === 'function' && + typeof obj.constructor.name === 'string' && + /^(Blob|File)$/.test(obj.constructor.name) && + /^(Blob|File)$/.test(obj[Symbol.toStringTag]) + +const convertBody = (buffer, headers) => { + /* istanbul ignore if */ + if (typeof convert !== 'function') { + throw new Error('The package `encoding` must be installed to use the textConverted() function') + } + + const ct = headers && headers.get('content-type') + let charset = 'utf-8' + let res + + // header + if (ct) { + res = /charset=([^;]*)/i.exec(ct) + } + + // no charset in content type, peek at response body for at most 1024 bytes + const str = buffer.slice(0, 1024).toString() + + // html5 + if (!res && str) { + res = /<meta.+?charset=(['"])(.+?)\1/i.exec(str) + } + + // html4 + if (!res && str) { + res = /<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(str) + + if (!res) { + res = /<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(str) + if (res) { + res.pop() + } // drop last quote + } + + if (res) { + res = /charset=(.*)/i.exec(res.pop()) + } + } + + // xml + if (!res && str) { + res = /<\?xml.+?encoding=(['"])(.+?)\1/i.exec(str) + } + + // found charset + if (res) { + charset = res.pop() + + // prevent decode issues when sites use incorrect encoding + // ref: https://hsivonen.fi/encoding-menu/ + if (charset === 'gb2312' || charset === 'gbk') { + charset = 'gb18030' + } + } + + // turn raw buffers into a single utf-8 buffer + return convert( + buffer, + 'UTF-8', + charset + ).toString() +} + +module.exports = Body diff --git a/node_modules/node-gyp/node_modules/minipass-fetch/lib/fetch-error.js b/node_modules/node-gyp/node_modules/minipass-fetch/lib/fetch-error.js new file mode 100644 index 0000000000000..85f6e98fb78d4 --- /dev/null +++ b/node_modules/node-gyp/node_modules/minipass-fetch/lib/fetch-error.js @@ -0,0 +1,32 @@ +'use strict' +class FetchError extends Error { + constructor (message, type, systemError) { + super(message) + this.code = 'FETCH_ERROR' + + // pick up code, expected, path, ... + if (systemError) { + Object.assign(this, systemError) + } + + this.errno = this.code + + // override anything the system error might've clobbered + this.type = this.code === 'EBADSIZE' && this.found > this.expect + ? 'max-size' : type + this.message = message + Error.captureStackTrace(this, this.constructor) + } + + get name () { + return 'FetchError' + } + + // don't allow name to be overwritten + set name (n) {} + + get [Symbol.toStringTag] () { + return 'FetchError' + } +} +module.exports = FetchError diff --git a/node_modules/node-gyp/node_modules/minipass-fetch/lib/headers.js b/node_modules/node-gyp/node_modules/minipass-fetch/lib/headers.js new file mode 100644 index 0000000000000..dd6e854d5ba39 --- /dev/null +++ b/node_modules/node-gyp/node_modules/minipass-fetch/lib/headers.js @@ -0,0 +1,267 @@ +'use strict' +const invalidTokenRegex = /[^^_`a-zA-Z\-0-9!#$%&'*+.|~]/ +const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/ + +const validateName = name => { + name = `${name}` + if (invalidTokenRegex.test(name) || name === '') { + throw new TypeError(`${name} is not a legal HTTP header name`) + } +} + +const validateValue = value => { + value = `${value}` + if (invalidHeaderCharRegex.test(value)) { + throw new TypeError(`${value} is not a legal HTTP header value`) + } +} + +const find = (map, name) => { + name = name.toLowerCase() + for (const key in map) { + if (key.toLowerCase() === name) { + return key + } + } + return undefined +} + +const MAP = Symbol('map') +class Headers { + constructor (init = undefined) { + this[MAP] = Object.create(null) + if (init instanceof Headers) { + const rawHeaders = init.raw() + const headerNames = Object.keys(rawHeaders) + for (const headerName of headerNames) { + for (const value of rawHeaders[headerName]) { + this.append(headerName, value) + } + } + return + } + + // no-op + if (init === undefined || init === null) { + return + } + + if (typeof init === 'object') { + const method = init[Symbol.iterator] + if (method !== null && method !== undefined) { + if (typeof method !== 'function') { + throw new TypeError('Header pairs must be iterable') + } + + // sequence<sequence<ByteString>> + // Note: per spec we have to first exhaust the lists then process them + const pairs = [] + for (const pair of init) { + if (typeof pair !== 'object' || + typeof pair[Symbol.iterator] !== 'function') { + throw new TypeError('Each header pair must be iterable') + } + const arrPair = Array.from(pair) + if (arrPair.length !== 2) { + throw new TypeError('Each header pair must be a name/value tuple') + } + pairs.push(arrPair) + } + + for (const pair of pairs) { + this.append(pair[0], pair[1]) + } + } else { + // record<ByteString, ByteString> + for (const key of Object.keys(init)) { + this.append(key, init[key]) + } + } + } else { + throw new TypeError('Provided initializer must be an object') + } + } + + get (name) { + name = `${name}` + validateName(name) + const key = find(this[MAP], name) + if (key === undefined) { + return null + } + + return this[MAP][key].join(', ') + } + + forEach (callback, thisArg = undefined) { + let pairs = getHeaders(this) + for (let i = 0; i < pairs.length; i++) { + const [name, value] = pairs[i] + callback.call(thisArg, value, name, this) + // refresh in case the callback added more headers + pairs = getHeaders(this) + } + } + + set (name, value) { + name = `${name}` + value = `${value}` + validateName(name) + validateValue(value) + const key = find(this[MAP], name) + this[MAP][key !== undefined ? key : name] = [value] + } + + append (name, value) { + name = `${name}` + value = `${value}` + validateName(name) + validateValue(value) + const key = find(this[MAP], name) + if (key !== undefined) { + this[MAP][key].push(value) + } else { + this[MAP][name] = [value] + } + } + + has (name) { + name = `${name}` + validateName(name) + return find(this[MAP], name) !== undefined + } + + delete (name) { + name = `${name}` + validateName(name) + const key = find(this[MAP], name) + if (key !== undefined) { + delete this[MAP][key] + } + } + + raw () { + return this[MAP] + } + + keys () { + return new HeadersIterator(this, 'key') + } + + values () { + return new HeadersIterator(this, 'value') + } + + [Symbol.iterator] () { + return new HeadersIterator(this, 'key+value') + } + + entries () { + return new HeadersIterator(this, 'key+value') + } + + get [Symbol.toStringTag] () { + return 'Headers' + } + + static exportNodeCompatibleHeaders (headers) { + const obj = Object.assign(Object.create(null), headers[MAP]) + + // http.request() only supports string as Host header. This hack makes + // specifying custom Host header possible. + const hostHeaderKey = find(headers[MAP], 'Host') + if (hostHeaderKey !== undefined) { + obj[hostHeaderKey] = obj[hostHeaderKey][0] + } + + return obj + } + + static createHeadersLenient (obj) { + const headers = new Headers() + for (const name of Object.keys(obj)) { + if (invalidTokenRegex.test(name)) { + continue + } + + if (Array.isArray(obj[name])) { + for (const val of obj[name]) { + if (invalidHeaderCharRegex.test(val)) { + continue + } + + if (headers[MAP][name] === undefined) { + headers[MAP][name] = [val] + } else { + headers[MAP][name].push(val) + } + } + } else if (!invalidHeaderCharRegex.test(obj[name])) { + headers[MAP][name] = [obj[name]] + } + } + return headers + } +} + +Object.defineProperties(Headers.prototype, { + get: { enumerable: true }, + forEach: { enumerable: true }, + set: { enumerable: true }, + append: { enumerable: true }, + has: { enumerable: true }, + delete: { enumerable: true }, + keys: { enumerable: true }, + values: { enumerable: true }, + entries: { enumerable: true }, +}) + +const getHeaders = (headers, kind = 'key+value') => + Object.keys(headers[MAP]).sort().map( + kind === 'key' ? k => k.toLowerCase() + : kind === 'value' ? k => headers[MAP][k].join(', ') + : k => [k.toLowerCase(), headers[MAP][k].join(', ')] + ) + +const INTERNAL = Symbol('internal') + +class HeadersIterator { + constructor (target, kind) { + this[INTERNAL] = { + target, + kind, + index: 0, + } + } + + get [Symbol.toStringTag] () { + return 'HeadersIterator' + } + + next () { + /* istanbul ignore if: should be impossible */ + if (!this || Object.getPrototypeOf(this) !== HeadersIterator.prototype) { + throw new TypeError('Value of `this` is not a HeadersIterator') + } + + const { target, kind, index } = this[INTERNAL] + const values = getHeaders(target, kind) + const len = values.length + if (index >= len) { + return { + value: undefined, + done: true, + } + } + + this[INTERNAL].index++ + + return { value: values[index], done: false } + } +} + +// manually extend because 'extends' requires a ctor +Object.setPrototypeOf(HeadersIterator.prototype, + Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))) + +module.exports = Headers diff --git a/node_modules/node-gyp/node_modules/minipass-fetch/lib/index.js b/node_modules/node-gyp/node_modules/minipass-fetch/lib/index.js new file mode 100644 index 0000000000000..b1878ac0c06b5 --- /dev/null +++ b/node_modules/node-gyp/node_modules/minipass-fetch/lib/index.js @@ -0,0 +1,365 @@ +'use strict' +const { URL } = require('url') +const http = require('http') +const https = require('https') +const zlib = require('minizlib') +const Minipass = require('minipass') + +const Body = require('./body.js') +const { writeToStream, getTotalBytes } = Body +const Response = require('./response.js') +const Headers = require('./headers.js') +const { createHeadersLenient } = Headers +const Request = require('./request.js') +const { getNodeRequestOptions } = Request +const FetchError = require('./fetch-error.js') +const AbortError = require('./abort-error.js') + +// XXX this should really be split up and unit-ized for easier testing +// and better DRY implementation of data/http request aborting +const fetch = async (url, opts) => { + if (/^data:/.test(url)) { + const request = new Request(url, opts) + // delay 1 promise tick so that the consumer can abort right away + return Promise.resolve().then(() => new Promise((resolve, reject) => { + let type, data + try { + const { pathname, search } = new URL(url) + const split = pathname.split(',') + if (split.length < 2) { + throw new Error('invalid data: URI') + } + const mime = split.shift() + const base64 = /;base64$/.test(mime) + type = base64 ? mime.slice(0, -1 * ';base64'.length) : mime + const rawData = decodeURIComponent(split.join(',') + search) + data = base64 ? Buffer.from(rawData, 'base64') : Buffer.from(rawData) + } catch (er) { + return reject(new FetchError(`[${request.method}] ${ + request.url} invalid URL, ${er.message}`, 'system', er)) + } + + const { signal } = request + if (signal && signal.aborted) { + return reject(new AbortError('The user aborted a request.')) + } + + const headers = { 'Content-Length': data.length } + if (type) { + headers['Content-Type'] = type + } + return resolve(new Response(data, { headers })) + })) + } + + return new Promise((resolve, reject) => { + // build request object + const request = new Request(url, opts) + let options + try { + options = getNodeRequestOptions(request) + } catch (er) { + return reject(er) + } + + const send = (options.protocol === 'https:' ? https : http).request + const { signal } = request + let response = null + const abort = () => { + const error = new AbortError('The user aborted a request.') + reject(error) + if (Minipass.isStream(request.body) && + typeof request.body.destroy === 'function') { + request.body.destroy(error) + } + if (response && response.body) { + response.body.emit('error', error) + } + } + + if (signal && signal.aborted) { + return abort() + } + + const abortAndFinalize = () => { + abort() + finalize() + } + + const finalize = () => { + req.abort() + if (signal) { + signal.removeEventListener('abort', abortAndFinalize) + } + clearTimeout(reqTimeout) + } + + // send request + const req = send(options) + + if (signal) { + signal.addEventListener('abort', abortAndFinalize) + } + + let reqTimeout = null + if (request.timeout) { + req.once('socket', socket => { + reqTimeout = setTimeout(() => { + reject(new FetchError(`network timeout at: ${ + request.url}`, 'request-timeout')) + finalize() + }, request.timeout) + }) + } + + req.on('error', er => { + // if a 'response' event is emitted before the 'error' event, then by the + // time this handler is run it's too late to reject the Promise for the + // response. instead, we forward the error event to the response stream + // so that the error will surface to the user when they try to consume + // the body. this is done as a side effect of aborting the request except + // for in windows, where we must forward the event manually, otherwise + // there is no longer a ref'd socket attached to the request and the + // stream never ends so the event loop runs out of work and the process + // exits without warning. + // coverage skipped here due to the difficulty in testing + // istanbul ignore next + if (req.res) { + req.res.emit('error', er) + } + reject(new FetchError(`request to ${request.url} failed, reason: ${ + er.message}`, 'system', er)) + finalize() + }) + + req.on('response', res => { + clearTimeout(reqTimeout) + + const headers = createHeadersLenient(res.headers) + + // HTTP fetch step 5 + if (fetch.isRedirect(res.statusCode)) { + // HTTP fetch step 5.2 + const location = headers.get('Location') + + // HTTP fetch step 5.3 + const locationURL = location === null ? null + : (new URL(location, request.url)).toString() + + // HTTP fetch step 5.5 + if (request.redirect === 'error') { + reject(new FetchError('uri requested responds with a redirect, ' + + `redirect mode is set to error: ${request.url}`, 'no-redirect')) + finalize() + return + } else if (request.redirect === 'manual') { + // node-fetch-specific step: make manual redirect a bit easier to + // use by setting the Location header value to the resolved URL. + if (locationURL !== null) { + // handle corrupted header + try { + headers.set('Location', locationURL) + } catch (err) { + /* istanbul ignore next: nodejs server prevent invalid + response headers, we can't test this through normal + request */ + reject(err) + } + } + } else if (request.redirect === 'follow' && locationURL !== null) { + // HTTP-redirect fetch step 5 + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${ + request.url}`, 'max-redirect')) + finalize() + return + } + + // HTTP-redirect fetch step 9 + if (res.statusCode !== 303 && + request.body && + getTotalBytes(request) === null) { + reject(new FetchError( + 'Cannot follow redirect with body being a readable stream', + 'unsupported-redirect' + )) + finalize() + return + } + + // Update host due to redirection + request.headers.set('host', (new URL(locationURL)).host) + + // HTTP-redirect fetch step 6 (counter increment) + // Create a new Request object. + const requestOpts = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: request.body, + signal: request.signal, + timeout: request.timeout, + } + + // if the redirect is to a new hostname, strip the authorization and cookie headers + const parsedOriginal = new URL(request.url) + const parsedRedirect = new URL(locationURL) + if (parsedOriginal.hostname !== parsedRedirect.hostname) { + requestOpts.headers.delete('authorization') + requestOpts.headers.delete('cookie') + } + + // HTTP-redirect fetch step 11 + if (res.statusCode === 303 || ( + (res.statusCode === 301 || res.statusCode === 302) && + request.method === 'POST' + )) { + requestOpts.method = 'GET' + requestOpts.body = undefined + requestOpts.headers.delete('content-length') + } + + // HTTP-redirect fetch step 15 + resolve(fetch(new Request(locationURL, requestOpts))) + finalize() + return + } + } // end if(isRedirect) + + // prepare response + res.once('end', () => + signal && signal.removeEventListener('abort', abortAndFinalize)) + + const body = new Minipass() + // if an error occurs, either on the response stream itself, on one of the + // decoder streams, or a response length timeout from the Body class, we + // forward the error through to our internal body stream. If we see an + // error event on that, we call finalize to abort the request and ensure + // we don't leave a socket believing a request is in flight. + // this is difficult to test, so lacks specific coverage. + body.on('error', finalize) + // exceedingly rare that the stream would have an error, + // but just in case we proxy it to the stream in use. + res.on('error', /* istanbul ignore next */ er => body.emit('error', er)) + res.on('data', (chunk) => body.write(chunk)) + res.on('end', () => body.end()) + + const responseOptions = { + url: request.url, + status: res.statusCode, + statusText: res.statusMessage, + headers: headers, + size: request.size, + timeout: request.timeout, + counter: request.counter, + trailer: new Promise(resolveTrailer => + res.on('end', () => resolveTrailer(createHeadersLenient(res.trailers)))), + } + + // HTTP-network fetch step 12.1.1.3 + const codings = headers.get('Content-Encoding') + + // HTTP-network fetch step 12.1.1.4: handle content codings + + // in following scenarios we ignore compression support + // 1. compression support is disabled + // 2. HEAD request + // 3. no Content-Encoding header + // 4. no content response (204) + // 5. content not modified response (304) + if (!request.compress || + request.method === 'HEAD' || + codings === null || + res.statusCode === 204 || + res.statusCode === 304) { + response = new Response(body, responseOptions) + resolve(response) + return + } + + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + const zlibOptions = { + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH, + } + + // for gzip + if (codings === 'gzip' || codings === 'x-gzip') { + const unzip = new zlib.Gunzip(zlibOptions) + response = new Response( + // exceedingly rare that the stream would have an error, + // but just in case we proxy it to the stream in use. + body.on('error', /* istanbul ignore next */ er => unzip.emit('error', er)).pipe(unzip), + responseOptions + ) + resolve(response) + return + } + + // for deflate + if (codings === 'deflate' || codings === 'x-deflate') { + // handle the infamous raw deflate response from old servers + // a hack for old IIS and Apache servers + const raw = res.pipe(new Minipass()) + raw.once('data', chunk => { + // see http://stackoverflow.com/questions/37519828 + const decoder = (chunk[0] & 0x0F) === 0x08 + ? new zlib.Inflate() + : new zlib.InflateRaw() + // exceedingly rare that the stream would have an error, + // but just in case we proxy it to the stream in use. + body.on('error', /* istanbul ignore next */ er => decoder.emit('error', er)).pipe(decoder) + response = new Response(decoder, responseOptions) + resolve(response) + }) + return + } + + // for br + if (codings === 'br') { + // ignoring coverage so tests don't have to fake support (or lack of) for brotli + // istanbul ignore next + try { + var decoder = new zlib.BrotliDecompress() + } catch (err) { + reject(err) + finalize() + return + } + // exceedingly rare that the stream would have an error, + // but just in case we proxy it to the stream in use. + body.on('error', /* istanbul ignore next */ er => decoder.emit('error', er)).pipe(decoder) + response = new Response(decoder, responseOptions) + resolve(response) + return + } + + // otherwise, use response as-is + response = new Response(body, responseOptions) + resolve(response) + }) + + writeToStream(req, request) + }) +} + +module.exports = fetch + +fetch.isRedirect = code => + code === 301 || + code === 302 || + code === 303 || + code === 307 || + code === 308 + +fetch.Headers = Headers +fetch.Request = Request +fetch.Response = Response +fetch.FetchError = FetchError +fetch.AbortError = AbortError diff --git a/node_modules/node-gyp/node_modules/minipass-fetch/lib/request.js b/node_modules/node-gyp/node_modules/minipass-fetch/lib/request.js new file mode 100644 index 0000000000000..e620df6de2c01 --- /dev/null +++ b/node_modules/node-gyp/node_modules/minipass-fetch/lib/request.js @@ -0,0 +1,281 @@ +'use strict' +const { URL } = require('url') +const Minipass = require('minipass') +const Headers = require('./headers.js') +const { exportNodeCompatibleHeaders } = Headers +const Body = require('./body.js') +const { clone, extractContentType, getTotalBytes } = Body + +const version = require('../package.json').version +const defaultUserAgent = + `minipass-fetch/${version} (+https://github.com/isaacs/minipass-fetch)` + +const INTERNALS = Symbol('Request internals') + +const isRequest = input => + typeof input === 'object' && typeof input[INTERNALS] === 'object' + +const isAbortSignal = signal => { + const proto = ( + signal + && typeof signal === 'object' + && Object.getPrototypeOf(signal) + ) + return !!(proto && proto.constructor.name === 'AbortSignal') +} + +class Request extends Body { + constructor (input, init = {}) { + const parsedURL = isRequest(input) ? new URL(input.url) + : input && input.href ? new URL(input.href) + : new URL(`${input}`) + + if (isRequest(input)) { + init = { ...input[INTERNALS], ...init } + } else if (!input || typeof input === 'string') { + input = {} + } + + const method = (init.method || input.method || 'GET').toUpperCase() + const isGETHEAD = method === 'GET' || method === 'HEAD' + + if ((init.body !== null && init.body !== undefined || + isRequest(input) && input.body !== null) && isGETHEAD) { + throw new TypeError('Request with GET/HEAD method cannot have body') + } + + const inputBody = init.body !== null && init.body !== undefined ? init.body + : isRequest(input) && input.body !== null ? clone(input) + : null + + super(inputBody, { + timeout: init.timeout || input.timeout || 0, + size: init.size || input.size || 0, + }) + + const headers = new Headers(init.headers || input.headers || {}) + + if (inputBody !== null && inputBody !== undefined && + !headers.has('Content-Type')) { + const contentType = extractContentType(inputBody) + if (contentType) { + headers.append('Content-Type', contentType) + } + } + + const signal = 'signal' in init ? init.signal + : null + + if (signal !== null && signal !== undefined && !isAbortSignal(signal)) { + throw new TypeError('Expected signal must be an instanceof AbortSignal') + } + + // TLS specific options that are handled by node + const { + ca, + cert, + ciphers, + clientCertEngine, + crl, + dhparam, + ecdhCurve, + family, + honorCipherOrder, + key, + passphrase, + pfx, + rejectUnauthorized = process.env.NODE_TLS_REJECT_UNAUTHORIZED !== '0', + secureOptions, + secureProtocol, + servername, + sessionIdContext, + } = init + + this[INTERNALS] = { + method, + redirect: init.redirect || input.redirect || 'follow', + headers, + parsedURL, + signal, + ca, + cert, + ciphers, + clientCertEngine, + crl, + dhparam, + ecdhCurve, + family, + honorCipherOrder, + key, + passphrase, + pfx, + rejectUnauthorized, + secureOptions, + secureProtocol, + servername, + sessionIdContext, + } + + // node-fetch-only options + this.follow = init.follow !== undefined ? init.follow + : input.follow !== undefined ? input.follow + : 20 + this.compress = init.compress !== undefined ? init.compress + : input.compress !== undefined ? input.compress + : true + this.counter = init.counter || input.counter || 0 + this.agent = init.agent || input.agent + } + + get method () { + return this[INTERNALS].method + } + + get url () { + return this[INTERNALS].parsedURL.toString() + } + + get headers () { + return this[INTERNALS].headers + } + + get redirect () { + return this[INTERNALS].redirect + } + + get signal () { + return this[INTERNALS].signal + } + + clone () { + return new Request(this) + } + + get [Symbol.toStringTag] () { + return 'Request' + } + + static getNodeRequestOptions (request) { + const parsedURL = request[INTERNALS].parsedURL + const headers = new Headers(request[INTERNALS].headers) + + // fetch step 1.3 + if (!headers.has('Accept')) { + headers.set('Accept', '*/*') + } + + // Basic fetch + if (!/^https?:$/.test(parsedURL.protocol)) { + throw new TypeError('Only HTTP(S) protocols are supported') + } + + if (request.signal && + Minipass.isStream(request.body) && + typeof request.body.destroy !== 'function') { + throw new Error( + 'Cancellation of streamed requests with AbortSignal is not supported') + } + + // HTTP-network-or-cache fetch steps 2.4-2.7 + const contentLengthValue = + (request.body === null || request.body === undefined) && + /^(POST|PUT)$/i.test(request.method) ? '0' + : request.body !== null && request.body !== undefined + ? getTotalBytes(request) + : null + + if (contentLengthValue) { + headers.set('Content-Length', contentLengthValue + '') + } + + // HTTP-network-or-cache fetch step 2.11 + if (!headers.has('User-Agent')) { + headers.set('User-Agent', defaultUserAgent) + } + + // HTTP-network-or-cache fetch step 2.15 + if (request.compress && !headers.has('Accept-Encoding')) { + headers.set('Accept-Encoding', 'gzip,deflate') + } + + const agent = typeof request.agent === 'function' + ? request.agent(parsedURL) + : request.agent + + if (!headers.has('Connection') && !agent) { + headers.set('Connection', 'close') + } + + // TLS specific options that are handled by node + const { + ca, + cert, + ciphers, + clientCertEngine, + crl, + dhparam, + ecdhCurve, + family, + honorCipherOrder, + key, + passphrase, + pfx, + rejectUnauthorized, + secureOptions, + secureProtocol, + servername, + sessionIdContext, + } = request[INTERNALS] + + // HTTP-network fetch step 4.2 + // chunked encoding is handled by Node.js + + // we cannot spread parsedURL directly, so we have to read each property one-by-one + // and map them to the equivalent https?.request() method options + const urlProps = { + auth: parsedURL.username || parsedURL.password + ? `${parsedURL.username}:${parsedURL.password}` + : '', + host: parsedURL.host, + hostname: parsedURL.hostname, + path: `${parsedURL.pathname}${parsedURL.search}`, + port: parsedURL.port, + protocol: parsedURL.protocol, + } + + return { + ...urlProps, + method: request.method, + headers: exportNodeCompatibleHeaders(headers), + agent, + ca, + cert, + ciphers, + clientCertEngine, + crl, + dhparam, + ecdhCurve, + family, + honorCipherOrder, + key, + passphrase, + pfx, + rejectUnauthorized, + secureOptions, + secureProtocol, + servername, + sessionIdContext, + } + } +} + +module.exports = Request + +Object.defineProperties(Request.prototype, { + method: { enumerable: true }, + url: { enumerable: true }, + headers: { enumerable: true }, + redirect: { enumerable: true }, + clone: { enumerable: true }, + signal: { enumerable: true }, +}) diff --git a/node_modules/node-gyp/node_modules/minipass-fetch/lib/response.js b/node_modules/node-gyp/node_modules/minipass-fetch/lib/response.js new file mode 100644 index 0000000000000..54cb52db3594a --- /dev/null +++ b/node_modules/node-gyp/node_modules/minipass-fetch/lib/response.js @@ -0,0 +1,90 @@ +'use strict' +const http = require('http') +const { STATUS_CODES } = http + +const Headers = require('./headers.js') +const Body = require('./body.js') +const { clone, extractContentType } = Body + +const INTERNALS = Symbol('Response internals') + +class Response extends Body { + constructor (body = null, opts = {}) { + super(body, opts) + + const status = opts.status || 200 + const headers = new Headers(opts.headers) + + if (body !== null && body !== undefined && !headers.has('Content-Type')) { + const contentType = extractContentType(body) + if (contentType) { + headers.append('Content-Type', contentType) + } + } + + this[INTERNALS] = { + url: opts.url, + status, + statusText: opts.statusText || STATUS_CODES[status], + headers, + counter: opts.counter, + trailer: Promise.resolve(opts.trailer || new Headers()), + } + } + + get trailer () { + return this[INTERNALS].trailer + } + + get url () { + return this[INTERNALS].url || '' + } + + get status () { + return this[INTERNALS].status + } + + get ok () { + return this[INTERNALS].status >= 200 && this[INTERNALS].status < 300 + } + + get redirected () { + return this[INTERNALS].counter > 0 + } + + get statusText () { + return this[INTERNALS].statusText + } + + get headers () { + return this[INTERNALS].headers + } + + clone () { + return new Response(clone(this), { + url: this.url, + status: this.status, + statusText: this.statusText, + headers: this.headers, + ok: this.ok, + redirected: this.redirected, + trailer: this.trailer, + }) + } + + get [Symbol.toStringTag] () { + return 'Response' + } +} + +module.exports = Response + +Object.defineProperties(Response.prototype, { + url: { enumerable: true }, + status: { enumerable: true }, + ok: { enumerable: true }, + redirected: { enumerable: true }, + statusText: { enumerable: true }, + headers: { enumerable: true }, + clone: { enumerable: true }, +}) diff --git a/node_modules/node-gyp/node_modules/minipass-fetch/package.json b/node_modules/node-gyp/node_modules/minipass-fetch/package.json new file mode 100644 index 0000000000000..ada5aed6d7cf6 --- /dev/null +++ b/node_modules/node-gyp/node_modules/minipass-fetch/package.json @@ -0,0 +1,67 @@ +{ + "name": "minipass-fetch", + "version": "2.1.2", + "description": "An implementation of window.fetch in Node.js using Minipass streams", + "license": "MIT", + "main": "lib/index.js", + "scripts": { + "test": "tap", + "snap": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --follow-tags", + "lint": "eslint \"**/*.js\"", + "postlint": "template-oss-check", + "lintfix": "npm run lint -- --fix", + "prepublishOnly": "git push origin --follow-tags", + "posttest": "npm run lint", + "template-oss-apply": "template-oss-apply --force" + }, + "tap": { + "coverage-map": "map.js", + "check-coverage": true + }, + "devDependencies": { + "@npmcli/eslint-config": "^3.0.1", + "@npmcli/template-oss": "3.5.0", + "@ungap/url-search-params": "^0.2.2", + "abort-controller": "^3.0.0", + "abortcontroller-polyfill": "~1.7.3", + "encoding": "^0.1.13", + "form-data": "^4.0.0", + "nock": "^13.2.4", + "parted": "^0.1.1", + "string-to-arraybuffer": "^1.0.2", + "tap": "^16.0.0" + }, + "dependencies": { + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + }, + "repository": { + "type": "git", + "url": "https://github.com/npm/minipass-fetch.git" + }, + "keywords": [ + "fetch", + "minipass", + "node-fetch", + "window.fetch" + ], + "files": [ + "bin/", + "lib/" + ], + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + }, + "author": "GitHub Inc.", + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "version": "3.5.0" + } +} diff --git a/node_modules/node-gyp/node_modules/npmlog/LICENSE.md b/node_modules/node-gyp/node_modules/npmlog/LICENSE.md new file mode 100644 index 0000000000000..5fc208ff122e0 --- /dev/null +++ b/node_modules/node-gyp/node_modules/npmlog/LICENSE.md @@ -0,0 +1,20 @@ +<!-- This file is automatically added by @npmcli/template-oss. Do not edit. --> + +ISC License + +Copyright npm, Inc. + +Permission to use, copy, modify, and/or distribute this +software for any purpose with or without fee is hereby +granted, provided that the above copyright notice and this +permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO +EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE +USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/node-gyp/node_modules/npmlog/lib/log.js b/node_modules/node-gyp/node_modules/npmlog/lib/log.js new file mode 100644 index 0000000000000..be650c6a42608 --- /dev/null +++ b/node_modules/node-gyp/node_modules/npmlog/lib/log.js @@ -0,0 +1,404 @@ +'use strict' +var Progress = require('are-we-there-yet') +var Gauge = require('gauge') +var EE = require('events').EventEmitter +var log = exports = module.exports = new EE() +var util = require('util') + +var setBlocking = require('set-blocking') +var consoleControl = require('console-control-strings') + +setBlocking(true) +var stream = process.stderr +Object.defineProperty(log, 'stream', { + set: function (newStream) { + stream = newStream + if (this.gauge) { + this.gauge.setWriteTo(stream, stream) + } + }, + get: function () { + return stream + }, +}) + +// by default, decide based on tty-ness. +var colorEnabled +log.useColor = function () { + return colorEnabled != null ? colorEnabled : stream.isTTY +} + +log.enableColor = function () { + colorEnabled = true + this.gauge.setTheme({ hasColor: colorEnabled, hasUnicode: unicodeEnabled }) +} +log.disableColor = function () { + colorEnabled = false + this.gauge.setTheme({ hasColor: colorEnabled, hasUnicode: unicodeEnabled }) +} + +// default level +log.level = 'info' + +log.gauge = new Gauge(stream, { + enabled: false, // no progress bars unless asked + theme: { hasColor: log.useColor() }, + template: [ + { type: 'progressbar', length: 20 }, + { type: 'activityIndicator', kerning: 1, length: 1 }, + { type: 'section', default: '' }, + ':', + { type: 'logline', kerning: 1, default: '' }, + ], +}) + +log.tracker = new Progress.TrackerGroup() + +// we track this separately as we may need to temporarily disable the +// display of the status bar for our own loggy purposes. +log.progressEnabled = log.gauge.isEnabled() + +var unicodeEnabled + +log.enableUnicode = function () { + unicodeEnabled = true + this.gauge.setTheme({ hasColor: this.useColor(), hasUnicode: unicodeEnabled }) +} + +log.disableUnicode = function () { + unicodeEnabled = false + this.gauge.setTheme({ hasColor: this.useColor(), hasUnicode: unicodeEnabled }) +} + +log.setGaugeThemeset = function (themes) { + this.gauge.setThemeset(themes) +} + +log.setGaugeTemplate = function (template) { + this.gauge.setTemplate(template) +} + +log.enableProgress = function () { + if (this.progressEnabled) { + return + } + + this.progressEnabled = true + this.tracker.on('change', this.showProgress) + if (this._paused) { + return + } + + this.gauge.enable() +} + +log.disableProgress = function () { + if (!this.progressEnabled) { + return + } + this.progressEnabled = false + this.tracker.removeListener('change', this.showProgress) + this.gauge.disable() +} + +var trackerConstructors = ['newGroup', 'newItem', 'newStream'] + +var mixinLog = function (tracker) { + // mixin the public methods from log into the tracker + // (except: conflicts and one's we handle specially) + Object.keys(log).forEach(function (P) { + if (P[0] === '_') { + return + } + + if (trackerConstructors.filter(function (C) { + return C === P + }).length) { + return + } + + if (tracker[P]) { + return + } + + if (typeof log[P] !== 'function') { + return + } + + var func = log[P] + tracker[P] = function () { + return func.apply(log, arguments) + } + }) + // if the new tracker is a group, make sure any subtrackers get + // mixed in too + if (tracker instanceof Progress.TrackerGroup) { + trackerConstructors.forEach(function (C) { + var func = tracker[C] + tracker[C] = function () { + return mixinLog(func.apply(tracker, arguments)) + } + }) + } + return tracker +} + +// Add tracker constructors to the top level log object +trackerConstructors.forEach(function (C) { + log[C] = function () { + return mixinLog(this.tracker[C].apply(this.tracker, arguments)) + } +}) + +log.clearProgress = function (cb) { + if (!this.progressEnabled) { + return cb && process.nextTick(cb) + } + + this.gauge.hide(cb) +} + +log.showProgress = function (name, completed) { + if (!this.progressEnabled) { + return + } + + var values = {} + if (name) { + values.section = name + } + + var last = log.record[log.record.length - 1] + if (last) { + values.subsection = last.prefix + var disp = log.disp[last.level] || last.level + var logline = this._format(disp, log.style[last.level]) + if (last.prefix) { + logline += ' ' + this._format(last.prefix, this.prefixStyle) + } + + logline += ' ' + last.message.split(/\r?\n/)[0] + values.logline = logline + } + values.completed = completed || this.tracker.completed() + this.gauge.show(values) +}.bind(log) // bind for use in tracker's on-change listener + +// temporarily stop emitting, but don't drop +log.pause = function () { + this._paused = true + if (this.progressEnabled) { + this.gauge.disable() + } +} + +log.resume = function () { + if (!this._paused) { + return + } + + this._paused = false + + var b = this._buffer + this._buffer = [] + b.forEach(function (m) { + this.emitLog(m) + }, this) + if (this.progressEnabled) { + this.gauge.enable() + } +} + +log._buffer = [] + +var id = 0 +log.record = [] +log.maxRecordSize = 10000 +log.log = function (lvl, prefix, message) { + var l = this.levels[lvl] + if (l === undefined) { + return this.emit('error', new Error(util.format( + 'Undefined log level: %j', lvl))) + } + + var a = new Array(arguments.length - 2) + var stack = null + for (var i = 2; i < arguments.length; i++) { + var arg = a[i - 2] = arguments[i] + + // resolve stack traces to a plain string. + if (typeof arg === 'object' && arg instanceof Error && arg.stack) { + Object.defineProperty(arg, 'stack', { + value: stack = arg.stack + '', + enumerable: true, + writable: true, + }) + } + } + if (stack) { + a.unshift(stack + '\n') + } + message = util.format.apply(util, a) + + var m = { + id: id++, + level: lvl, + prefix: String(prefix || ''), + message: message, + messageRaw: a, + } + + this.emit('log', m) + this.emit('log.' + lvl, m) + if (m.prefix) { + this.emit(m.prefix, m) + } + + this.record.push(m) + var mrs = this.maxRecordSize + var n = this.record.length - mrs + if (n > mrs / 10) { + var newSize = Math.floor(mrs * 0.9) + this.record = this.record.slice(-1 * newSize) + } + + this.emitLog(m) +}.bind(log) + +log.emitLog = function (m) { + if (this._paused) { + this._buffer.push(m) + return + } + if (this.progressEnabled) { + this.gauge.pulse(m.prefix) + } + + var l = this.levels[m.level] + if (l === undefined) { + return + } + + if (l < this.levels[this.level]) { + return + } + + if (l > 0 && !isFinite(l)) { + return + } + + // If 'disp' is null or undefined, use the lvl as a default + // Allows: '', 0 as valid disp + var disp = log.disp[m.level] != null ? log.disp[m.level] : m.level + this.clearProgress() + m.message.split(/\r?\n/).forEach(function (line) { + var heading = this.heading + if (heading) { + this.write(heading, this.headingStyle) + this.write(' ') + } + this.write(disp, log.style[m.level]) + var p = m.prefix || '' + if (p) { + this.write(' ') + } + + this.write(p, this.prefixStyle) + this.write(' ' + line + '\n') + }, this) + this.showProgress() +} + +log._format = function (msg, style) { + if (!stream) { + return + } + + var output = '' + if (this.useColor()) { + style = style || {} + var settings = [] + if (style.fg) { + settings.push(style.fg) + } + + if (style.bg) { + settings.push('bg' + style.bg[0].toUpperCase() + style.bg.slice(1)) + } + + if (style.bold) { + settings.push('bold') + } + + if (style.underline) { + settings.push('underline') + } + + if (style.inverse) { + settings.push('inverse') + } + + if (settings.length) { + output += consoleControl.color(settings) + } + + if (style.beep) { + output += consoleControl.beep() + } + } + output += msg + if (this.useColor()) { + output += consoleControl.color('reset') + } + + return output +} + +log.write = function (msg, style) { + if (!stream) { + return + } + + stream.write(this._format(msg, style)) +} + +log.addLevel = function (lvl, n, style, disp) { + // If 'disp' is null or undefined, use the lvl as a default + if (disp == null) { + disp = lvl + } + + this.levels[lvl] = n + this.style[lvl] = style + if (!this[lvl]) { + this[lvl] = function () { + var a = new Array(arguments.length + 1) + a[0] = lvl + for (var i = 0; i < arguments.length; i++) { + a[i + 1] = arguments[i] + } + + return this.log.apply(this, a) + }.bind(this) + } + this.disp[lvl] = disp +} + +log.prefixStyle = { fg: 'magenta' } +log.headingStyle = { fg: 'white', bg: 'black' } + +log.style = {} +log.levels = {} +log.disp = {} +log.addLevel('silly', -Infinity, { inverse: true }, 'sill') +log.addLevel('verbose', 1000, { fg: 'cyan', bg: 'black' }, 'verb') +log.addLevel('info', 2000, { fg: 'green' }) +log.addLevel('timing', 2500, { fg: 'green', bg: 'black' }) +log.addLevel('http', 3000, { fg: 'green', bg: 'black' }) +log.addLevel('notice', 3500, { fg: 'cyan', bg: 'black' }) +log.addLevel('warn', 4000, { fg: 'black', bg: 'yellow' }, 'WARN') +log.addLevel('error', 5000, { fg: 'red', bg: 'black' }, 'ERR!') +log.addLevel('silent', Infinity) + +// allow 'error' prefix +log.on('error', function () {}) diff --git a/node_modules/node-gyp/node_modules/npmlog/package.json b/node_modules/node-gyp/node_modules/npmlog/package.json new file mode 100644 index 0000000000000..bdb5a384781ce --- /dev/null +++ b/node_modules/node-gyp/node_modules/npmlog/package.json @@ -0,0 +1,51 @@ +{ + "author": "GitHub Inc.", + "name": "npmlog", + "description": "logger for npm", + "version": "6.0.2", + "repository": { + "type": "git", + "url": "https://github.com/npm/npmlog.git" + }, + "main": "lib/log.js", + "files": [ + "bin/", + "lib/" + ], + "scripts": { + "test": "tap", + "npmclilint": "npmcli-lint", + "lint": "eslint \"**/*.js\"", + "lintfix": "npm run lint -- --fix", + "posttest": "npm run lint", + "postsnap": "npm run lintfix --", + "postlint": "template-oss-check", + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "snap": "tap", + "template-oss-apply": "template-oss-apply --force" + }, + "dependencies": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + }, + "devDependencies": { + "@npmcli/eslint-config": "^3.0.1", + "@npmcli/template-oss": "3.4.1", + "tap": "^16.0.1" + }, + "license": "ISC", + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + }, + "tap": { + "branches": 95 + }, + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "version": "3.4.1" + } +} diff --git a/node_modules/node-gyp/node_modules/ssri/LICENSE.md b/node_modules/node-gyp/node_modules/ssri/LICENSE.md new file mode 100644 index 0000000000000..e335388869f50 --- /dev/null +++ b/node_modules/node-gyp/node_modules/ssri/LICENSE.md @@ -0,0 +1,16 @@ +ISC License + +Copyright 2021 (c) npm, Inc. + +Permission to use, copy, modify, and/or distribute this software for +any purpose with or without fee is hereby granted, provided that the +above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS +ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE +USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/node-gyp/node_modules/ssri/lib/index.js b/node_modules/node-gyp/node_modules/ssri/lib/index.js new file mode 100644 index 0000000000000..1443137cbc708 --- /dev/null +++ b/node_modules/node-gyp/node_modules/ssri/lib/index.js @@ -0,0 +1,524 @@ +'use strict' + +const crypto = require('crypto') +const MiniPass = require('minipass') + +const SPEC_ALGORITHMS = ['sha256', 'sha384', 'sha512'] + +// TODO: this should really be a hardcoded list of algorithms we support, +// rather than [a-z0-9]. +const BASE64_REGEX = /^[a-z0-9+/]+(?:=?=?)$/i +const SRI_REGEX = /^([a-z0-9]+)-([^?]+)([?\S*]*)$/ +const STRICT_SRI_REGEX = /^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)?$/ +const VCHAR_REGEX = /^[\x21-\x7E]+$/ + +const defaultOpts = { + algorithms: ['sha512'], + error: false, + options: [], + pickAlgorithm: getPrioritizedHash, + sep: ' ', + single: false, + strict: false, +} + +const ssriOpts = (opts = {}) => ({ ...defaultOpts, ...opts }) + +const getOptString = options => !options || !options.length + ? '' + : `?${options.join('?')}` + +const _onEnd = Symbol('_onEnd') +const _getOptions = Symbol('_getOptions') +const _emittedSize = Symbol('_emittedSize') +const _emittedIntegrity = Symbol('_emittedIntegrity') +const _emittedVerified = Symbol('_emittedVerified') + +class IntegrityStream extends MiniPass { + constructor (opts) { + super() + this.size = 0 + this.opts = opts + + // may be overridden later, but set now for class consistency + this[_getOptions]() + + // options used for calculating stream. can't be changed. + const { algorithms = defaultOpts.algorithms } = opts + this.algorithms = Array.from( + new Set(algorithms.concat(this.algorithm ? [this.algorithm] : [])) + ) + this.hashes = this.algorithms.map(crypto.createHash) + } + + [_getOptions] () { + const { + integrity, + size, + options, + } = { ...defaultOpts, ...this.opts } + + // For verification + this.sri = integrity ? parse(integrity, this.opts) : null + this.expectedSize = size + this.goodSri = this.sri ? !!Object.keys(this.sri).length : false + this.algorithm = this.goodSri ? this.sri.pickAlgorithm(this.opts) : null + this.digests = this.goodSri ? this.sri[this.algorithm] : null + this.optString = getOptString(options) + } + + on (ev, handler) { + if (ev === 'size' && this[_emittedSize]) { + return handler(this[_emittedSize]) + } + + if (ev === 'integrity' && this[_emittedIntegrity]) { + return handler(this[_emittedIntegrity]) + } + + if (ev === 'verified' && this[_emittedVerified]) { + return handler(this[_emittedVerified]) + } + + return super.on(ev, handler) + } + + emit (ev, data) { + if (ev === 'end') { + this[_onEnd]() + } + return super.emit(ev, data) + } + + write (data) { + this.size += data.length + this.hashes.forEach(h => h.update(data)) + return super.write(data) + } + + [_onEnd] () { + if (!this.goodSri) { + this[_getOptions]() + } + const newSri = parse(this.hashes.map((h, i) => { + return `${this.algorithms[i]}-${h.digest('base64')}${this.optString}` + }).join(' '), this.opts) + // Integrity verification mode + const match = this.goodSri && newSri.match(this.sri, this.opts) + if (typeof this.expectedSize === 'number' && this.size !== this.expectedSize) { + /* eslint-disable-next-line max-len */ + const err = new Error(`stream size mismatch when checking ${this.sri}.\n Wanted: ${this.expectedSize}\n Found: ${this.size}`) + err.code = 'EBADSIZE' + err.found = this.size + err.expected = this.expectedSize + err.sri = this.sri + this.emit('error', err) + } else if (this.sri && !match) { + /* eslint-disable-next-line max-len */ + const err = new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${newSri}. (${this.size} bytes)`) + err.code = 'EINTEGRITY' + err.found = newSri + err.expected = this.digests + err.algorithm = this.algorithm + err.sri = this.sri + this.emit('error', err) + } else { + this[_emittedSize] = this.size + this.emit('size', this.size) + this[_emittedIntegrity] = newSri + this.emit('integrity', newSri) + if (match) { + this[_emittedVerified] = match + this.emit('verified', match) + } + } + } +} + +class Hash { + get isHash () { + return true + } + + constructor (hash, opts) { + opts = ssriOpts(opts) + const strict = !!opts.strict + this.source = hash.trim() + + // set default values so that we make V8 happy to + // always see a familiar object template. + this.digest = '' + this.algorithm = '' + this.options = [] + + // 3.1. Integrity metadata (called "Hash" by ssri) + // https://w3c.github.io/webappsec-subresource-integrity/#integrity-metadata-description + const match = this.source.match( + strict + ? STRICT_SRI_REGEX + : SRI_REGEX + ) + if (!match) { + return + } + if (strict && !SPEC_ALGORITHMS.some(a => a === match[1])) { + return + } + this.algorithm = match[1] + this.digest = match[2] + + const rawOpts = match[3] + if (rawOpts) { + this.options = rawOpts.slice(1).split('?') + } + } + + hexDigest () { + return this.digest && Buffer.from(this.digest, 'base64').toString('hex') + } + + toJSON () { + return this.toString() + } + + toString (opts) { + opts = ssriOpts(opts) + if (opts.strict) { + // Strict mode enforces the standard as close to the foot of the + // letter as it can. + if (!( + // The spec has very restricted productions for algorithms. + // https://www.w3.org/TR/CSP2/#source-list-syntax + SPEC_ALGORITHMS.some(x => x === this.algorithm) && + // Usually, if someone insists on using a "different" base64, we + // leave it as-is, since there's multiple standards, and the + // specified is not a URL-safe variant. + // https://www.w3.org/TR/CSP2/#base64_value + this.digest.match(BASE64_REGEX) && + // Option syntax is strictly visual chars. + // https://w3c.github.io/webappsec-subresource-integrity/#grammardef-option-expression + // https://tools.ietf.org/html/rfc5234#appendix-B.1 + this.options.every(opt => opt.match(VCHAR_REGEX)) + )) { + return '' + } + } + const options = this.options && this.options.length + ? `?${this.options.join('?')}` + : '' + return `${this.algorithm}-${this.digest}${options}` + } +} + +class Integrity { + get isIntegrity () { + return true + } + + toJSON () { + return this.toString() + } + + isEmpty () { + return Object.keys(this).length === 0 + } + + toString (opts) { + opts = ssriOpts(opts) + let sep = opts.sep || ' ' + if (opts.strict) { + // Entries must be separated by whitespace, according to spec. + sep = sep.replace(/\S+/g, ' ') + } + return Object.keys(this).map(k => { + return this[k].map(hash => { + return Hash.prototype.toString.call(hash, opts) + }).filter(x => x.length).join(sep) + }).filter(x => x.length).join(sep) + } + + concat (integrity, opts) { + opts = ssriOpts(opts) + const other = typeof integrity === 'string' + ? integrity + : stringify(integrity, opts) + return parse(`${this.toString(opts)} ${other}`, opts) + } + + hexDigest () { + return parse(this, { single: true }).hexDigest() + } + + // add additional hashes to an integrity value, but prevent + // *changing* an existing integrity hash. + merge (integrity, opts) { + opts = ssriOpts(opts) + const other = parse(integrity, opts) + for (const algo in other) { + if (this[algo]) { + if (!this[algo].find(hash => + other[algo].find(otherhash => + hash.digest === otherhash.digest))) { + throw new Error('hashes do not match, cannot update integrity') + } + } else { + this[algo] = other[algo] + } + } + } + + match (integrity, opts) { + opts = ssriOpts(opts) + const other = parse(integrity, opts) + const algo = other.pickAlgorithm(opts) + return ( + this[algo] && + other[algo] && + this[algo].find(hash => + other[algo].find(otherhash => + hash.digest === otherhash.digest + ) + ) + ) || false + } + + pickAlgorithm (opts) { + opts = ssriOpts(opts) + const pickAlgorithm = opts.pickAlgorithm + const keys = Object.keys(this) + return keys.reduce((acc, algo) => { + return pickAlgorithm(acc, algo) || acc + }) + } +} + +module.exports.parse = parse +function parse (sri, opts) { + if (!sri) { + return null + } + opts = ssriOpts(opts) + if (typeof sri === 'string') { + return _parse(sri, opts) + } else if (sri.algorithm && sri.digest) { + const fullSri = new Integrity() + fullSri[sri.algorithm] = [sri] + return _parse(stringify(fullSri, opts), opts) + } else { + return _parse(stringify(sri, opts), opts) + } +} + +function _parse (integrity, opts) { + // 3.4.3. Parse metadata + // https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata + if (opts.single) { + return new Hash(integrity, opts) + } + const hashes = integrity.trim().split(/\s+/).reduce((acc, string) => { + const hash = new Hash(string, opts) + if (hash.algorithm && hash.digest) { + const algo = hash.algorithm + if (!acc[algo]) { + acc[algo] = [] + } + acc[algo].push(hash) + } + return acc + }, new Integrity()) + return hashes.isEmpty() ? null : hashes +} + +module.exports.stringify = stringify +function stringify (obj, opts) { + opts = ssriOpts(opts) + if (obj.algorithm && obj.digest) { + return Hash.prototype.toString.call(obj, opts) + } else if (typeof obj === 'string') { + return stringify(parse(obj, opts), opts) + } else { + return Integrity.prototype.toString.call(obj, opts) + } +} + +module.exports.fromHex = fromHex +function fromHex (hexDigest, algorithm, opts) { + opts = ssriOpts(opts) + const optString = getOptString(opts.options) + return parse( + `${algorithm}-${ + Buffer.from(hexDigest, 'hex').toString('base64') + }${optString}`, opts + ) +} + +module.exports.fromData = fromData +function fromData (data, opts) { + opts = ssriOpts(opts) + const algorithms = opts.algorithms + const optString = getOptString(opts.options) + return algorithms.reduce((acc, algo) => { + const digest = crypto.createHash(algo).update(data).digest('base64') + const hash = new Hash( + `${algo}-${digest}${optString}`, + opts + ) + /* istanbul ignore else - it would be VERY strange if the string we + * just calculated with an algo did not have an algo or digest. + */ + if (hash.algorithm && hash.digest) { + const hashAlgo = hash.algorithm + if (!acc[hashAlgo]) { + acc[hashAlgo] = [] + } + acc[hashAlgo].push(hash) + } + return acc + }, new Integrity()) +} + +module.exports.fromStream = fromStream +function fromStream (stream, opts) { + opts = ssriOpts(opts) + const istream = integrityStream(opts) + return new Promise((resolve, reject) => { + stream.pipe(istream) + stream.on('error', reject) + istream.on('error', reject) + let sri + istream.on('integrity', s => { + sri = s + }) + istream.on('end', () => resolve(sri)) + istream.on('data', () => {}) + }) +} + +module.exports.checkData = checkData +function checkData (data, sri, opts) { + opts = ssriOpts(opts) + sri = parse(sri, opts) + if (!sri || !Object.keys(sri).length) { + if (opts.error) { + throw Object.assign( + new Error('No valid integrity hashes to check against'), { + code: 'EINTEGRITY', + } + ) + } else { + return false + } + } + const algorithm = sri.pickAlgorithm(opts) + const digest = crypto.createHash(algorithm).update(data).digest('base64') + const newSri = parse({ algorithm, digest }) + const match = newSri.match(sri, opts) + if (match || !opts.error) { + return match + } else if (typeof opts.size === 'number' && (data.length !== opts.size)) { + /* eslint-disable-next-line max-len */ + const err = new Error(`data size mismatch when checking ${sri}.\n Wanted: ${opts.size}\n Found: ${data.length}`) + err.code = 'EBADSIZE' + err.found = data.length + err.expected = opts.size + err.sri = sri + throw err + } else { + /* eslint-disable-next-line max-len */ + const err = new Error(`Integrity checksum failed when using ${algorithm}: Wanted ${sri}, but got ${newSri}. (${data.length} bytes)`) + err.code = 'EINTEGRITY' + err.found = newSri + err.expected = sri + err.algorithm = algorithm + err.sri = sri + throw err + } +} + +module.exports.checkStream = checkStream +function checkStream (stream, sri, opts) { + opts = ssriOpts(opts) + opts.integrity = sri + sri = parse(sri, opts) + if (!sri || !Object.keys(sri).length) { + return Promise.reject(Object.assign( + new Error('No valid integrity hashes to check against'), { + code: 'EINTEGRITY', + } + )) + } + const checker = integrityStream(opts) + return new Promise((resolve, reject) => { + stream.pipe(checker) + stream.on('error', reject) + checker.on('error', reject) + let verified + checker.on('verified', s => { + verified = s + }) + checker.on('end', () => resolve(verified)) + checker.on('data', () => {}) + }) +} + +module.exports.integrityStream = integrityStream +function integrityStream (opts = {}) { + return new IntegrityStream(opts) +} + +module.exports.create = createIntegrity +function createIntegrity (opts) { + opts = ssriOpts(opts) + const algorithms = opts.algorithms + const optString = getOptString(opts.options) + + const hashes = algorithms.map(crypto.createHash) + + return { + update: function (chunk, enc) { + hashes.forEach(h => h.update(chunk, enc)) + return this + }, + digest: function (enc) { + const integrity = algorithms.reduce((acc, algo) => { + const digest = hashes.shift().digest('base64') + const hash = new Hash( + `${algo}-${digest}${optString}`, + opts + ) + /* istanbul ignore else - it would be VERY strange if the hash we + * just calculated with an algo did not have an algo or digest. + */ + if (hash.algorithm && hash.digest) { + const hashAlgo = hash.algorithm + if (!acc[hashAlgo]) { + acc[hashAlgo] = [] + } + acc[hashAlgo].push(hash) + } + return acc + }, new Integrity()) + + return integrity + }, + } +} + +const NODE_HASHES = new Set(crypto.getHashes()) + +// This is a Best Effort™ at a reasonable priority for hash algos +const DEFAULT_PRIORITY = [ + 'md5', 'whirlpool', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512', + // TODO - it's unclear _which_ of these Node will actually use as its name + // for the algorithm, so we guesswork it based on the OpenSSL names. + 'sha3', + 'sha3-256', 'sha3-384', 'sha3-512', + 'sha3_256', 'sha3_384', 'sha3_512', +].filter(algo => NODE_HASHES.has(algo)) + +function getPrioritizedHash (algo1, algo2) { + /* eslint-disable-next-line max-len */ + return DEFAULT_PRIORITY.indexOf(algo1.toLowerCase()) >= DEFAULT_PRIORITY.indexOf(algo2.toLowerCase()) + ? algo1 + : algo2 +} diff --git a/node_modules/node-gyp/node_modules/ssri/package.json b/node_modules/node-gyp/node_modules/ssri/package.json new file mode 100644 index 0000000000000..91c1f919788cd --- /dev/null +++ b/node_modules/node-gyp/node_modules/ssri/package.json @@ -0,0 +1,63 @@ +{ + "name": "ssri", + "version": "9.0.1", + "description": "Standard Subresource Integrity library -- parses, serializes, generates, and verifies integrity metadata according to the SRI spec.", + "main": "lib/index.js", + "files": [ + "bin/", + "lib/" + ], + "scripts": { + "prerelease": "npm t", + "postrelease": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "posttest": "npm run lint", + "test": "tap", + "coverage": "tap", + "lint": "eslint \"**/*.js\"", + "postlint": "template-oss-check", + "template-oss-apply": "template-oss-apply --force", + "lintfix": "npm run lint -- --fix", + "preversion": "npm test", + "postversion": "npm publish", + "snap": "tap" + }, + "tap": { + "check-coverage": true + }, + "repository": { + "type": "git", + "url": "https://github.com/npm/ssri.git" + }, + "keywords": [ + "w3c", + "web", + "security", + "integrity", + "checksum", + "hashing", + "subresource integrity", + "sri", + "sri hash", + "sri string", + "sri generator", + "html" + ], + "author": "GitHub Inc.", + "license": "ISC", + "dependencies": { + "minipass": "^3.1.1" + }, + "devDependencies": { + "@npmcli/eslint-config": "^3.0.1", + "@npmcli/template-oss": "3.5.0", + "tap": "^16.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + }, + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "version": "3.5.0" + } +} diff --git a/node_modules/node-gyp/node_modules/unique-filename/LICENSE b/node_modules/node-gyp/node_modules/unique-filename/LICENSE new file mode 100644 index 0000000000000..69619c125ea7e --- /dev/null +++ b/node_modules/node-gyp/node_modules/unique-filename/LICENSE @@ -0,0 +1,5 @@ +Copyright npm, Inc + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/node-gyp/node_modules/unique-filename/lib/index.js b/node_modules/node-gyp/node_modules/unique-filename/lib/index.js new file mode 100644 index 0000000000000..d067d2e709809 --- /dev/null +++ b/node_modules/node-gyp/node_modules/unique-filename/lib/index.js @@ -0,0 +1,7 @@ +var path = require('path') + +var uniqueSlug = require('unique-slug') + +module.exports = function (filepath, prefix, uniq) { + return path.join(filepath, (prefix ? prefix + '-' : '') + uniqueSlug(uniq)) +} diff --git a/node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin/package.json b/node_modules/node-gyp/node_modules/unique-filename/package.json similarity index 68% rename from node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin/package.json rename to node_modules/node-gyp/node_modules/unique-filename/package.json index 02de808d9b702..bfdec2c3722a0 100644 --- a/node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin/package.json +++ b/node_modules/node-gyp/node_modules/unique-filename/package.json @@ -1,32 +1,39 @@ { - "name": "npm-normalize-package-bin", - "version": "2.0.0", - "description": "Turn any flavor of allowable package.json bin into a normalized object", + "name": "unique-filename", + "version": "2.0.1", + "description": "Generate a unique filename for use in temporary directories or caches.", "main": "lib/index.js", - "repository": { - "type": "git", - "url": "https://github.com/npm/npm-normalize-package-bin.git" - }, - "author": "GitHub Inc.", - "license": "ISC", "scripts": { "test": "tap", - "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags", "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix", + "preversion": "npm test", + "postversion": "npm publish", "prepublishOnly": "git push origin --follow-tags", + "snap": "tap", "posttest": "npm run lint" }, + "repository": { + "type": "git", + "url": "https://github.com/npm/unique-filename.git" + }, + "keywords": [], + "author": "GitHub Inc.", + "license": "ISC", + "bugs": { + "url": "https://github.com/iarna/unique-filename/issues" + }, + "homepage": "https://github.com/iarna/unique-filename", "devDependencies": { "@npmcli/eslint-config": "^3.1.0", "@npmcli/template-oss": "3.5.0", "tap": "^16.3.0" }, + "dependencies": { + "unique-slug": "^3.0.0" + }, "files": [ "bin/", "lib/" diff --git a/node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin/LICENSE b/node_modules/node-gyp/node_modules/unique-slug/LICENSE similarity index 96% rename from node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin/LICENSE rename to node_modules/node-gyp/node_modules/unique-slug/LICENSE index 19cec97b18468..7953647e7760b 100644 --- a/node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin/LICENSE +++ b/node_modules/node-gyp/node_modules/unique-slug/LICENSE @@ -1,6 +1,6 @@ The ISC License -Copyright (c) npm, Inc. +Copyright npm, Inc Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/node_modules/node-gyp/node_modules/unique-slug/lib/index.js b/node_modules/node-gyp/node_modules/unique-slug/lib/index.js new file mode 100644 index 0000000000000..1bac84d95d730 --- /dev/null +++ b/node_modules/node-gyp/node_modules/unique-slug/lib/index.js @@ -0,0 +1,11 @@ +'use strict' +var MurmurHash3 = require('imurmurhash') + +module.exports = function (uniq) { + if (uniq) { + var hash = new MurmurHash3(uniq) + return ('00000000' + hash.result().toString(16)).slice(-8) + } else { + return (Math.random().toString(16) + '0000000').slice(2, 10) + } +} diff --git a/node_modules/bin-links/node_modules/npm-normalize-package-bin/package.json b/node_modules/node-gyp/node_modules/unique-slug/package.json similarity index 76% rename from node_modules/bin-links/node_modules/npm-normalize-package-bin/package.json rename to node_modules/node-gyp/node_modules/unique-slug/package.json index 02de808d9b702..3194408f27fda 100644 --- a/node_modules/bin-links/node_modules/npm-normalize-package-bin/package.json +++ b/node_modules/node-gyp/node_modules/unique-slug/package.json @@ -1,32 +1,35 @@ { - "name": "npm-normalize-package-bin", - "version": "2.0.0", - "description": "Turn any flavor of allowable package.json bin into a normalized object", + "name": "unique-slug", + "version": "3.0.0", + "description": "Generate a unique character string suitible for use in files and URLs.", "main": "lib/index.js", - "repository": { - "type": "git", - "url": "https://github.com/npm/npm-normalize-package-bin.git" - }, - "author": "GitHub Inc.", - "license": "ISC", "scripts": { "test": "tap", - "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags", "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix", + "preversion": "npm test", + "postversion": "npm publish", "prepublishOnly": "git push origin --follow-tags", + "snap": "tap", "posttest": "npm run lint" }, + "keywords": [], + "author": "GitHub Inc.", + "license": "ISC", "devDependencies": { "@npmcli/eslint-config": "^3.1.0", "@npmcli/template-oss": "3.5.0", "tap": "^16.3.0" }, + "repository": { + "type": "git", + "url": "https://github.com/npm/unique-slug.git" + }, + "dependencies": { + "imurmurhash": "^0.1.4" + }, "files": [ "bin/", "lib/" diff --git a/node_modules/normalize-package-data/package.json b/node_modules/normalize-package-data/package.json index 1bec9bb8645e7..ec2773bfbe6bf 100644 --- a/node_modules/normalize-package-data/package.json +++ b/node_modules/normalize-package-data/package.json @@ -1,6 +1,6 @@ { "name": "normalize-package-data", - "version": "4.0.1", + "version": "5.0.0", "author": "GitHub Inc.", "description": "Normalizes data that can be found in package.json files.", "license": "BSD-2-Clause", @@ -10,9 +10,6 @@ }, "main": "lib/normalize.js", "scripts": { - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "preversion": "npm test", "test": "tap", "npmclilint": "npmcli-lint", "lint": "eslint \"**/*.js\"", @@ -24,14 +21,14 @@ "template-oss-apply": "template-oss-apply --force" }, "dependencies": { - "hosted-git-info": "^5.0.0", + "hosted-git-info": "^6.0.0", "is-core-module": "^2.8.1", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4" }, "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.5.0", + "@npmcli/template-oss": "4.5.1", "tap": "^16.0.1" }, "files": [ @@ -39,16 +36,20 @@ "lib/" ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.5.0" + "version": "4.5.1" }, "tap": { "branches": 86, "functions": 92, "lines": 86, - "statements": 86 + "statements": 86, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] } } diff --git a/node_modules/npm-audit-report/package.json b/node_modules/npm-audit-report/package.json index 8749c14582fa9..8779f4c1d2c7e 100644 --- a/node_modules/npm-audit-report/package.json +++ b/node_modules/npm-audit-report/package.json @@ -1,14 +1,11 @@ { "name": "npm-audit-report", - "version": "3.0.0", + "version": "4.0.0", "description": "Given a response from the npm security api, render it into a variety of security reports", "main": "lib/index.js", "scripts": { "test": "tap", "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", @@ -17,7 +14,11 @@ }, "tap": { "check-coverage": true, - "coverage-map": "map.js" + "coverage-map": "map.js", + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "keywords": [ "npm", @@ -32,7 +33,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.1.2", + "@npmcli/template-oss": "4.5.1", "require-inject": "^1.4.4", "tap": "^16.0.0" }, @@ -50,14 +51,13 @@ "homepage": "https://github.com/npm/npm-audit-report#readme", "files": [ "bin/", - "lib/", - "reporters" + "lib/" ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.1.2" + "version": "4.5.1" } } diff --git a/node_modules/@npmcli/installed-package-contents/node_modules/npm-bundled/LICENSE b/node_modules/npm-bundled/LICENSE similarity index 100% rename from node_modules/@npmcli/installed-package-contents/node_modules/npm-bundled/LICENSE rename to node_modules/npm-bundled/LICENSE diff --git a/node_modules/@npmcli/installed-package-contents/node_modules/npm-bundled/index.js b/node_modules/npm-bundled/lib/index.js similarity index 91% rename from node_modules/@npmcli/installed-package-contents/node_modules/npm-bundled/index.js rename to node_modules/npm-bundled/lib/index.js index 378ddc4c5ddb2..4f54ca647c087 100644 --- a/node_modules/@npmcli/installed-package-contents/node_modules/npm-bundled/index.js +++ b/node_modules/npm-bundled/lib/index.js @@ -73,10 +73,11 @@ class BundleWalker extends EE { start () { const pj = path.resolve(this.path, 'package.json') - if (this.packageJsonCache.has(pj)) + if (this.packageJsonCache.has(pj)) { this.onPackage(this.packageJsonCache.get(pj)) - else + } else { this.readPackageJson(pj) + } return this } @@ -112,11 +113,11 @@ class BundleWalker extends EE { : bdRaw === true ? this.allDepsBundled(pkg) : Object.keys(bdRaw))) - if (!bd.length) + if (!bd.length) { return this.done() + } this.bundle = bd - const nm = this.path + '/node_modules' this.readModules() } @@ -130,8 +131,9 @@ class BundleWalker extends EE { this.node_modules = nm this.bundle.forEach(dep => this.childDep(dep)) - if (this.children === 0) + if (this.children === 0) { this.done() + } } childDep (dep) { @@ -150,21 +152,18 @@ class BundleWalker extends EE { this.children += 1 const child = new BundleWalker({ path: p, - parent: this + parent: this, }) child.on('done', _ => { - if (--this.children === 0) + if (--this.children === 0) { this.done() + } }) child.start() } } class BundleWalkerSync extends BundleWalker { - constructor (opt) { - super(opt) - } - start () { super.start() this.done() @@ -174,14 +173,16 @@ class BundleWalkerSync extends BundleWalker { readPackageJson (pj) { try { this.onPackageJson(pj, fs.readFileSync(pj)) - } catch (er) {} + } catch { + // empty catch + } return this } readModules () { try { this.onReaddir(readdirNodeModulesSync(this.path + '/node_modules')) - } catch (er) { + } catch { this.onReaddir([]) } } @@ -189,30 +190,32 @@ class BundleWalkerSync extends BundleWalker { child (dep) { new BundleWalkerSync({ path: this.path + '/node_modules/' + dep, - parent: this + parent: this, }).start() } } const readdirNodeModules = (nm, cb) => { fs.readdir(nm, (er, set) => { - if (er) + if (er) { cb(er) - else { + } else { const scopes = set.filter(f => /^@/.test(f)) - if (!scopes.length) + if (!scopes.length) { cb(null, set) - else { + } else { const unscoped = set.filter(f => !/^@/.test(f)) let count = scopes.length scopes.forEach(scope => { - fs.readdir(nm + '/' + scope, (er, pkgs) => { - if (er || !pkgs.length) + fs.readdir(nm + '/' + scope, (readdirEr, pkgs) => { + if (readdirEr || !pkgs.length) { unscoped.push(scope) - else + } else { unscoped.push.apply(unscoped, pkgs.map(p => scope + '/' + p)) - if (--count === 0) + } + if (--count === 0) { cb(null, unscoped) + } }) }) } diff --git a/node_modules/npm-bundled/package.json b/node_modules/npm-bundled/package.json new file mode 100644 index 0000000000000..f41066ab2e6d3 --- /dev/null +++ b/node_modules/npm-bundled/package.json @@ -0,0 +1,49 @@ +{ + "name": "npm-bundled", + "version": "3.0.0", + "description": "list things in node_modules that are bundledDependencies, or transitive dependencies thereof", + "main": "lib/index.js", + "repository": { + "type": "git", + "url": "https://github.com/npm/npm-bundled.git" + }, + "author": "GitHub Inc.", + "license": "ISC", + "devDependencies": { + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.5.1", + "mkdirp": "^1.0.4", + "mutate-fs": "^2.1.1", + "rimraf": "^3.0.2", + "tap": "^16.3.0" + }, + "scripts": { + "test": "tap", + "lint": "eslint \"**/*.js\"", + "postlint": "template-oss-check", + "template-oss-apply": "template-oss-apply --force", + "lintfix": "npm run lint -- --fix", + "snap": "tap", + "posttest": "npm run lint" + }, + "files": [ + "bin/", + "lib/" + ], + "dependencies": { + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "version": "4.5.1" + }, + "tap": { + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] + } +} diff --git a/node_modules/npm-install-checks/package.json b/node_modules/npm-install-checks/package.json index ce33718514b4a..1003b107763d9 100644 --- a/node_modules/npm-install-checks/package.json +++ b/node_modules/npm-install-checks/package.json @@ -1,6 +1,6 @@ { "name": "npm-install-checks", - "version": "5.0.0", + "version": "6.0.0", "description": "Check the engines and platform fields in package.json", "main": "lib/index.js", "dependencies": { @@ -8,19 +8,15 @@ }, "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.2.2", + "@npmcli/template-oss": "4.5.1", "tap": "^16.0.1" }, "scripts": { "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags", "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix", - "prepublishOnly": "git push origin --follow-tags", "snap": "tap", "posttest": "npm run lint" }, @@ -38,11 +34,17 @@ "lib/" ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "author": "GitHub Inc.", "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.2.2" + "version": "4.5.1" + }, + "tap": { + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] } } diff --git a/node_modules/npm-normalize-package-bin/index.js b/node_modules/npm-normalize-package-bin/index.js deleted file mode 100644 index 5a738ff82e1e3..0000000000000 --- a/node_modules/npm-normalize-package-bin/index.js +++ /dev/null @@ -1,60 +0,0 @@ -// pass in a manifest with a 'bin' field here, and it'll turn it -// into a properly santized bin object -const {join, basename} = require('path') - -const normalize = pkg => - !pkg.bin ? removeBin(pkg) - : typeof pkg.bin === 'string' ? normalizeString(pkg) - : Array.isArray(pkg.bin) ? normalizeArray(pkg) - : typeof pkg.bin === 'object' ? normalizeObject(pkg) - : removeBin(pkg) - -const normalizeString = pkg => { - if (!pkg.name) - return removeBin(pkg) - pkg.bin = { [pkg.name]: pkg.bin } - return normalizeObject(pkg) -} - -const normalizeArray = pkg => { - pkg.bin = pkg.bin.reduce((acc, k) => { - acc[basename(k)] = k - return acc - }, {}) - return normalizeObject(pkg) -} - -const removeBin = pkg => { - delete pkg.bin - return pkg -} - -const normalizeObject = pkg => { - const orig = pkg.bin - const clean = {} - let hasBins = false - Object.keys(orig).forEach(binKey => { - const base = join('/', basename(binKey.replace(/\\|:/g, '/'))).substr(1) - - if (typeof orig[binKey] !== 'string' || !base) - return - - const binTarget = join('/', orig[binKey]) - .replace(/\\/g, '/').substr(1) - - if (!binTarget) - return - - clean[base] = binTarget - hasBins = true - }) - - if (hasBins) - pkg.bin = clean - else - delete pkg.bin - - return pkg -} - -module.exports = normalize diff --git a/node_modules/bin-links/node_modules/npm-normalize-package-bin/lib/index.js b/node_modules/npm-normalize-package-bin/lib/index.js similarity index 100% rename from node_modules/bin-links/node_modules/npm-normalize-package-bin/lib/index.js rename to node_modules/npm-normalize-package-bin/lib/index.js diff --git a/node_modules/npm-normalize-package-bin/package.json b/node_modules/npm-normalize-package-bin/package.json index a331a682e74e0..8e237074b8a34 100644 --- a/node_modules/npm-normalize-package-bin/package.json +++ b/node_modules/npm-normalize-package-bin/package.json @@ -1,21 +1,43 @@ { "name": "npm-normalize-package-bin", - "version": "1.0.1", + "version": "3.0.0", "description": "Turn any flavor of allowable package.json bin into a normalized object", - "repository": "git+https://github.com/npm/npm-normalize-package-bin", - "author": "Isaac Z. Schlueter <i@izs.me> (https://izs.me)", + "main": "lib/index.js", + "repository": { + "type": "git", + "url": "https://github.com/npm/npm-normalize-package-bin.git" + }, + "author": "GitHub Inc.", "license": "ISC", "scripts": { "test": "tap", "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags" - }, - "tap": { - "check-coverage": true + "lint": "eslint \"**/*.js\"", + "postlint": "template-oss-check", + "template-oss-apply": "template-oss-apply --force", + "lintfix": "npm run lint -- --fix", + "posttest": "npm run lint" }, "devDependencies": { - "tap": "^14.10.2" + "@npmcli/eslint-config": "^3.1.0", + "@npmcli/template-oss": "4.5.1", + "tap": "^16.3.0" + }, + "files": [ + "bin/", + "lib/" + ], + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "version": "4.5.1" + }, + "tap": { + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] } } diff --git a/node_modules/npm-normalize-package-bin/test/array.js b/node_modules/npm-normalize-package-bin/test/array.js deleted file mode 100644 index 63dafa8913741..0000000000000 --- a/node_modules/npm-normalize-package-bin/test/array.js +++ /dev/null @@ -1,37 +0,0 @@ -const normalize = require('../') -const t = require('tap') - -t.test('benign array', async t => { - const pkg = { name: 'hello', version: 'world', bin: ['./x/y', 'y/z', './a'] } - const expect = { name: 'hello', version: 'world', bin: { - y: 'x/y', - z: 'y/z', - a: 'a', - } } - t.strictSame(normalize(pkg), expect) - t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok') -}) - -t.test('conflicting array', async t => { - const pkg = { name: 'hello', version: 'world', bin: ['./x/y', 'z/y', './a'] } - const expect = { name: 'hello', version: 'world', bin: { - y: 'z/y', - a: 'a', - } } - t.strictSame(normalize(pkg), expect) - t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok') -}) - -t.test('slashy array', async t => { - const pkg = { name: 'hello', version: 'world', bin: [ '/etc/passwd' ] } - const expect = { name: 'hello', version: 'world', bin: { passwd: 'etc/passwd' } } - t.strictSame(normalize(pkg), expect) - t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok') -}) - -t.test('dotty array', async t => { - const pkg = { name: 'hello', version: 'world', bin: ['../../../../etc/passwd'] } - const expect = { name: 'hello', version: 'world', bin: { passwd: 'etc/passwd' } } - t.strictSame(normalize(pkg), expect) - t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok') -}) diff --git a/node_modules/npm-normalize-package-bin/test/nobin.js b/node_modules/npm-normalize-package-bin/test/nobin.js deleted file mode 100644 index 536d7eb22f68a..0000000000000 --- a/node_modules/npm-normalize-package-bin/test/nobin.js +++ /dev/null @@ -1,35 +0,0 @@ -const normalize = require('../') -const t = require('tap') - -// all of these just delete the bins, so expect the same value -const expect = { name: 'hello', version: 'world' } - -t.test('no bin in object', async t => { - const pkg = { name: 'hello', version: 'world' } - t.strictSame(normalize(pkg), expect) - t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok') -}) - -t.test('empty string bin in object', async t => { - const pkg = { name: 'hello', version: 'world', bin: '' } - t.strictSame(normalize(pkg), expect) - t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok') -}) - -t.test('false bin in object', async t => { - const pkg = { name: 'hello', version: 'world', bin: false } - t.strictSame(normalize(pkg), expect) - t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok') -}) - -t.test('null bin in object', async t => { - const pkg = { name: 'hello', version: 'world', bin: null } - t.strictSame(normalize(pkg), expect) - t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok') -}) - -t.test('number bin', async t => { - const pkg = { name: 'hello', version: 'world', bin: 42069 } - t.strictSame(normalize(pkg), expect) - t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok') -}) diff --git a/node_modules/npm-normalize-package-bin/test/object.js b/node_modules/npm-normalize-package-bin/test/object.js deleted file mode 100644 index 00d23684fb75b..0000000000000 --- a/node_modules/npm-normalize-package-bin/test/object.js +++ /dev/null @@ -1,141 +0,0 @@ -const normalize = require('../') -const t = require('tap') - -t.test('benign object', async t => { - // just clean up the ./ in the targets and remove anything weird - const pkg = { name: 'hello', version: 'world', bin: { - y: './x/y', - z: './y/z', - a: './a', - } } - const expect = { name: 'hello', version: 'world', bin: { - y: 'x/y', - z: 'y/z', - a: 'a', - } } - t.strictSame(normalize(pkg), expect) - t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok') -}) - -t.test('empty and non-string targets', async t => { - // just clean up the ./ in the targets and remove anything weird - const pkg = { name: 'hello', version: 'world', bin: { - z: './././', - y: '', - './x': 'x.js', - re: /asdf/, - foo: { bar: 'baz' }, - false: false, - null: null, - array: [1,2,3], - func: function () {}, - } } - const expect = { name: 'hello', version: 'world', bin: { - x: 'x.js', - } } - t.strictSame(normalize(pkg), expect) - t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok') -}) - -t.test('slashy object', async t => { - const pkg = { name: 'hello', version: 'world', bin: { - '/path/foo': '/etc/passwd', - 'bar': '/etc/passwd', - '/etc/glorb/baz': '/etc/passwd', - '/etc/passwd:/bin/usr/exec': '/etc/passwd', - } } - const expect = { - name: 'hello', - version: 'world', - bin: { - foo: 'etc/passwd', - bar: 'etc/passwd', - baz: 'etc/passwd', - exec: 'etc/passwd', - } - } - t.strictSame(normalize(pkg), expect) - t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok') -}) - -t.test('dotty object', async t => { - const pkg = { - name: 'hello', - version: 'world', - bin: { - 'nodots': '../../../../etc/passwd', - '../../../../../../dots': '../../../../etc/passwd', - '.././../\\./..//C:\\./': 'this is removed', - '.././../\\./..//C:\\/': 'super safe programming language', - '.././../\\./..//C:\\x\\y\\z/': 'xyz', - } } - const expect = { name: 'hello', version: 'world', bin: { - nodots: 'etc/passwd', - dots: 'etc/passwd', - C: 'super safe programming language', - z: 'xyz', - } } - t.strictSame(normalize(pkg), expect) - t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok') -}) - -t.test('weird object', async t => { - const pkg = { name: 'hello', version: 'world', bin: /asdf/ } - const expect = { name: 'hello', version: 'world' } - t.strictSame(normalize(pkg), expect) - t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok') -}) - -t.test('oddball keys', async t => { - const pkg = { - bin: { - '~': 'target', - '£': 'target', - 'ζ': 'target', - 'ぎ': 'target', - '操': 'target', - '🎱': 'target', - '💎': 'target', - '💸': 'target', - '🦉': 'target', - 'сheck-dom': 'target', - 'Ωpm': 'target', - 'ζλ': 'target', - 'мга': 'target', - 'пше': 'target', - 'тзч': 'target', - 'тзь': 'target', - 'нфкт': 'target', - 'ссср': 'target', - '君の名は': 'target', - '君の名は': 'target', - } - } - - const expect = { - bin: { - '~': 'target', - '£': 'target', - 'ζ': 'target', - 'ぎ': 'target', - '操': 'target', - '🎱': 'target', - '💎': 'target', - '💸': 'target', - '🦉': 'target', - 'сheck-dom': 'target', - 'Ωpm': 'target', - 'ζλ': 'target', - 'мга': 'target', - 'пше': 'target', - 'тзч': 'target', - 'тзь': 'target', - 'нфкт': 'target', - 'ссср': 'target', - '君の名は': 'target', - }, - } - - t.strictSame(normalize(pkg), expect) - t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok') -}) diff --git a/node_modules/npm-normalize-package-bin/test/string.js b/node_modules/npm-normalize-package-bin/test/string.js deleted file mode 100644 index b6de8f8f589b5..0000000000000 --- a/node_modules/npm-normalize-package-bin/test/string.js +++ /dev/null @@ -1,37 +0,0 @@ -const normalize = require('../') -const t = require('tap') - -t.test('benign string', async t => { - const pkg = { name: 'hello', version: 'world', bin: 'hello.js' } - const expect = { name: 'hello', version: 'world', bin: { hello: 'hello.js' } } - t.strictSame(normalize(pkg), expect) - t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok') -}) - -t.test('slashy string', async t => { - const pkg = { name: 'hello', version: 'world', bin: '/etc/passwd' } - const expect = { name: 'hello', version: 'world', bin: { hello: 'etc/passwd' } } - t.strictSame(normalize(pkg), expect) - t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok') -}) - -t.test('dotty string', async t => { - const pkg = { name: 'hello', version: 'world', bin: '../../../../etc/passwd' } - const expect = { name: 'hello', version: 'world', bin: { hello: 'etc/passwd' } } - t.strictSame(normalize(pkg), expect) - t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok') -}) - -t.test('double path', async t => { - const pkg = { name: 'hello', version: 'world', bin: '/etc/passwd:/bin/usr/exec' } - const expect = { name: 'hello', version: 'world', bin: { hello: 'etc/passwd:/bin/usr/exec' } } - t.strictSame(normalize(pkg), expect) - t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok') -}) - -t.test('string with no name', async t => { - const pkg = { bin: 'foobar.js' } - const expect = {} - t.strictSame(normalize(pkg), expect) - t.strictSame(normalize(normalize(pkg)), expect, 'double sanitize ok') -}) diff --git a/node_modules/npm-package-arg/lib/npa.js b/node_modules/npm-package-arg/lib/npa.js index cd1932b0bc78b..10af67be538f3 100644 --- a/node_modules/npm-package-arg/lib/npa.js +++ b/node_modules/npm-package-arg/lib/npa.js @@ -39,11 +39,12 @@ function npa (arg, where) { spec = arg } else if (nameEndsAt > 0) { name = namePart - spec = arg.slice(nameEndsAt + 1) + spec = arg.slice(nameEndsAt + 1) || '*' } else { const valid = validatePackageName(arg) if (valid.validForOldPackages) { name = arg + spec = '*' } else { spec = arg } @@ -113,7 +114,7 @@ function Result (opts) { this.name = undefined this.escapedName = undefined this.scope = undefined - this.rawSpec = opts.rawSpec == null ? '' : opts.rawSpec + this.rawSpec = opts.rawSpec || '' this.saveSpec = opts.saveSpec this.fetchSpec = opts.fetchSpec if (opts.name) { @@ -383,7 +384,7 @@ function fromAlias (res, where) { function fromRegistry (res) { res.registry = true - const spec = res.rawSpec === '' ? 'latest' : res.rawSpec.trim() + const spec = res.rawSpec.trim() // no save spec for registry components as we save based on the fetched // version, not on the argument so this can't compute that. res.saveSpec = null diff --git a/node_modules/npm-package-arg/package.json b/node_modules/npm-package-arg/package.json index eddc6bbbbb8f8..9ade534a2d88c 100644 --- a/node_modules/npm-package-arg/package.json +++ b/node_modules/npm-package-arg/package.json @@ -1,6 +1,6 @@ { "name": "npm-package-arg", - "version": "9.1.2", + "version": "10.0.0", "description": "Parse the things that can be arguments to `npm install`", "main": "./lib/npa.js", "directories": { @@ -11,14 +11,14 @@ "lib/" ], "dependencies": { - "hosted-git-info": "^5.0.0", - "proc-log": "^2.0.1", + "hosted-git-info": "^6.0.0", + "proc-log": "^3.0.0", "semver": "^7.3.5", - "validate-npm-package-name": "^4.0.0" + "validate-npm-package-name": "^5.0.0" }, "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "4.3.2", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.1", "tap": "^16.0.1" }, "scripts": { @@ -43,7 +43,7 @@ }, "homepage": "https://github.com/npm/npm-package-arg", "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "tap": { "branches": 97, @@ -54,17 +54,6 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.3.2", - "releaseBranches": [ - "v9" - ], - "ciVersions": [ - "12.13.0", - "12.x", - "14.15.0", - "14.x", - "16.0.0", - "16.x" - ] + "version": "4.6.1" } } diff --git a/node_modules/npm-packlist/package.json b/node_modules/npm-packlist/package.json index 5811e02f48251..c0fdd1b002ec1 100644 --- a/node_modules/npm-packlist/package.json +++ b/node_modules/npm-packlist/package.json @@ -1,13 +1,13 @@ { "name": "npm-packlist", - "version": "7.0.0", + "version": "7.0.1", "description": "Get a list of the files to add from a folder into an npm package", "directories": { "test": "test" }, "main": "lib/index.js", "dependencies": { - "ignore-walk": "^5.0.1" + "ignore-walk": "^6.0.0" }, "author": "GitHub Inc.", "license": "ISC", @@ -17,8 +17,8 @@ ], "devDependencies": { "@npmcli/arborist": "^6.0.0 || ^6.0.0-pre.0", - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "4.4.2", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.5.1", "mutate-fs": "^2.1.1", "tap": "^16.0.1" }, @@ -55,6 +55,6 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.4.2" + "version": "4.5.1" } } diff --git a/node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin/lib/index.js b/node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin/lib/index.js deleted file mode 100644 index d6f0a581b9e66..0000000000000 --- a/node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin/lib/index.js +++ /dev/null @@ -1,64 +0,0 @@ -// pass in a manifest with a 'bin' field here, and it'll turn it -// into a properly santized bin object -const { join, basename } = require('path') - -const normalize = pkg => - !pkg.bin ? removeBin(pkg) - : typeof pkg.bin === 'string' ? normalizeString(pkg) - : Array.isArray(pkg.bin) ? normalizeArray(pkg) - : typeof pkg.bin === 'object' ? normalizeObject(pkg) - : removeBin(pkg) - -const normalizeString = pkg => { - if (!pkg.name) { - return removeBin(pkg) - } - pkg.bin = { [pkg.name]: pkg.bin } - return normalizeObject(pkg) -} - -const normalizeArray = pkg => { - pkg.bin = pkg.bin.reduce((acc, k) => { - acc[basename(k)] = k - return acc - }, {}) - return normalizeObject(pkg) -} - -const removeBin = pkg => { - delete pkg.bin - return pkg -} - -const normalizeObject = pkg => { - const orig = pkg.bin - const clean = {} - let hasBins = false - Object.keys(orig).forEach(binKey => { - const base = join('/', basename(binKey.replace(/\\|:/g, '/'))).slice(1) - - if (typeof orig[binKey] !== 'string' || !base) { - return - } - - const binTarget = join('/', orig[binKey]) - .replace(/\\/g, '/').slice(1) - - if (!binTarget) { - return - } - - clean[base] = binTarget - hasBins = true - }) - - if (hasBins) { - pkg.bin = clean - } else { - delete pkg.bin - } - - return pkg -} - -module.exports = normalize diff --git a/node_modules/npm-pick-manifest/package.json b/node_modules/npm-pick-manifest/package.json index b3ebc9f8de62e..89ff8966f1a39 100644 --- a/node_modules/npm-pick-manifest/package.json +++ b/node_modules/npm-pick-manifest/package.json @@ -1,6 +1,6 @@ { "name": "npm-pick-manifest", - "version": "7.0.2", + "version": "8.0.1", "description": "Resolves a matching manifest from a package metadata document according to standard npm semver resolution rules.", "main": "./lib", "files": [ @@ -12,9 +12,6 @@ "lint": "eslint \"**/*.js\"", "test": "tap", "posttest": "npm run lint", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "postlint": "template-oss-check", "lintfix": "npm run lint -- --fix", "snap": "tap", @@ -32,24 +29,28 @@ "author": "GitHub Inc.", "license": "ISC", "dependencies": { - "npm-install-checks": "^5.0.0", - "npm-normalize-package-bin": "^2.0.0", - "npm-package-arg": "^9.0.0", + "npm-install-checks": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "npm-package-arg": "^10.0.0", "semver": "^7.3.5" }, "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.2.2", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.1", "tap": "^16.0.1" }, "tap": { - "check-coverage": true + "check-coverage": true, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.2.2" + "version": "4.6.1" } } diff --git a/node_modules/npm-profile/package.json b/node_modules/npm-profile/package.json index a99125f55bf0c..9c0b77b8a6dd5 100644 --- a/node_modules/npm-profile/package.json +++ b/node_modules/npm-profile/package.json @@ -1,13 +1,13 @@ { "name": "npm-profile", - "version": "7.0.0", + "version": "7.0.1", "description": "Library for updating an npmjs.com profile", "keywords": [], "author": "GitHub Inc.", "license": "ISC", "dependencies": { - "npm-registry-fetch": "^13.0.1", - "proc-log": "^2.0.0" + "npm-registry-fetch": "^14.0.0", + "proc-log": "^3.0.0" }, "main": "./lib/index.js", "repository": { @@ -19,8 +19,8 @@ "lib/" ], "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "4.4.4", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.5.1", "nock": "^13.2.4", "tap": "^16.0.1" }, @@ -45,6 +45,6 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.4.4" + "version": "4.5.1" } } diff --git a/node_modules/npm-registry-fetch/package.json b/node_modules/npm-registry-fetch/package.json index 7a3885ae12e88..1cb6bf4e47a4c 100644 --- a/node_modules/npm-registry-fetch/package.json +++ b/node_modules/npm-registry-fetch/package.json @@ -1,6 +1,6 @@ { "name": "npm-registry-fetch", - "version": "13.3.1", + "version": "14.0.2", "description": "Fetch-based http client for use with npm registry APIs", "main": "lib", "files": [ @@ -11,9 +11,6 @@ "eslint": "eslint", "lint": "eslint \"**/*.js\"", "lintfix": "npm run lint -- --fix", - "prepublishOnly": "git push origin --follow-tags", - "preversion": "npm test", - "postversion": "npm publish", "test": "tap", "posttest": "npm run lint", "npmclilint": "npmcli-lint", @@ -34,34 +31,38 @@ "author": "GitHub Inc.", "license": "ISC", "dependencies": { - "make-fetch-happen": "^10.0.6", + "make-fetch-happen": "^11.0.0", "minipass": "^3.1.6", - "minipass-fetch": "^2.0.3", + "minipass-fetch": "^3.0.0", "minipass-json-stream": "^1.0.1", "minizlib": "^2.1.2", - "npm-package-arg": "^9.0.1", - "proc-log": "^2.0.0" + "npm-package-arg": "^10.0.0", + "proc-log": "^3.0.0" }, "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.5.0", - "cacache": "^16.0.2", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.1", + "cacache": "^17.0.0", "mkdirp": "^1.0.4", "nock": "^13.2.4", "require-inject": "^1.4.4", "rimraf": "^3.0.2", - "ssri": "^9.0.0", + "ssri": "^10.0.0", "tap": "^16.0.1" }, "tap": { "check-coverage": true, - "test-ignore": "test[\\\\/](util|cache)[\\\\/]" + "test-ignore": "test[\\\\/](util|cache)[\\\\/]", + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.5.0" + "version": "4.6.1" } } diff --git a/node_modules/npmlog/lib/log.js b/node_modules/npmlog/lib/log.js index be650c6a42608..38106ea34ae08 100644 --- a/node_modules/npmlog/lib/log.js +++ b/node_modules/npmlog/lib/log.js @@ -79,16 +79,12 @@ log.setGaugeTemplate = function (template) { } log.enableProgress = function () { - if (this.progressEnabled) { + if (this.progressEnabled || this._paused) { return } this.progressEnabled = true this.tracker.on('change', this.showProgress) - if (this._paused) { - return - } - this.gauge.enable() } diff --git a/node_modules/npmlog/package.json b/node_modules/npmlog/package.json index bdb5a384781ce..dbcc772d37ab7 100644 --- a/node_modules/npmlog/package.json +++ b/node_modules/npmlog/package.json @@ -2,7 +2,7 @@ "author": "GitHub Inc.", "name": "npmlog", "description": "logger for npm", - "version": "6.0.2", + "version": "7.0.1", "repository": { "type": "git", "url": "https://github.com/npm/npmlog.git" @@ -20,32 +20,33 @@ "posttest": "npm run lint", "postsnap": "npm run lintfix --", "postlint": "template-oss-check", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "snap": "tap", "template-oss-apply": "template-oss-apply --force" }, "dependencies": { - "are-we-there-yet": "^3.0.0", + "are-we-there-yet": "^4.0.0", "console-control-strings": "^1.1.0", - "gauge": "^4.0.3", + "gauge": "^5.0.0", "set-blocking": "^2.0.0" }, "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.4.1", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.1", "tap": "^16.0.1" }, "license": "ISC", "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "tap": { - "branches": 95 + "branches": 95, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.4.1" + "version": "4.6.1" } } diff --git a/node_modules/pacote/lib/fetcher.js b/node_modules/pacote/lib/fetcher.js index 95b6d3ee432bb..fe5679f00a0a1 100644 --- a/node_modules/pacote/lib/fetcher.js +++ b/node_modules/pacote/lib/fetcher.js @@ -7,10 +7,10 @@ const npa = require('npm-package-arg') const ssri = require('ssri') const { promisify } = require('util') const { basename, dirname } = require('path') -const rimraf = promisify(require('rimraf')) const tar = require('tar') const log = require('proc-log') const retry = require('promise-retry') +const fs = require('fs/promises') const fsm = require('fs-minipass') const cacache = require('cacache') const isPackageBin = require('./util/is-package-bin.js') @@ -20,20 +20,11 @@ const readPackageJsonFast = require('read-package-json-fast') const readPackageJson = promisify(require('read-package-json')) const Minipass = require('minipass') -// we only change ownership on unix platforms, and only if uid is 0 -const selfOwner = process.getuid && process.getuid() === 0 ? { - uid: 0, - gid: process.getgid(), -} : null -const chownr = selfOwner ? promisify(require('chownr')) : null -const inferOwner = selfOwner ? require('infer-owner') : null -const mkdirp = require('mkdirp') const cacheDir = require('./util/cache-dir.js') // Private methods. // Child classes should not have to override these. // Users should never call them. -const _chown = Symbol('_chown') const _extract = Symbol('_extract') const _mkdir = Symbol('_mkdir') const _empty = Symbol('_empty') @@ -359,44 +350,21 @@ class FetcherBase { return cacache.rm.content(this.cache, this.integrity, this.opts) } - async [_chown] (path, uid, gid) { - return selfOwner && (selfOwner.gid !== gid || selfOwner.uid !== uid) - ? chownr(path, uid, gid) - : /* istanbul ignore next - we don't test in root-owned folders */ null - } - [_empty] (path) { return getContents({ path, depth: 1 }).then(contents => Promise.all( - contents.map(entry => rimraf(entry)))) + contents.map(entry => fs.rm(entry, { recursive: true, force: true })))) } - [_mkdir] (dest) { - // if we're bothering to do owner inference, then do it. - // otherwise just make the dir, and return an empty object. - // always empty the dir dir to start with, but do so - // _after_ inferring the owner, in case there's an existing folder - // there that we would want to preserve which differs from the - // parent folder (rare, but probably happens sometimes). - return !inferOwner - ? this[_empty](dest).then(() => mkdirp(dest)).then(() => ({})) - : inferOwner(dest).then(({ uid, gid }) => - this[_empty](dest) - .then(() => mkdirp(dest)) - .then(made => { - // ignore the || dest part in coverage. It's there to handle - // race conditions where the dir may be made by someone else - // after being removed by us. - const dir = made || /* istanbul ignore next */ dest - return this[_chown](dir, uid, gid) - }) - .then(() => ({ uid, gid }))) + async [_mkdir] (dest) { + await this[_empty](dest) + return await fs.mkdir(dest, { recursive: true }) } // extraction is always the same. the only difference is where // the tarball comes from. - extract (dest) { - return this[_mkdir](dest).then(({ uid, gid }) => - this.tarballStream(tarball => this[_extract](dest, tarball, uid, gid))) + async extract (dest) { + await this[_mkdir](dest) + return this.tarballStream((tarball) => this[_extract](dest, tarball)) } [_toFile] (dest) { @@ -414,18 +382,14 @@ class FetcherBase { } // don't use this[_mkdir] because we don't want to rimraf anything - tarballFile (dest) { + async tarballFile (dest) { const dir = dirname(dest) - return !inferOwner - ? mkdirp(dir).then(() => this[_toFile](dest)) - : inferOwner(dest).then(({ uid, gid }) => - mkdirp(dir).then(made => this[_toFile](dest) - .then(res => this[_chown](made || dir, uid, gid) - .then(() => res)))) + await fs.mkdir(dir, { recursive: true }) + return this[_toFile](dest) } - [_extract] (dest, tarball, uid, gid) { - const extractor = tar.x(this[_tarxOptions]({ cwd: dest, uid, gid })) + [_extract] (dest, tarball) { + const extractor = tar.x(this[_tarxOptions]({ cwd: dest })) const p = new Promise((resolve, reject) => { extractor.on('end', () => { resolve({ diff --git a/node_modules/pacote/lib/registry.js b/node_modules/pacote/lib/registry.js index eeb22e93c33d6..c4c9df8e4096c 100644 --- a/node_modules/pacote/lib/registry.js +++ b/node_modules/pacote/lib/registry.js @@ -3,7 +3,6 @@ const RemoteFetcher = require('./remote.js') const _tarballFromResolved = Symbol.for('pacote.Fetcher._tarballFromResolved') const pacoteVersion = require('../package.json').version const removeTrailingSlashes = require('./util/trailing-slashes.js') -const npa = require('npm-package-arg') const rpj = require('read-package-json-fast') const pickManifest = require('npm-pick-manifest') const ssri = require('ssri') @@ -28,12 +27,6 @@ class RegistryFetcher extends Fetcher { // already. this.packumentCache = this.opts.packumentCache || null - // handle case when npm-package-arg guesses wrong. - if (this.spec.type === 'tag' && - this.spec.rawSpec === '' && - this.defaultTag !== 'latest') { - this.spec = npa(`${this.spec.name}@${this.defaultTag}`) - } this.registry = fetch.pickRegistry(spec, opts) this.packumentUrl = removeTrailingSlashes(this.registry) + '/' + this.spec.escapedName diff --git a/node_modules/pacote/package.json b/node_modules/pacote/package.json index 9add3c97361b4..07adc61dc72bc 100644 --- a/node_modules/pacote/package.json +++ b/node_modules/pacote/package.json @@ -1,6 +1,6 @@ { "name": "pacote", - "version": "14.0.0", + "version": "15.0.2", "description": "JavaScript package downloader", "author": "GitHub Inc.", "bin": { @@ -27,8 +27,8 @@ "devDependencies": { "@npmcli/arborist": "^6.0.0 || ^6.0.0-pre.0", "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.4.4", - "hosted-git-info": "^5.0.0", + "@npmcli/template-oss": "4.6.2", + "hosted-git-info": "^6.0.0", "mutate-fs": "^2.1.1", "nock": "^13.2.4", "npm-registry-mock": "^1.3.2", @@ -44,26 +44,22 @@ "git" ], "dependencies": { - "@npmcli/git": "^3.0.0", - "@npmcli/installed-package-contents": "^1.0.7", - "@npmcli/promise-spawn": "^3.0.0", - "@npmcli/run-script": "^4.1.0", - "cacache": "^16.0.0", - "chownr": "^2.0.0", + "@npmcli/git": "^4.0.0", + "@npmcli/installed-package-contents": "^2.0.0", + "@npmcli/promise-spawn": "^4.0.0", + "@npmcli/run-script": "^5.0.0", + "cacache": "^17.0.0", "fs-minipass": "^2.1.0", - "infer-owner": "^1.0.4", "minipass": "^3.1.6", - "mkdirp": "^1.0.4", - "npm-package-arg": "^9.0.0", + "npm-package-arg": "^10.0.0", "npm-packlist": "^7.0.0", - "npm-pick-manifest": "^7.0.0", - "npm-registry-fetch": "^13.0.1", - "proc-log": "^2.0.0", + "npm-pick-manifest": "^8.0.0", + "npm-registry-fetch": "^14.0.0", + "proc-log": "^3.0.0", "promise-retry": "^2.0.1", - "read-package-json": "^5.0.0", - "read-package-json-fast": "^2.0.3", - "rimraf": "^3.0.2", - "ssri": "^9.0.0", + "read-package-json": "^6.0.0", + "read-package-json-fast": "^3.0.0", + "ssri": "^10.0.0", "tar": "^6.1.11" }, "engines": { @@ -75,7 +71,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.4.4", + "version": "4.6.2", "windowsCI": false } } diff --git a/node_modules/parse-conflict-json/package.json b/node_modules/parse-conflict-json/package.json index 5dab68d52f7ca..7b86df89edb39 100644 --- a/node_modules/parse-conflict-json/package.json +++ b/node_modules/parse-conflict-json/package.json @@ -1,6 +1,6 @@ { "name": "parse-conflict-json", - "version": "2.0.2", + "version": "3.0.0", "description": "Parse a JSON string that has git merge conflicts, resolving if possible", "author": "GitHub Inc.", "license": "ISC", @@ -8,26 +8,26 @@ "scripts": { "test": "tap", "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags", "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", "lintfix": "npm run lint -- --fix", - "prepublishOnly": "git push origin --follow-tags", "posttest": "npm run lint", "template-oss-apply": "template-oss-apply --force" }, "tap": { - "check-coverage": true + "check-coverage": true, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.2.0", + "@npmcli/template-oss": "4.5.1", "tap": "^16.0.1" }, "dependencies": { - "json-parse-even-better-errors": "^2.3.1", + "json-parse-even-better-errors": "^3.0.0", "just-diff": "^5.0.1", "just-diff-apply": "^5.2.0" }, @@ -40,10 +40,10 @@ "lib/" ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.2.0" + "version": "4.5.1" } } diff --git a/node_modules/proc-log/package.json b/node_modules/proc-log/package.json index ca2f1c771d8e9..d335fa965ace5 100644 --- a/node_modules/proc-log/package.json +++ b/node_modules/proc-log/package.json @@ -1,6 +1,6 @@ { "name": "proc-log", - "version": "2.0.1", + "version": "3.0.0", "files": [ "bin/", "lib/" @@ -18,9 +18,6 @@ "snap": "tap", "posttest": "npm run lint", "postsnap": "eslint index.js test/*.js --fix", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", "lintfix": "npm run lint -- --fix", @@ -28,14 +25,20 @@ }, "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.2.0", + "@npmcli/template-oss": "4.5.1", "tap": "^16.0.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.2.0" + "version": "4.5.1" + }, + "tap": { + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] } } diff --git a/node_modules/process/LICENSE b/node_modules/process/LICENSE new file mode 100644 index 0000000000000..b8c1246cf49cb --- /dev/null +++ b/node_modules/process/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2013 Roman Shtylman <shtylman@gmail.com> + +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. diff --git a/node_modules/process/browser.js b/node_modules/process/browser.js new file mode 100644 index 0000000000000..d059362306586 --- /dev/null +++ b/node_modules/process/browser.js @@ -0,0 +1,184 @@ +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; diff --git a/node_modules/process/index.js b/node_modules/process/index.js new file mode 100644 index 0000000000000..8d8ed7df45bb8 --- /dev/null +++ b/node_modules/process/index.js @@ -0,0 +1,2 @@ +// for now just expose the builtin process global from node.js +module.exports = global.process; diff --git a/node_modules/process/package.json b/node_modules/process/package.json new file mode 100644 index 0000000000000..d2cfaade44177 --- /dev/null +++ b/node_modules/process/package.json @@ -0,0 +1,27 @@ +{ + "author": "Roman Shtylman <shtylman@gmail.com>", + "name": "process", + "description": "process information for node.js and browsers", + "keywords": [ + "process" + ], + "scripts": { + "test": "mocha test.js", + "browser": "zuul --no-coverage --ui mocha-bdd --local 8080 -- test.js" + }, + "version": "0.11.10", + "repository": { + "type": "git", + "url": "git://github.com/shtylman/node-process.git" + }, + "license": "MIT", + "browser": "./browser.js", + "main": "./index.js", + "engines": { + "node": ">= 0.6.0" + }, + "devDependencies": { + "mocha": "2.2.1", + "zuul": "^3.10.3" + } +} diff --git a/node_modules/process/test.js b/node_modules/process/test.js new file mode 100644 index 0000000000000..8ba579c0a2026 --- /dev/null +++ b/node_modules/process/test.js @@ -0,0 +1,199 @@ +var assert = require('assert'); +var ourProcess = require('./browser'); +describe('test against our process', function () { + test(ourProcess); +}); +if (!process.browser) { + describe('test against node', function () { + test(process); + }); + vmtest(); +} +function test (ourProcess) { + describe('test arguments', function () { + it ('works', function (done) { + var order = 0; + + + ourProcess.nextTick(function (num) { + assert.equal(num, order++, 'first one works'); + ourProcess.nextTick(function (num) { + assert.equal(num, order++, 'recursive one is 4th'); + }, 3); + }, 0); + ourProcess.nextTick(function (num) { + assert.equal(num, order++, 'second one starts'); + ourProcess.nextTick(function (num) { + assert.equal(num, order++, 'this is third'); + ourProcess.nextTick(function (num) { + assert.equal(num, order++, 'this is last'); + done(); + }, 5); + }, 4); + }, 1); + ourProcess.nextTick(function (num) { + + assert.equal(num, order++, '3rd schedualed happens after the error'); + }, 2); + }); + }); +if (!process.browser) { + describe('test errors', function (t) { + it ('works', function (done) { + var order = 0; + process.removeAllListeners('uncaughtException'); + process.once('uncaughtException', function(err) { + assert.equal(2, order++, 'error is third'); + ourProcess.nextTick(function () { + assert.equal(5, order++, 'schedualed in error is last'); + done(); + }); + }); + ourProcess.nextTick(function () { + assert.equal(0, order++, 'first one works'); + ourProcess.nextTick(function () { + assert.equal(4, order++, 'recursive one is 4th'); + }); + }); + ourProcess.nextTick(function () { + assert.equal(1, order++, 'second one starts'); + throw(new Error('an error is thrown')); + }); + ourProcess.nextTick(function () { + assert.equal(3, order++, '3rd schedualed happens after the error'); + }); + }); + }); +} + describe('rename globals', function (t) { + var oldTimeout = setTimeout; + var oldClear = clearTimeout; + + it('clearTimeout', function (done){ + + var ok = true; + clearTimeout = function () { + ok = false; + } + var ran = false; + function cleanup() { + clearTimeout = oldClear; + var err; + try { + assert.ok(ok, 'fake clearTimeout ran'); + assert.ok(ran, 'should have run'); + } catch (e) { + err = e; + } + done(err); + } + setTimeout(cleanup, 1000); + ourProcess.nextTick(function () { + ran = true; + }); + }); + it('just setTimeout', function (done){ + + + setTimeout = function () { + setTimeout = oldTimeout; + try { + assert.ok(false, 'fake setTimeout called') + } catch (e) { + done(e); + } + + } + + ourProcess.nextTick(function () { + setTimeout = oldTimeout; + done(); + }); + }); + }); +} +function vmtest() { + var vm = require('vm'); + var fs = require('fs'); + var process = fs.readFileSync('./browser.js', {encoding: 'utf8'}); + + + describe('should work in vm in strict mode with no globals', function () { + it('should parse', function (done) { + var str = '"use strict";var module = {exports:{}};'; + str += process; + str += 'this.works = process.browser;'; + var script = new vm.Script(str); + var context = { + works: false + }; + script.runInNewContext(context); + assert.ok(context.works); + done(); + }); + it('setTimeout throws error', function (done) { + var str = '"use strict";var module = {exports:{}};'; + str += process; + str += 'try {process.nextTick(function () {})} catch (e){this.works = e;}'; + var script = new vm.Script(str); + var context = { + works: false + }; + script.runInNewContext(context); + assert.ok(context.works); + done(); + }); + it('should generally work', function (done) { + var str = '"use strict";var module = {exports:{}};'; + str += process; + str += 'process.nextTick(function () {assert.ok(true);done();})'; + var script = new vm.Script(str); + var context = { + clearTimeout: clearTimeout, + setTimeout: setTimeout, + done: done, + assert: assert + }; + script.runInNewContext(context); + }); + it('late defs setTimeout', function (done) { + var str = '"use strict";var module = {exports:{}};'; + str += process; + str += 'var setTimeout = hiddenSetTimeout;process.nextTick(function () {assert.ok(true);done();})'; + var script = new vm.Script(str); + var context = { + clearTimeout: clearTimeout, + hiddenSetTimeout: setTimeout, + done: done, + assert: assert + }; + script.runInNewContext(context); + }); + it('late defs clearTimeout', function (done) { + var str = '"use strict";var module = {exports:{}};'; + str += process; + str += 'var clearTimeout = hiddenClearTimeout;process.nextTick(function () {assert.ok(true);done();})'; + var script = new vm.Script(str); + var context = { + hiddenClearTimeout: clearTimeout, + setTimeout: setTimeout, + done: done, + assert: assert + }; + script.runInNewContext(context); + }); + it('late defs setTimeout and then redefine', function (done) { + var str = '"use strict";var module = {exports:{}};'; + str += process; + str += 'var setTimeout = hiddenSetTimeout;process.nextTick(function () {setTimeout = function (){throw new Error("foo")};hiddenSetTimeout(function(){process.nextTick(function (){assert.ok(true);done();});});});'; + var script = new vm.Script(str); + var context = { + clearTimeout: clearTimeout, + hiddenSetTimeout: setTimeout, + done: done, + assert: assert + }; + script.runInNewContext(context); + }); + }); +} diff --git a/node_modules/read-cmd-shim/lib/index.js b/node_modules/read-cmd-shim/lib/index.js index 782d4c36dced5..dafc874463f63 100644 --- a/node_modules/read-cmd-shim/lib/index.js +++ b/node_modules/read-cmd-shim/lib/index.js @@ -56,8 +56,10 @@ const readCmdShim = path => { if (destination) { return destination } - return Promise.reject(notaShim(path, er)) - }, readFileEr => Promise.reject(wrapError(readFileEr, er))) + throw notaShim(path, er) + }, readFileEr => { + throw wrapError(readFileEr, er) + }) } const readCmdShimSync = path => { diff --git a/node_modules/read-cmd-shim/package.json b/node_modules/read-cmd-shim/package.json index fee454f017c2f..401ee3d7101f1 100644 --- a/node_modules/read-cmd-shim/package.json +++ b/node_modules/read-cmd-shim/package.json @@ -1,19 +1,16 @@ { "name": "read-cmd-shim", - "version": "3.0.0", + "version": "4.0.0", "description": "Figure out what a cmd-shim is pointing at. This acts as the equivalent of fs.readlink.", "main": "lib/index.js", "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.2.2", - "cmd-shim": "^4.0.0", + "@npmcli/template-oss": "4.5.1", + "cmd-shim": "^5.0.0", "rimraf": "^3.0.0", "tap": "^16.0.1" }, "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "test": "tap", "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", @@ -23,7 +20,11 @@ "posttest": "npm run lint" }, "tap": { - "check-coverage": true + "check-coverage": true, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "repository": { "type": "git", @@ -37,10 +38,10 @@ ], "author": "GitHub Inc.", "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.2.2" + "version": "4.5.1" } } diff --git a/node_modules/read-package-json-fast/index.js b/node_modules/read-package-json-fast/lib/index.js similarity index 83% rename from node_modules/read-package-json-fast/index.js rename to node_modules/read-package-json-fast/lib/index.js index 646ff7dfbbd76..c5c896ffec004 100644 --- a/node_modules/read-package-json-fast/index.js +++ b/node_modules/read-package-json-fast/lib/index.js @@ -1,4 +1,4 @@ -const {promisify} = require('util') +const { promisify } = require('util') const fs = require('fs') const readFile = promisify(fs.readFile) const lstat = promisify(fs.lstat) @@ -18,12 +18,14 @@ const normalizePackageBin = require('npm-normalize-package-bin') // load the directories.bin folder as a 'bin' object const readBinDir = async (path, data) => { - if (data.bin) + if (data.bin) { return data + } const m = data.directories && data.directories.bin - if (!m || typeof m !== 'string') + if (!m || typeof m !== 'string') { return data + } // cut off any monkey business, like setting directories.bin // to ../../../etc/passwd or /etc/passwd or something like that. @@ -36,30 +38,33 @@ const readBinDir = async (path, data) => { const walkBinDir = async (root, dir, obj) => { const entries = await readdir(resolve(root, dir)).catch(() => []) for (const entry of entries) { - if (entry.charAt(0) === '.') + if (entry.charAt(0) === '.') { continue + } const f = resolve(root, dir, entry) // ignore stat errors, weird file types, symlinks, etc. const st = await lstat(f).catch(() => null) - if (!st) + if (!st) { continue - else if (st.isFile()) + } else if (st.isFile()) { obj[entry] = relative(root, f) - else if (st.isDirectory()) + } else if (st.isDirectory()) { await walkBinDir(root, join(dir, entry), obj) + } } return obj } // do not preserve _fields set in files, they are sus const stripUnderscores = data => { - for (const key of Object.keys(data).filter(k => /^_/.test(k))) + for (const key of Object.keys(data).filter(k => /^_/.test(k))) { delete data[key] + } return data } const normalize = data => { - add_id(data) + addId(data) fixBundled(data) pruneRepeatedOptionals(data) fixScripts(data) @@ -70,9 +75,10 @@ const normalize = data => { rpj.normalize = normalize -const add_id = data => { - if (data.name && data.version) +const addId = data => { + if (data.name && data.version) { data._id = `${data.name}@${data.version}` + } return data } @@ -88,8 +94,9 @@ const pruneRepeatedOptionals = data => { delete dd[name] } } - if (Object.keys(dd).length === 0) + if (Object.keys(dd).length === 0) { delete data.dependencies + } return data } @@ -98,17 +105,19 @@ const fixBundled = data => { const bd = data.bundleDependencies === undefined ? bdd : data.bundleDependencies - if (bd === false) + if (bd === false) { data.bundleDependencies = [] - else if (bd === true) + } else if (bd === true) { data.bundleDependencies = Object.keys(data.dependencies || {}) - else if (bd && typeof bd === 'object') { - if (!Array.isArray(bd)) + } else if (bd && typeof bd === 'object') { + if (!Array.isArray(bd)) { data.bundleDependencies = Object.keys(bd) - else + } else { data.bundleDependencies = bd - } else + } + } else { delete data.bundleDependencies + } delete data.bundledDependencies return data @@ -121,15 +130,17 @@ const fixScripts = data => { } for (const [name, script] of Object.entries(data.scripts)) { - if (typeof script !== 'string') + if (typeof script !== 'string') { delete data.scripts[name] + } } return data } const fixFunding = data => { - if (data.funding && typeof data.funding === 'string') + if (data.funding && typeof data.funding === 'string') { data.funding = { url: data.funding } + } return data } diff --git a/node_modules/read-package-json-fast/package.json b/node_modules/read-package-json-fast/package.json index c3a9f7dc5c37b..7baa36cfbeb9e 100644 --- a/node_modules/read-package-json-fast/package.json +++ b/node_modules/read-package-json-fast/package.json @@ -1,34 +1,47 @@ { "name": "read-package-json-fast", - "version": "2.0.3", + "version": "3.0.1", "description": "Like read-package-json, but faster", - "author": "Isaac Z. Schlueter <i@izs.me> (https://izs.me)", + "main": "lib/index.js", + "author": "GitHub Inc.", "license": "ISC", "scripts": { "test": "tap", "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags" + "lint": "eslint \"**/*.js\"", + "postlint": "template-oss-check", + "template-oss-apply": "template-oss-apply --force", + "lintfix": "npm run lint -- --fix", + "posttest": "npm run lint" }, "engines": { - "node": ">=10" - }, - "tap": { - "check-coverage": true + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "devDependencies": { - "tap": "^15.0.9" + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.5.1", + "tap": "^16.3.0" }, "dependencies": { - "json-parse-even-better-errors": "^2.3.0", - "npm-normalize-package-bin": "^1.0.1" + "json-parse-even-better-errors": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" }, "repository": { "type": "git", - "url": "git+https://github.com/npm/read-package-json-fast.git" + "url": "https://github.com/npm/read-package-json-fast.git" }, "files": [ - "index.js" - ] + "bin/", + "lib/" + ], + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "version": "4.5.1" + }, + "tap": { + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] + } } diff --git a/node_modules/read-package-json/node_modules/npm-normalize-package-bin/lib/index.js b/node_modules/read-package-json/node_modules/npm-normalize-package-bin/lib/index.js deleted file mode 100644 index d6f0a581b9e66..0000000000000 --- a/node_modules/read-package-json/node_modules/npm-normalize-package-bin/lib/index.js +++ /dev/null @@ -1,64 +0,0 @@ -// pass in a manifest with a 'bin' field here, and it'll turn it -// into a properly santized bin object -const { join, basename } = require('path') - -const normalize = pkg => - !pkg.bin ? removeBin(pkg) - : typeof pkg.bin === 'string' ? normalizeString(pkg) - : Array.isArray(pkg.bin) ? normalizeArray(pkg) - : typeof pkg.bin === 'object' ? normalizeObject(pkg) - : removeBin(pkg) - -const normalizeString = pkg => { - if (!pkg.name) { - return removeBin(pkg) - } - pkg.bin = { [pkg.name]: pkg.bin } - return normalizeObject(pkg) -} - -const normalizeArray = pkg => { - pkg.bin = pkg.bin.reduce((acc, k) => { - acc[basename(k)] = k - return acc - }, {}) - return normalizeObject(pkg) -} - -const removeBin = pkg => { - delete pkg.bin - return pkg -} - -const normalizeObject = pkg => { - const orig = pkg.bin - const clean = {} - let hasBins = false - Object.keys(orig).forEach(binKey => { - const base = join('/', basename(binKey.replace(/\\|:/g, '/'))).slice(1) - - if (typeof orig[binKey] !== 'string' || !base) { - return - } - - const binTarget = join('/', orig[binKey]) - .replace(/\\/g, '/').slice(1) - - if (!binTarget) { - return - } - - clean[base] = binTarget - hasBins = true - }) - - if (hasBins) { - pkg.bin = clean - } else { - delete pkg.bin - } - - return pkg -} - -module.exports = normalize diff --git a/node_modules/read-package-json/package.json b/node_modules/read-package-json/package.json index 82d0b72965109..09829fa3fbf78 100644 --- a/node_modules/read-package-json/package.json +++ b/node_modules/read-package-json/package.json @@ -1,6 +1,6 @@ { "name": "read-package-json", - "version": "5.0.2", + "version": "6.0.0", "author": "GitHub Inc.", "description": "The thing npm uses to read package.json files with semantics and defaults and validation", "repository": { @@ -19,21 +19,18 @@ "posttest": "npm run lint", "postsnap": "npm run lintfix --", "postlint": "template-oss-check", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "snap": "tap", "template-oss-apply": "template-oss-apply --force" }, "dependencies": { "glob": "^8.0.1", - "json-parse-even-better-errors": "^2.3.1", - "normalize-package-data": "^4.0.0", - "npm-normalize-package-bin": "^2.0.0" + "json-parse-even-better-errors": "^3.0.0", + "normalize-package-data": "^5.0.0", + "npm-normalize-package-bin": "^3.0.0" }, "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.6.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.5.1", "tap": "^16.0.1" }, "license": "ISC", @@ -42,16 +39,20 @@ "lib/" ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "tap": { "branches": 68, "functions": 83, "lines": 76, - "statements": 77 + "statements": 77, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.6.0" + "version": "4.5.1" } } diff --git a/node_modules/ssri/lib/index.js b/node_modules/ssri/lib/index.js index 1443137cbc708..222861a021bfd 100644 --- a/node_modules/ssri/lib/index.js +++ b/node_modules/ssri/lib/index.js @@ -270,6 +270,9 @@ class Integrity { match (integrity, opts) { opts = ssriOpts(opts) const other = parse(integrity, opts) + if (!other) { + return false + } const algo = other.pickAlgorithm(opts) return ( this[algo] && diff --git a/node_modules/ssri/package.json b/node_modules/ssri/package.json index 91c1f919788cd..156d50ee6939a 100644 --- a/node_modules/ssri/package.json +++ b/node_modules/ssri/package.json @@ -1,6 +1,6 @@ { "name": "ssri", - "version": "9.0.1", + "version": "10.0.0", "description": "Standard Subresource Integrity library -- parses, serializes, generates, and verifies integrity metadata according to the SRI spec.", "main": "lib/index.js", "files": [ @@ -10,7 +10,6 @@ "scripts": { "prerelease": "npm t", "postrelease": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "posttest": "npm run lint", "test": "tap", "coverage": "tap", @@ -18,12 +17,14 @@ "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix", - "preversion": "npm test", - "postversion": "npm publish", "snap": "tap" }, "tap": { - "check-coverage": true + "check-coverage": true, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "repository": { "type": "git", @@ -50,14 +51,14 @@ }, "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.5.0", + "@npmcli/template-oss": "4.5.1", "tap": "^16.0.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.5.0" + "version": "4.5.1" } } diff --git a/node_modules/treeverse/package.json b/node_modules/treeverse/package.json index 97269b335fc4b..b8de0b21ad719 100644 --- a/node_modules/treeverse/package.json +++ b/node_modules/treeverse/package.json @@ -1,6 +1,6 @@ { "name": "treeverse", - "version": "2.0.0", + "version": "3.0.0", "description": "Walk any kind of tree structure depth- or breadth-first. Supports promises and advanced map-reduce operations with a very small API.", "author": "GitHub Inc.", "license": "ISC", @@ -11,23 +11,23 @@ "scripts": { "test": "tap", "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags", "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix", - "prepublishOnly": "git push origin --follow-tags", "posttest": "npm run lint" }, "tap": { "100": true, - "coverage-map": "test/coverage-map.js" + "coverage-map": "test/coverage-map.js", + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] }, "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.2.2", + "@npmcli/template-oss": "4.5.1", "tap": "^16.0.1" }, "files": [ @@ -42,10 +42,10 @@ "breadth first search" ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.2.2" + "version": "4.5.1" } } diff --git a/node_modules/unique-filename/package.json b/node_modules/unique-filename/package.json index bfdec2c3722a0..b2fbf0666489a 100644 --- a/node_modules/unique-filename/package.json +++ b/node_modules/unique-filename/package.json @@ -1,6 +1,6 @@ { "name": "unique-filename", - "version": "2.0.1", + "version": "3.0.0", "description": "Generate a unique filename for use in temporary directories or caches.", "main": "lib/index.js", "scripts": { @@ -9,9 +9,6 @@ "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "snap": "tap", "posttest": "npm run lint" }, @@ -27,22 +24,28 @@ }, "homepage": "https://github.com/iarna/unique-filename", "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "3.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.5.1", "tap": "^16.3.0" }, "dependencies": { - "unique-slug": "^3.0.0" + "unique-slug": "^4.0.0" }, "files": [ "bin/", "lib/" ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.5.0" + "version": "4.5.1" + }, + "tap": { + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] } } diff --git a/node_modules/unique-slug/package.json b/node_modules/unique-slug/package.json index 3194408f27fda..33732cdbb4285 100644 --- a/node_modules/unique-slug/package.json +++ b/node_modules/unique-slug/package.json @@ -1,6 +1,6 @@ { "name": "unique-slug", - "version": "3.0.0", + "version": "4.0.0", "description": "Generate a unique character string suitible for use in files and URLs.", "main": "lib/index.js", "scripts": { @@ -9,9 +9,6 @@ "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "snap": "tap", "posttest": "npm run lint" }, @@ -20,7 +17,7 @@ "license": "ISC", "devDependencies": { "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "3.5.0", + "@npmcli/template-oss": "4.5.1", "tap": "^16.3.0" }, "repository": { @@ -35,10 +32,16 @@ "lib/" ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.5.0" + "version": "4.5.1" + }, + "tap": { + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] } } diff --git a/node_modules/validate-npm-package-name/package.json b/node_modules/validate-npm-package-name/package.json index fa9a6920d411f..5579a5c33a76b 100644 --- a/node_modules/validate-npm-package-name/package.json +++ b/node_modules/validate-npm-package-name/package.json @@ -1,6 +1,6 @@ { "name": "validate-npm-package-name", - "version": "4.0.0", + "version": "5.0.0", "description": "Give me a string and I'll tell you if it's a valid npm package name", "main": "lib/", "directories": { @@ -11,7 +11,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.2.1", + "@npmcli/template-oss": "4.5.1", "tap": "^16.0.1" }, "scripts": { @@ -23,9 +23,6 @@ "postlint": "template-oss-check", "template-oss-apply": "template-oss-apply --force", "lintfix": "npm run lint -- --fix", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "snap": "tap", "posttest": "npm run lint" }, @@ -50,15 +47,19 @@ "lib/" ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "3.2.1" + "version": "4.5.1" }, "tap": { "statements": 88, "branches": 92, - "lines": 88 + "lines": 88, + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] } } diff --git a/node_modules/write-file-atomic/package.json b/node_modules/write-file-atomic/package.json index 86e2a0fbadfeb..5c9bce457a188 100644 --- a/node_modules/write-file-atomic/package.json +++ b/node_modules/write-file-atomic/package.json @@ -1,6 +1,6 @@ { "name": "write-file-atomic", - "version": "4.0.2", + "version": "5.0.0", "description": "Write files in an atomic fashion w/configurable ownership", "main": "./lib/index.js", "scripts": { @@ -8,9 +8,6 @@ "posttest": "npm run lint", "lint": "eslint \"**/*.js\"", "postlint": "template-oss-check", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", "lintfix": "npm run lint -- --fix", "snap": "tap", "template-oss-apply": "template-oss-apply --force" @@ -35,7 +32,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "3.5.0", + "@npmcli/template-oss": "4.5.1", "mkdirp": "^1.0.4", "rimraf": "^3.0.2", "tap": "^16.0.1" @@ -45,11 +42,17 @@ "lib/" ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", "windowsCI": false, - "version": "3.5.0" + "version": "4.5.1" + }, + "tap": { + "nyc-arg": [ + "--exclude", + "tap-snapshots/**" + ] } } diff --git a/package-lock.json b/package-lock.json index 58d8c904f7d2e..092ad85b6f83a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,18 +1,17 @@ { "name": "npm", - "version": "9.0.0-pre.4", + "version": "9.0.0-pre.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "npm", - "version": "9.0.0-pre.4", + "version": "9.0.0-pre.6", "bundleDependencies": [ "@isaacs/string-locale-compare", "@npmcli/arborist", "@npmcli/ci-detect", "@npmcli/config", - "@npmcli/fs", "@npmcli/map-workspaces", "@npmcli/package-json", "@npmcli/run-script", @@ -20,7 +19,6 @@ "archy", "cacache", "chalk", - "chownr", "cli-columns", "cli-table3", "columnify", @@ -49,7 +47,6 @@ "minipass", "minipass-pipeline", "mkdirp", - "mkdirp-infer-owner", "ms", "node-gyp", "nopt", @@ -90,18 +87,16 @@ ], "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/arborist": "^6.0.0-pre.4", + "@npmcli/arborist": "^6.0.0-pre.5", "@npmcli/ci-detect": "^3.0.0", - "@npmcli/config": "^4.2.1", - "@npmcli/fs": "^2.1.0", - "@npmcli/map-workspaces": "^2.0.3", - "@npmcli/package-json": "^2.0.0", - "@npmcli/run-script": "^4.2.1", + "@npmcli/config": "^6.0.1", + "@npmcli/map-workspaces": "^3.0.0", + "@npmcli/package-json": "^3.0.0", + "@npmcli/run-script": "^5.0.0", "abbrev": "~1.1.1", "archy": "~1.0.0", - "cacache": "^16.1.3", + "cacache": "^17.0.1", "chalk": "^4.1.2", - "chownr": "^2.0.0", "cli-columns": "^4.0.0", "cli-table3": "^0.6.2", "columnify": "^1.6.0", @@ -109,72 +104,72 @@ "fs-minipass": "^2.1.0", "glob": "^8.0.1", "graceful-fs": "^4.2.10", - "hosted-git-info": "^5.1.0", + "hosted-git-info": "^6.0.0", "ini": "^3.0.1", - "init-package-json": "^3.0.2", + "init-package-json": "^4.0.1", "is-cidr": "^4.0.2", - "json-parse-even-better-errors": "^2.3.1", - "libnpmaccess": "^7.0.0-pre.1", - "libnpmdiff": "^5.0.0-pre.2", - "libnpmexec": "^5.0.0-pre.4", - "libnpmfund": "^4.0.0-pre.4", - "libnpmhook": "^9.0.0-pre.0", - "libnpmorg": "^5.0.0-pre.0", - "libnpmpack": "^5.0.0-pre.2", - "libnpmpublish": "^7.0.0-pre.2", - "libnpmsearch": "^6.0.0-pre.0", - "libnpmteam": "^5.0.0-pre.0", - "libnpmversion": "^4.0.0-pre.0", - "make-fetch-happen": "^10.2.0", + "json-parse-even-better-errors": "^3.0.0", + "libnpmaccess": "^7.0.0-pre.2", + "libnpmdiff": "^5.0.0-pre.3", + "libnpmexec": "^5.0.0-pre.5", + "libnpmfund": "^4.0.0-pre.5", + "libnpmhook": "^9.0.0-pre.1", + "libnpmorg": "^5.0.0-pre.1", + "libnpmpack": "^5.0.0-pre.4", + "libnpmpublish": "^7.0.0-pre.4", + "libnpmsearch": "^6.0.0-pre.1", + "libnpmteam": "^5.0.0-pre.1", + "libnpmversion": "^4.0.0-pre.1", + "make-fetch-happen": "^11.0.1", "minimatch": "^5.1.0", "minipass": "^3.1.6", "minipass-pipeline": "^1.2.4", "mkdirp": "^1.0.4", - "mkdirp-infer-owner": "^2.0.0", "ms": "^2.1.2", "node-gyp": "^9.1.0", "nopt": "^6.0.0", - "npm-audit-report": "^3.0.0", - "npm-install-checks": "^5.0.0", - "npm-package-arg": "^9.1.2", - "npm-pick-manifest": "^7.0.2", - "npm-profile": "^7.0.0", - "npm-registry-fetch": "^13.3.1", + "npm-audit-report": "^4.0.0", + "npm-install-checks": "^6.0.0", + "npm-package-arg": "^10.0.0", + "npm-pick-manifest": "^8.0.1", + "npm-profile": "^7.0.1", + "npm-registry-fetch": "^14.0.2", "npm-user-validate": "^1.0.1", - "npmlog": "^6.0.2", + "npmlog": "^7.0.1", "opener": "^1.5.2", "p-map": "^4.0.0", - "pacote": "^14.0.0", - "parse-conflict-json": "^2.0.2", - "proc-log": "^2.0.1", + "pacote": "^15.0.2", + "parse-conflict-json": "^3.0.0", + "proc-log": "^3.0.0", "qrcode-terminal": "^0.12.0", "read": "~1.0.7", - "read-package-json": "^5.0.2", - "read-package-json-fast": "^2.0.3", + "read-package-json": "^6.0.0", + "read-package-json-fast": "^3.0.1", "readdir-scoped-modules": "^1.1.0", "rimraf": "^3.0.2", "semver": "^7.3.8", - "ssri": "^9.0.1", + "ssri": "^10.0.0", "tar": "^6.1.11", "text-table": "~0.2.0", "tiny-relative-date": "^1.3.0", - "treeverse": "^2.0.0", - "validate-npm-package-name": "^4.0.0", + "treeverse": "^3.0.0", + "validate-npm-package-name": "^5.0.0", "which": "^2.0.2", - "write-file-atomic": "^4.0.1" + "write-file-atomic": "^5.0.0" }, "bin": { "npm": "bin/npm-cli.js", "npx": "bin/npx-cli.js" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/git": "^3.0.2", - "@npmcli/promise-spawn": "^3.0.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/docs": "^1.0.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/git": "^4.0.1", + "@npmcli/promise-spawn": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "licensee": "^8.2.0", "nock": "^13.2.4", - "npm-packlist": "^7.0.0", + "npm-packlist": "^7.0.1", "spawk": "^1.7.1", "tap": "^16.0.1" }, @@ -183,47 +178,39 @@ } }, "docs": { + "name": "@npmcli/docs", "version": "1.0.0", "license": "ISC", "dependencies": { + "@isaacs/string-locale-compare": "^1.1.0", "@mdx-js/mdx": "^1.6.22", "cmark-gfm": "^0.9.0", - "jsdom": "^18.1.0", + "front-matter": "^4.0.2", + "ignore-walk": "^6.0.0", + "jsdom": "^20.0.1", "marked-man": "^0.7.0", "mkdirp": "^1.0.4", - "yaml": "^1.10.2" + "yaml": "^2.1.3" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/fs": "^2.1.0", - "@npmcli/promise-spawn": "^3.0.0", - "@npmcli/template-oss": "4.5.0", - "tap": "^16.0.1", - "which": "^2.0.2" + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", + "tap": "^16.0.1" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@actions/core": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz", - "integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", + "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", "dev": true, "dependencies": { "@actions/http-client": "^2.0.1", "uuid": "^8.3.2" } }, - "node_modules/@actions/core/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/@actions/http-client": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", @@ -233,36 +220,57 @@ "tunnel": "^0.0.6" } }, + "node_modules/@ampproject/remapping": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "dependencies": { + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@babel/code-frame": { - "version": "7.16.7", - "license": "MIT", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", "dependencies": { - "@babel/highlight": "^7.16.7" + "@babel/highlight": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/compat-data": { + "version": "7.19.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.4.tgz", + "integrity": "sha512-CHIGpJcUQ5lU9KrPHTjBMhVwQG6CQjxfg36fGXl3qk/Gik1WwWachaXFuo0uCWJT/mStOKtcbFJCaVLihC1CMw==", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/core": { - "version": "7.12.9", - "license": "MIT", + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.3.tgz", + "integrity": "sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==", "dependencies": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.12.5", - "@babel/helper-module-transforms": "^7.12.1", - "@babel/helpers": "^7.12.5", - "@babel/parser": "^7.12.7", - "@babel/template": "^7.12.7", - "@babel/traverse": "^7.12.9", - "@babel/types": "^7.12.7", + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.3", + "@babel/helper-compilation-targets": "^7.19.3", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helpers": "^7.19.0", + "@babel/parser": "^7.19.3", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.3", + "@babel/types": "^7.19.3", "convert-source-map": "^1.7.0", "debug": "^4.1.0", - "gensync": "^1.0.0-beta.1", - "json5": "^2.1.2", - "lodash": "^4.17.19", - "resolve": "^1.3.2", - "semver": "^5.4.1", - "source-map": "^0.5.0" + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.1", + "semver": "^6.3.0" }, "engines": { "node": ">=6.9.0" @@ -273,144 +281,197 @@ } }, "node_modules/@babel/core/node_modules/semver": { - "version": "5.7.1", - "license": "ISC", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "bin": { - "semver": "bin/semver" + "semver": "bin/semver.js" } }, "node_modules/@babel/generator": { - "version": "7.17.7", - "license": "MIT", + "version": "7.19.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.5.tgz", + "integrity": "sha512-DxbNz9Lz4aMZ99qPpO1raTbcrI1ZeYh+9NR9qhfkQIbFtVEqotHojEBxHzmxhVONkGt6VyrqVQcgpefMy9pqcg==", "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" + "@babel/types": "^7.19.4", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.16.7", - "license": "MIT", + "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", "dependencies": { - "@babel/types": "^7.16.7" + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" }, "engines": { - "node": ">=6.9.0" + "node": ">=6.0.0" } }, - "node_modules/@babel/helper-function-name": { - "version": "7.16.7", - "license": "MIT", + "node_modules/@babel/helper-compilation-targets": { + "version": "7.19.3", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz", + "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==", "dependencies": { - "@babel/helper-get-function-arity": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/compat-data": "^7.19.3", + "@babel/helper-validator-option": "^7.18.6", + "browserslist": "^4.21.3", + "semver": "^6.3.0" }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-get-function-arity": { - "version": "7.16.7", - "license": "MIT", + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", "dependencies": { - "@babel/types": "^7.16.7" + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.16.7", - "license": "MIT", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.16.7", - "license": "MIT", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.17.7", - "license": "MIT", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", + "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", "dependencies": { - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-simple-access": "^7.17.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/helper-validator-identifier": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0" + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.18.6", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.16.7", - "license": "MIT", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", + "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.17.7", - "license": "MIT", + "version": "7.19.4", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.19.4.tgz", + "integrity": "sha512-f9Xq6WqBFqaDfbCzn2w85hwklswz5qsKlh7f08w4Y9yhJHpnNC0QemtSkK5YyOY8kPGvyiwdzZksGUhnGdaUIg==", "dependencies": { - "@babel/types": "^7.17.0" + "@babel/types": "^7.19.4" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.16.7", - "license": "MIT", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/helper-string-parser": { + "version": "7.19.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", + "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.16.7", - "license": "MIT", + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", + "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.17.8", - "license": "MIT", + "version": "7.19.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.4.tgz", + "integrity": "sha512-G+z3aOx2nfDHwX/kyVii5fJq+bgscg89/dJNWpYeKeBv3v9xX8EIabmx1k6u9LS04H7nROFVRVK+e3k0VHp+sw==", "dependencies": { - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0" + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.4", + "@babel/types": "^7.19.4" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.16.10", - "license": "MIT", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-validator-identifier": "^7.18.6", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, @@ -420,7 +481,8 @@ }, "node_modules/@babel/highlight/node_modules/ansi-styles": { "version": "3.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dependencies": { "color-convert": "^1.9.0" }, @@ -430,7 +492,8 @@ }, "node_modules/@babel/highlight/node_modules/chalk": { "version": "2.4.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -442,32 +505,37 @@ }, "node_modules/@babel/highlight/node_modules/color-convert": { "version": "1.9.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dependencies": { "color-name": "1.1.3" } }, "node_modules/@babel/highlight/node_modules/color-name": { "version": "1.1.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, "node_modules/@babel/highlight/node_modules/escape-string-regexp": { "version": "1.0.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "engines": { "node": ">=0.8.0" } }, "node_modules/@babel/highlight/node_modules/has-flag": { "version": "3.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "engines": { "node": ">=4" } }, "node_modules/@babel/highlight/node_modules/supports-color": { "version": "5.5.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dependencies": { "has-flag": "^3.0.0" }, @@ -476,8 +544,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.17.8", - "license": "MIT", + "version": "7.19.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.4.tgz", + "integrity": "sha512-qpVT7gtuOLjWeDTKLkJ6sryqLliBaFpAtGeqw5cs5giLldvh+Ch0plqnUMKoVAUS6ZEueQQiZV+p5pxtPitEsA==", "bin": { "parser": "bin/babel-parser.js" }, @@ -487,7 +556,8 @@ }, "node_modules/@babel/plugin-proposal-object-rest-spread": { "version": "7.12.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz", + "integrity": "sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA==", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-object-rest-spread": "^7.8.0", @@ -499,7 +569,8 @@ }, "node_modules/@babel/plugin-syntax-jsx": { "version": "7.12.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz", + "integrity": "sha512-1yRi7yAtB0ETgxdY9ti/p2TivUxJkTdhu/ZbF9MshVGqOx1TdB3b7xCXs49Fupgg50N45KcAsRP/ZqWjs9SRjg==", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -509,7 +580,8 @@ }, "node_modules/@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -518,39 +590,45 @@ } }, "node_modules/@babel/plugin-transform-parameters": { - "version": "7.14.2", - "license": "MIT", + "version": "7.18.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.8.tgz", + "integrity": "sha512-ivfbE3X2Ss+Fj8nnXvKJS6sjRG4gzwPMsP+taZC+ZzEGjAYlvENixmt1sZ5Ca6tWls+BlKSGKPJ6OOXvXCbkFg==", "dependencies": { - "@babel/helper-plugin-utils": "^7.13.0" + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "node_modules/@babel/template": { - "version": "7.16.7", - "license": "MIT", + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", + "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.10", + "@babel/types": "^7.18.10" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.17.3", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", + "version": "7.19.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.4.tgz", + "integrity": "sha512-w3K1i+V5u2aJUOXBFFC5pveFLmtq1s3qcdDNC2qRI6WPBQIDaKFqXxDEqDO/h1dQ3HjsZoZMyIy6jGLq0xtw+g==", + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.4", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.19.4", + "@babel/types": "^7.19.4", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -558,11 +636,21 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/types": { - "version": "7.17.0", - "license": "MIT", + "version": "7.19.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.4.tgz", + "integrity": "sha512-M5LK7nAeS6+9j7hAq+b3fQs+pNfUtTGq+yFFfHnauFA8zQtLRfmuipmsKDKKLuyG+wC8ABW43A153YNawNTEtw==", "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-string-parser": "^7.19.4", + "@babel/helper-validator-identifier": "^7.19.1", "to-fast-properties": "^2.0.0" }, "engines": { @@ -571,14 +659,14 @@ }, "node_modules/@blueoak/list": { "version": "2.0.0", - "dev": true, - "license": "CC0-1.0" + "resolved": "https://registry.npmjs.org/@blueoak/list/-/list-2.0.0.tgz", + "integrity": "sha512-yQ6/CTy6DYvmJOAIw/BJjKeNG2ZyF8uxgTN8Yvcv4L9YavoVp9xUgmoVUKN5l24NGPDQpswavNanHOqB00ZNXg==", + "dev": true }, "node_modules/@colors/colors": { "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", - "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", "inBundle": true, + "license": "MIT", "optional": true, "engines": { "node": ">=0.1.90" @@ -608,51 +696,6 @@ "node": ">=v14" } }, - "node_modules/@commitlint/cli/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@commitlint/cli/node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/@commitlint/cli/node_modules/yargs": { - "version": "17.5.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", - "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@commitlint/cli/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, "node_modules/@commitlint/config-conventional": { "version": "17.1.0", "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-17.1.0.tgz", @@ -678,28 +721,6 @@ "node": ">=v14" } }, - "node_modules/@commitlint/config-validator/node_modules/ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/@commitlint/config-validator/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, "node_modules/@commitlint/ensure": { "version": "17.0.0", "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-17.0.0.tgz", @@ -813,15 +834,6 @@ "node": ">=v14" } }, - "node_modules/@commitlint/load/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/@commitlint/message": { "version": "17.0.0", "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-17.0.0.tgz", @@ -878,19 +890,10 @@ "node": ">=v14" } }, - "node_modules/@commitlint/resolve-extends/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@commitlint/rules": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-17.0.0.tgz", - "integrity": "sha512-45nIy3dERKXWpnwX9HeBzK5SepHwlDxdGBfmedXhL30fmFCkJOdxHyOJsh0+B0RaVsLGT01NELpfzJUmtpDwdQ==", + "node_modules/@commitlint/rules": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-17.0.0.tgz", + "integrity": "sha512-45nIy3dERKXWpnwX9HeBzK5SepHwlDxdGBfmedXhL30fmFCkJOdxHyOJsh0+B0RaVsLGT01NELpfzJUmtpDwdQ==", "dev": true, "dependencies": { "@commitlint/ensure": "^17.0.0", @@ -924,76 +927,6 @@ "node": ">=v14" } }, - "node_modules/@commitlint/top-level/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@commitlint/top-level/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@commitlint/top-level/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@commitlint/top-level/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@commitlint/top-level/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/@commitlint/types": { "version": "17.0.0", "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-17.0.0.tgz", @@ -1028,16 +961,26 @@ "node": ">=12" } }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@eslint/eslintrc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", - "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", + "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", "dev": true, "peer": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.3.2", + "espree": "^9.4.0", "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -1047,14 +990,27 @@ }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, - "peer": true + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } }, "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { "version": "1.1.11", @@ -1067,34 +1023,12 @@ "concat-map": "0.0.1" } }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", - "dev": true, - "peer": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true, - "peer": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } + "peer": true }, "node_modules/@eslint/eslintrc/node_modules/minimatch": { "version": "3.1.2", @@ -1109,85 +1043,31 @@ "node": "*" } }, - "node_modules/@eslint/eslintrc/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@gar/promisify": { "version": "1.1.3", - "inBundle": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", + "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", + "inBundle": true }, "node_modules/@google-automations/git-file-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@google-automations/git-file-utils/-/git-file-utils-1.1.0.tgz", - "integrity": "sha512-MfrDlDLWbisVRdVCqn3Vy5uaJWZCB3v1zyWwTIYXWmHp1WSDUX4vP+T8d/mULvegDOnp/hLFOeOJC1jQObd2xw==", - "dev": true, - "dependencies": { - "@octokit/rest": "19.0.3" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/@google-automations/git-file-utils/node_modules/@octokit/openapi-types": { - "version": "12.11.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", - "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==", - "dev": true - }, - "node_modules/@google-automations/git-file-utils/node_modules/@octokit/plugin-paginate-rest": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-3.1.0.tgz", - "integrity": "sha512-+cfc40pMzWcLkoDcLb1KXqjX0jTGYXjKuQdFQDc6UAknISJHnZTiBqld6HDwRJvD4DsouDKrWXNbNV0lE/3AXA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@google-automations/git-file-utils/-/git-file-utils-1.2.1.tgz", + "integrity": "sha512-gI3YQg5tYHPEc1aeOuNoCSOQEptbRH7+vc2rxLaq5z854667ev4Mw19mCyi/fh5/DDzomKh3569SshD0dgtnDA==", "dev": true, "dependencies": { - "@octokit/types": "^6.41.0" + "@octokit/rest": "19.0.4", + "@octokit/types": "^7.5.1", + "minimatch": "^5.1.0" }, "engines": { "node": ">= 14" - }, - "peerDependencies": { - "@octokit/core": ">=4" - } - }, - "node_modules/@google-automations/git-file-utils/node_modules/@octokit/rest": { - "version": "19.0.3", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-19.0.3.tgz", - "integrity": "sha512-5arkTsnnRT7/sbI4fqgSJ35KiFaN7zQm0uQiQtivNQLI8RQx8EHwJCajcTUwmaCMNDg7tdCvqAnc7uvHHPxrtQ==", - "dev": true, - "dependencies": { - "@octokit/core": "^4.0.0", - "@octokit/plugin-paginate-rest": "^3.0.0", - "@octokit/plugin-request-log": "^1.0.4", - "@octokit/plugin-rest-endpoint-methods": "^6.0.0" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/@google-automations/git-file-utils/node_modules/@octokit/types": { - "version": "6.41.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", - "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", - "dev": true, - "dependencies": { - "@octokit/openapi-types": "^12.11.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.9.5", + "version": "0.10.7", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.7.tgz", + "integrity": "sha512-MDl6D6sBsaV452/QSdX+4CXIjZhIcI0PELsxUjk4U828yd58vk3bTIvk/6w5FY+4hIy9sLW0sfrV7K7Kc++j/w==", "dev": true, - "license": "Apache-2.0", "peer": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", @@ -1222,10 +1102,25 @@ "node": "*" } }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true, - "license": "BSD-3-Clause", "peer": true }, "node_modules/@iarna/toml": { @@ -1241,8 +1136,9 @@ }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", "dev": true, - "license": "ISC", "dependencies": { "camelcase": "^5.3.1", "find-up": "^4.1.0", @@ -1254,10 +1150,33 @@ "node": ">=8" } }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, - "license": "MIT", "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -1266,10 +1185,24 @@ "node": ">=8" } }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, - "license": "MIT", "dependencies": { "p-locate": "^4.1.0" }, @@ -1279,8 +1212,9 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, - "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, @@ -1293,8 +1227,9 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, - "license": "MIT", "dependencies": { "p-limit": "^2.2.0" }, @@ -1302,43 +1237,39 @@ "node": ">=8" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-try": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { - "version": "5.0.0", + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "dev": true, - "license": "MIT", + "node_modules/@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "dependencies": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + }, "engines": { - "node": ">=8" + "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "engines": { "node": ">=6.0.0" } @@ -1346,17 +1277,15 @@ "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.14", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, + "version": "0.3.16", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.16.tgz", + "integrity": "sha512-LCQ+NeThyJ4k1W2d+vIKdxuSt9R3pQSZ4P92m7EakaYuXcVWbHuT5bjNcqLd4Rdgi6xYWYDvBJZJLZSLanjDcA==", "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" } }, "node_modules/@lerna/child-process": { @@ -2095,7 +2024,8 @@ }, "node_modules/@mdx-js/mdx": { "version": "1.6.22", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-1.6.22.tgz", + "integrity": "sha512-AMxuLxPz2j5/6TpF/XSdKpQP1NlG0z11dFOlq+2IP/lSgl11GY8ji6S/rgsViN/L0BDvHvUMruRb7ub+24LUYA==", "dependencies": { "@babel/core": "7.12.9", "@babel/plugin-syntax-jsx": "7.12.1", @@ -2122,61 +2052,148 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/@mdx-js/mdx/node_modules/@babel/core": { + "version": "7.12.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz", + "integrity": "sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ==", + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.5", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.5", + "@babel/parser": "^7.12.7", + "@babel/template": "^7.12.7", + "@babel/traverse": "^7.12.9", + "@babel/types": "^7.12.7", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@mdx-js/mdx/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@mdx-js/mdx/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@mdx-js/util": { "version": "1.6.22", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@mdx-js/util/-/util-1.6.22.tgz", + "integrity": "sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA==", "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" } }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "peer": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "peer": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@npmcli/arborist": { "resolved": "workspaces/arborist", "link": true }, "node_modules/@npmcli/ci-detect": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/ci-detect/-/ci-detect-3.0.0.tgz", - "integrity": "sha512-d6eGMbZ2j6n2b1KpGNbTsKNpCe3NU7xe7stzeXu6BJyLbMZ/FGHnSuwozcHEckGRKF06RO+Z8FpHg7nAbBmuUw==", "inBundle": true, + "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/config": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-4.2.2.tgz", - "integrity": "sha512-5GNcLd+0c4bYBnFop53+26CO5GQP0R9YcxlernohpHDWdIgzUg9I0+GEMk3sNHnLntATVU39d283A4OO+W402w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-6.0.1.tgz", + "integrity": "sha512-f8PGjhM7kKbMfEMmE8n1dW+m/7XFuvatLXqItO89ZKJwYl9Zs5d7CmsIe8n8i+4YmGYL3HqR26/mVb4oK2b6Zw==", "inBundle": true, "dependencies": { - "@npmcli/map-workspaces": "^2.0.2", + "@npmcli/map-workspaces": "^3.0.0", "ini": "^3.0.0", - "mkdirp-infer-owner": "^2.0.0", "nopt": "^6.0.0", - "proc-log": "^2.0.0", - "read-package-json-fast": "^2.0.3", + "proc-log": "^3.0.0", + "read-package-json-fast": "^3.0.0", "semver": "^7.3.5", "walk-up-path": "^1.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/disparity-colors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/disparity-colors/-/disparity-colors-2.0.0.tgz", - "integrity": "sha512-FFXGrIjhvd2qSZ8iS0yDvbI7nbjdyT2VNO7wotosjYZM2p2r8PN3B7Om3M5NO9KqW/OVzfzLB3L0V5Vo5QXC7A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/disparity-colors/-/disparity-colors-3.0.0.tgz", + "integrity": "sha512-5R/z157/f20Fi0Ou4ZttL51V0xz0EdPEOauFtPCEYOLInDBRCj1/TxOJ5aGTrtShxEshN2d+hXb9ZKSi5RLBcg==", "dependencies": { "ansi-styles": "^4.3.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/@npmcli/docs": { + "resolved": "docs", + "link": true + }, "node_modules/@npmcli/eslint-config": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@npmcli/eslint-config/-/eslint-config-3.1.0.tgz", - "integrity": "sha512-t+FYG0KSpEAfz7CUHW/S2V/01bRuFCXmBxRBrhV9mp01qFXtrKa3IgBhmxM0uQ18v2YBT4+5r4P/Xn3mxB33IA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/eslint-config/-/eslint-config-4.0.0.tgz", + "integrity": "sha512-k89vNnv2BcTRRHZhVz18p4S5bLSEyFQAZ+yiPWIiY3CjB8jq+5uyyVZJpt2yScMi57ho9mjZMjsvu1dUIeEdZw==", "dev": true, "dependencies": { "which": "^2.0.2" @@ -2185,7 +2202,7 @@ "lint": "bin/index.js" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "peerDependencies": { "eslint": "^8.13.0", @@ -2195,85 +2212,76 @@ } }, "node_modules/@npmcli/fs": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", - "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.0.0.tgz", + "integrity": "sha512-GdeVD+dnBxzMslTFvnctLX5yIqV4ZNZBWNbo1OejQ++bZpnFNQ1AjOn9Sboi+LzheQbCBU1ts1mhEVduHrcZOQ==", "inBundle": true, "dependencies": { - "@gar/promisify": "^1.1.3", "semver": "^7.3.5" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/git": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-3.0.2.tgz", - "integrity": "sha512-CAcd08y3DWBJqJDpfuVL0uijlq5oaXaOJEKHKc4wqrjd00gkvTZB+nFuLn+doOOKddaQS9JfqtNoFCO2LCvA3w==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-4.0.1.tgz", + "integrity": "sha512-sfaCFyZO7Zsxia2TNHW8TeHFIUnK63896EZFA5K0vCReOMFi9aELB5RZyFveRLaBE/pT1BS6RxbTWZGjulNgSg==", "inBundle": true, "dependencies": { - "@npmcli/promise-spawn": "^3.0.0", + "@npmcli/promise-spawn": "^4.0.0", "lru-cache": "^7.4.4", "mkdirp": "^1.0.4", - "npm-pick-manifest": "^7.0.0", - "proc-log": "^2.0.0", + "npm-pick-manifest": "^8.0.0", + "proc-log": "^3.0.0", "promise-inflight": "^1.0.1", "promise-retry": "^2.0.1", "semver": "^7.3.5", "which": "^2.0.2" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/installed-package-contents": { - "version": "1.0.7", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.0.tgz", + "integrity": "sha512-vpPDeSnqHAXaPK1l6lcIcpgK/aIe63AbNR5vbzOhO6I2rkaFZmviQZ5nAlSpt+vwKrOH1CnplOdoE5/x8FWtNA==", "inBundle": true, - "license": "ISC", "dependencies": { - "npm-bundled": "^1.1.1", - "npm-normalize-package-bin": "^1.0.1" + "npm-bundled": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" }, "bin": { "installed-package-contents": "index.js" }, "engines": { - "node": ">= 10" - } - }, - "node_modules/@npmcli/installed-package-contents/node_modules/npm-bundled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", - "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", - "inBundle": true, - "dependencies": { - "npm-normalize-package-bin": "^1.0.1" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/map-workspaces": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@npmcli/map-workspaces/-/map-workspaces-2.0.4.tgz", - "integrity": "sha512-bMo0aAfwhVwqoVM5UzX1DJnlvVvzDCHae821jv48L1EsrYwfOZChlqWYXEtto/+BkBXetPbEWgau++/brh4oVg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/map-workspaces/-/map-workspaces-3.0.0.tgz", + "integrity": "sha512-aaEDwQ+fUH80iNYSDAcKv9lxIFWsgGkLjIPZENyep75hKeAk2CfSbCAZ6IHDDrVlNybvvNmlFjPap6GdTz9cCw==", "inBundle": true, "dependencies": { "@npmcli/name-from-folder": "^1.0.1", "glob": "^8.0.1", "minimatch": "^5.0.1", - "read-package-json-fast": "^2.0.3" + "read-package-json-fast": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/metavuln-calculator": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/metavuln-calculator/-/metavuln-calculator-4.0.0.tgz", - "integrity": "sha512-RHNlpbXW0onc8inOANEC55m4zjRbhw11OwAof967MgzQauLFjoCAANhx3Ugvse/mXglb48uS3Jy+XjbYPOuqsg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/metavuln-calculator/-/metavuln-calculator-5.0.0.tgz", + "integrity": "sha512-BBFQx4M12wiEuVwCgtX/Depx0B/+NHMwDWOlXT41/Pdy5W/1Fenk+hibUlMSrFWwASbX+fY90UbILAEIYH02/A==", "dependencies": { - "cacache": "^16.0.0", - "json-parse-even-better-errors": "^2.3.1", - "pacote": "^14.0.0", + "cacache": "^17.0.0", + "json-parse-even-better-errors": "^3.0.0", + "pacote": "^15.0.0", "semver": "^7.3.5" }, "engines": { @@ -2281,16 +2289,16 @@ } }, "node_modules/@npmcli/move-file": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", - "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-3.0.0.tgz", + "integrity": "sha512-mOUBUIXsqAQBfn87vGIjBAve6JmD9PkP9Vdq2SayDqQh2Ol60hnXaBSvT4V6IQiho1otw6SipnVV1fulvOiyKQ==", "inBundle": true, "dependencies": { "mkdirp": "^1.0.4", "rimraf": "^3.0.2" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/name-from-folder": { @@ -2299,71 +2307,69 @@ "license": "ISC" }, "node_modules/@npmcli/node-gyp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-2.0.0.tgz", - "integrity": "sha512-doNI35wIe3bBaEgrlPfdJPaCpUR89pJWep4Hq3aRdh6gKazIVWfs0jHttvSSoq47ZXgC7h73kDsUl8AoIQUB+A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz", + "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==", "inBundle": true, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/package-json": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-2.0.0.tgz", - "integrity": "sha512-42jnZ6yl16GzjWSH7vtrmWyJDGVa/LXPdpN2rcUWolFjc9ON2N3uz0qdBbQACfmhuJZ2lbKYtmK5qx68ZPLHMA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-3.0.0.tgz", + "integrity": "sha512-NnuPuM97xfiCpbTEJYtEuKz6CFbpUHtaT0+5via5pQeI25omvQDFbp1GcGJ/c4zvL/WX0qbde6YiLgfZbWFgvg==", "inBundle": true, "dependencies": { - "json-parse-even-better-errors": "^2.3.1" + "json-parse-even-better-errors": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/promise-spawn": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-3.0.0.tgz", - "integrity": "sha512-s9SgS+p3a9Eohe68cSI3fi+hpcZUmXq5P7w0kMlAsWVtR7XbK3ptkZqKT2cK1zLDObJ3sR+8P59sJE0w/KTL1g==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-4.0.0.tgz", + "integrity": "sha512-LM/GRZSwkxar1jgd58yW5WspFWrFefh8a/KVy+sbOMa0pCwqlXWxXEjQRQzbtWExyhwPb2XSK/4mJnLeiVOYng==", "inBundle": true, "dependencies": { "infer-owner": "^1.0.4" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/query": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/query/-/query-2.0.0.tgz", - "integrity": "sha512-ef3fUALbojBvtCi6wpogwnrtChBcK8Pdso5Vbz2EU0cud7VW1jcMGqwSNeSMU8V4cjpqVgudKQ+dosKO7N903g==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/query/-/query-3.0.0.tgz", + "integrity": "sha512-MFNDSJNgsLZIEBVZ0Q9w9K7o07j5N4o4yjtdz2uEpuCZlXGMuPENiRaFYk0vRqAA64qVuUQwC05g27fRtfUgnA==", "dependencies": { - "npm-package-arg": "^9.1.0", - "postcss-selector-parser": "^6.0.10", - "semver": "^7.3.7" + "postcss-selector-parser": "^6.0.10" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/run-script": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-4.2.1.tgz", - "integrity": "sha512-7dqywvVudPSrRCW5nTHpHgeWnbBtz8cFkOuKrecm6ih+oO9ciydhWt6OF7HlqupRRmB8Q/gECVdB9LMfToJbRg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-5.0.0.tgz", + "integrity": "sha512-AuqcoTOt7v4D2JqC7mCa+eUQHb64vWbwyu9o1hoJiq2kfZNwCB71f0s7tvUw+v+1B5XMdqcr98aGzjKIg7s6Vw==", "inBundle": true, "dependencies": { - "@npmcli/node-gyp": "^2.0.0", - "@npmcli/promise-spawn": "^3.0.0", + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/promise-spawn": "^4.0.0", "node-gyp": "^9.0.0", - "read-package-json-fast": "^2.0.3", + "read-package-json-fast": "^3.0.0", "which": "^2.0.2" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/template-oss": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/@npmcli/template-oss/-/template-oss-4.5.0.tgz", - "integrity": "sha512-5Z55OSSKiD1r3S7Q0Q8w8PPw3q+tvmj9RPRixyy1e4dIqiyKgUwDUNUVlngjDG2xzykAlZWW2EKudr8d9Zn6Lg==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@npmcli/template-oss/-/template-oss-4.6.2.tgz", + "integrity": "sha512-DNFvLfh10McWruYmvulHFC/RjGZ/frFpecl0fBPPF+B3qvJn6jcKRt8///IWl+D+KS/aQKKx9o7bqtQWUjQ9ug==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -2371,22 +2377,21 @@ "@commitlint/cli": "^17.1.1", "@commitlint/config-conventional": "^17.1.0", "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/fs": "^2.0.1", - "@npmcli/git": "^3.0.0", - "@npmcli/map-workspaces": "^2.0.2", - "@npmcli/package-json": "^2.0.0", + "@npmcli/git": "^4.0.0", + "@npmcli/map-workspaces": "^3.0.0", + "@npmcli/package-json": "^3.0.0", "@octokit/rest": "^19.0.4", "diff": "^5.0.0", "glob": "^8.0.1", "handlebars": "^4.7.7", - "hosted-git-info": "^5.0.0", - "json-parse-even-better-errors": "^2.3.1", + "hosted-git-info": "^6.0.0", + "json-parse-even-better-errors": "^3.0.0", "just-deep-map-values": "^1.1.1", "just-diff": "^5.0.1", "lodash": "^4.17.21", - "npm-package-arg": "^9.0.1", - "proc-log": "^2.0.0", - "release-please": "npm:@npmcli/release-please@^14.2.5", + "npm-package-arg": "^10.0.0", + "proc-log": "^3.0.0", + "release-please": "npm:@npmcli/release-please@^14.2.6", "semver": "^7.3.5", "yaml": "^2.1.1" }, @@ -2400,15 +2405,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@npmcli/template-oss/node_modules/yaml": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.1.tgz", - "integrity": "sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==", - "dev": true, - "engines": { - "node": ">= 14" - } - }, "node_modules/@octokit/auth-token": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.1.tgz", @@ -2440,9 +2436,9 @@ } }, "node_modules/@octokit/endpoint": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.1.tgz", - "integrity": "sha512-/wTXAJwt0HzJ2IeE4kQXO+mBScfzyCkI0hMtkIaqyXd9zg76OpOfNQfHL9FlaxAV2RsNiOXZibVWloy8EexENg==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.2.tgz", + "integrity": "sha512-8/AUACfE9vpRpehE6ZLfEtzkibe5nfsSwFZVMsG8qabqRt1M81qZYUFRZa1B8w8lP6cdfDJfRq9HWS+MbmR7tw==", "dev": true, "dependencies": { "@octokit/types": "^7.0.0", @@ -2468,18 +2464,18 @@ } }, "node_modules/@octokit/openapi-types": { - "version": "13.6.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-13.6.0.tgz", - "integrity": "sha512-bxftLwoZ2J6zsU1rzRvk0O32j7lVB0NWWn+P5CDHn9zPzytasR3hdAeXlTngRDkqv1LyEeuy5psVnDkmOSwrcQ==", + "version": "13.13.1", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-13.13.1.tgz", + "integrity": "sha512-4EuKSk3N95UBWFau3Bz9b3pheQ8jQYbKmBL5+GSuY8YDPDwu03J4BjI+66yNi8aaX/3h1qDpb0mbBkLdr+cfGQ==", "dev": true }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-4.2.0.tgz", - "integrity": "sha512-8otLCIK9esfmOCY14CBnG/xPqv0paf14rc+s9tHpbOpeFwrv5CnECKW1qdqMAT60ngAa9eB1bKQ+l2YCpi0HPQ==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-4.3.1.tgz", + "integrity": "sha512-h8KKxESmSFTcXX409CAxlaOYscEDvN2KGQRsLCGT1NSqRW+D6EXLVQ8vuHhFznS9MuH9QYw1GfsUN30bg8hjVA==", "dev": true, "dependencies": { - "@octokit/types": "^7.2.0" + "@octokit/types": "^7.5.0" }, "engines": { "node": ">= 14" @@ -2498,12 +2494,12 @@ } }, "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-6.4.0.tgz", - "integrity": "sha512-YP4eUqZ6vORy/eZOTdil1ZSrMt0kv7i/CVw+HhC2C0yJN+IqTc/rot957JQ7JfyeJD6HZOjLg6Jp1o9cPhI9KA==", + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-6.6.2.tgz", + "integrity": "sha512-n9dL5KMpz9qVFSNdcVWC8ZPbl68QbTk7+CMPXCXqaMZOLn1n1YuoSFFCy84Ge0fx333fUqpnBHv8BFjwGtUQkA==", "dev": true, "dependencies": { - "@octokit/types": "^7.2.0", + "@octokit/types": "^7.5.0", "deprecation": "^2.3.1" }, "engines": { @@ -2560,12 +2556,12 @@ } }, "node_modules/@octokit/types": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-7.2.0.tgz", - "integrity": "sha512-pYQ/a1U6mHptwhGyp6SvsiM4bWP2s3V95olUeTxas85D/2kN78yN5C8cGN+P4LwJSWUqIEyvq0Qn2WUn6NQRjw==", + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-7.5.1.tgz", + "integrity": "sha512-Zk4OUMLCSpXNI8KZZn47lVLJSsgMyCimsWWQI5hyjZg7hdYm0kjotaIkbG0Pp8SfU2CofMBzonboTqvzn3FrJA==", "dev": true, "dependencies": { - "@octokit/openapi-types": "^13.6.0" + "@octokit/openapi-types": "^13.11.0" } }, "node_modules/@tootallnate/once": { @@ -2602,7 +2598,8 @@ }, "node_modules/@types/hast": { "version": "2.3.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.4.tgz", + "integrity": "sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g==", "dependencies": { "@types/unist": "*" } @@ -2616,7 +2613,8 @@ }, "node_modules/@types/mdast": { "version": "3.0.10", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.10.tgz", + "integrity": "sha512-W864tg/Osz1+9f4lrGTZpCSO5/z4608eUp19tbozkq2HJK6i3z1kT0H9tlADXuYIb1YYOBByU4Jsqkk75q48qA==", "dependencies": { "@types/unist": "*" } @@ -2628,9 +2626,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "14.18.26", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.26.tgz", - "integrity": "sha512-0b+utRBSYj8L7XAp0d+DX7lI4cSmowNaaTkk6/1SKzbKkG+doLuPusB9EOvzLJ8ahJSk03bTLIL6cWaEd4dBKA==", + "version": "14.18.32", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.32.tgz", + "integrity": "sha512-Y6S38pFr04yb13qqHf8uk1nHE3lXgQ30WZbv1mLliV9pt0NjvqdWttLcrOYLnXbOafknVYRHZGoMSpR9UwfYow==", "dev": true }, "node_modules/@types/normalize-package-data": { @@ -2653,11 +2651,13 @@ }, "node_modules/@types/parse5": { "version": "5.0.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-5.0.3.tgz", + "integrity": "sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw==" }, "node_modules/@types/unist": { "version": "2.0.6", - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", + "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==" }, "node_modules/@types/yargs": { "version": "16.0.4", @@ -2675,26 +2675,40 @@ "dev": true }, "node_modules/@xmldom/xmldom": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.2.tgz", - "integrity": "sha512-+R0juSseERyoPvnBQ/cZih6bpF7IpCXlWbHRoCRzYzqpz6gWHOgf8o4MOEf6KBVuOyqU+gCNLkCWVIJAro8XyQ==", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.3.tgz", + "integrity": "sha512-Lv2vySXypg4nfa51LY1nU8yDAGo/5YwF+EY/rUZgIbfvwVARcd67ttCM8SMsTeJy51YhHYavEq+FS6R0hW9PFQ==", "dev": true, "engines": { "node": ">=10.0.0" } }, "node_modules/abab": { - "version": "2.0.5", - "license": "BSD-3-Clause" + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", + "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==" }, "node_modules/abbrev": { "version": "1.1.1", "inBundle": true, "license": "ISC" }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "inBundle": true, + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, "node_modules/acorn": { - "version": "7.4.1", - "license": "MIT", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", "bin": { "acorn": "bin/acorn" }, @@ -2703,11 +2717,12 @@ } }, "node_modules/acorn-globals": { - "version": "6.0.0", - "license": "MIT", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-7.0.1.tgz", + "integrity": "sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==", "dependencies": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1" + "acorn": "^8.1.0", + "acorn-walk": "^8.0.2" } }, "node_modules/acorn-jsx": { @@ -2721,8 +2736,9 @@ } }, "node_modules/acorn-walk": { - "version": "7.2.0", - "license": "MIT", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", "engines": { "node": ">=0.4.0" } @@ -2764,14 +2780,14 @@ } }, "node_modules/ajv": { - "version": "6.12.6", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", + "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", "dev": true, - "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", "uri-js": "^4.2.2" }, "funding": { @@ -2803,8 +2819,9 @@ }, "node_modules/anymatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dev": true, - "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -2815,8 +2832,9 @@ }, "node_modules/append-transform": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", + "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", "dev": true, - "license": "MIT", "dependencies": { "default-require-extensions": "^3.0.0" }, @@ -2835,35 +2853,74 @@ "license": "MIT" }, "node_modules/are-we-there-yet": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", - "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-4.0.0.tgz", + "integrity": "sha512-nSXlV+u3vtVjRgihdTzbfWYzxPWGo424zPgQbHD0ZqIla3jqYAewDcvee0Ua2hjS5IfTAmjGlx1Jf0PKwjZDEw==", "inBundle": true, "dependencies": { "delegates": "^1.0.0", - "readable-stream": "^3.6.0" + "readable-stream": "^4.1.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/are-we-there-yet/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/are-we-there-yet/node_modules/readable-stream": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.2.0.tgz", + "integrity": "sha512-gJrBHsaI3lgBoGMW/jHZsQ/o/TIWiu5ENCJG1BB7fuCKzpFM8GaS2UoBVt9NO+oI+3FcrBNbUkl3ilDe09aY4A==", + "inBundle": true, + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/arg": { "version": "4.1.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true }, "node_modules/argparse": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "node_modules/array-find-index": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -2894,6 +2951,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/array.prototype.flat": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz", @@ -2913,6 +2980,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/array.prototype.reduce": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/array.prototype.reduce/-/array.prototype.reduce-1.0.4.tgz", + "integrity": "sha512-WnM+AjG/DvLRLo4DDl+r+SvCzYtD2Jd9oeBYMcEaI7t3fFrHY9M53/wdLcTvmZNQ70IU6Htj0emFkZ5TS+lrdw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.2", + "es-array-method-boxes-properly": "^1.0.0", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", @@ -2927,26 +3013,6 @@ "inBundle": true, "license": "MIT" }, - "node_modules/asn1": { - "version": "0.2.4", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "safer-buffer": "~2.1.0" - } - }, - "node_modules/assert-plus": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=0.8" - } - }, "node_modules/async-hook-domain": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/async-hook-domain/-/async-hook-domain-2.0.4.tgz", @@ -2976,28 +3042,13 @@ }, "node_modules/asynckit": { "version": "0.4.0", - "license": "MIT" - }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "dev": true, - "license": "Apache-2.0", - "optional": true, - "peer": true, - "engines": { - "node": "*" - } - }, - "node_modules/aws4": { - "version": "1.11.0", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/babel-plugin-apply-mdx-type-prop": { "version": "1.6.22", - "license": "MIT", + "resolved": "https://registry.npmjs.org/babel-plugin-apply-mdx-type-prop/-/babel-plugin-apply-mdx-type-prop-1.6.22.tgz", + "integrity": "sha512-VefL+8o+F/DfK24lPZMtJctrCVOfgbqLAGZSkxwhazQv4VxPg3Za/i40fu22KR2m8eEda+IfSOlPLUSIiLcnCQ==", "dependencies": { "@babel/helper-plugin-utils": "7.10.4", "@mdx-js/util": "1.6.22" @@ -3012,11 +3063,13 @@ }, "node_modules/babel-plugin-apply-mdx-type-prop/node_modules/@babel/helper-plugin-utils": { "version": "7.10.4", - "license": "MIT" + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==" }, "node_modules/babel-plugin-extract-import-names": { "version": "1.6.22", - "license": "MIT", + "resolved": "https://registry.npmjs.org/babel-plugin-extract-import-names/-/babel-plugin-extract-import-names-1.6.22.tgz", + "integrity": "sha512-yJ9BsJaISua7d8zNT7oRG1ZLBJCIdZ4PZqmH8qa9N5AK01ifk3fnkc98AXhtzE7UkfCsEumvoQWgoYLhOnJ7jQ==", "dependencies": { "@babel/helper-plugin-utils": "7.10.4" }, @@ -3027,11 +3080,13 @@ }, "node_modules/babel-plugin-extract-import-names/node_modules/@babel/helper-plugin-utils": { "version": "7.10.4", - "license": "MIT" + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==" }, "node_modules/bail": { "version": "1.0.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", + "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -3039,12 +3094,13 @@ }, "node_modules/balanced-match": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "inBundle": true + "inBundle": true, + "license": "MIT" }, "node_modules/base64-js": { "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "funding": [ { "type": "github", @@ -3059,55 +3115,36 @@ "url": "https://feross.org/support" } ], - "license": "MIT" - }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "dev": true, - "license": "BSD-3-Clause", - "optional": true, - "peer": true, - "dependencies": { - "tweetnacl": "^0.14.3" - } + "inBundle": true }, "node_modules/before-after-hook": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", - "integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", + "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==", "dev": true }, "node_modules/benchmark": { "version": "2.1.4", + "resolved": "https://registry.npmjs.org/benchmark/-/benchmark-2.1.4.tgz", + "integrity": "sha512-l9MlfN4M1K/H2fbhfMy3B7vJd6AGKJVQn2h6Sg/Yx+KckoUA7ewS5Vv6TjSq18ooE1kS9hhAlQRH3AkXIh/aOQ==", "dev": true, - "license": "MIT", "dependencies": { "lodash": "^4.17.4", "platform": "^1.3.3" } }, "node_modules/bin-links": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/bin-links/-/bin-links-3.0.3.tgz", - "integrity": "sha512-zKdnMPWEdh4F5INR07/eBrodC7QrF5JKvqskjz/ZZRXg5YSAZIbn8zGhbhUrElzHBZ2fvEQdOU59RHcTG3GiwA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bin-links/-/bin-links-4.0.1.tgz", + "integrity": "sha512-bmFEM39CyX336ZGGRsGPlc6jZHriIoHacOQcTt72MktIjpPhZoP4te2jOyUXF3BLILmJ8aNLncoPVeIIFlrDeA==", "dependencies": { - "cmd-shim": "^5.0.0", - "mkdirp-infer-owner": "^2.0.0", - "npm-normalize-package-bin": "^2.0.0", - "read-cmd-shim": "^3.0.0", - "rimraf": "^3.0.0", - "write-file-atomic": "^4.0.0" + "cmd-shim": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "read-cmd-shim": "^4.0.0", + "write-file-atomic": "^5.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/bin-links/node_modules/npm-normalize-package-bin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", - "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/binary-extensions": { @@ -3128,14 +3165,16 @@ }, "node_modules/bindings": { "version": "1.5.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", "dependencies": { "file-uri-to-path": "1.0.0" } }, "node_modules/bl": { "version": "4.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", @@ -3150,17 +3189,17 @@ }, "node_modules/brace-expansion": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "inBundle": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/braces": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, - "license": "MIT", "dependencies": { "fill-range": "^7.0.1" }, @@ -3168,12 +3207,37 @@ "node": ">=8" } }, - "node_modules/browser-process-hrtime": { - "version": "1.0.0", - "license": "BSD-2-Clause" + "node_modules/browserslist": { + "version": "4.21.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", + "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001400", + "electron-to-chromium": "^1.4.251", + "node-releases": "^2.0.6", + "update-browserslist-db": "^1.0.9" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } }, "node_modules/buffer": { "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "funding": [ { "type": "github", @@ -3188,59 +3252,55 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, "node_modules/buffer-from": { - "version": "1.1.1", - "dev": true, - "license": "MIT" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true }, "node_modules/builtins": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", - "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", "inBundle": true, + "license": "MIT", "dependencies": { "semver": "^7.0.0" } }, "node_modules/cacache": { - "version": "16.1.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", - "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.0.1.tgz", + "integrity": "sha512-HRnDSZUXB5hdCQc2wuB8eBQPe1a9PVU2Ow8zMTi82NGJZmBGNTSjEGzetlndKlqpVYBa4esdaJ2LH6/uOB4sFQ==", "inBundle": true, "dependencies": { - "@npmcli/fs": "^2.1.0", - "@npmcli/move-file": "^2.0.0", - "chownr": "^2.0.0", + "@npmcli/fs": "^3.0.0", + "@npmcli/move-file": "^3.0.0", "fs-minipass": "^2.1.0", "glob": "^8.0.1", - "infer-owner": "^1.0.4", "lru-cache": "^7.7.1", "minipass": "^3.1.6", "minipass-collect": "^1.0.2", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", - "mkdirp": "^1.0.4", "p-map": "^4.0.0", "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^9.0.0", + "ssri": "^10.0.0", "tar": "^6.1.11", - "unique-filename": "^2.0.0" + "unique-filename": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/caching-transform": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", + "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", "dev": true, - "license": "MIT", "dependencies": { "hasha": "^5.0.0", "make-dir": "^3.0.0", @@ -3251,18 +3311,11 @@ "node": ">=8" } }, - "node_modules/caching-transform/node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, "node_modules/caching-transform/node_modules/write-file-atomic": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, - "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4", "is-typedarray": "^1.0.0", @@ -3272,8 +3325,9 @@ }, "node_modules/call-bind": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, - "license": "MIT", "dependencies": { "function-bind": "^1.1.1", "get-intrinsic": "^1.0.2" @@ -3284,8 +3338,9 @@ }, "node_modules/caller": { "version": "1.1.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/caller/-/caller-1.1.0.tgz", + "integrity": "sha512-n+21IZC3j06YpCWaxmUy5AnVqhmCIM2bQtqQyy00HJlmStRt6kwDX5F9Z97pqwAB+G/tgSz6q/kUBbNyQzIubw==", + "dev": true }, "node_modules/callsites": { "version": "3.1.0", @@ -3298,15 +3353,17 @@ }, "node_modules/camelcase": { "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/camelcase-css": { "version": "2.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", "engines": { "node": ">= 6" } @@ -3328,16 +3385,25 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/caseless": { - "version": "0.12.0", - "dev": true, - "license": "Apache-2.0", - "optional": true, - "peer": true + "node_modules/caniuse-lite": { + "version": "1.0.30001418", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001418.tgz", + "integrity": "sha512-oIs7+JL3K9JRQ3jPZjlH6qyYDp+nBTCais7hjh0s+fuBwufc7uZ7hPYMXrDOJhV360KGMTcczMRObk0/iMqZRg==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + } + ] }, "node_modules/ccount": { "version": "1.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.1.0.tgz", + "integrity": "sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -3360,7 +3426,8 @@ }, "node_modules/character-entities": { "version": "1.2.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -3368,7 +3435,8 @@ }, "node_modules/character-entities-legacy": { "version": "1.1.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -3376,30 +3444,50 @@ }, "node_modules/character-reference-invalid": { "version": "1.1.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" } }, "node_modules/chokidar": { - "version": "3.5.1", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, - "license": "MIT", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "dependencies": { - "anymatch": "~3.1.1", + "anymatch": "~3.1.2", "braces": "~3.0.2", - "glob-parent": "~5.1.0", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" + "readdirp": "~3.6.0" }, "engines": { "node": ">= 8.10.0" }, "optionalDependencies": { - "fsevents": "~2.3.1" + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" } }, "node_modules/chownr": { @@ -3443,9 +3531,8 @@ }, "node_modules/cli-table3": { "version": "0.6.2", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.2.tgz", - "integrity": "sha512-QyavHCaIC80cMivimWu4aWHilIpiDpfm3hGmqAmXVL1UsnbLuBSMd21hTX6VY4ZSDSM73ESLeF8TOYId3rBTbw==", "inBundle": true, + "license": "MIT", "dependencies": { "string-width": "^4.2.0" }, @@ -3458,8 +3545,9 @@ }, "node_modules/cliui": { "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, - "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -3476,8 +3564,9 @@ }, "node_modules/cmark-gfm": { "version": "0.9.0", + "resolved": "https://registry.npmjs.org/cmark-gfm/-/cmark-gfm-0.9.0.tgz", + "integrity": "sha512-zt++V303Zh+kqS3PERSq1knHT21TpKjbVUF/U63QhLktEH+eeZymv+mHz+6IhcTN5Hy85LdkgdKlroa/Jc6Wvg==", "hasInstallScript": true, - "license": "MIT", "dependencies": { "bindings": "^1.5.0", "node-addon-api": "^3.0.0", @@ -3488,19 +3577,17 @@ } }, "node_modules/cmd-shim": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-5.0.0.tgz", - "integrity": "sha512-qkCtZ59BidfEwHltnJwkyVZn+XQojdAySM1D1gSeh11Z4pW1Kpolkyo53L5noc0nrxmIvyFwTmJRo4xs7FFLPw==", - "dependencies": { - "mkdirp-infer-owner": "^2.0.0" - }, + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-6.0.0.tgz", + "integrity": "sha512-wx+RWLgiSU6SCDzMtxG0Dv1lsuOcEfqq5SbqAViezaJIkR5sbveKzFU31YnWhqrJx3o3Iu3H0Rq8R00OS3oI+Q==", "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/code-point-at": { "version": "1.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", "engines": { "node": ">=0.10.0" } @@ -3568,15 +3655,6 @@ "node": "*" } }, - "node_modules/code-suggester/node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/code-suggester/node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -3595,18 +3673,10 @@ "node": ">=10" } }, - "node_modules/code-suggester/node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/collapse-white-space": { "version": "1.0.6", - "license": "MIT", + "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.6.tgz", + "integrity": "sha512-jEovNnrhMuqyCcjfEJA56v0Xq8SkIoPKDyaHahwo3POf4qcSXqMYuwNcOTzp74vTsR9Tn08z4MxWqAhcekogkQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -3650,7 +3720,8 @@ }, "node_modules/combined-stream": { "version": "1.0.8", - "license": "MIT", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -3660,7 +3731,8 @@ }, "node_modules/comma-separated-tokens": { "version": "1.0.8", - "license": "MIT", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz", + "integrity": "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -3672,8 +3744,9 @@ }, "node_modules/commondir": { "version": "1.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "dev": true }, "node_modules/compare-func": { "version": "2.0.0", @@ -3687,9 +3760,8 @@ }, "node_modules/concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "inBundle": true + "inBundle": true, + "license": "MIT" }, "node_modules/console-control-strings": { "version": "1.1.0", @@ -3789,24 +3861,20 @@ } }, "node_modules/convert-source-map": { - "version": "1.8.0", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.1" - } - }, - "node_modules/convert-source-map/node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" }, "node_modules/core-util-is": { - "version": "1.0.2", - "license": "MIT" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "node_modules/correct-license-metadata": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/correct-license-metadata/-/correct-license-metadata-1.4.0.tgz", + "integrity": "sha512-nvbNpK/aYCbztZWGi9adIPqR+ZcQmZTWNT7eMYLvkaVGroN1nTHiVuuNPl7pK6ZNx1mvDztlRBJtfUdrVwKJ5A==", "dev": true, - "license": "MIT", "dependencies": { "spdx-expression-validate": "^2.0.0" } @@ -3828,9 +3896,9 @@ } }, "node_modules/cosmiconfig-typescript-loader": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.0.0.tgz", - "integrity": "sha512-cVpucSc2Tf+VPwCCR7SZzmQTQkPbkk4O01yXsYqXBIbjE1bhwqSyAgYQkRK1un4i0OPziTleqFhdkmOc4RQ/9g==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.1.1.tgz", + "integrity": "sha512-9DHpa379Gp0o0Zefii35fcmuuin6q92FnLDffzdZ0l9tVd3nEobG3O+MZ06+kuBvFTSVScvNb/oHA13Nd4iipg==", "dev": true, "engines": { "node": ">=12", @@ -3843,24 +3911,13 @@ "typescript": ">=3" } }, - "node_modules/coveralls": { - "version": "3.1.1", + "node_modules/cosmiconfig/node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true, - "license": "BSD-2-Clause", - "optional": true, - "peer": true, - "dependencies": { - "js-yaml": "^3.13.1", - "lcov-parse": "^1.0.0", - "log-driver": "^1.2.7", - "minimist": "^1.2.5", - "request": "^2.88.2" - }, - "bin": { - "coveralls": "bin/coveralls.js" - }, "engines": { - "node": ">=6" + "node": ">= 6" } }, "node_modules/create-require": { @@ -3871,8 +3928,9 @@ }, "node_modules/cross-spawn": { "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, - "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -3912,8 +3970,7 @@ }, "node_modules/cssesc": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "license": "MIT", "bin": { "cssesc": "bin/cssesc" }, @@ -3923,11 +3980,13 @@ }, "node_modules/cssom": { "version": "0.5.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", + "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==" }, "node_modules/cssstyle": { "version": "2.3.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", + "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", "dependencies": { "cssom": "~0.3.6" }, @@ -3937,7 +3996,8 @@ }, "node_modules/cssstyle/node_modules/cssom": { "version": "0.3.8", - "license": "MIT" + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==" }, "node_modules/dargs": { "version": "7.0.0", @@ -3948,26 +4008,45 @@ "node": ">=8" } }, - "node_modules/dashdash": { - "version": "1.14.1", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, + "node_modules/data-urls": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz", + "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==", "dependencies": { - "assert-plus": "^1.0.0" + "abab": "^2.0.6", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^11.0.0" }, "engines": { - "node": ">=0.10" + "node": ">=12" } }, - "node_modules/data-urls": { - "version": "3.0.1", - "license": "MIT", + "node_modules/data-urls/node_modules/tr46": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", "dependencies": { - "abab": "^2.0.3", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^10.0.0" + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/data-urls/node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "engines": { + "node": ">=12" + } + }, + "node_modules/data-urls/node_modules/whatwg-url": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "dependencies": { + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" }, "engines": { "node": ">=12" @@ -4013,8 +4092,9 @@ }, "node_modules/decamelize": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -4042,12 +4122,14 @@ } }, "node_modules/decimal.js": { - "version": "10.3.1", - "license": "MIT" + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.1.tgz", + "integrity": "sha512-F29o+vci4DodHYT9UrR5IEbfBw9pE5eSapIJdTqXK5+6hq+t8VRxwQyKlW2i+KDKFkkJQRvFyI/QXD83h8LyQw==" }, "node_modules/decompress-response": { "version": "4.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", + "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", "dependencies": { "mimic-response": "^2.0.0" }, @@ -4057,32 +4139,30 @@ }, "node_modules/deep-extend": { "version": "0.6.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "engines": { "node": ">=4.0.0" } }, "node_modules/deep-is": { "version": "0.1.4", - "license": "MIT" + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" }, "node_modules/default-require-extensions": { - "version": "3.0.0", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.1.tgz", + "integrity": "sha512-eXTJmRbm2TIt9MgWTsOH1wEuhew6XGZcMeGKCtLedIg/NCsg1iBePXkceTdK4Fii7pzmN9tGsZhKzZ4h7O/fxw==", "dev": true, - "license": "MIT", "dependencies": { "strip-bom": "^4.0.0" }, "engines": { "node": ">=8" - } - }, - "node_modules/default-require-extensions/node_modules/strip-bom": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/defaults": { @@ -4111,7 +4191,8 @@ }, "node_modules/delayed-stream": { "version": "1.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "engines": { "node": ">=0.4.0" } @@ -4137,7 +4218,8 @@ }, "node_modules/detab": { "version": "2.0.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/detab/-/detab-2.0.4.tgz", + "integrity": "sha512-8zdsQA5bIkoRECvCrNKPla84lyoR7DSAyf7p0YgXzBO9PDJx8KntPUay7NS6yp+KdxdVtiE5SpHKtbp2ZQyA9g==", "dependencies": { "repeat-string": "^1.5.4" }, @@ -4157,7 +4239,8 @@ }, "node_modules/detect-libc": { "version": "1.0.3", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", "bin": { "detect-libc": "bin/detect-libc.js" }, @@ -4167,9 +4250,8 @@ }, "node_modules/dezalgo": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz", - "integrity": "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==", "inBundle": true, + "license": "ISC", "dependencies": { "asap": "^2.0.0", "wrappy": "1" @@ -4177,27 +4259,38 @@ }, "node_modules/diff": { "version": "5.1.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", - "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "peer": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/docopt": { "version": "0.6.2", + "resolved": "https://registry.npmjs.org/docopt/-/docopt-0.6.2.tgz", + "integrity": "sha512-NqTbaYeE4gA/wU1hdKFdU+AFahpDOpgGLzHP42k6H6DKExJd0A55KEVWYhL9FEmHmgeLvEU2vuKXDuU+4yToOw==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/docs": { - "resolved": "docs", - "link": true - }, "node_modules/doctrine": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, - "license": "Apache-2.0", "peer": true, "dependencies": { "esutils": "^2.0.2" @@ -4234,7 +4327,8 @@ }, "node_modules/domexception": { "version": "4.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", + "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", "dependencies": { "webidl-conversions": "^7.0.0" }, @@ -4242,6 +4336,14 @@ "node": ">=12" } }, + "node_modules/domexception/node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "engines": { + "node": ">=12" + } + }, "node_modules/domhandler": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", @@ -4289,16 +4391,10 @@ "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", "dev": true }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } + "node_modules/electron-to-chromium": { + "version": "1.4.279", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.279.tgz", + "integrity": "sha512-xs7vEuSZ84+JsHSTFqqG0TE3i8EAivHomRQZhhcRvsmnjsh5C2KdhwNKf4ZRYtzq75wojpFyqb62m32Oam57wA==" }, "node_modules/emoji-regex": { "version": "8.0.0", @@ -4316,7 +4412,8 @@ }, "node_modules/end-of-stream": { "version": "1.4.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dependencies": { "once": "^1.4.0" } @@ -4353,31 +4450,32 @@ } }, "node_modules/es-abstract": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.1.tgz", - "integrity": "sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==", + "version": "1.20.4", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.4.tgz", + "integrity": "sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.1.1", + "get-intrinsic": "^1.1.3", "get-symbol-description": "^1.0.0", "has": "^1.0.3", "has-property-descriptors": "^1.0.0", "has-symbols": "^1.0.3", "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", + "is-callable": "^1.2.7", "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.0", + "object-inspect": "^1.12.2", "object-keys": "^1.1.1", - "object.assign": "^4.1.2", + "object.assign": "^4.1.4", "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", "string.prototype.trimend": "^1.0.5", "string.prototype.trimstart": "^1.0.5", "unbox-primitive": "^1.0.2" @@ -4389,6 +4487,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-array-method-boxes-properly": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", + "dev": true + }, "node_modules/es-shim-unscopables": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", @@ -4401,8 +4505,9 @@ }, "node_modules/es-to-primitive": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, - "license": "MIT", "dependencies": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", @@ -4417,22 +4522,23 @@ }, "node_modules/es6-error": { "version": "4.1.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, "engines": { "node": ">=6" } }, "node_modules/escape-string-regexp": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, - "license": "MIT", "peer": true, "engines": { "node": ">=10" @@ -4442,11 +4548,13 @@ } }, "node_modules/escodegen": { - "version": "2.0.0", - "license": "BSD-2-Clause", + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", + "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", + "dev": true, "dependencies": { "esprima": "^4.0.1", - "estraverse": "^5.2.0", + "estraverse": "^4.2.0", "esutils": "^2.0.2", "optionator": "^0.8.1" }, @@ -4455,15 +4563,39 @@ "esgenerate": "bin/esgenerate.js" }, "engines": { - "node": ">=6.0" + "node": ">=4.0" }, "optionalDependencies": { "source-map": "~0.6.1" } }, + "node_modules/escodegen/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/escodegen/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, "node_modules/escodegen/node_modules/levn": { "version": "0.3.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "dev": true, "dependencies": { "prelude-ls": "~1.1.2", "type-check": "~0.3.2" @@ -4474,7 +4606,9 @@ }, "node_modules/escodegen/node_modules/optionator": { "version": "0.8.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, "dependencies": { "deep-is": "~0.1.3", "fast-levenshtein": "~2.0.6", @@ -4489,21 +4623,18 @@ }, "node_modules/escodegen/node_modules/prelude-ls": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "dev": true, "engines": { "node": ">= 0.8.0" } }, - "node_modules/escodegen/node_modules/source-map": { - "version": "0.6.1", - "license": "BSD-3-Clause", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/escodegen/node_modules/type-check": { "version": "0.3.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "dev": true, "dependencies": { "prelude-ls": "~1.1.2" }, @@ -4512,14 +4643,15 @@ } }, "node_modules/eslint": { - "version": "8.20.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz", - "integrity": "sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA==", + "version": "8.25.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.25.0.tgz", + "integrity": "sha512-DVlJOZ4Pn50zcKW5bYH7GQK/9MsoQG2d5eDH0ebEkE8PbgzTTmtt/VTH9GGJ4BfeZCpBLqFfvsjX35UacUL83A==", "dev": true, "peer": true, "dependencies": { - "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.9.2", + "@eslint/eslintrc": "^1.3.3", + "@humanwhocodes/config-array": "^0.10.5", + "@humanwhocodes/module-importer": "^1.0.1", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -4529,18 +4661,21 @@ "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.2", + "espree": "^9.4.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", + "find-up": "^5.0.0", "glob-parent": "^6.0.1", "globals": "^13.15.0", + "globby": "^11.1.0", + "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", + "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", @@ -4551,8 +4686,7 @@ "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" @@ -4586,17 +4720,21 @@ } }, "node_modules/eslint-module-utils": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz", - "integrity": "sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==", + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz", + "integrity": "sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==", "dev": true, "peer": true, "dependencies": { - "debug": "^3.2.7", - "find-up": "^2.1.0" + "debug": "^3.2.7" }, "engines": { "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } } }, "node_modules/eslint-module-utils/node_modules/debug": { @@ -4611,8 +4749,9 @@ }, "node_modules/eslint-plugin-es": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", + "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", "dev": true, - "license": "MIT", "peer": true, "dependencies": { "eslint-utils": "^2.0.0", @@ -4628,6 +4767,32 @@ "eslint": ">=4.19.1" } }, + "node_modules/eslint-plugin-es/node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "peer": true, + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/eslint-plugin-es/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, "node_modules/eslint-plugin-import": { "version": "2.26.0", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz", @@ -4712,8 +4877,9 @@ }, "node_modules/eslint-plugin-node": { "version": "11.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", + "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", "dev": true, - "license": "MIT", "peer": true, "dependencies": { "eslint-plugin-es": "^3.0.0", @@ -4741,58 +4907,11 @@ "concat-map": "0.0.1" } }, - "node_modules/eslint-plugin-node/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "peer": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/eslint-plugin-node/node_modules/semver": { - "version": "6.3.0", - "dev": true, - "license": "ISC", - "peer": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-plugin-promise": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.0.tgz", - "integrity": "sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw==", - "dev": true, - "peer": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - } - }, - "node_modules/eslint-scope": { - "version": "7.1.1", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint-utils": { + "node_modules/eslint-plugin-node/node_modules/eslint-utils": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", "dev": true, - "license": "MIT", "peer": true, "dependencies": { "eslint-visitor-keys": "^1.1.0" @@ -4804,46 +4923,71 @@ "url": "https://github.com/sponsors/mysticatea" } }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "node_modules/eslint-plugin-node/node_modules/eslint-visitor-keys": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "dev": true, - "license": "Apache-2.0", "peer": true, "engines": { "node": ">=4" } }, - "node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "node_modules/eslint-plugin-node/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "*" } }, - "node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", + "node_modules/eslint-plugin-node/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "license": "Python-2.0", - "peer": true + "peer": true, + "bin": { + "semver": "bin/semver.js" + } }, - "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/eslint-plugin-promise": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.1.tgz", + "integrity": "sha512-uM4Tgo5u3UWQiroOyDEsYcVMOo7re3zmno0IZmB5auxoaQNIceAbXEkSt8RNrKtaYehARHG06pYK6K1JhtP0Zw==", + "dev": true, + "peer": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, "peer": true, "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/eslint/node_modules/eslint-utils": { + "node_modules/eslint-utils": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, - "license": "MIT", "peer": true, "dependencies": { "eslint-visitor-keys": "^2.0.0" @@ -4858,55 +5002,61 @@ "eslint": ">=5" } }, - "node_modules/eslint/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true, - "license": "Apache-2.0", "peer": true, "engines": { "node": ">=10" } }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", + "node_modules/eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true, - "license": "ISC", "peer": true, - "dependencies": { - "is-glob": "^4.0.3" - }, "engines": { - "node": ">=10.13.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/eslint/node_modules/globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "node_modules/eslint/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "peer": true, "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "license": "MIT", "peer": true, "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "peer": true + }, "node_modules/eslint/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -4920,62 +5070,42 @@ "node": "*" } }, - "node_modules/eslint/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/espree": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", - "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", + "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", "dev": true, "peer": true, "dependencies": { - "acorn": "^8.7.1", + "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.3.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/espree/node_modules/acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true, - "peer": true, - "bin": { - "acorn": "bin/acorn" }, - "engines": { - "node": ">=0.4.0" + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/esprima": { - "version": "4.0.1", - "license": "BSD-2-Clause", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz", + "integrity": "sha512-+JpPZam9w5DuJ3Q67SqsMGtiHKENSMRVoxvArfJZK01/BfLEObtZ6orJa/MtoGNR/rfMgp5837T41PAmTwAv/A==", + "dev": true, "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" }, "engines": { - "node": ">=4" + "node": ">=0.4.0" } }, "node_modules/esquery": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, - "license": "BSD-3-Clause", "peer": true, "dependencies": { "estraverse": "^5.1.0" @@ -4986,8 +5116,9 @@ }, "node_modules/esrecurse": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, - "license": "BSD-2-Clause", "peer": true, "dependencies": { "estraverse": "^5.2.0" @@ -4998,28 +5129,49 @@ }, "node_modules/estraverse": { "version": "5.3.0", - "license": "BSD-2-Clause", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "engines": { "node": ">=4.0" } }, "node_modules/esutils": { "version": "2.0.3", - "license": "BSD-2-Clause", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "engines": { "node": ">=0.10.0" } }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "inBundle": true, + "engines": { + "node": ">=6" + } + }, "node_modules/eventemitter3": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", "dev": true }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "inBundle": true, + "engines": { + "node": ">=0.8.x" + } + }, "node_modules/events-to-array": { "version": "1.1.2", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-1.1.2.tgz", + "integrity": "sha512-inRWzRY7nG+aXZxBzEqYKB3HPgwflZRopAjDCHv0whhRx+MTUr1ei0ICZUypdyE0HRm4L2d5VEcIqLD6yl+BFA==", + "dev": true }, "node_modules/execa": { "version": "5.1.1", @@ -5046,45 +5198,80 @@ }, "node_modules/expand-template": { "version": "2.0.3", - "license": "(MIT OR WTFPL)", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", "engines": { "node": ">=6" } }, "node_modules/extend": { "version": "3.0.2", - "license": "MIT" - }, - "node_modules/extsprintf": { - "version": "1.3.0", - "dev": true, - "engines": [ - "node >=0.6.0" - ], - "license": "MIT", - "optional": true, - "peer": true + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, "node_modules/fast-deep-equal": { "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", "dev": true, - "license": "MIT" + "peer": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "peer": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true, - "license": "MIT", "peer": true }, "node_modules/fast-levenshtein": { "version": "2.0.6", - "license": "MIT" + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" }, "node_modules/fastest-levenshtein": { "version": "1.0.12", "inBundle": true, "license": "MIT" }, + "node_modules/fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "peer": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, "node_modules/figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -5111,8 +5298,9 @@ }, "node_modules/file-entry-cache": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, - "license": "MIT", "peer": true, "dependencies": { "flat-cache": "^3.0.4" @@ -5123,12 +5311,14 @@ }, "node_modules/file-uri-to-path": { "version": "1.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" }, "node_modules/fill-range": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, - "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -5138,8 +5328,9 @@ }, "node_modules/find-cache-dir": { "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", "dev": true, - "license": "MIT", "dependencies": { "commondir": "^1.0.1", "make-dir": "^3.0.2", @@ -5152,103 +5343,33 @@ "url": "https://github.com/avajs/find-cache-dir?sponsor=1" } }, - "node_modules/find-cache-dir/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-cache-dir/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-cache-dir/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/find-cache-dir/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-cache-dir/node_modules/p-try": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/find-cache-dir/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/find-cache-dir/node_modules/pkg-dir": { - "version": "4.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, - "peer": true, "dependencies": { - "locate-path": "^2.0.0" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/findit": { "version": "2.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/findit/-/findit-2.0.0.tgz", + "integrity": "sha512-ENZS237/Hr8bjczn5eKuBohLgaD0JyUd0arxretR1f9RO46vZHA1b2y0VorgGV3WaOT3c+78P8h7v4JGJ1i/rg==", + "dev": true }, "node_modules/flat-cache": { "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, - "license": "MIT", "peer": true, "dependencies": { "flatted": "^3.1.0", @@ -5259,44 +5380,17 @@ } }, "node_modules/flatted": { - "version": "3.2.5", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true, - "license": "ISC", "peer": true }, - "node_modules/flow-parser": { - "version": "0.174.1", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/flow-remove-types": { - "version": "2.174.1", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "flow-parser": "^0.174.1", - "pirates": "^3.0.2", - "vlq": "^0.2.1" - }, - "bin": { - "flow-node": "flow-node", - "flow-remove-types": "flow-remove-types" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/foreground-child": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", "dev": true, - "license": "ISC", "dependencies": { "cross-spawn": "^7.0.0", "signal-exit": "^3.0.2" @@ -5305,19 +5399,10 @@ "node": ">=8.0.0" } }, - "node_modules/forever-agent": { - "version": "0.6.1", - "dev": true, - "license": "Apache-2.0", - "optional": true, - "peer": true, - "engines": { - "node": "*" - } - }, "node_modules/form-data": { "version": "4.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -5329,6 +5414,8 @@ }, "node_modules/fromentries": { "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", + "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", "dev": true, "funding": [ { @@ -5343,13 +5430,54 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] + }, + "node_modules/front-matter": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/front-matter/-/front-matter-4.0.2.tgz", + "integrity": "sha512-I8ZuJ/qG92NWX8i5x1Y8qyj3vizhXS31OxjKDu3LKP+7/qBgfIKValiZIEwoVoJKUHlhWtYrktkxV1XsX+pPlg==", + "dependencies": { + "js-yaml": "^3.13.1" + } + }, + "node_modules/front-matter/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/front-matter/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/front-matter/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } }, "node_modules/fs-access": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-2.0.0.tgz", + "integrity": "sha512-Vt45hBKJrYDQeAD9ja43liw8JfK75uB7XexIXWEtDKwFLQNmzmvuulh28hRxexxuFm0zsGGq7nISGQSK6KnGrA==", + "deprecated": "This package is no longer relevant as Node.js 0.12 is unmaintained.", "dev": true, - "license": "MIT", "dependencies": { "null-check": "^1.0.0" }, @@ -5359,12 +5487,14 @@ }, "node_modules/fs-constants": { "version": "1.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" }, "node_modules/fs-exists-cached": { "version": "1.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/fs-exists-cached/-/fs-exists-cached-1.0.0.tgz", + "integrity": "sha512-kSxoARUDn4F2RPXX48UXnaFKwVU7Ivd/6qpzZL29MCDmr9sTvybv4gFCp+qaI4fM9m0z9fgz/yJvi56GAz+BZg==", + "dev": true }, "node_modules/fs-extra": { "version": "10.1.0", @@ -5380,20 +5510,10 @@ "node": ">=12" } }, - "node_modules/fs-extra/node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true, - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/fs-minipass": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", "inBundle": true, + "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -5408,8 +5528,10 @@ }, "node_modules/fsevents": { "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, - "license": "MIT", + "hasInstallScript": true, "optional": true, "os": [ "darwin" @@ -5447,12 +5569,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -5463,9 +5579,10 @@ } }, "node_modules/gauge": { - "version": "4.0.4", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-5.0.0.tgz", + "integrity": "sha512-0s5T5eciEG7Q3ugkxAkFtaDhrrhXsCRivA5y8C9WMHWuI8UlMOJg7+Iwf7Mccii+Dfs3H5jHepU0joPVyQU0Lw==", "inBundle": true, - "license": "ISC", "dependencies": { "aproba": "^1.0.3 || ^2.0.0", "color-support": "^1.1.3", @@ -5477,32 +5594,35 @@ "wide-align": "^1.1.5" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/gensync": { "version": "1.0.0-beta.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "engines": { "node": ">=6.9.0" } }, "node_modules/get-caller-file": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, - "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } }, "node_modules/get-intrinsic": { - "version": "1.1.1", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", "dev": true, - "license": "MIT", "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1" + "has-symbols": "^1.0.3" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5510,8 +5630,9 @@ }, "node_modules/get-package-type": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8.0.0" } @@ -5530,8 +5651,9 @@ }, "node_modules/get-symbol-description": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "get-intrinsic": "^1.1.1" @@ -5543,16 +5665,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/getpass": { - "version": "0.1.7", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "assert-plus": "^1.0.0" - } - }, "node_modules/git-raw-commits": { "version": "2.0.11", "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.11.tgz", @@ -5574,13 +5686,13 @@ }, "node_modules/github-from-package": { "version": "0.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" }, "node_modules/glob": { "version": "8.0.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", - "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", "inBundle": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -5596,14 +5708,16 @@ } }, "node_modules/glob-parent": { - "version": "5.1.2", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, - "license": "ISC", + "peer": true, "dependencies": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" }, "engines": { - "node": ">= 6" + "node": ">=10.13.0" } }, "node_modules/global-dirs": { @@ -5625,17 +5739,53 @@ "dev": true }, "node_modules/globals": { - "version": "11.12.0", - "license": "MIT", + "version": "13.17.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "dev": true, + "peer": true, + "dependencies": { + "type-fest": "^0.20.2" + }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "peer": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/graceful-fs": { "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "inBundle": true + "inBundle": true, + "license": "ISC" + }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true, + "peer": true }, "node_modules/handlebars": { "version": "4.7.7", @@ -5658,39 +5808,6 @@ "uglify-js": "^3.1.4" } }, - "node_modules/handlebars/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/har-schema": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "optional": true, - "peer": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/har-validator": { - "version": "5.1.5", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/hard-rejection": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", @@ -5742,8 +5859,9 @@ }, "node_modules/has-symbols": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -5753,8 +5871,9 @@ }, "node_modules/has-tostringtag": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", "dev": true, - "license": "MIT", "dependencies": { "has-symbols": "^1.0.2" }, @@ -5772,8 +5891,9 @@ }, "node_modules/hasha": { "version": "5.2.2", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", + "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", "dev": true, - "license": "MIT", "dependencies": { "is-stream": "^2.0.0", "type-fest": "^0.8.0" @@ -5785,9 +5905,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/hasha/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/hast-to-hyperscript": { "version": "9.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/hast-to-hyperscript/-/hast-to-hyperscript-9.0.1.tgz", + "integrity": "sha512-zQgLKqF+O2F72S1aa4y2ivxzSlko3MAvxkwG8ehGmNiqd98BIN3JM1rAJPmplEyLmGLO2QZYJtIneOSZ2YbJuA==", "dependencies": { "@types/unist": "^2.0.3", "comma-separated-tokens": "^1.0.0", @@ -5804,7 +5934,8 @@ }, "node_modules/hast-util-from-parse5": { "version": "6.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-6.0.1.tgz", + "integrity": "sha512-jeJUWiN5pSxW12Rh01smtVkZgZr33wBokLzKLwinYOUfSzm1Nl/c3GUGebDyOKjdsRgMvoVbV0VpAcpjF4NrJA==", "dependencies": { "@types/parse5": "^5.0.0", "hastscript": "^6.0.0", @@ -5820,7 +5951,8 @@ }, "node_modules/hast-util-parse-selector": { "version": "2.2.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz", + "integrity": "sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==", "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" @@ -5828,7 +5960,8 @@ }, "node_modules/hast-util-raw": { "version": "6.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-6.0.1.tgz", + "integrity": "sha512-ZMuiYA+UF7BXBtsTBNcLBF5HzXzkyE6MLzJnL605LKE8GJylNjGc4jjxazAHUtcwT5/CEt6afRKViYB4X66dig==", "dependencies": { "@types/hast": "^2.0.0", "hast-util-from-parse5": "^6.0.0", @@ -5848,7 +5981,8 @@ }, "node_modules/hast-util-to-parse5": { "version": "6.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-6.0.0.tgz", + "integrity": "sha512-Lu5m6Lgm/fWuz8eWnrKezHtVY83JeRGaNQ2kn9aJgqaxvVkFCZQBEhgodZUDUvoodgyROHDb3r5IxAEdl6suJQ==", "dependencies": { "hast-to-hyperscript": "^9.0.0", "property-information": "^5.0.0", @@ -5863,7 +5997,8 @@ }, "node_modules/hastscript": { "version": "6.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-6.0.0.tgz", + "integrity": "sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w==", "dependencies": { "@types/hast": "^2.0.0", "comma-separated-tokens": "^1.0.0", @@ -5886,20 +6021,21 @@ } }, "node_modules/hosted-git-info": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.1.0.tgz", - "integrity": "sha512-Ek+QmMEqZF8XrbFdwoDjSbm7rT23pCgEMOJmz6GPk/s4yH//RQfNPArhIxbguNxROq/+5lNBwCDHMhA903Kx1Q==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.0.0.tgz", + "integrity": "sha512-NURrKJX36ihI69iCqcvN4uuIk9fHcc1C+uax/5fPh4Tr5WJnATir+QM/CMJNKrcOOvxQDsAdS5C9oJliM80X7g==", "inBundle": true, "dependencies": { "lru-cache": "^7.5.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/html-encoding-sniffer": { "version": "3.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", + "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", "dependencies": { "whatwg-encoding": "^2.0.0" }, @@ -5909,12 +6045,14 @@ }, "node_modules/html-escaper": { "version": "2.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true }, "node_modules/html-void-elements": { "version": "1.0.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-1.0.5.tgz", + "integrity": "sha512-uE/TxKuyNIcx44cIWnjr/rfIATDH7ZaOMmstu0CwhFG1Dunhlp4OC6/NMbhiwoq5BpW0ubi303qnEk/PZj614w==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -5938,27 +6076,10 @@ "node": ">= 6" } }, - "node_modules/http-signature": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - }, - "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" - } - }, "node_modules/https-proxy-agent": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "inBundle": true, + "license": "MIT", "dependencies": { "agent-base": "6", "debug": "4" @@ -6012,27 +6133,29 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "inBundle": true }, "node_modules/ignore": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true, - "license": "MIT", "peer": true, "engines": { "node": ">= 4" } }, "node_modules/ignore-walk": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-5.0.1.tgz", - "integrity": "sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.0.tgz", + "integrity": "sha512-bTf9UWe/UP1yxG3QUrj/KOvEhTAUWPcv+WvbFZ28LcqznXabp7Xu6o9y1JEC18+oqODuS7VhTpekV5XvFwsxJg==", "inBundle": true, "dependencies": { "minimatch": "^5.0.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/import-fresh": { @@ -6051,6 +6174,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/imurmurhash": { "version": "0.1.4", "inBundle": true, @@ -6088,39 +6220,40 @@ }, "node_modules/ini": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ini/-/ini-3.0.1.tgz", - "integrity": "sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==", "inBundle": true, + "license": "ISC", "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/init-package-json": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-3.0.2.tgz", - "integrity": "sha512-YhlQPEjNFqlGdzrBfDNRLhvoSgX7iQRgSxgsNknRQ9ITXFT7UMfVMWhBTOh2Y+25lRnGrv5Xz8yZwQ3ACR6T3A==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-4.0.1.tgz", + "integrity": "sha512-+8aiPEdLbTZxVBMeu0qdQ378Yf7Fv6CuoTI2fYOmEN+ND7SLpHUfcKLXuPmrcvLOSUy8SzCnsqoQdMiwN6ijTw==", "inBundle": true, "dependencies": { - "npm-package-arg": "^9.0.1", + "npm-package-arg": "^10.0.0", "promzard": "^0.3.0", "read": "^1.0.7", - "read-package-json": "^5.0.0", + "read-package-json": "^6.0.0", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4", - "validate-npm-package-name": "^4.0.0" + "validate-npm-package-name": "^5.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/inline-style-parser": { "version": "0.1.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz", + "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==" }, "node_modules/internal-slot": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", "dev": true, - "license": "MIT", "dependencies": { "get-intrinsic": "^1.1.0", "has": "^1.0.3", @@ -6132,9 +6265,8 @@ }, "node_modules/ip": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", - "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==", - "inBundle": true + "inBundle": true, + "license": "MIT" }, "node_modules/ip-regex": { "version": "4.3.0", @@ -6146,7 +6278,8 @@ }, "node_modules/is-alphabetical": { "version": "1.0.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -6154,7 +6287,8 @@ }, "node_modules/is-alphanumerical": { "version": "1.0.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", "dependencies": { "is-alphabetical": "^1.0.0", "is-decimal": "^1.0.0" @@ -6184,8 +6318,9 @@ }, "node_modules/is-binary-path": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, - "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -6211,6 +6346,8 @@ }, "node_modules/is-buffer": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", "funding": [ { "type": "github", @@ -6225,15 +6362,15 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/is-callable": { - "version": "1.2.4", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -6254,9 +6391,8 @@ }, "node_modules/is-core-module": { "version": "2.10.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", - "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", "inBundle": true, + "license": "MIT", "dependencies": { "has": "^1.0.3" }, @@ -6266,8 +6402,9 @@ }, "node_modules/is-date-object": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dev": true, - "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -6280,7 +6417,8 @@ }, "node_modules/is-decimal": { "version": "1.0.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -6288,8 +6426,9 @@ }, "node_modules/is-extglob": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -6304,8 +6443,9 @@ }, "node_modules/is-glob": { "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, - "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -6315,7 +6455,8 @@ }, "node_modules/is-hexadecimal": { "version": "1.0.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -6328,8 +6469,9 @@ }, "node_modules/is-negative-zero": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -6339,8 +6481,9 @@ }, "node_modules/is-number": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -6370,10 +6513,12 @@ } }, "node_modules/is-plain-obj": { - "version": "2.1.0", - "license": "MIT", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "dev": true, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, "node_modules/is-plain-object": { @@ -6387,12 +6532,14 @@ }, "node_modules/is-potential-custom-element-name": { "version": "1.0.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" }, "node_modules/is-regex": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -6418,8 +6565,9 @@ }, "node_modules/is-stream": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -6429,8 +6577,9 @@ }, "node_modules/is-string": { "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, - "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -6443,8 +6592,9 @@ }, "node_modules/is-symbol": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "dev": true, - "license": "MIT", "dependencies": { "has-symbols": "^1.0.2" }, @@ -6469,13 +6619,15 @@ }, "node_modules/is-typedarray": { "version": "1.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "dev": true }, "node_modules/is-weakref": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2" }, @@ -6485,7 +6637,8 @@ }, "node_modules/is-whitespace-character": { "version": "1.0.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz", + "integrity": "sha512-SDweEzfIZM0SJV0EUga669UTKlmL0Pq8Lno0QDQsPnvECB3IM2aP0gdx5TrU0A01MAPfViaZiI2V1QMZLaKK5w==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -6493,15 +6646,17 @@ }, "node_modules/is-windows": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/is-word-character": { "version": "1.0.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.4.tgz", + "integrity": "sha512-5SMO8RVennx3nZrqtKwCGyyetPE9VDba5ugvKLaD4KopPG5kR4mQ7tNt/r7feL5yt5h3lpuBbIUmCOG2eSzXHA==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -6509,32 +6664,28 @@ }, "node_modules/isarray": { "version": "1.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" }, "node_modules/isexe": { "version": "2.0.0", "inBundle": true, "license": "ISC" }, - "node_modules/isstream": { - "version": "0.1.2", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true - }, "node_modules/istanbul-lib-coverage": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=8" } }, "node_modules/istanbul-lib-hook": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", + "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "append-transform": "^2.0.0" }, @@ -6544,8 +6695,9 @@ }, "node_modules/istanbul-lib-instrument": { "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "@babel/core": "^7.7.5", "@istanbuljs/schema": "^0.1.2", @@ -6558,24 +6710,25 @@ }, "node_modules/istanbul-lib-instrument/node_modules/semver": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/istanbul-lib-processinfo": { - "version": "2.0.2", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.3.tgz", + "integrity": "sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg==", "dev": true, - "license": "ISC", "dependencies": { "archy": "^1.0.0", - "cross-spawn": "^7.0.0", - "istanbul-lib-coverage": "^3.0.0-alpha.1", - "make-dir": "^3.0.0", + "cross-spawn": "^7.0.3", + "istanbul-lib-coverage": "^3.2.0", "p-map": "^3.0.0", "rimraf": "^3.0.0", - "uuid": "^3.3.3" + "uuid": "^8.3.2" }, "engines": { "node": ">=8" @@ -6583,8 +6736,9 @@ }, "node_modules/istanbul-lib-processinfo/node_modules/p-map": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", "dev": true, - "license": "MIT", "dependencies": { "aggregate-error": "^3.0.0" }, @@ -6594,8 +6748,9 @@ }, "node_modules/istanbul-lib-report": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "istanbul-lib-coverage": "^3.0.0", "make-dir": "^3.0.0", @@ -6607,8 +6762,9 @@ }, "node_modules/istanbul-lib-source-maps": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "debug": "^4.1.1", "istanbul-lib-coverage": "^3.0.0", @@ -6618,18 +6774,11 @@ "node": ">=10" } }, - "node_modules/istanbul-lib-source-maps/node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/istanbul-reports": { - "version": "3.1.4", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -6640,8 +6789,9 @@ }, "node_modules/jackspeak": { "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-1.4.1.tgz", + "integrity": "sha512-npN8f+M4+IQ8xD3CcWi3U62VQwKlT3Tj4GxbdT/fYTmeogD9eBF9OFdpoFG/VPNoshRjPUijdkp/p2XrzUHaVg==", "dev": true, - "license": "ISC", "dependencies": { "cliui": "^7.0.4" }, @@ -6649,63 +6799,64 @@ "node": ">=8" } }, + "node_modules/js-sdsl": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.5.tgz", + "integrity": "sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==", + "dev": true, + "peer": true + }, "node_modules/js-tokens": { "version": "4.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "node_modules/js-yaml": { - "version": "3.14.1", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "license": "MIT", "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsbn": { - "version": "0.1.1", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true - }, "node_modules/jsdom": { - "version": "18.1.1", - "license": "MIT", + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.1.tgz", + "integrity": "sha512-pksjj7Rqoa+wdpkKcLzQRHhJCEE42qQhl/xLMUKHgoSejaKOdaXEAnqs6uDNwMl/fciHTzKeR8Wm8cw7N+g98A==", "dependencies": { - "abab": "^2.0.5", - "acorn": "^8.5.0", - "acorn-globals": "^6.0.0", + "abab": "^2.0.6", + "acorn": "^8.8.0", + "acorn-globals": "^7.0.0", "cssom": "^0.5.0", "cssstyle": "^2.3.0", - "data-urls": "^3.0.1", - "decimal.js": "^10.3.1", + "data-urls": "^3.0.2", + "decimal.js": "^10.4.1", "domexception": "^4.0.0", "escodegen": "^2.0.0", "form-data": "^4.0.0", "html-encoding-sniffer": "^3.0.0", "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.1", "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", + "nwsapi": "^2.2.2", + "parse5": "^7.1.1", + "saxes": "^6.0.0", "symbol-tree": "^3.2.4", - "tough-cookie": "^4.0.0", - "w3c-hr-time": "^1.0.2", + "tough-cookie": "^4.1.2", "w3c-xmlserializer": "^3.0.0", "webidl-conversions": "^7.0.0", "whatwg-encoding": "^2.0.0", "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^10.0.0", - "ws": "^8.2.3", + "whatwg-url": "^11.0.0", + "ws": "^8.9.0", "xml-name-validator": "^4.0.0" }, "engines": { - "node": ">=12" + "node": ">=14" }, "peerDependencies": { "canvas": "^2.5.0" @@ -6716,19 +6867,143 @@ } } }, - "node_modules/jsdom/node_modules/acorn": { - "version": "8.7.0", - "license": "MIT", + "node_modules/jsdom/node_modules/entities": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", + "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/jsdom/node_modules/escodegen": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", + "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, "bin": { - "acorn": "bin/acorn" + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" }, "engines": { - "node": ">=0.4.0" + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/jsdom/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/jsdom/node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/jsdom/node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/jsdom/node_modules/parse5": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.1.tgz", + "integrity": "sha512-kwpuwzB+px5WUg9pyK0IcK/shltJN5/OVhQagxhCQNtT9Y9QRZqNY2e1cmbu/paRh5LMnz/oVTVLBpjFmMZhSg==", + "dependencies": { + "entities": "^4.4.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/jsdom/node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/jsdom/node_modules/tr46": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", + "dependencies": { + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/jsdom/node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/jsdom/node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "engines": { + "node": ">=12" + } + }, + "node_modules/jsdom/node_modules/whatwg-url": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "dependencies": { + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=12" } }, "node_modules/jsesc": { "version": "2.5.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "bin": { "jsesc": "bin/jsesc" }, @@ -6738,31 +7013,30 @@ }, "node_modules/json-parse-errback": { "version": "2.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-parse-errback/-/json-parse-errback-2.0.1.tgz", + "integrity": "sha512-OGFnfy12Q3dz0COvYEt9xlvD7hFMuuW4bbgni7LuTBv1SAWV5eKfxcBoNDvLmwdz4PTRIx16gnwRSZA0yART6w==", + "dev": true }, "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", + "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", "inBundle": true, - "license": "MIT" - }, - "node_modules/json-schema": { - "version": "0.4.0", - "dev": true, - "license": "(AFL-2.1 OR BSD-3-Clause)", - "optional": true, - "peer": true + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } }, "node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "peer": true + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true, - "license": "MIT", "peer": true }, "node_modules/json-stringify-nice": { @@ -6774,12 +7048,14 @@ }, "node_modules/json-stringify-safe": { "version": "5.0.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true }, "node_modules/json5": { "version": "2.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", "bin": { "json5": "lib/cli.js" }, @@ -6799,15 +7075,6 @@ "graceful-fs": "^4.1.6" } }, - "node_modules/jsonfile/node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true, - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/jsonparse": { "version": "1.3.1", "engines": [ @@ -6827,19 +7094,6 @@ "underscore": "1.12.1" } }, - "node_modules/jsonpath/node_modules/esprima": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz", - "integrity": "sha512-+JpPZam9w5DuJ3Q67SqsMGtiHKENSMRVoxvArfJZK01/BfLEObtZ6orJa/MtoGNR/rfMgp5837T41PAmTwAv/A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/JSONStream": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", @@ -6856,22 +7110,6 @@ "node": "*" } }, - "node_modules/jsprim": { - "version": "1.4.2", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/just-deep-map-values": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/just-deep-map-values/-/just-deep-map-values-1.1.1.tgz", @@ -6880,39 +7118,28 @@ }, "node_modules/just-diff": { "version": "5.1.1", - "resolved": "https://registry.npmjs.org/just-diff/-/just-diff-5.1.1.tgz", - "integrity": "sha512-u8HXJ3HlNrTzY7zrYYKjNEfBlyjqhdBkoyTVdjtn7p02RJD5NvR8rIClzeGA7t+UYP1/7eAkWNLU0+P3QrEqKQ==", - "inBundle": true + "inBundle": true, + "license": "MIT" }, "node_modules/just-diff-apply": { "version": "5.4.1", - "resolved": "https://registry.npmjs.org/just-diff-apply/-/just-diff-apply-5.4.1.tgz", - "integrity": "sha512-AAV5Jw7tsniWwih8Ly3fXxEZ06y+6p5TwQMsw0dzZ/wPKilzyDgdAnL0Ug4NNIquPUOh1vfFWEHbmXUqM5+o8g==", - "inBundle": true + "inBundle": true, + "license": "MIT" }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/lcov-parse": { - "version": "1.0.0", - "dev": true, - "license": "BSD-3-Clause", - "optional": true, - "peer": true, - "bin": { - "lcov-parse": "bin/cli.js" + "engines": { + "node": ">=0.10.0" } }, "node_modules/levn": { "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, - "license": "MIT", "peer": true, "dependencies": { "prelude-ls": "^1.2.1", @@ -7004,8 +7231,9 @@ }, "node_modules/licensee": { "version": "8.2.0", + "resolved": "https://registry.npmjs.org/licensee/-/licensee-8.2.0.tgz", + "integrity": "sha512-Z5fQ+qP85N38klGijH0bXiWVlKqLKDMqsckKL+VcA+ZQ/DJK5cpIpvryGHtREaQ3Ah5jrgtXN8mHfII7UtlsJg==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@blueoak/list": "^2.0.0", "correct-license-metadata": "^1.0.1", @@ -7029,8 +7257,9 @@ }, "node_modules/licensee/node_modules/semver": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver.js" } @@ -7056,15 +7285,6 @@ "node": ">=8" } }, - "node_modules/load-json-file/node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/load-json-file/node_modules/type-fest": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", @@ -7075,32 +7295,36 @@ } }, "node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, - "peer": true, "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "p-locate": "^5.0.0" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/lodash": { "version": "4.17.21", - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/lodash.clonedeep": { "version": "4.5.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "dev": true }, "node_modules/lodash.flattendeep": { "version": "4.4.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", + "dev": true }, "node_modules/lodash.ismatch": { "version": "4.4.0", @@ -7110,37 +7334,29 @@ }, "node_modules/lodash.merge": { "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true, - "license": "MIT", "peer": true }, "node_modules/lodash.uniq": { "version": "4.5.0", - "license": "MIT" - }, - "node_modules/log-driver": { - "version": "1.2.7", - "dev": true, - "license": "ISC", - "optional": true, - "peer": true, - "engines": { - "node": ">=0.8.6" - } + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==" }, "node_modules/lru-cache": { "version": "7.13.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.13.2.tgz", - "integrity": "sha512-VJL3nIpA79TodY/ctmZEfhASgqekbT574/c4j3jn4bKXbSCnTTCH/KltZyvL2GlV+tGSMtsWyem8DCX7qKTMBA==", "inBundle": true, + "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/make-dir": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, - "license": "MIT", "dependencies": { "semver": "^6.0.0" }, @@ -7153,25 +7369,27 @@ }, "node_modules/make-dir/node_modules/semver": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/make-error": { "version": "1.3.6", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true }, "node_modules/make-fetch-happen": { - "version": "10.2.1", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", - "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.0.1.tgz", + "integrity": "sha512-clv3IblugXn2CDUmqFhNzii3rjKa46u5wNeivc+QlLXkGI5FjLX3rGboo+y2kwf1pd8W0iDiC384cemeDtw9kw==", "inBundle": true, "dependencies": { "agentkeepalive": "^4.2.1", - "cacache": "^16.1.0", + "cacache": "^17.0.0", "http-cache-semantics": "^4.1.0", "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", @@ -7179,16 +7397,16 @@ "lru-cache": "^7.7.1", "minipass": "^3.1.6", "minipass-collect": "^1.0.2", - "minipass-fetch": "^2.0.3", + "minipass-fetch": "^3.0.0", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "negotiator": "^0.6.3", "promise-retry": "^2.0.1", "socks-proxy-agent": "^7.0.0", - "ssri": "^9.0.0" + "ssri": "^10.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/map-obj": { @@ -7205,7 +7423,8 @@ }, "node_modules/markdown-escapes": { "version": "1.0.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.4.tgz", + "integrity": "sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -7213,7 +7432,8 @@ }, "node_modules/marked": { "version": "0.7.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz", + "integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==", "peer": true, "bin": { "marked": "bin/marked" @@ -7224,7 +7444,8 @@ }, "node_modules/marked-man": { "version": "0.7.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/marked-man/-/marked-man-0.7.0.tgz", + "integrity": "sha512-zxK5E4jbuARALc+fIUAanM2njVGnrd9YvKrqoDHUg2XwNLJijo39EzMIg59LecHBHsIHNtPqepqnJp4SmL/EVg==", "bin": { "marked-man": "bin/marked-man" }, @@ -7234,7 +7455,8 @@ }, "node_modules/mdast-squeeze-paragraphs": { "version": "4.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/mdast-squeeze-paragraphs/-/mdast-squeeze-paragraphs-4.0.0.tgz", + "integrity": "sha512-zxdPn69hkQ1rm4J+2Cs2j6wDEv7O17TfXTJ33tl/+JPIoEmtV9t2ZzBM5LPHE8QlHsmVD8t3vPKCyY3oH+H8MQ==", "dependencies": { "unist-util-remove": "^2.0.0" }, @@ -7245,7 +7467,8 @@ }, "node_modules/mdast-util-definitions": { "version": "4.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-4.0.0.tgz", + "integrity": "sha512-k8AJ6aNnUkB7IE+5azR9h81O5EQ/cTDXtWdMq9Kk5KcEW/8ritU5CeLg/9HhOC++nALHBlaogJ5jz0Ybk3kPMQ==", "dependencies": { "unist-util-visit": "^2.0.0" }, @@ -7256,7 +7479,8 @@ }, "node_modules/mdast-util-to-hast": { "version": "10.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-10.0.1.tgz", + "integrity": "sha512-BW3LM9SEMnjf4HXXVApZMt8gLQWVNXc3jryK0nJu/rOXPOnlkUjmdkDlmxMirpbU9ILncGFIwLH/ubnWBbcdgA==", "dependencies": { "@types/mdast": "^3.0.0", "@types/unist": "^2.0.0", @@ -7274,7 +7498,8 @@ }, "node_modules/mdurl": { "version": "1.0.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==" }, "node_modules/meow": { "version": "8.1.2", @@ -7352,31 +7577,48 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/meow/node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "peer": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/mime-db": { "version": "1.52.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { "version": "2.1.35", - "license": "MIT", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dependencies": { "mime-db": "1.52.0" }, @@ -7395,7 +7637,8 @@ }, "node_modules/mimic-response": { "version": "2.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", + "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", "engines": { "node": ">=8" }, @@ -7420,9 +7663,8 @@ }, "node_modules/minimatch": { "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", "inBundle": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -7431,8 +7673,12 @@ } }, "node_modules/minimist": { - "version": "1.2.6", - "license": "MIT" + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/minimist-options": { "version": "4.1.0", @@ -7448,20 +7694,10 @@ "node": ">= 6" } }, - "node_modules/minimist-options/node_modules/is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/minipass": { "version": "3.3.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.4.tgz", - "integrity": "sha512-I9WPbWHCGu8W+6k1ZiGpPu0GkoKBeorkfKNuAFBNS1HNFJvke82sxvI5bzcCNpWPorkOO5QQ+zomzzwRxejXiw==", "inBundle": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -7481,9 +7717,9 @@ } }, "node_modules/minipass-fetch": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.1.tgz", - "integrity": "sha512-/kgtXVGS10PTFET6dAbOBWQtgH+iDiI4NhRqAftojRlsOJhk0y45sVVxqCaRQC+AMFH7JkHiWpuKJKQ+mojKiA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.0.tgz", + "integrity": "sha512-NSx3k5gR4Q5Ts2poCM/19d45VwhVLBtJZ6ypYcthj2BwmDx/e7lW8Aadnyt3edd2W0ecb+b0o7FYLRYE2AGcQg==", "inBundle": true, "dependencies": { "minipass": "^3.1.6", @@ -7491,7 +7727,7 @@ "minizlib": "^2.1.2" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "optionalDependencies": { "encoding": "^0.1.13" @@ -7553,9 +7789,8 @@ }, "node_modules/mkdirp": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "inBundle": true, + "license": "MIT", "bin": { "mkdirp": "bin/cmd.js" }, @@ -7565,20 +7800,8 @@ }, "node_modules/mkdirp-classic": { "version": "0.5.3", - "license": "MIT" - }, - "node_modules/mkdirp-infer-owner": { - "version": "2.0.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "chownr": "^2.0.0", - "infer-owner": "^1.0.4", - "mkdirp": "^1.0.3" - }, - "engines": { - "node": ">=10" - } + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" }, "node_modules/modify-values": { "version": "1.0.1", @@ -7601,12 +7824,14 @@ }, "node_modules/napi-build-utils": { "version": "1.0.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" }, "node_modules/natural-compare": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true, - "license": "MIT", "peer": true }, "node_modules/negotiator": { @@ -7624,9 +7849,9 @@ "dev": true }, "node_modules/nock": { - "version": "13.2.8", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.2.8.tgz", - "integrity": "sha512-JT42FrXfQRpfyL4cnbBEJdf4nmBpVP0yoCcSBr+xkT8Q1y3pgtaCKHGAAOIFcEJ3O3t0QbVAmid0S0f2bj3Wpg==", + "version": "13.2.9", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.2.9.tgz", + "integrity": "sha512-1+XfJNYF1cjGB+TKMWi29eZ0b82QOvQs2YoLNzbpWGqFMtRQHTa57osqdGj4FrFPgkO4D4AZinzUJR9VvW3QUA==", "dev": true, "dependencies": { "debug": "^4.1.0", @@ -7640,21 +7865,24 @@ }, "node_modules/node-abi": { "version": "2.30.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz", + "integrity": "sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w==", "dependencies": { "semver": "^5.4.1" } }, "node_modules/node-abi/node_modules/semver": { "version": "5.7.1", - "license": "ISC", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "bin": { "semver": "bin/semver" } }, "node_modules/node-addon-api": { "version": "3.2.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==" }, "node_modules/node-fetch": { "version": "2.6.7", @@ -7676,67 +7904,169 @@ } } }, - "node_modules/node-fetch/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true + "node_modules/node-gyp": { + "version": "9.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^10.0.3", + "nopt": "^5.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^12.22 || ^14.13 || >=16" + } + }, + "node_modules/node-gyp/node_modules/@npmcli/fs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", + "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", + "inBundle": true, + "dependencies": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/node-gyp/node_modules/@npmcli/move-file": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", + "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", + "inBundle": true, + "dependencies": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } }, - "node_modules/node-fetch/node_modules/webidl-conversions": { + "node_modules/node-gyp/node_modules/are-we-there-yet": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", + "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", + "inBundle": true, + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } }, - "node_modules/node-fetch/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, + "node_modules/node-gyp/node_modules/brace-expansion": { + "version": "1.1.11", + "inBundle": true, + "license": "MIT", "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/node-gyp/node_modules/cacache": { + "version": "16.1.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", + "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", + "inBundle": true, + "dependencies": { + "@npmcli/fs": "^2.1.0", + "@npmcli/move-file": "^2.0.0", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "infer-owner": "^1.0.4", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^9.0.0", + "tar": "^6.1.11", + "unique-filename": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "inBundle": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/node-gyp/node_modules/cacache/node_modules/glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "inBundle": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/node-gyp": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.1.0.tgz", - "integrity": "sha512-HkmN0ZpQJU7FLbJauJTHkHlSVAXlNGDAzH/VYFZGDOnFyn/Na3GlNJfkudmufOdS6/jNFhy88ObzL7ERz9es1g==", + "node_modules/node-gyp/node_modules/cacache/node_modules/minimatch": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", + "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", "inBundle": true, "dependencies": { - "env-paths": "^2.2.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.6", - "make-fetch-happen": "^10.0.3", - "nopt": "^5.0.0", - "npmlog": "^6.0.0", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.2", - "which": "^2.0.2" - }, - "bin": { - "node-gyp": "bin/node-gyp.js" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "^12.22 || ^14.13 || >=16" + "node": ">=10" } }, - "node_modules/node-gyp/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/node-gyp/node_modules/gauge": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", "inBundle": true, "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/node-gyp/node_modules/glob": { "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "inBundle": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -7752,11 +8082,37 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/node-gyp/node_modules/make-fetch-happen": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", + "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", + "inBundle": true, + "dependencies": { + "agentkeepalive": "^4.2.1", + "cacache": "^16.1.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^2.0.3", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^9.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, "node_modules/node-gyp/node_modules/minimatch": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "inBundle": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -7764,11 +8120,27 @@ "node": "*" } }, + "node_modules/node-gyp/node_modules/minipass-fetch": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", + "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", + "inBundle": true, + "dependencies": { + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, "node_modules/node-gyp/node_modules/nopt": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", "inBundle": true, + "license": "ISC", "dependencies": { "abbrev": "1" }, @@ -7779,6 +8151,57 @@ "node": ">=6" } }, + "node_modules/node-gyp/node_modules/npmlog": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "inBundle": true, + "dependencies": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/node-gyp/node_modules/ssri": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", + "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", + "inBundle": true, + "dependencies": { + "minipass": "^3.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/node-gyp/node_modules/unique-filename": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", + "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", + "inBundle": true, + "dependencies": { + "unique-slug": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/node-gyp/node_modules/unique-slug": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", + "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", + "inBundle": true, + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, "node_modules/node-html-parser": { "version": "5.4.2", "resolved": "https://registry.npmjs.org/node-html-parser/-/node-html-parser-5.4.2.tgz", @@ -7789,20 +8212,11 @@ "he": "1.2.0" } }, - "node_modules/node-modules-regexp": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/node-preload": { "version": "0.2.1", + "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", + "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", "dev": true, - "license": "MIT", "dependencies": { "process-on-spawn": "^1.0.0" }, @@ -7810,11 +8224,15 @@ "node": ">=8" } }, + "node_modules/node-releases": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==" + }, "node_modules/nopt": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", - "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", "inBundle": true, + "license": "ISC", "dependencies": { "abbrev": "^1.0.0" }, @@ -7826,141 +8244,151 @@ } }, "node_modules/normalize-package-data": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-4.0.1.tgz", - "integrity": "sha512-EBk5QKKuocMJhB3BILuKhmaPjI8vNRSpIfO9woLC6NyHVkKKdVEdAO1mrT0ZfxNR1lKwCcTkuZfmGIFdizZ8Pg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz", + "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==", "inBundle": true, "dependencies": { - "hosted-git-info": "^5.0.0", + "hosted-git-info": "^6.0.0", "is-core-module": "^2.8.1", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/normalize-path": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/npm-audit-report": { - "version": "3.0.0", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/npm-audit-report/-/npm-audit-report-4.0.0.tgz", + "integrity": "sha512-k2o5476sLrp94b6Gl819YzlS7LAdb8lgE6yQCysBEji5E3WoUdRve6tiVMLKAPPdLfItU4kOSUycWS5HFTrbug==", "inBundle": true, - "license": "ISC", "dependencies": { "chalk": "^4.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-bundled": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz", + "integrity": "sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==", + "inBundle": true, + "dependencies": { + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/npm-install-checks": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-5.0.0.tgz", - "integrity": "sha512-65lUsMI8ztHCxFz5ckCEC44DRvEGdZX5usQFriauxHEwt7upv1FKaQEmAtU0YnOAdwuNWCmk64xYiQABNrEyLA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.0.0.tgz", + "integrity": "sha512-SBU9oFglRVZnfElwAtF14NivyulDqF1VKqqwNsFW9HDcbHMAPHpRSsVFgKuwFGq/hVvWZExz62Th0kvxn/XE7Q==", "inBundle": true, "dependencies": { "semver": "^7.1.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/npm-license-corrections": { - "version": "1.5.0", - "dev": true, - "license": "CC0-1.0" + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/npm-license-corrections/-/npm-license-corrections-1.6.2.tgz", + "integrity": "sha512-U66tDCdutNSdzbbPu3IWpgUwcrekT3XW+5fPdRleQmW2kiDqCnurRJnI2kQswRYng1dg/GpgxXE8mT6r6s40rg==", + "dev": true }, "node_modules/npm-normalize-package-bin": { - "version": "1.0.1", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.0.tgz", + "integrity": "sha512-g+DPQSkusnk7HYXr75NtzkIP4+N81i3RPsGFidF3DzHd9MT9wWngmqoeg/fnHFz5MNdtG4w03s+QnhewSLTT2Q==", "inBundle": true, - "license": "ISC" + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } }, "node_modules/npm-package-arg": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.1.2.tgz", - "integrity": "sha512-pzd9rLEx4TfNJkovvlBSLGhq31gGu2QDexFPWT19yCDh0JgnRhlBLNo5759N0AJmBk+kQ9Y/hXoLnlgFD+ukmg==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.0.0.tgz", + "integrity": "sha512-7dkh8mRp7s0KwVHKIVJnFCJQ2B34gOGnzgBjDGyprycmARq/82SX/lhilQ95ZuacP/G/1gsS345iAkKmxWBQ2Q==", "inBundle": true, "dependencies": { - "hosted-git-info": "^5.0.0", - "proc-log": "^2.0.1", + "hosted-git-info": "^6.0.0", + "proc-log": "^3.0.0", "semver": "^7.3.5", - "validate-npm-package-name": "^4.0.0" + "validate-npm-package-name": "^5.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/npm-packlist": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.0.tgz", - "integrity": "sha512-8GRMzWQmFdUrRmc6tPPCd9Umm9g2qDR6X6Rik+9nYvoDQTLs/0IcCKv6iUdAmgr9sgJCm24QovwozCHWMDriOg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.1.tgz", + "integrity": "sha512-XddbYutimy7hdmP7S1tHMjFwghn64lvgdnhYG0KLGFBWjEvMt1/jg95OR3vPNNCjkakHS+k4a//3XOO8JOGI2A==", "inBundle": true, "dependencies": { - "ignore-walk": "^5.0.1" + "ignore-walk": "^6.0.0" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/npm-pick-manifest": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-7.0.2.tgz", - "integrity": "sha512-gk37SyRmlIjvTfcYl6RzDbSmS9Y4TOBXfsPnoYqTHARNgWbyDiCSMLUpmALDj4jjcTZpURiEfsSHJj9k7EV4Rw==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-8.0.1.tgz", + "integrity": "sha512-mRtvlBjTsJvfCCdmPtiu2bdlx8d/KXtF7yNXNWe7G0Z36qWA9Ny5zXsI2PfBZEv7SXgoxTmNaTzGSbbzDZChoA==", "inBundle": true, "dependencies": { - "npm-install-checks": "^5.0.0", - "npm-normalize-package-bin": "^2.0.0", - "npm-package-arg": "^9.0.0", + "npm-install-checks": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "npm-package-arg": "^10.0.0", "semver": "^7.3.5" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", - "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", - "inBundle": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/npm-profile": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-7.0.0.tgz", - "integrity": "sha512-/WbM1IJzmOECMOsxx75kgpKCn6v2doXsvv2/FQeSmSuHxN2IzeLqqjrsQU2lBOf0fZIbyoR5vxLrnI8vvnXd0A==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-7.0.1.tgz", + "integrity": "sha512-VReArOY/fCx5dWL66cbJ2OMogTQAVVQA//8jjmjkarboki3V7UJ0XbGFW+khRwiAJFQjuH0Bqr/yF7Y5RZdkMQ==", "inBundle": true, "dependencies": { - "npm-registry-fetch": "^13.0.1", - "proc-log": "^2.0.0" + "npm-registry-fetch": "^14.0.0", + "proc-log": "^3.0.0" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/npm-registry-fetch": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.3.1.tgz", - "integrity": "sha512-eukJPi++DKRTjSBRcDZSDDsGqRK3ehbxfFUcgaRd0Yp6kRwOwh2WVn0r+8rMB4nnuzvAk6rQVzl6K5CkYOmnvw==", + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.2.tgz", + "integrity": "sha512-TMenrMagFA9KF81E2bkS5XRyzERK4KXu70vgXt5+i8FcrFeLNgNsc6e5hekTqjDwPDkL3HGn/holWcXDMfnFgw==", "inBundle": true, "dependencies": { - "make-fetch-happen": "^10.0.6", + "make-fetch-happen": "^11.0.0", "minipass": "^3.1.6", - "minipass-fetch": "^2.0.3", + "minipass-fetch": "^3.0.0", "minipass-json-stream": "^1.0.1", "minizlib": "^2.1.2", - "npm-package-arg": "^9.0.1", - "proc-log": "^2.0.0" + "npm-package-arg": "^10.0.0", + "proc-log": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/npm-run-path": { @@ -7981,18 +8409,18 @@ "license": "BSD-2-Clause" }, "node_modules/npmlog": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", - "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-7.0.1.tgz", + "integrity": "sha512-uJ0YFk/mCQpLBt+bxN88AKd+gyqZvZDbtiNxk6Waqcj2aPRyfVx8ITawkyQynxUagInjdYT1+qj4NfA5KJJUxg==", "inBundle": true, "dependencies": { - "are-we-there-yet": "^3.0.0", + "are-we-there-yet": "^4.0.0", "console-control-strings": "^1.1.0", - "gauge": "^4.0.3", + "gauge": "^5.0.0", "set-blocking": "^2.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/nth-check": { @@ -8009,27 +8437,31 @@ }, "node_modules/null-check": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz", + "integrity": "sha512-j8ZNHg19TyIQOWCGeeQJBuu6xZYIEurf8M1Qsfd8mFrGEfIZytbw18YjKWg+LcO25NowXGZXZpKAx+Ui3TFfDw==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/number-is-nan": { "version": "1.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", "engines": { "node": ">=0.10.0" } }, "node_modules/nwsapi": { - "version": "2.2.0", - "license": "MIT" + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.2.tgz", + "integrity": "sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw==" }, "node_modules/nyc": { "version": "15.1.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", + "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", "dev": true, - "license": "ISC", "dependencies": { "@istanbuljs/load-nyc-config": "^1.0.0", "@istanbuljs/schema": "^0.1.2", @@ -8076,10 +8508,22 @@ "concat-map": "0.0.1" } }, + "node_modules/nyc/node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, "node_modules/nyc/node_modules/find-up": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, - "license": "MIT", "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -8110,8 +8554,9 @@ }, "node_modules/nyc/node_modules/locate-path": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, - "license": "MIT", "dependencies": { "p-locate": "^4.1.0" }, @@ -8133,8 +8578,9 @@ }, "node_modules/nyc/node_modules/p-limit": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, - "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, @@ -8147,8 +8593,9 @@ }, "node_modules/nyc/node_modules/p-locate": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, - "license": "MIT", "dependencies": { "p-limit": "^2.2.0" }, @@ -8158,8 +8605,9 @@ }, "node_modules/nyc/node_modules/p-map": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", "dev": true, - "license": "MIT", "dependencies": { "aggregate-error": "^3.0.0" }, @@ -8167,71 +8615,96 @@ "node": ">=8" } }, - "node_modules/nyc/node_modules/p-try": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/nyc/node_modules/path-exists": { - "version": "4.0.0", + "node_modules/nyc/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, - "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, "engines": { "node": ">=8" } }, - "node_modules/nyc/node_modules/resolve-from": { - "version": "5.0.0", + "node_modules/nyc/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "node_modules/nyc/node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", "dev": true, - "license": "MIT", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, "engines": { "node": ">=8" } }, - "node_modules/oauth-sign": { - "version": "0.9.0", + "node_modules/nyc/node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", "dev": true, - "license": "Apache-2.0", - "optional": true, - "peer": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, "engines": { - "node": "*" + "node": ">=6" } }, "node_modules/object-assign": { "version": "4.1.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "engines": { "node": ">=0.10.0" } }, "node_modules/object-inspect": { - "version": "1.12.0", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", "dev": true, - "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/object-keys": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/object.assign": { - "version": "4.1.2", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, "engines": { @@ -8242,13 +8715,15 @@ } }, "node_modules/object.getownpropertydescriptors": { - "version": "2.1.3", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.4.tgz", + "integrity": "sha512-sccv3L/pMModT6dJAYF3fzGMVcb38ysQ0tEE6ixv2yXJDtEIPph268OlAdJj5/qZMZDq2g/jqvwppt36uS/uQQ==", "dev": true, - "license": "MIT", "dependencies": { + "array.prototype.reduce": "^1.0.4", "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.1" }, "engines": { "node": ">= 0.8" @@ -8308,8 +8783,9 @@ }, "node_modules/optionator": { "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, - "license": "MIT", "peer": true, "dependencies": { "deep-is": "^0.1.3", @@ -8348,36 +8824,39 @@ } }, "node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, - "peer": true, "dependencies": { - "p-try": "^1.0.0" + "yocto-queue": "^0.1.0" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, - "peer": true, "dependencies": { - "p-limit": "^1.1.0" + "p-limit": "^3.0.2" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-map": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "inBundle": true, + "license": "MIT", "dependencies": { "aggregate-error": "^3.0.0" }, @@ -8417,19 +8896,19 @@ } }, "node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, - "peer": true, "engines": { - "node": ">=4" + "node": ">=6" } }, "node_modules/package-hash": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", + "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", "dev": true, - "license": "ISC", "dependencies": { "graceful-fs": "^4.1.15", "hasha": "^5.0.0", @@ -8441,31 +8920,27 @@ } }, "node_modules/pacote": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-14.0.0.tgz", - "integrity": "sha512-SYXfAQi7Bj+suydMz7lVnEF4/xNIvP+uobXGPwIUdFPkUxoOBHYxCakMXHGQQZ9lIHLj2IXTJ6BeWSe6U/uAYg==", + "version": "15.0.2", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-15.0.2.tgz", + "integrity": "sha512-Gj4w436jiM9/0574JGI8nxpsuXssp5OhyBhnWijvzUVJdU5GvNvnYUgd5WA6mr6ImOQ7JqWqdA44ixBqqMfyZQ==", "inBundle": true, "dependencies": { - "@npmcli/git": "^3.0.0", - "@npmcli/installed-package-contents": "^1.0.7", - "@npmcli/promise-spawn": "^3.0.0", - "@npmcli/run-script": "^4.1.0", - "cacache": "^16.0.0", - "chownr": "^2.0.0", + "@npmcli/git": "^4.0.0", + "@npmcli/installed-package-contents": "^2.0.0", + "@npmcli/promise-spawn": "^4.0.0", + "@npmcli/run-script": "^5.0.0", + "cacache": "^17.0.0", "fs-minipass": "^2.1.0", - "infer-owner": "^1.0.4", "minipass": "^3.1.6", - "mkdirp": "^1.0.4", - "npm-package-arg": "^9.0.0", + "npm-package-arg": "^10.0.0", "npm-packlist": "^7.0.0", - "npm-pick-manifest": "^7.0.0", - "npm-registry-fetch": "^13.0.1", - "proc-log": "^2.0.0", + "npm-pick-manifest": "^8.0.0", + "npm-registry-fetch": "^14.0.0", + "proc-log": "^3.0.0", "promise-retry": "^2.0.1", - "read-package-json": "^5.0.0", - "read-package-json-fast": "^2.0.3", - "rimraf": "^3.0.2", - "ssri": "^9.0.0", + "read-package-json": "^6.0.0", + "read-package-json-fast": "^3.0.0", + "ssri": "^10.0.0", "tar": "^6.1.11" }, "bin": { @@ -8488,16 +8963,17 @@ } }, "node_modules/parse-conflict-json": { - "version": "2.0.2", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/parse-conflict-json/-/parse-conflict-json-3.0.0.tgz", + "integrity": "sha512-ipcKLCmZbAj7n+h9qQREvdvsBUMPetGk9mM4ljCvs5inZznAlkHPk5XPc7ROtknUKw7kO6Jnz10Y3Eec7tky/A==", "inBundle": true, - "license": "ISC", "dependencies": { - "json-parse-even-better-errors": "^2.3.1", + "json-parse-even-better-errors": "^3.0.0", "just-diff": "^5.0.1", "just-diff-apply": "^5.2.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/parse-diff": { @@ -8508,7 +8984,8 @@ }, "node_modules/parse-entities": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", "dependencies": { "character-entities": "^1.0.0", "character-entities-legacy": "^1.0.0", @@ -8546,18 +9023,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/parse-json/node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, "node_modules/parse5": { "version": "6.0.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" }, "node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, - "peer": true, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/path-is-absolute": { @@ -8570,15 +9053,17 @@ }, "node_modules/path-key": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/path-parse": { "version": "1.0.7", - "license": "MIT" + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "node_modules/path-type": { "version": "4.0.0", @@ -8589,17 +9074,16 @@ "node": ">=8" } }, - "node_modules/performance-now": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "node_modules/picomatch": { "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8.6" }, @@ -8616,28 +9100,79 @@ "node": ">=6" } }, - "node_modules/pirates": { - "version": "3.0.2", + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, - "license": "MIT", - "optional": true, - "peer": true, "dependencies": { - "node-modules-regexp": "^1.0.0" + "find-up": "^4.0.0" }, "engines": { - "node": ">= 4" + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" } }, "node_modules/platform": { "version": "1.3.6", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz", + "integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==", + "dev": true }, "node_modules/postcss-selector-parser": { "version": "6.0.10", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", - "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", + "license": "MIT", "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -8648,7 +9183,8 @@ }, "node_modules/prebuild-install": { "version": "6.1.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.1.4.tgz", + "integrity": "sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ==", "dependencies": { "detect-libc": "^1.0.3", "expand-template": "^2.0.3", @@ -8673,18 +9209,21 @@ }, "node_modules/prebuild-install/node_modules/ansi-regex": { "version": "2.1.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", "engines": { "node": ">=0.10.0" } }, "node_modules/prebuild-install/node_modules/aproba": { "version": "1.2.0", - "license": "ISC" + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" }, "node_modules/prebuild-install/node_modules/are-we-there-yet": { "version": "1.1.7", - "license": "ISC", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", + "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", "dependencies": { "delegates": "^1.0.0", "readable-stream": "^2.0.6" @@ -8692,7 +9231,8 @@ }, "node_modules/prebuild-install/node_modules/gauge": { "version": "2.7.4", - "license": "ISC", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg==", "dependencies": { "aproba": "^1.0.3", "console-control-strings": "^1.0.0", @@ -8706,7 +9246,8 @@ }, "node_modules/prebuild-install/node_modules/is-fullwidth-code-point": { "version": "1.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", "dependencies": { "number-is-nan": "^1.0.0" }, @@ -8716,7 +9257,8 @@ }, "node_modules/prebuild-install/node_modules/npmlog": { "version": "4.1.2", - "license": "ISC", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "dependencies": { "are-we-there-yet": "~1.1.2", "console-control-strings": "~1.1.0", @@ -8726,7 +9268,8 @@ }, "node_modules/prebuild-install/node_modules/readable-stream": { "version": "2.3.7", - "license": "MIT", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -8739,18 +9282,21 @@ }, "node_modules/prebuild-install/node_modules/safe-buffer": { "version": "5.1.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/prebuild-install/node_modules/string_decoder": { "version": "1.1.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dependencies": { "safe-buffer": "~5.1.0" } }, "node_modules/prebuild-install/node_modules/string-width": { "version": "1.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", "dependencies": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -8762,7 +9308,8 @@ }, "node_modules/prebuild-install/node_modules/strip-ansi": { "version": "3.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", "dependencies": { "ansi-regex": "^2.0.0" }, @@ -8772,29 +9319,42 @@ }, "node_modules/prelude-ls": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, - "license": "MIT", "peer": true, "engines": { "node": ">= 0.8.0" } }, "node_modules/proc-log": { - "version": "2.0.1", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", + "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", "inBundle": true, - "license": "ISC", "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "inBundle": true, + "engines": { + "node": ">= 0.6.0" } }, "node_modules/process-nextick-args": { "version": "2.0.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, "node_modules/process-on-spawn": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", + "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", "dev": true, - "license": "MIT", "dependencies": { "fromentries": "^1.2.0" }, @@ -8804,8 +9364,7 @@ }, "node_modules/promise-all-reject-late": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz", - "integrity": "sha512-vuf0Lf0lOxyQREH7GDIOUMLS7kz+gs8i6B+Yi8dC68a2sychGrHTJYghMBD6k7eUcH0H5P73EckCA48xijWqXw==", + "license": "ISC", "funding": { "url": "https://github.com/sponsors/isaacs" } @@ -8844,15 +9403,17 @@ }, "node_modules/propagate": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz", + "integrity": "sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==", "dev": true, - "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/property-information": { "version": "5.6.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz", + "integrity": "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==", "dependencies": { "xtend": "^4.0.0" }, @@ -8862,12 +9423,14 @@ } }, "node_modules/psl": { - "version": "1.8.0", - "license": "MIT" + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" }, "node_modules/pump": { "version": "3.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -8875,7 +9438,8 @@ }, "node_modules/punycode": { "version": "2.1.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "engines": { "node": ">=6" } @@ -8897,18 +9461,15 @@ "qrcode-terminal": "bin/qrcode-terminal.js" } }, - "node_modules/qs": { - "version": "6.5.3", - "dev": true, - "license": "BSD-3-Clause", - "optional": true, - "peer": true, - "engines": { - "node": ">=0.6" - } + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" }, "node_modules/queue-microtask": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, "funding": [ { @@ -8923,8 +9484,7 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/quick-lru": { "version": "4.0.1", @@ -8937,7 +9497,8 @@ }, "node_modules/rc": { "version": "1.2.8", - "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dependencies": { "deep-extend": "^0.6.0", "ini": "~1.3.0", @@ -8950,11 +9511,13 @@ }, "node_modules/rc/node_modules/ini": { "version": "1.3.8", - "license": "ISC" + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, "node_modules/rc/node_modules/strip-json-comments": { "version": "2.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", "engines": { "node": ">=0.10.0" } @@ -8971,53 +9534,47 @@ } }, "node_modules/read-cmd-shim": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-3.0.0.tgz", - "integrity": "sha512-KQDVjGqhZk92PPNRj9ZEXEuqg8bUobSKRw+q0YQ3TKI5xkce7bUJobL4Z/OtiEbAAv70yEpYIXp4iQ9L8oPVog==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-4.0.0.tgz", + "integrity": "sha512-yILWifhaSEEytfXI76kB9xEEiG1AiozaCJZ83A87ytjRiN+jVibXjedjCRNjoZviinhG+4UkalO3mWTd8u5O0Q==", "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/read-package-json": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-5.0.2.tgz", - "integrity": "sha512-BSzugrt4kQ/Z0krro8zhTwV1Kd79ue25IhNN/VtHFy1mG/6Tluyi+msc0UpwaoQzxSHa28mntAjIZY6kEgfR9Q==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-6.0.0.tgz", + "integrity": "sha512-b/9jxWJ8EwogJPpv99ma+QwtqB7FSl3+V6UXS7Aaay8/5VwMY50oIFooY1UKXMWpfNCM6T/PoGqa5GD1g9xf9w==", "inBundle": true, "dependencies": { "glob": "^8.0.1", - "json-parse-even-better-errors": "^2.3.1", - "normalize-package-data": "^4.0.0", - "npm-normalize-package-bin": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/read-package-json-fast": { - "version": "2.0.3", - "inBundle": true, - "license": "ISC", - "dependencies": { - "json-parse-even-better-errors": "^2.3.0", - "npm-normalize-package-bin": "^1.0.1" + "json-parse-even-better-errors": "^3.0.0", + "normalize-package-data": "^5.0.0", + "npm-normalize-package-bin": "^3.0.0" }, "engines": { - "node": ">=10" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/read-package-json/node_modules/npm-normalize-package-bin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", - "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", + "node_modules/read-package-json-fast": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.1.tgz", + "integrity": "sha512-8+HW7Yo+cjfF+md8DqsZHgats2mxf7gGYow/+2JjxrftoHFZz9v4dzd0EubzYbkNaLxrTVcnllHwklXN2+7aTQ==", "inBundle": true, + "dependencies": { + "json-parse-even-better-errors": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/read-package-tree": { "version": "5.3.1", + "resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.3.1.tgz", + "integrity": "sha512-mLUDsD5JVtlZxjSlPPx1RETkNjjvQYuweKwNVt1Sn8kP5Jh44pvYuUHCp6xSVDZWbNxVxG5lyZJ921aJH61sTw==", + "deprecated": "The functionality that this package provided is now in @npmcli/arborist", "dev": true, - "license": "ISC", "dependencies": { "read-package-json": "^2.0.0", "readdir-scoped-modules": "^1.0.0", @@ -9056,8 +9613,15 @@ }, "node_modules/read-package-tree/node_modules/hosted-git-info": { "version": "2.8.9", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/read-package-tree/node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true }, "node_modules/read-package-tree/node_modules/minimatch": { "version": "3.1.2", @@ -9073,8 +9637,9 @@ }, "node_modules/read-package-tree/node_modules/normalize-package-data": { "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", @@ -9082,10 +9647,17 @@ "validate-npm-package-license": "^3.0.1" } }, + "node_modules/read-package-tree/node_modules/npm-normalize-package-bin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", + "dev": true + }, "node_modules/read-package-tree/node_modules/read-package-json": { "version": "2.1.2", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.1.2.tgz", + "integrity": "sha512-D1KmuLQr6ZSJS0tW8hf3WGpRlwszJOXZ3E8Yd/DNRaM5d+1wVRZdHlpGBLAuovjr28LbWvjpWkBHMxpRGGjzNA==", "dev": true, - "license": "ISC", "dependencies": { "glob": "^7.1.1", "json-parse-even-better-errors": "^2.3.0", @@ -9095,8 +9667,9 @@ }, "node_modules/read-package-tree/node_modules/semver": { "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver" } @@ -9185,19 +9758,10 @@ "node": ">=8" } }, - "node_modules/read-pkg-up/node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/read-pkg-up/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true, "engines": { "node": ">=8" @@ -9264,9 +9828,10 @@ } }, "node_modules/readdirp": { - "version": "3.5.0", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, - "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -9306,8 +9871,9 @@ }, "node_modules/regexpp": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true, - "license": "MIT", "peer": true, "engines": { "node": ">=8" @@ -9318,9 +9884,9 @@ }, "node_modules/release-please": { "name": "@npmcli/release-please", - "version": "14.2.5", - "resolved": "https://registry.npmjs.org/@npmcli/release-please/-/release-please-14.2.5.tgz", - "integrity": "sha512-DYdAMinyf+Kvcurz50fvq0q9/hvshIzgziq1YDLPN7uWXbSzZUufeU4eSCo9/8PisR2Zn+muRroLU/Sk1SxGzA==", + "version": "14.2.6", + "resolved": "https://registry.npmjs.org/@npmcli/release-please/-/release-please-14.2.6.tgz", + "integrity": "sha512-KvkP3KZsJCeJJpyPK2QMkUCPsOoTbMarrCTFg4QIHXVV9US+UjJZLs6wvHrJbTg4vnCliRgGj9A2qIW3g32zLw==", "dev": true, "dependencies": { "@conventional-commits/parser": "^0.4.1", @@ -9363,24 +9929,6 @@ "node": ">=14.0.0" } }, - "node_modules/release-please/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/release-please/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/release-please/node_modules/type-fest": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", @@ -9393,46 +9941,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/release-please/node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/release-please/node_modules/yargs": { - "version": "17.5.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", - "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/release-please/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, "node_modules/release-zalgo": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", + "integrity": "sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA==", "dev": true, - "license": "ISC", "dependencies": { "es6-error": "^4.0.1" }, @@ -9442,7 +9955,8 @@ }, "node_modules/remark-footnotes": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/remark-footnotes/-/remark-footnotes-2.0.0.tgz", + "integrity": "sha512-3Clt8ZMH75Ayjp9q4CorNeyjwIxHFcTkaektplKGl2A1jNGEUey8cKL0ZC5vJwfcD5GFGsNLImLG/NGzWIzoMQ==", "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" @@ -9450,7 +9964,8 @@ }, "node_modules/remark-mdx": { "version": "1.6.22", - "license": "MIT", + "resolved": "https://registry.npmjs.org/remark-mdx/-/remark-mdx-1.6.22.tgz", + "integrity": "sha512-phMHBJgeV76uyFkH4rvzCftLfKCr2RZuF+/gmVcaKrpsihyzmhXjA0BEMDaPTXG5y8qZOKPVo83NAOX01LPnOQ==", "dependencies": { "@babel/core": "7.12.9", "@babel/helper-plugin-utils": "7.10.4", @@ -9466,13 +9981,61 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remark-mdx/node_modules/@babel/core": { + "version": "7.12.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz", + "integrity": "sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ==", + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.5", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.5", + "@babel/parser": "^7.12.7", + "@babel/template": "^7.12.7", + "@babel/traverse": "^7.12.9", + "@babel/types": "^7.12.7", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, "node_modules/remark-mdx/node_modules/@babel/helper-plugin-utils": { "version": "7.10.4", - "license": "MIT" + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==" + }, + "node_modules/remark-mdx/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/remark-mdx/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "engines": { + "node": ">=0.10.0" + } }, "node_modules/remark-parse": { "version": "8.0.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-8.0.3.tgz", + "integrity": "sha512-E1K9+QLGgggHxCQtLt++uXltxEprmWzNfg+MxpfHsZlrddKzZ/hZyWHDbK3/Ap8HJQqYJRXP+jHczdL6q6i85Q==", "dependencies": { "ccount": "^1.0.0", "collapse-white-space": "^1.0.2", @@ -9498,7 +10061,8 @@ }, "node_modules/remark-squeeze-paragraphs": { "version": "4.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/remark-squeeze-paragraphs/-/remark-squeeze-paragraphs-4.0.0.tgz", + "integrity": "sha512-8qRqmL9F4nuLPIgl92XUuxI3pFxize+F1H0e/W3llTk0UsjJaj01+RrirkMw7P21RKe4X6goQhYRSvNWX+70Rw==", "dependencies": { "mdast-squeeze-paragraphs": "^4.0.0" }, @@ -9509,76 +10073,17 @@ }, "node_modules/repeat-string": { "version": "1.6.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", "engines": { "node": ">=0.10" } }, - "node_modules/request": { - "version": "2.88.2", - "dev": true, - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/request/node_modules/form-data": { - "version": "2.3.3", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/request/node_modules/tough-cookie": { - "version": "2.5.0", - "dev": true, - "license": "BSD-3-Clause", - "optional": true, - "peer": true, - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, "node_modules/require-directory": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -9594,22 +10099,30 @@ }, "node_modules/require-inject": { "version": "1.4.4", + "resolved": "https://registry.npmjs.org/require-inject/-/require-inject-1.4.4.tgz", + "integrity": "sha512-5Y5ctRN84+I4iOZO61gm+48tgP/6Hcd3VZydkaEM3MCuOvnHRsTJYQBOc01faI/Z9at5nsCAJVHhlfPA6Pc0Og==", "dev": true, - "license": "ISC", "dependencies": { "caller": "^1.0.1" } }, "node_modules/require-main-filename": { "version": "2.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" }, "node_modules/resolve": { - "version": "1.22.0", - "license": "MIT", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", "dependencies": { - "is-core-module": "^2.8.1", + "is-core-module": "^2.9.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -9621,12 +10134,12 @@ } }, "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/resolve-global": { @@ -9649,11 +10162,21 @@ "node": ">= 4" } }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "peer": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/rimraf": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "inBundle": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -9666,9 +10189,8 @@ }, "node_modules/rimraf/node_modules/brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "inBundle": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -9676,9 +10198,8 @@ }, "node_modules/rimraf/node_modules/glob": { "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "inBundle": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -9696,9 +10217,8 @@ }, "node_modules/rimraf/node_modules/minimatch": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "inBundle": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -9708,6 +10228,8 @@ }, "node_modules/run-parallel": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "funding": [ { @@ -9723,7 +10245,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } @@ -9747,26 +10268,40 @@ "inBundle": true, "license": "MIT" }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "inBundle": true, "license": "MIT" }, "node_modules/saxes": { - "version": "5.0.1", - "license": "ISC", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", "dependencies": { "xmlchars": "^2.2.0" }, "engines": { - "node": ">=10" + "node": ">=v12.22.7" } }, "node_modules/semver": { "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "inBundle": true, + "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" }, @@ -9779,9 +10314,8 @@ }, "node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "inBundle": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -9796,8 +10330,9 @@ }, "node_modules/shebang-command": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -9807,16 +10342,18 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/side-channel": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.0", "get-intrinsic": "^1.0.2", @@ -9833,6 +10370,8 @@ }, "node_modules/simple-concat": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", "funding": [ { "type": "github", @@ -9846,12 +10385,12 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/simple-get": { "version": "3.1.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz", + "integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==", "dependencies": { "decompress-response": "^4.2.0", "once": "^1.3.1", @@ -9869,9 +10408,8 @@ }, "node_modules/smart-buffer": { "version": "4.2.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", "inBundle": true, + "license": "MIT", "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" @@ -9883,9 +10421,8 @@ }, "node_modules/socks": { "version": "2.7.0", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.0.tgz", - "integrity": "sha512-scnOe9y4VuiNUULJN72GrM26BNOjVsfPXI+j+98PkyEfsIXroa5ofyjT+FzGvn/xHs73U2JtoBYAVx9Hl4quSA==", "inBundle": true, + "license": "MIT", "dependencies": { "ip": "^2.0.0", "smart-buffer": "^4.2.0" @@ -9897,9 +10434,8 @@ }, "node_modules/socks-proxy-agent": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", - "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", "inBundle": true, + "license": "MIT", "dependencies": { "agent-base": "^6.0.2", "debug": "^4.3.3", @@ -9921,42 +10457,29 @@ "node": ">=4" } }, - "node_modules/sort-keys/node_modules/is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/source-map": { - "version": "0.5.7", - "license": "BSD-3-Clause", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "devOptional": true, "engines": { "node": ">=0.10.0" } }, "node_modules/source-map-support": { "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, - "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, - "node_modules/source-map-support/node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/space-separated-tokens": { "version": "1.1.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz", + "integrity": "sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -9973,8 +10496,9 @@ }, "node_modules/spawn-wrap": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", + "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", "dev": true, - "license": "ISC", "dependencies": { "foreground-child": "^2.0.0", "is-windows": "^1.0.2", @@ -9989,8 +10513,9 @@ }, "node_modules/spdx-compare": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/spdx-compare/-/spdx-compare-1.0.0.tgz", + "integrity": "sha512-C1mDZOX0hnu0ep9dfmuoi03+eOdDoz2yvK79RxbcrVEG1NO1Ph35yW102DHWKN4pk80nwCgeMmSY5L25VE4D9A==", "dev": true, - "license": "MIT", "dependencies": { "array-find-index": "^1.0.2", "spdx-expression-parse": "^3.0.0", @@ -10022,8 +10547,9 @@ }, "node_modules/spdx-expression-validate": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-validate/-/spdx-expression-validate-2.0.0.tgz", + "integrity": "sha512-b3wydZLM+Tc6CFvaRDBOF9d76oGIHNCLYFeHbftFXUWjnfZWganmDmvtM5sm1cRwJc/VDBMLyGGrsLFd1vOxbg==", "dev": true, - "license": "(MIT AND CC-BY-3.0)", "dependencies": { "spdx-expression-parse": "^3.0.0" } @@ -10035,18 +10561,21 @@ }, "node_modules/spdx-osi": { "version": "3.0.0", - "dev": true, - "license": "CC0-1.0" + "resolved": "https://registry.npmjs.org/spdx-osi/-/spdx-osi-3.0.0.tgz", + "integrity": "sha512-7DZMaD/rNHWGf82qWOazBsLXQsaLsoJb9RRjhEUQr5o86kw3A1ErGzSdvaXl+KalZyKkkU5T2a5NjCCutAKQSw==", + "dev": true }, "node_modules/spdx-ranges": { "version": "2.1.1", - "dev": true, - "license": "(MIT AND CC-BY-3.0)" + "resolved": "https://registry.npmjs.org/spdx-ranges/-/spdx-ranges-2.1.1.tgz", + "integrity": "sha512-mcdpQFV7UDAgLpXEE/jOMqvK4LBoO0uTQg0uvXUewmEFhpiZx5yJSZITHB8w1ZahKdhfZqP5GPEOKLyEq5p8XA==", + "dev": true }, "node_modules/spdx-whitelisted": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/spdx-whitelisted/-/spdx-whitelisted-1.0.0.tgz", + "integrity": "sha512-X4FOpUCvZuo42MdB1zAZ/wdX4N0lLcWDozf2KYFVDgtLv8Lx+f31LOYLP2/FcwTzsPi64bS/VwKqklI4RBletg==", "dev": true, - "license": "MIT", "dependencies": { "spdx-compare": "^1.0.0", "spdx-ranges": "^2.0.0" @@ -10075,45 +10604,19 @@ }, "node_modules/sprintf-js": { "version": "1.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/sshpk": { - "version": "1.17.0", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, - "engines": { - "node": ">=0.10.0" - } + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" }, "node_modules/ssri": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", - "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.0.tgz", + "integrity": "sha512-64ghGOpqW0k+jh7m5jndBGdVEoPikWwGQmBNN5ks6jyUSMymzHDTlnNHOvzp+6MmHOljr2MokUzvRksnTwG0Iw==", "inBundle": true, "dependencies": { "minipass": "^3.1.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/stack-utils": { @@ -10139,7 +10642,8 @@ }, "node_modules/state-toggle": { "version": "1.0.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.3.tgz", + "integrity": "sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -10154,98 +10658,6 @@ "escodegen": "^1.8.1" } }, - "node_modules/static-eval/node_modules/escodegen": { - "version": "1.14.3", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", - "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", - "dev": true, - "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=4.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "node_modules/static-eval/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/static-eval/node_modules/levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", - "dev": true, - "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/static-eval/node_modules/optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dev": true, - "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/static-eval/node_modules/prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/static-eval/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-eval/node_modules/type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", - "dev": true, - "dependencies": { - "prelude-ls": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/string_decoder": { "version": "1.3.0", "inBundle": true, @@ -10307,13 +10719,12 @@ } }, "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true, - "peer": true, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/strip-final-newline": { @@ -10369,7 +10780,8 @@ }, "node_modules/style-to-object": { "version": "0.3.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.3.0.tgz", + "integrity": "sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA==", "dependencies": { "inline-style-parser": "0.1.1" } @@ -10387,7 +10799,8 @@ }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "engines": { "node": ">= 0.4" }, @@ -10397,7 +10810,8 @@ }, "node_modules/symbol-tree": { "version": "3.2.4", - "license": "MIT" + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" }, "node_modules/tap": { "version": "16.3.0", @@ -10471,8 +10885,9 @@ }, "node_modules/tap-mocha-reporter": { "version": "5.0.3", + "resolved": "https://registry.npmjs.org/tap-mocha-reporter/-/tap-mocha-reporter-5.0.3.tgz", + "integrity": "sha512-6zlGkaV4J+XMRFkN0X+yuw6xHbE9jyCZ3WUKfw4KxMyRGOpYSRuuQTRJyWX88WWuLdVTuFbxzwXhXuS2XE6o0g==", "dev": true, - "license": "ISC", "dependencies": { "color-support": "^1.1.0", "debug": "^4.1.1", @@ -10502,16 +10917,18 @@ }, "node_modules/tap-mocha-reporter/node_modules/diff": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } }, "node_modules/tap-mocha-reporter/node_modules/escape-string-regexp": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -10550,8 +10967,9 @@ }, "node_modules/tap-parser": { "version": "11.0.1", + "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-11.0.1.tgz", + "integrity": "sha512-5ow0oyFOnXVSALYdidMX94u0GEjIlgc/BPFYLx0yRh9hb8+cFGNJqJzDJlUqbLOwx8+NBrIbxCWkIQi7555c0w==", "dev": true, - "license": "MIT", "dependencies": { "events-to-array": "^1.0.1", "minipass": "^3.1.6", @@ -10566,12 +10984,22 @@ }, "node_modules/tap-yaml": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tap-yaml/-/tap-yaml-1.0.0.tgz", + "integrity": "sha512-Rxbx4EnrWkYk0/ztcm5u3/VznbyFJpyXO12dDBHKWiDVxy7O2Qw6MRrwO5H6Ww0U5YhRY/4C/VzWmFPhBQc4qQ==", "dev": true, - "license": "ISC", "dependencies": { "yaml": "^1.5.0" } }, + "node_modules/tap-yaml/node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, "node_modules/tap/node_modules/@ampproject/remapping": { "version": "2.1.2", "dev": true, @@ -12456,7 +12884,8 @@ }, "node_modules/tar-fs": { "version": "2.1.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", "dependencies": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", @@ -12466,11 +12895,13 @@ }, "node_modules/tar-fs/node_modules/chownr": { "version": "1.1.4", - "license": "ISC" + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" }, "node_modules/tar-stream": { "version": "2.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", "dependencies": { "bl": "^4.0.3", "end-of-stream": "^1.4.1", @@ -12484,8 +12915,9 @@ }, "node_modules/tcompare": { "version": "5.0.7", + "resolved": "https://registry.npmjs.org/tcompare/-/tcompare-5.0.7.tgz", + "integrity": "sha512-d9iddt6YYGgyxJw5bjsN7UJUO1kGOtjSlNy/4PoGYAjQS5pAT/hzIoLf1bZCw+uUxRmZJh7Yy1aA7xKVRT9B4w==", "dev": true, - "license": "ISC", "dependencies": { "diff": "^4.0.2" }, @@ -12495,16 +12927,18 @@ }, "node_modules/tcompare/node_modules/diff": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } }, "node_modules/test-exclude": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, - "license": "ISC", "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^7.1.4", @@ -12592,15 +13026,17 @@ }, "node_modules/to-fast-properties": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "engines": { "node": ">=4" } }, "node_modules/to-regex-range": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -12609,38 +13045,46 @@ } }, "node_modules/tough-cookie": { - "version": "4.0.0", - "license": "BSD-3-Clause", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.2.tgz", + "integrity": "sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==", "dependencies": { "psl": "^1.1.33", "punycode": "^2.1.1", - "universalify": "^0.1.2" + "universalify": "^0.2.0", + "url-parse": "^1.5.3" }, "engines": { "node": ">=6" } }, - "node_modules/tr46": { - "version": "3.0.0", - "license": "MIT", - "dependencies": { - "punycode": "^2.1.1" - }, + "node_modules/tough-cookie/node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", "engines": { - "node": ">=12" + "node": ">= 4.0.0" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, "node_modules/treeverse": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/treeverse/-/treeverse-2.0.0.tgz", - "integrity": "sha512-N5gJCkLu1aXccpOTtqV6ddSEi6ZmGkh3hjmbu1IjcavJK4qyOVQmi0myQKM7z5jVGmD68SJoliaVrMmVObhj6A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/treeverse/-/treeverse-3.0.0.tgz", + "integrity": "sha512-gcANaAnd2QDZFmHFEOF4k7uc1J/6a6z3DJMd/QwEyxLoKGiptJRwid582r7QIsFlFMIZ3SnxfS52S4hm2DHkuQ==", "inBundle": true, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/trim": { - "version": "0.0.1" + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", + "integrity": "sha512-YzQV+TZg4AxpKxaTHK3c3D+kRDCGVEE7LemdlQZoQXn0iennk10RsIoY6ikzAqJTc9Xjl9C1/waHom/J86ziAQ==" }, "node_modules/trim-newlines": { "version": "3.0.1", @@ -12653,7 +13097,8 @@ }, "node_modules/trim-trailing-lines": { "version": "1.1.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.4.tgz", + "integrity": "sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -12662,12 +13107,13 @@ "node_modules/trivial-deferred": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trivial-deferred/-/trivial-deferred-1.0.1.tgz", - "integrity": "sha1-N21NKdlR1jaKb3oK6FwvTV4GWPM=", + "integrity": "sha512-dagAKX7vaesNNAwOc9Np9C2mJ+7YopF4lk+jE2JML9ta4kZ91Y6UruJNH65bLRYoUROD8EY+Pmi44qQWwXR7sw==", "dev": true }, "node_modules/trough": { "version": "1.0.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz", + "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -12716,31 +13162,11 @@ } } }, - "node_modules/ts-node/node_modules/acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/ts-node/node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/ts-node/node_modules/diff": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } @@ -12771,6 +13197,16 @@ "json5": "lib/cli.js" } }, + "node_modules/tsconfig-paths/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, "node_modules/tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", @@ -12782,7 +13218,8 @@ }, "node_modules/tunnel-agent": { "version": "0.6.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "dependencies": { "safe-buffer": "^5.0.1" }, @@ -12790,17 +13227,11 @@ "node": "*" } }, - "node_modules/tweetnacl": { - "version": "0.14.5", - "dev": true, - "license": "Unlicense", - "optional": true, - "peer": true - }, "node_modules/type-check": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, - "license": "MIT", "peer": true, "dependencies": { "prelude-ls": "^1.2.1" @@ -12810,17 +13241,31 @@ } }, "node_modules/type-fest": { - "version": "0.8.1", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, - "license": "(MIT OR CC0-1.0)", + "peer": true, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "dependencies": { + "is-typedarray": "^1.0.0" } }, "node_modules/typescript": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz", - "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -12831,9 +13276,9 @@ } }, "node_modules/uglify-js": { - "version": "3.15.3", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.15.3.tgz", - "integrity": "sha512-6iCVm2omGJbsu3JWac+p6kUiOpg3wFO2f8lIXjfEb8RrmLjzog1wTPMmwKB7swfzzqxj9YM+sGUM++u1qN4qJg==", + "version": "3.17.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.3.tgz", + "integrity": "sha512-JmMFDME3iufZnBpyKL+uS78LRiC+mK55zWfM5f/pWBJfpOttXAqYfdDGRukYhJuyRinvPVAtUhvy7rlDybNtFg==", "dev": true, "optional": true, "bin": { @@ -12866,7 +13311,8 @@ }, "node_modules/unherit": { "version": "1.1.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/unherit/-/unherit-1.1.3.tgz", + "integrity": "sha512-Ft16BJcnapDKp0+J/rqFC3Rrk6Y/Ng4nzsC028k2jdDII/rdZ7Wd3pPT/6+vIIxRagwRc9K0IUX0Ra4fKvw+WQ==", "dependencies": { "inherits": "^2.0.0", "xtend": "^4.0.0" @@ -12877,36 +13323,18 @@ } }, "node_modules/unicode-length": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "punycode": "^2.0.0", - "strip-ansi": "^3.0.1" - } - }, - "node_modules/unicode-length/node_modules/ansi-regex": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unicode-length/node_modules/strip-ansi": { - "version": "3.0.1", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-length/-/unicode-length-2.1.0.tgz", + "integrity": "sha512-4bV582zTV9Q02RXBxSUMiuN/KHo5w4aTojuKTNT96DIKps/SIawFp7cS5Mu25VuY1AioGXrmYyzKZUzh8OqoUw==", "dev": true, - "license": "MIT", "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" + "punycode": "^2.0.0" } }, "node_modules/unified": { "version": "9.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.0.tgz", + "integrity": "sha512-vx2Z0vY+a3YoTj8+pttM3tiJHCwY5UFbYdiWrwBEbHmK8pvsPj2rtAX2BFfgXen8T39CJWblWRDT4L5WGXtDdg==", "dependencies": { "bail": "^1.0.0", "extend": "^3.0.0", @@ -12920,33 +13348,42 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/unified/node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "engines": { + "node": ">=8" + } + }, "node_modules/unique-filename": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", - "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", "inBundle": true, "dependencies": { - "unique-slug": "^3.0.0" + "unique-slug": "^4.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/unique-slug": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", - "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", "inBundle": true, "dependencies": { "imurmurhash": "^0.1.4" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/unist-builder": { "version": "2.0.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/unist-builder/-/unist-builder-2.0.3.tgz", + "integrity": "sha512-f98yt5pnlMWlzP539tPc4grGMsFaQQlP/vM396b00jngsiINumNmsY8rkXjfoi1c6QaM8nQ3vaGDuoKWbe/1Uw==", "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" @@ -12954,7 +13391,8 @@ }, "node_modules/unist-util-generated": { "version": "1.1.6", - "license": "MIT", + "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-1.1.6.tgz", + "integrity": "sha512-cln2Mm1/CZzN5ttGK7vkoGw+RZ8VcUH6BtGbq98DDtRGquAAOXig1mrBQYelOwMXYS8rK+vZDyyojSjp7JX+Lg==", "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" @@ -12962,7 +13400,8 @@ }, "node_modules/unist-util-is": { "version": "4.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", + "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==", "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" @@ -12970,7 +13409,8 @@ }, "node_modules/unist-util-position": { "version": "3.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-3.1.0.tgz", + "integrity": "sha512-w+PkwCbYSFw8vpgWD0v7zRCl1FpY3fjDSQ3/N/wNd9Ffa4gPi8+4keqt99N3XW6F99t/mUzp2xAhNmfKWp95QA==", "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" @@ -12978,7 +13418,8 @@ }, "node_modules/unist-util-remove": { "version": "2.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/unist-util-remove/-/unist-util-remove-2.1.0.tgz", + "integrity": "sha512-J8NYPyBm4baYLdCbjmf1bhPu45Cr1MWTm77qd9istEkzWpnN6O9tMsEbB2JhNnBCqGENRqEWomQ+He6au0B27Q==", "dependencies": { "unist-util-is": "^4.0.0" }, @@ -12989,7 +13430,8 @@ }, "node_modules/unist-util-remove-position": { "version": "2.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-2.0.1.tgz", + "integrity": "sha512-fDZsLYIe2uT+oGFnuZmy73K6ZxOPG/Qcm+w7jbEjaFcJgbQ6cqjs/eSPzXhsmGpAsWPkqZM9pYjww5QTn3LHMA==", "dependencies": { "unist-util-visit": "^2.0.0" }, @@ -13000,7 +13442,8 @@ }, "node_modules/unist-util-stringify-position": { "version": "2.0.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", "dependencies": { "@types/unist": "^2.0.2" }, @@ -13011,7 +13454,8 @@ }, "node_modules/unist-util-visit": { "version": "2.0.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.3.tgz", + "integrity": "sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==", "dependencies": { "@types/unist": "^2.0.0", "unist-util-is": "^4.0.0", @@ -13024,7 +13468,8 @@ }, "node_modules/unist-util-visit-parents": { "version": "3.1.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz", + "integrity": "sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==", "dependencies": { "@types/unist": "^2.0.0", "unist-util-is": "^4.0.0" @@ -13041,20 +13486,57 @@ "dev": true }, "node_modules/universalify": { - "version": "0.1.2", - "license": "MIT", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, "engines": { - "node": ">= 4.0.0" + "node": ">= 10.0.0" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", + "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist-lint": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" } }, "node_modules/uri-js": { "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "inBundle": true, @@ -13062,26 +13544,22 @@ }, "node_modules/util-promisify": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/util-promisify/-/util-promisify-2.1.0.tgz", + "integrity": "sha512-K+5eQPYs14b3+E+hmE2J6gCZ4JmMl9DbYS6BeP2CHq6WMuNxErxf5B/n0fz85L8zUuoO6rIzNNmIQDu/j+1OcA==", "dev": true, - "license": "MIT", "dependencies": { "object.getownpropertydescriptors": "^2.0.3" } }, "node_modules/uuid": { - "version": "3.4.0", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true, - "license": "MIT", "bin": { - "uuid": "bin/uuid" + "uuid": "dist/bin/uuid" } }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", @@ -13098,35 +13576,21 @@ } }, "node_modules/validate-npm-package-name": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-4.0.0.tgz", - "integrity": "sha512-mzR0L8ZDktZjpX4OB46KT+56MAhl4EIazWP/+G/HPGuvfdaqg4YsCdtOm6U9+LOFyYDoh4dpnpxZRB9MQQns5Q==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", + "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", "inBundle": true, "dependencies": { "builtins": "^5.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/verror": { - "version": "1.10.0", - "dev": true, - "engines": [ - "node >=0.6.0" - ], - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/vfile": { "version": "4.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", + "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", "dependencies": { "@types/unist": "^2.0.0", "is-buffer": "^2.0.0", @@ -13140,7 +13604,8 @@ }, "node_modules/vfile-location": { "version": "3.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.2.0.tgz", + "integrity": "sha512-aLEIZKv/oxuCDZ8lkJGhuhztf/BW4M+iHdCwglA/eWc+vtuRFJj8EtgceYFX4LRjOhCAAiNHsKGssC6onJ+jbA==", "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" @@ -13148,7 +13613,8 @@ }, "node_modules/vfile-message": { "version": "2.0.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", + "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==", "dependencies": { "@types/unist": "^2.0.0", "unist-util-stringify-position": "^2.0.0" @@ -13158,23 +13624,10 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/vlq": { - "version": "0.2.3", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/w3c-hr-time": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "browser-process-hrtime": "^1.0.0" - } - }, "node_modules/w3c-xmlserializer": { "version": "3.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-3.0.0.tgz", + "integrity": "sha512-3WFqGEgSXIyGhOmAFtlicJNMjEps8b1MG31NCA0/vOF9+nKMUW1ckhi9cnNHmf88Rzw5V+dwIwsm2C7X8k9aQg==", "dependencies": { "xml-name-validator": "^4.0.0" }, @@ -13197,22 +13650,23 @@ }, "node_modules/web-namespaces": { "version": "1.1.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-1.1.4.tgz", + "integrity": "sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" } }, "node_modules/webidl-conversions": { - "version": "7.0.0", - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - } + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true }, "node_modules/whatwg-encoding": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", + "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", "dependencies": { "iconv-lite": "0.6.3" }, @@ -13222,27 +13676,26 @@ }, "node_modules/whatwg-mimetype": { "version": "3.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", "engines": { "node": ">=12" } }, "node_modules/whatwg-url": { - "version": "10.0.0", - "license": "MIT", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, "dependencies": { - "tr46": "^3.0.0", - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=12" + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" } }, "node_modules/which": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "inBundle": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -13271,8 +13724,9 @@ }, "node_modules/which-module": { "version": "2.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==", + "dev": true }, "node_modules/wide-align": { "version": "1.1.5", @@ -13284,7 +13738,8 @@ }, "node_modules/word-wrap": { "version": "1.2.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "engines": { "node": ">=0.10.0" } @@ -13292,13 +13747,14 @@ "node_modules/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", "dev": true }, "node_modules/wrap-ansi": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -13317,16 +13773,16 @@ "license": "ISC" }, "node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.0.tgz", + "integrity": "sha512-R7NYMnHSlV42K54lwY9lvW6MnSm1HSJqZL3xiSgi9E7//FYaI74r2G0rd+/X6VAMkHEdzxQaU5HUOXWUz5kA/w==", "inBundle": true, "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^3.0.7" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/write-json-file": { @@ -13412,8 +13868,9 @@ } }, "node_modules/ws": { - "version": "8.5.0", - "license": "MIT", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz", + "integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==", "engines": { "node": ">=10.0.0" }, @@ -13432,14 +13889,16 @@ }, "node_modules/xml-name-validator": { "version": "4.0.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", + "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", "engines": { "node": ">=12" } }, "node_modules/xmlchars": { "version": "2.2.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" }, "node_modules/xpath": { "version": "0.0.32", @@ -13452,15 +13911,20 @@ }, "node_modules/xtend": { "version": "4.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "engines": { "node": ">=0.4" } }, "node_modules/y18n": { - "version": "4.0.3", + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, - "license": "ISC" + "engines": { + "node": ">=10" + } }, "node_modules/yallist": { "version": "4.0.0", @@ -13468,136 +13932,68 @@ "license": "ISC" }, "node_modules/yaml": { - "version": "1.10.2", - "license": "ISC", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.3.tgz", + "integrity": "sha512-AacA8nRULjKMX2DvWvOAdBZMOfQlypSFkjcOcu9FalllIDJ1kvlREzcdIZmidQUqqeMv7jorHjq2HlLv/+c2lg==", "engines": { - "node": ">= 6" + "node": ">= 14" } }, "node_modules/yargs": { - "version": "15.4.1", + "version": "17.6.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.0.tgz", + "integrity": "sha512-8H/wTDqlSwoSnScvV2N/JHfLWOKuh5MVla9hqLjK3nsfyy6Y4kDSYSvkU5YCUEPOSnRXfIyx3Sq+B/IWudTo4g==", "dev": true, - "license": "MIT", "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.0.0" }, "engines": { - "node": ">=8" + "node": ">=12" } }, "node_modules/yargs-parser": { - "version": "18.1.3", + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, "engines": { - "node": ">=6" + "node": ">=10" } }, "node_modules/yargs/node_modules/cliui": { - "version": "6.0.0", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, - "license": "ISC", "dependencies": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/yargs/node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yargs/node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" }, "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/p-try": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/yargs/node_modules/wrap-ansi": { - "version": "6.2.0", + "node_modules/yargs/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, "engines": { - "node": ">=8" + "node": ">=12" } }, "node_modules/yn": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -13616,7 +14012,8 @@ }, "node_modules/zwitch": { "version": "1.0.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", + "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -13626,9 +14023,9 @@ "version": "1.0.0", "license": "ISC", "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/promise-spawn": "^3.0.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/promise-spawn": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "minify-registry-metadata": "^2.2.0", "rimraf": "^3.0.2", "tap": "^16.0.1", @@ -13640,52 +14037,49 @@ }, "workspaces/arborist": { "name": "@npmcli/arborist", - "version": "6.0.0-pre.4", + "version": "6.0.0-pre.5", "license": "ISC", "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/installed-package-contents": "^1.0.7", - "@npmcli/map-workspaces": "^2.0.3", - "@npmcli/metavuln-calculator": "^4.0.0", - "@npmcli/move-file": "^2.0.0", + "@npmcli/installed-package-contents": "^2.0.0", + "@npmcli/map-workspaces": "^3.0.0", + "@npmcli/metavuln-calculator": "^5.0.0", + "@npmcli/move-file": "^3.0.0", "@npmcli/name-from-folder": "^1.0.1", - "@npmcli/node-gyp": "^2.0.0", - "@npmcli/package-json": "^2.0.0", - "@npmcli/query": "^2.0.0", - "@npmcli/run-script": "^4.1.3", - "bin-links": "^3.0.3", - "cacache": "^16.1.3", + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/package-json": "^3.0.0", + "@npmcli/query": "^3.0.0", + "@npmcli/run-script": "^5.0.0", + "bin-links": "^4.0.1", + "cacache": "^17.0.1", "common-ancestor-path": "^1.0.1", - "json-parse-even-better-errors": "^2.3.1", + "json-parse-even-better-errors": "^3.0.0", "json-stringify-nice": "^1.1.4", "minimatch": "^5.1.0", - "mkdirp": "^1.0.4", - "mkdirp-infer-owner": "^2.0.0", "nopt": "^6.0.0", - "npm-install-checks": "^5.0.0", - "npm-package-arg": "^9.0.0", - "npm-pick-manifest": "^7.0.2", - "npm-registry-fetch": "^13.0.0", - "npmlog": "^6.0.2", - "pacote": "^14.0.0", - "parse-conflict-json": "^2.0.1", - "proc-log": "^2.0.0", + "npm-install-checks": "^6.0.0", + "npm-package-arg": "^10.0.0", + "npm-pick-manifest": "^8.0.1", + "npm-registry-fetch": "^14.0.2", + "npmlog": "^7.0.1", + "pacote": "^15.0.2", + "parse-conflict-json": "^3.0.0", + "proc-log": "^3.0.0", "promise-all-reject-late": "^1.0.0", "promise-call-limit": "^1.0.1", - "read-package-json-fast": "^2.0.2", + "read-package-json-fast": "^3.0.1", "readdir-scoped-modules": "^1.1.0", - "rimraf": "^3.0.2", "semver": "^7.3.7", - "ssri": "^9.0.0", - "treeverse": "^2.0.0", + "ssri": "^10.0.0", + "treeverse": "^3.0.0", "walk-up-path": "^1.0.0" }, "bin": { "arborist": "bin/index.js" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "benchmark": "^2.1.4", "chalk": "^4.1.0", "minify-registry-metadata": "^2.1.0", @@ -13698,15 +14092,15 @@ } }, "workspaces/libnpmaccess": { - "version": "7.0.0-pre.1", + "version": "7.0.0-pre.2", "license": "ISC", "dependencies": { - "npm-package-arg": "^9.0.1", - "npm-registry-fetch": "^13.0.0" + "npm-package-arg": "^10.0.0", + "npm-registry-fetch": "^14.0.2" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "nock": "^13.2.4", "tap": "^16.0.1" }, @@ -13715,22 +14109,22 @@ } }, "workspaces/libnpmdiff": { - "version": "5.0.0-pre.2", + "version": "5.0.0-pre.3", "license": "ISC", "dependencies": { - "@npmcli/arborist": "^6.0.0-pre.4", - "@npmcli/disparity-colors": "^2.0.0", - "@npmcli/installed-package-contents": "^1.0.7", + "@npmcli/arborist": "^6.0.0-pre.5", + "@npmcli/disparity-colors": "^3.0.0", + "@npmcli/installed-package-contents": "^2.0.0", "binary-extensions": "^2.2.0", "diff": "^5.1.0", "minimatch": "^5.0.1", - "npm-package-arg": "^9.0.1", - "pacote": "^14.0.0", + "npm-package-arg": "^10.0.0", + "pacote": "^15.0.2", "tar": "^6.1.0" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "tap": "^16.0.1" }, "engines": { @@ -13738,28 +14132,26 @@ } }, "workspaces/libnpmexec": { - "version": "5.0.0-pre.4", + "version": "5.0.0-pre.5", "license": "ISC", "dependencies": { - "@npmcli/arborist": "^6.0.0-pre.4", + "@npmcli/arborist": "^6.0.0-pre.5", "@npmcli/ci-detect": "^3.0.0", - "@npmcli/fs": "^2.1.1", - "@npmcli/run-script": "^4.2.0", + "@npmcli/run-script": "^5.0.0", "chalk": "^4.1.0", - "mkdirp-infer-owner": "^2.0.0", - "npm-package-arg": "^9.0.1", - "npmlog": "^6.0.2", - "pacote": "^14.0.0", - "proc-log": "^2.0.0", + "npm-package-arg": "^10.0.0", + "npmlog": "^7.0.1", + "pacote": "^15.0.2", + "proc-log": "^3.0.0", "read": "^1.0.7", - "read-package-json-fast": "^2.0.2", + "read-package-json-fast": "^3.0.1", "semver": "^7.3.7", "walk-up-path": "^1.0.0" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", - "bin-links": "^3.0.3", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", + "bin-links": "^4.0.1", "minify-registry-metadata": "^2.2.0", "mkdirp": "^1.0.4", "tap": "^16.0.1" @@ -13769,14 +14161,14 @@ } }, "workspaces/libnpmfund": { - "version": "4.0.0-pre.4", + "version": "4.0.0-pre.5", "license": "ISC", "dependencies": { - "@npmcli/arborist": "^6.0.0-pre.4" + "@npmcli/arborist": "^6.0.0-pre.5" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "tap": "^16.0.1" }, "engines": { @@ -13784,15 +14176,15 @@ } }, "workspaces/libnpmhook": { - "version": "9.0.0-pre.0", + "version": "9.0.0-pre.1", "license": "ISC", "dependencies": { "aproba": "^2.0.0", - "npm-registry-fetch": "^13.0.0" + "npm-registry-fetch": "^14.0.2" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "nock": "^13.2.4", "tap": "^16.0.1" }, @@ -13801,15 +14193,15 @@ } }, "workspaces/libnpmorg": { - "version": "5.0.0-pre.0", + "version": "5.0.0-pre.1", "license": "ISC", "dependencies": { "aproba": "^2.0.0", - "npm-registry-fetch": "^13.0.0" + "npm-registry-fetch": "^14.0.2" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "minipass": "^3.1.1", "nock": "^13.2.4", "tap": "^16.0.1" @@ -13819,17 +14211,17 @@ } }, "workspaces/libnpmpack": { - "version": "5.0.0-pre.2", + "version": "5.0.0-pre.4", "license": "ISC", "dependencies": { - "@npmcli/arborist": "^6.0.0-pre.4", - "@npmcli/run-script": "^4.1.3", - "npm-package-arg": "^9.0.1", - "pacote": "^14.0.0" + "@npmcli/arborist": "^6.0.0-pre.5", + "@npmcli/run-script": "^5.0.0", + "npm-package-arg": "^10.0.0", + "pacote": "^15.0.2" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "nock": "^13.0.7", "spawk": "^1.7.1", "tap": "^16.0.1" @@ -13839,19 +14231,19 @@ } }, "workspaces/libnpmpublish": { - "version": "7.0.0-pre.2", + "version": "7.0.0-pre.4", "license": "ISC", "dependencies": { - "normalize-package-data": "^4.0.0", - "npm-package-arg": "^9.0.1", - "npm-registry-fetch": "^13.0.0", + "normalize-package-data": "^5.0.0", + "npm-package-arg": "^10.0.0", + "npm-registry-fetch": "^14.0.2", "semver": "^7.3.7", - "ssri": "^9.0.0" + "ssri": "^10.0.0" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", - "libnpmpack": "^5.0.0-pre.2", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", + "libnpmpack": "^5.0.0-pre.4", "lodash.clonedeep": "^4.5.0", "nock": "^13.2.4", "tap": "^16.0.1" @@ -13861,14 +14253,14 @@ } }, "workspaces/libnpmsearch": { - "version": "6.0.0-pre.0", + "version": "6.0.0-pre.1", "license": "ISC", "dependencies": { - "npm-registry-fetch": "^13.0.0" + "npm-registry-fetch": "^14.0.2" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "nock": "^13.2.4", "tap": "^16.0.1" }, @@ -13877,15 +14269,15 @@ } }, "workspaces/libnpmteam": { - "version": "5.0.0-pre.0", + "version": "5.0.0-pre.1", "license": "ISC", "dependencies": { "aproba": "^2.0.0", - "npm-registry-fetch": "^13.0.0" + "npm-registry-fetch": "^14.0.2" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "nock": "^13.2.4", "tap": "^16.0.1" }, @@ -13894,18 +14286,18 @@ } }, "workspaces/libnpmversion": { - "version": "4.0.0-pre.0", + "version": "4.0.0-pre.1", "license": "ISC", "dependencies": { - "@npmcli/git": "^3.0.0", - "@npmcli/run-script": "^4.1.3", - "json-parse-even-better-errors": "^2.3.1", - "proc-log": "^2.0.0", + "@npmcli/git": "^4.0.1", + "@npmcli/run-script": "^5.0.0", + "json-parse-even-better-errors": "^3.0.0", + "proc-log": "^3.0.0", "semver": "^7.3.7" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "require-inject": "^1.4.4", "tap": "^16.0.1" }, diff --git a/package.json b/package.json index 398a73cccf103..69887d22d0c22 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "9.0.0-pre.4", + "version": "9.0.0-pre.6", "name": "npm", "description": "a package manager for JavaScript", "workspaces": [ @@ -56,18 +56,16 @@ }, "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/arborist": "^6.0.0-pre.4", + "@npmcli/arborist": "^6.0.0-pre.5", "@npmcli/ci-detect": "^3.0.0", - "@npmcli/config": "^4.2.1", - "@npmcli/fs": "^2.1.0", - "@npmcli/map-workspaces": "^2.0.3", - "@npmcli/package-json": "^2.0.0", - "@npmcli/run-script": "^4.2.1", + "@npmcli/config": "^6.0.1", + "@npmcli/map-workspaces": "^3.0.0", + "@npmcli/package-json": "^3.0.0", + "@npmcli/run-script": "^5.0.0", "abbrev": "~1.1.1", "archy": "~1.0.0", - "cacache": "^16.1.3", + "cacache": "^17.0.1", "chalk": "^4.1.2", - "chownr": "^2.0.0", "cli-columns": "^4.0.0", "cli-table3": "^0.6.2", "columnify": "^1.6.0", @@ -75,66 +73,64 @@ "fs-minipass": "^2.1.0", "glob": "^8.0.1", "graceful-fs": "^4.2.10", - "hosted-git-info": "^5.1.0", + "hosted-git-info": "^6.0.0", "ini": "^3.0.1", - "init-package-json": "^3.0.2", + "init-package-json": "^4.0.1", "is-cidr": "^4.0.2", - "json-parse-even-better-errors": "^2.3.1", - "libnpmaccess": "^7.0.0-pre.1", - "libnpmdiff": "^5.0.0-pre.2", - "libnpmexec": "^5.0.0-pre.4", - "libnpmfund": "^4.0.0-pre.4", - "libnpmhook": "^9.0.0-pre.0", - "libnpmorg": "^5.0.0-pre.0", - "libnpmpack": "^5.0.0-pre.2", - "libnpmpublish": "^7.0.0-pre.2", - "libnpmsearch": "^6.0.0-pre.0", - "libnpmteam": "^5.0.0-pre.0", - "libnpmversion": "^4.0.0-pre.0", - "make-fetch-happen": "^10.2.0", + "json-parse-even-better-errors": "^3.0.0", + "libnpmaccess": "^7.0.0-pre.2", + "libnpmdiff": "^5.0.0-pre.3", + "libnpmexec": "^5.0.0-pre.5", + "libnpmfund": "^4.0.0-pre.5", + "libnpmhook": "^9.0.0-pre.1", + "libnpmorg": "^5.0.0-pre.1", + "libnpmpack": "^5.0.0-pre.4", + "libnpmpublish": "^7.0.0-pre.4", + "libnpmsearch": "^6.0.0-pre.1", + "libnpmteam": "^5.0.0-pre.1", + "libnpmversion": "^4.0.0-pre.1", + "make-fetch-happen": "^11.0.1", "minimatch": "^5.1.0", "minipass": "^3.1.6", "minipass-pipeline": "^1.2.4", "mkdirp": "^1.0.4", - "mkdirp-infer-owner": "^2.0.0", "ms": "^2.1.2", "node-gyp": "^9.1.0", "nopt": "^6.0.0", - "npm-audit-report": "^3.0.0", - "npm-install-checks": "^5.0.0", - "npm-package-arg": "^9.1.2", - "npm-pick-manifest": "^7.0.2", - "npm-profile": "^7.0.0", - "npm-registry-fetch": "^13.3.1", + "npm-audit-report": "^4.0.0", + "npm-install-checks": "^6.0.0", + "npm-package-arg": "^10.0.0", + "npm-pick-manifest": "^8.0.1", + "npm-profile": "^7.0.1", + "npm-registry-fetch": "^14.0.2", "npm-user-validate": "^1.0.1", - "npmlog": "^6.0.2", + "npmlog": "^7.0.1", "opener": "^1.5.2", "p-map": "^4.0.0", - "pacote": "^14.0.0", - "parse-conflict-json": "^2.0.2", - "proc-log": "^2.0.1", + "pacote": "^15.0.2", + "parse-conflict-json": "^3.0.0", + "proc-log": "^3.0.0", "qrcode-terminal": "^0.12.0", "read": "~1.0.7", - "read-package-json": "^5.0.2", - "read-package-json-fast": "^2.0.3", + "read-package-json": "^6.0.0", + "read-package-json-fast": "^3.0.1", "readdir-scoped-modules": "^1.1.0", "rimraf": "^3.0.2", "semver": "^7.3.8", - "ssri": "^9.0.1", + "ssri": "^10.0.0", "tar": "^6.1.11", "text-table": "~0.2.0", "tiny-relative-date": "^1.3.0", - "treeverse": "^2.0.0", - "validate-npm-package-name": "^4.0.0", + "treeverse": "^3.0.0", + "validate-npm-package-name": "^5.0.0", "which": "^2.0.2", - "write-file-atomic": "^4.0.1" + "write-file-atomic": "^5.0.0" }, "bundleDependencies": [ "@isaacs/string-locale-compare", "@npmcli/arborist", "@npmcli/ci-detect", "@npmcli/config", - "@npmcli/fs", "@npmcli/map-workspaces", "@npmcli/package-json", "@npmcli/run-script", @@ -142,7 +138,6 @@ "archy", "cacache", "chalk", - "chownr", "cli-columns", "cli-table3", "columnify", @@ -171,7 +166,6 @@ "minipass", "minipass-pipeline", "mkdirp", - "mkdirp-infer-owner", "ms", "node-gyp", "nopt", @@ -205,13 +199,14 @@ "write-file-atomic" ], "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/git": "^3.0.2", - "@npmcli/promise-spawn": "^3.0.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/docs": "^1.0.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/git": "^4.0.1", + "@npmcli/promise-spawn": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "licensee": "^8.2.0", "nock": "^13.2.4", - "npm-packlist": "^7.0.0", + "npm-packlist": "^7.0.1", "spawk": "^1.7.1", "tap": "^16.0.1" }, @@ -223,7 +218,7 @@ "test": "tap", "test-all": "node . run test -ws -iwr --if-present", "snap": "tap", - "postsnap": "make -s docs", + "prepack": "node . run build -w docs", "test:nocleanup": "NO_TEST_CLEANUP=1 node . run test --", "sudotest": "sudo node . run run test --", "sudotest:nocleanup": "sudo NO_TEST_CLEANUP=1 node . run test --", @@ -258,7 +253,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.0", + "version": "4.6.2", "content": "./scripts/template-oss/root.js" }, "license": "Artistic-2.0", diff --git a/scripts/bundle-and-gitignore-deps.js b/scripts/bundle-and-gitignore-deps.js index 4010046eb3fd8..bbe08a7836147 100644 --- a/scripts/bundle-and-gitignore-deps.js +++ b/scripts/bundle-and-gitignore-deps.js @@ -5,7 +5,7 @@ const packlist = require('npm-packlist') const git = require('@npmcli/git') const { resolve, join, relative } = require('path') const localeCompare = require('@isaacs/string-locale-compare')('en') -const fs = require('@npmcli/fs') +const fs = require('fs/promises') const PackageJson = require('@npmcli/package-json') const RM_FLAG = '--remove-ignored-files' diff --git a/scripts/resetdeps.sh b/scripts/resetdeps.sh index 758edef648bda..3172f8c869bd9 100755 --- a/scripts/resetdeps.sh +++ b/scripts/resetdeps.sh @@ -9,3 +9,9 @@ git checkout node_modules node . i --ignore-scripts --no-audit --no-fund "$@" node . rebuild --ignore-scripts node . run dependencies --ignore-scripts +# check for cmark-gfm bindings +cmarkbinding=$(find `node . ls cmark-gfm --parseable \ +| head -n 1` -name binding.node) +if [[ ! $cmarkbinding ]]; then + node . rebuild cmark-gfm +fi diff --git a/scripts/template-oss/audit.yml b/scripts/template-oss/audit.yml new file mode 100644 index 0000000000000..3859c5e3dbba1 --- /dev/null +++ b/scripts/template-oss/audit.yml @@ -0,0 +1,13 @@ +name: Audit + +on: + workflow_dispatch: + schedule: + # "At 08:00 UTC (01:00 PT) on Monday" https://crontab.guru/#0_8_*_*_1 + - cron: "0 8 * * 1" + +jobs: + audit: + {{> job jobName="Audit Dependencies" jobDepFlags="--package-lock" }} + - name: Run Audit + run: {{ rootNpmPath }} audit -iwr -w workspaces diff --git a/scripts/template-oss/ci.yml b/scripts/template-oss/ci.yml index c78efe5e2c560..f1dcc1a4b427a 100644 --- a/scripts/template-oss/ci.yml +++ b/scripts/template-oss/ci.yml @@ -1,12 +1,5 @@ {{> ci }} - check-docs: - {{> job jobName="Check Docs" }} - - name: Make Docs - run: make freshdocs - - name: Check Git Status - run: node scripts/git-dirty.js - licenses: {{> job jobName="Check Licenses" }} - name: Check Licenses diff --git a/scripts/template-oss/root.js b/scripts/template-oss/root.js index fdcdd6b6663c6..13bd4c5faabc3 100644 --- a/scripts/template-oss/root.js +++ b/scripts/template-oss/root.js @@ -5,12 +5,17 @@ module.exports = { '.github/ISSUE_TEMPLATE/bug.yml': false, '.github/workflows/ci.yml': 'ci.yml', '.github/workflows/ci-release.yml': 'ci-release.yml', + '.github/dependabot.yml': false, + '.github/workflows/post-dependabot.yml': false, + '.github/workflows/audit.yml': 'audit.yml', }, }, workspaceRepo: { add: { '.github/workflows/release.yml': false, '.github/workflows/ci-release.yml': false, + '.github/dependabot.yml': false, + '.github/workflows/post-dependabot.yml': false, }, }, lockfile: true, diff --git a/smoke-tests/package.json b/smoke-tests/package.json index a63b5ce15d3ac..c9b08a175caec 100644 --- a/smoke-tests/package.json +++ b/smoke-tests/package.json @@ -18,9 +18,9 @@ "directory": "smoke-tests" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/promise-spawn": "^3.0.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/promise-spawn": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "minify-registry-metadata": "^2.2.0", "rimraf": "^3.0.2", "tap": "^16.0.1", @@ -30,7 +30,7 @@ "license": "ISC", "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.0", + "version": "4.6.2", "content": "../scripts/template-oss/index.js" }, "tap": { diff --git a/smoke-tests/tap-snapshots/test/index.js.test.cjs b/smoke-tests/tap-snapshots/test/index.js.test.cjs index 5a08980433547..98030692de8e4 100644 --- a/smoke-tests/tap-snapshots/test/index.js.test.cjs +++ b/smoke-tests/tap-snapshots/test/index.js.test.cjs @@ -56,7 +56,8 @@ npm ERR! npm ci npm ERR! npm ERR! Options: npm ERR! [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] -npm ERR! [-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling] +npm ERR! [-E|--save-exact] [-g|--global] [--install-strategy <hoisted|nested|shallow>] +npm ERR! [--legacy-bundling] [--global-style] npm ERR! [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] npm ERR! [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] npm ERR! [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] diff --git a/tap-snapshots/test/lib/commands/config.js.test.cjs b/tap-snapshots/test/lib/commands/config.js.test.cjs index 116ccea3a12ef..4170dd9078c86 100644 --- a/tap-snapshots/test/lib/commands/config.js.test.cjs +++ b/tap-snapshots/test/lib/commands/config.js.test.cjs @@ -60,8 +60,8 @@ exports[`test/lib/commands/config.js TAP config list --json > output matches sna "git": "git", "git-tag-version": true, "global": false, - "global-style": false, "globalconfig": "{GLOBALPREFIX}/npmrc", + "global-style": false, "heading": "npm", "https-proxy": null, "if-present": false, @@ -82,6 +82,7 @@ exports[`test/lib/commands/config.js TAP config list --json > output matches sna "init.module": "{HOME}/.npm-init.js", "init.version": "1.0.0", "install-links": true, + "install-strategy": "hoisted", "key": null, "legacy-bundling": false, "legacy-peer-deps": false, @@ -96,11 +97,9 @@ exports[`test/lib/commands/config.js TAP config list --json > output matches sna "maxsockets": 15, "message": "%s", "node-options": null, - "node-version": "{NODE-VERSION}", "noproxy": [ "" ], - "npm-version": "{NPM-VERSION}", "offline": false, "omit": [], "omit-lockfile-registry-resolved": false, @@ -236,6 +235,7 @@ init.license = "ISC" init.module = "{HOME}/.npm-init.js" init.version = "1.0.0" install-links = true +install-strategy = "hoisted" json = false key = null legacy-bundling = false @@ -252,9 +252,7 @@ maxsockets = 15 message = "%s" metrics-registry = "https://registry.npmjs.org/" node-options = null -node-version = "{NODE-VERSION}" noproxy = [""] -npm-version = "{NPM-VERSION}" offline = false omit = [] omit-lockfile-registry-resolved = false diff --git a/tap-snapshots/test/lib/commands/dist-tag.js.test.cjs b/tap-snapshots/test/lib/commands/dist-tag.js.test.cjs index 73cc223a9a0b9..da7944402afc6 100644 --- a/tap-snapshots/test/lib/commands/dist-tag.js.test.cjs +++ b/tap-snapshots/test/lib/commands/dist-tag.js.test.cjs @@ -21,7 +21,7 @@ latest: 1.0.0 ` exports[`test/lib/commands/dist-tag.js TAP ls on missing package > should log no dist-tag found msg 1`] = ` -dist-tag ls Couldn't get dist-tag data for foo@latest +dist-tag ls Couldn't get dist-tag data for foo@* ` diff --git a/tap-snapshots/test/lib/docs.js.test.cjs b/tap-snapshots/test/lib/docs.js.test.cjs new file mode 100644 index 0000000000000..b1b7d5b6b493e --- /dev/null +++ b/tap-snapshots/test/lib/docs.js.test.cjs @@ -0,0 +1,4278 @@ +/* IMPORTANT + * This snapshot file is auto-generated, but designed for humans. + * It should be checked into source control and tracked carefully. + * Re-generate by setting TAP_SNAPSHOT=1 and running tests. + * Make sure to inspect the output below. Do not ignore changes! + */ +'use strict' +exports[`test/lib/docs.js TAP basic usage > must match snapshot 1`] = ` +npm <command> + +Usage: + +npm install install all the dependencies in your project +npm install <foo> add the <foo> dependency to your project +npm test run this project's tests +npm run <foo> run the script named <foo> +npm <command> -h quick help on <command> +npm -l display usage info for all commands +npm help <term> search for help on <term> +npm help npm more involved overview + +All commands: + + + +Specify configs in the ini-formatted file: + /some/config/file/.npmrc +or on the command line via: npm <command> --key=value + +More configuration info: npm help config +Configuration fields: npm help 7 config + +npm@{VERSION} {BASEDIR} +` + +exports[`test/lib/docs.js TAP command list > abbrevs 1`] = ` +Object { + "ac": "access", + "acc": "access", + "acce": "access", + "acces": "access", + "access": "access", + "add": "add", + "add-": "add-user", + "add-u": "add-user", + "add-us": "add-user", + "add-use": "add-user", + "add-user": "add-user", + "addu": "adduser", + "addus": "adduser", + "adduse": "adduser", + "adduser": "adduser", + "aud": "audit", + "audi": "audit", + "audit": "audit", + "aut": "author", + "auth": "author", + "autho": "author", + "author": "author", + "b": "bugs", + "bu": "bugs", + "bug": "bugs", + "bugs": "bugs", + "c": "c", + "ca": "cache", + "cac": "cache", + "cach": "cache", + "cache": "cache", + "ci": "ci", + "cit": "cit", + "clean-install": "clean-install", + "clean-install-": "clean-install-test", + "clean-install-t": "clean-install-test", + "clean-install-te": "clean-install-test", + "clean-install-tes": "clean-install-test", + "clean-install-test": "clean-install-test", + "com": "completion", + "comp": "completion", + "compl": "completion", + "comple": "completion", + "complet": "completion", + "completi": "completion", + "completio": "completion", + "completion": "completion", + "con": "config", + "conf": "config", + "confi": "config", + "config": "config", + "cr": "create", + "cre": "create", + "crea": "create", + "creat": "create", + "create": "create", + "dd": "ddp", + "ddp": "ddp", + "ded": "dedupe", + "dedu": "dedupe", + "dedup": "dedupe", + "dedupe": "dedupe", + "dep": "deprecate", + "depr": "deprecate", + "depre": "deprecate", + "deprec": "deprecate", + "depreca": "deprecate", + "deprecat": "deprecate", + "deprecate": "deprecate", + "dif": "diff", + "diff": "diff", + "dist-tag": "dist-tag", + "dist-tags": "dist-tags", + "docs": "docs", + "doct": "doctor", + "docto": "doctor", + "doctor": "doctor", + "ed": "edit", + "edi": "edit", + "edit": "edit", + "exe": "exec", + "exec": "exec", + "expla": "explain", + "explai": "explain", + "explain": "explain", + "explo": "explore", + "explor": "explore", + "explore": "explore", + "find": "find", + "find-": "find-dupes", + "find-d": "find-dupes", + "find-du": "find-dupes", + "find-dup": "find-dupes", + "find-dupe": "find-dupes", + "find-dupes": "find-dupes", + "fu": "fund", + "fun": "fund", + "fund": "fund", + "g": "get", + "ge": "get", + "get": "get", + "he": "help", + "hel": "help", + "help": "help", + "hl": "hlep", + "hle": "hlep", + "hlep": "hlep", + "hom": "home", + "home": "home", + "hoo": "hook", + "hook": "hook", + "i": "i", + "ic": "ic", + "in": "in", + "inf": "info", + "info": "info", + "ini": "init", + "init": "init", + "inn": "innit", + "inni": "innit", + "innit": "innit", + "ins": "ins", + "inst": "inst", + "insta": "insta", + "instal": "instal", + "install": "install", + "install-ci": "install-ci-test", + "install-ci-": "install-ci-test", + "install-ci-t": "install-ci-test", + "install-ci-te": "install-ci-test", + "install-ci-tes": "install-ci-test", + "install-ci-test": "install-ci-test", + "install-cl": "install-clean", + "install-cle": "install-clean", + "install-clea": "install-clean", + "install-clean": "install-clean", + "install-t": "install-test", + "install-te": "install-test", + "install-tes": "install-test", + "install-test": "install-test", + "isnt": "isnt", + "isnta": "isnta", + "isntal": "isntal", + "isntall": "isntall", + "isntall-": "isntall-clean", + "isntall-c": "isntall-clean", + "isntall-cl": "isntall-clean", + "isntall-cle": "isntall-clean", + "isntall-clea": "isntall-clean", + "isntall-clean": "isntall-clean", + "iss": "issues", + "issu": "issues", + "issue": "issues", + "issues": "issues", + "it": "it", + "la": "la", + "lin": "link", + "link": "link", + "lis": "list", + "list": "list", + "ll": "ll", + "ln": "ln", + "logi": "login", + "login": "login", + "logo": "logout", + "logou": "logout", + "logout": "logout", + "ls": "ls", + "og": "ogr", + "ogr": "ogr", + "or": "org", + "org": "org", + "ou": "outdated", + "out": "outdated", + "outd": "outdated", + "outda": "outdated", + "outdat": "outdated", + "outdate": "outdated", + "outdated": "outdated", + "ow": "owner", + "own": "owner", + "owne": "owner", + "owner": "owner", + "pa": "pack", + "pac": "pack", + "pack": "pack", + "pi": "ping", + "pin": "ping", + "ping": "ping", + "pk": "pkg", + "pkg": "pkg", + "pre": "prefix", + "pref": "prefix", + "prefi": "prefix", + "prefix": "prefix", + "pro": "profile", + "prof": "profile", + "profi": "profile", + "profil": "profile", + "profile": "profile", + "pru": "prune", + "prun": "prune", + "prune": "prune", + "pu": "publish", + "pub": "publish", + "publ": "publish", + "publi": "publish", + "publis": "publish", + "publish": "publish", + "q": "query", + "qu": "query", + "que": "query", + "quer": "query", + "query": "query", + "r": "r", + "rb": "rb", + "reb": "rebuild", + "rebu": "rebuild", + "rebui": "rebuild", + "rebuil": "rebuild", + "rebuild": "rebuild", + "rem": "remove", + "remo": "remove", + "remov": "remove", + "remove": "remove", + "rep": "repo", + "repo": "repo", + "res": "restart", + "rest": "restart", + "resta": "restart", + "restar": "restart", + "restart": "restart", + "rm": "rm", + "ro": "root", + "roo": "root", + "root": "root", + "rum": "rum", + "run": "run", + "run-": "run-script", + "run-s": "run-script", + "run-sc": "run-script", + "run-scr": "run-script", + "run-scri": "run-script", + "run-scrip": "run-script", + "run-script": "run-script", + "s": "s", + "se": "se", + "sea": "search", + "sear": "search", + "searc": "search", + "search": "search", + "set": "set", + "sho": "show", + "show": "show", + "shr": "shrinkwrap", + "shri": "shrinkwrap", + "shrin": "shrinkwrap", + "shrink": "shrinkwrap", + "shrinkw": "shrinkwrap", + "shrinkwr": "shrinkwrap", + "shrinkwra": "shrinkwrap", + "shrinkwrap": "shrinkwrap", + "si": "sit", + "sit": "sit", + "star": "star", + "stars": "stars", + "start": "start", + "sto": "stop", + "stop": "stop", + "t": "t", + "tea": "team", + "team": "team", + "tes": "test", + "test": "test", + "to": "token", + "tok": "token", + "toke": "token", + "token": "token", + "ts": "tst", + "tst": "tst", + "ud": "udpate", + "udp": "udpate", + "udpa": "udpate", + "udpat": "udpate", + "udpate": "udpate", + "un": "un", + "uni": "uninstall", + "unin": "uninstall", + "unins": "uninstall", + "uninst": "uninstall", + "uninsta": "uninstall", + "uninstal": "uninstall", + "uninstall": "uninstall", + "unl": "unlink", + "unli": "unlink", + "unlin": "unlink", + "unlink": "unlink", + "unp": "unpublish", + "unpu": "unpublish", + "unpub": "unpublish", + "unpubl": "unpublish", + "unpubli": "unpublish", + "unpublis": "unpublish", + "unpublish": "unpublish", + "uns": "unstar", + "unst": "unstar", + "unsta": "unstar", + "unstar": "unstar", + "up": "up", + "upd": "update", + "upda": "update", + "updat": "update", + "update": "update", + "upg": "upgrade", + "upgr": "upgrade", + "upgra": "upgrade", + "upgrad": "upgrade", + "upgrade": "upgrade", + "ur": "urn", + "urn": "urn", + "v": "v", + "veri": "verison", + "veris": "verison", + "veriso": "verison", + "verison": "verison", + "vers": "version", + "versi": "version", + "versio": "version", + "version": "version", + "vi": "view", + "vie": "view", + "view": "view", + "who": "whoami", + "whoa": "whoami", + "whoam": "whoami", + "whoami": "whoami", + "why": "why", + "x": "x", +} +` + +exports[`test/lib/docs.js TAP command list > aliases 1`] = ` +Object { + "add": "install", + "add-user": "adduser", + "author": "owner", + "c": "config", + "cit": "install-ci-test", + "clean-install": "ci", + "clean-install-test": "cit", + "create": "init", + "ddp": "dedupe", + "dist-tags": "dist-tag", + "find": "search", + "hlep": "help", + "home": "docs", + "i": "install", + "ic": "ci", + "in": "install", + "info": "view", + "innit": "init", + "ins": "install", + "inst": "install", + "insta": "install", + "instal": "install", + "install-clean": "ci", + "isnt": "install", + "isnta": "install", + "isntal": "install", + "isntall": "install", + "isntall-clean": "ci", + "issues": "bugs", + "it": "install-test", + "la": "ll", + "list": "ls", + "ln": "link", + "ogr": "org", + "r": "uninstall", + "rb": "rebuild", + "remove": "uninstall", + "rm": "uninstall", + "rum": "run-script", + "run": "run-script", + "s": "search", + "se": "search", + "show": "view", + "sit": "cit", + "t": "test", + "tst": "test", + "udpate": "update", + "un": "uninstall", + "unlink": "uninstall", + "up": "update", + "upgrade": "update", + "urn": "run-script", + "v": "view", + "verison": "version", + "why": "explain", + "x": "exec", +} +` + +exports[`test/lib/docs.js TAP command list > allCommands 1`] = ` +Array [ + "access", + "adduser", + "audit", + "bugs", + "cache", + "ci", + "completion", + "config", + "dedupe", + "deprecate", + "diff", + "dist-tag", + "docs", + "doctor", + "edit", + "exec", + "explain", + "explore", + "find-dupes", + "fund", + "get", + "help", + "help-search", + "hook", + "init", + "install", + "install-ci-test", + "install-test", + "link", + "ll", + "login", + "logout", + "ls", + "org", + "outdated", + "owner", + "pack", + "ping", + "pkg", + "prefix", + "profile", + "prune", + "publish", + "query", + "rebuild", + "repo", + "restart", + "root", + "run-script", + "search", + "set", + "shrinkwrap", + "star", + "stars", + "start", + "stop", + "team", + "test", + "token", + "uninstall", + "unpublish", + "unstar", + "update", + "version", + "view", + "whoami", +] +` + +exports[`test/lib/docs.js TAP command list > commands 1`] = ` +Array [ + "access", + "adduser", + "audit", + "bugs", + "cache", + "ci", + "completion", + "config", + "dedupe", + "deprecate", + "diff", + "dist-tag", + "docs", + "doctor", + "edit", + "exec", + "explain", + "explore", + "find-dupes", + "fund", + "get", + "help", + "hook", + "init", + "install", + "install-ci-test", + "install-test", + "link", + "ll", + "login", + "logout", + "ls", + "org", + "outdated", + "owner", + "pack", + "ping", + "pkg", + "prefix", + "profile", + "prune", + "publish", + "query", + "rebuild", + "repo", + "restart", + "root", + "run-script", + "search", + "set", + "shrinkwrap", + "star", + "stars", + "start", + "stop", + "team", + "test", + "token", + "uninstall", + "unpublish", + "unstar", + "update", + "version", + "view", + "whoami", +] +` + +exports[`test/lib/docs.js TAP command list > plumbing 1`] = ` +Array [ + "help-search", +] +` + +exports[`test/lib/docs.js TAP config > all definitions 1`] = ` +#### \`_auth\` + +* Default: null +* Type: null or String + +A basic-auth string to use when authenticating against the npm registry. +This will ONLY be used to authenticate against the npm registry. For other +registries you will need to scope it like "//other-registry.tld/:_auth" + +Warning: This should generally not be set via a command-line option. It is +safer to use a registry-provided authentication bearer token stored in the +~/.npmrc file by running \`npm login\`. + +#### \`access\` + +* Default: 'public' for new packages, existing packages it will not change the + current level +* Type: null, "restricted", or "public" + +If do not want your scoped package to be publicly viewable (and installable) +set \`--access=restricted\`. + +Unscoped packages can not be set to \`restricted\`. + +Note: This defaults to not changing the current access level for existing +packages. Specifying a value of \`restricted\` or \`public\` during publish will +change the access for an existing package the same way that \`npm access set +status\` would. + +#### \`all\` + +* Default: false +* Type: Boolean + +When running \`npm outdated\` and \`npm ls\`, setting \`--all\` will show all +outdated or installed packages, rather than only those directly depended +upon by the current project. + +#### \`allow-same-version\` + +* Default: false +* Type: Boolean + +Prevents throwing an error when \`npm version\` is used to set the new version +to the same value as the current version. + +#### \`audit\` + +* Default: true +* Type: Boolean + +When "true" submit audit reports alongside the current npm command to the +default registry and all registries configured for scopes. See the +documentation for [\`npm audit\`](/commands/npm-audit) for details on what is +submitted. + +#### \`audit-level\` + +* Default: null +* Type: null, "info", "low", "moderate", "high", "critical", or "none" + +The minimum level of vulnerability for \`npm audit\` to exit with a non-zero +exit code. + +#### \`auth-type\` + +* Default: "web" +* Type: "legacy" or "web" + +What authentication strategy to use with \`login\`. + +#### \`before\` + +* Default: null +* Type: null or Date + +If passed to \`npm install\`, will rebuild the npm tree such that only +versions that were available **on or before** the \`--before\` time get +installed. If there's no versions available for the current set of direct +dependencies, the command will error. + +If the requested version is a \`dist-tag\` and the given tag does not pass the +\`--before\` filter, the most recent version less than or equal to that tag +will be used. For example, \`foo@latest\` might install \`foo@1.2\` even though +\`latest\` is \`2.0\`. + +#### \`bin-links\` + +* Default: true +* Type: Boolean + +Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package +executables. + +Set to false to have it not do this. This can be used to work around the +fact that some file systems don't support symlinks, even on ostensibly Unix +systems. + +#### \`browser\` + +* Default: OS X: \`"open"\`, Windows: \`"start"\`, Others: \`"xdg-open"\` +* Type: null, Boolean, or String + +The browser that is called by npm commands to open websites. + +Set to \`false\` to suppress browser behavior and instead print urls to +terminal. + +Set to \`true\` to use default system URL opener. + +#### \`ca\` + +* Default: null +* Type: null or String (can be set multiple times) + +The Certificate Authority signing certificate that is trusted for SSL +connections to the registry. Values should be in PEM format (Windows calls +it "Base-64 encoded X.509 (.CER)") with newlines replaced by the string +"\\n". For example: + +\`\`\`ini +ca="-----BEGIN CERTIFICATE-----\\nXXXX\\nXXXX\\n-----END CERTIFICATE-----" +\`\`\` + +Set to \`null\` to only allow "known" registrars, or to a specific CA cert to +trust only that specific signing authority. + +Multiple CAs can be trusted by specifying an array of certificates: + +\`\`\`ini +ca[]="..." +ca[]="..." +\`\`\` + +See also the \`strict-ssl\` config. + +#### \`cache\` + +* Default: Windows: \`%LocalAppData%\\npm-cache\`, Posix: \`~/.npm\` +* Type: Path + +The location of npm's cache directory. + +#### \`cafile\` + +* Default: null +* Type: Path + +A path to a file containing one or multiple Certificate Authority signing +certificates. Similar to the \`ca\` setting, but allows for multiple CA's, as +well as for the CA information to be stored in a file on disk. + +#### \`call\` + +* Default: "" +* Type: String + +Optional companion option for \`npm exec\`, \`npx\` that allows for specifying a +custom command to be run along with the installed packages. + +\`\`\`bash +npm exec --package yo --package generator-node --call "yo node" +\`\`\` + + +#### \`ci-name\` + +* Default: The name of the current CI system, or \`null\` when not on a known CI + platform. +* Type: null or String + +The name of a continuous integration system. If not set explicitly, npm will +detect the current CI environment using the +[\`@npmcli/ci-detect\`](http://npm.im/@npmcli/ci-detect) module. + +#### \`cidr\` + +* Default: null +* Type: null or String (can be set multiple times) + +This is a list of CIDR address to be used when configuring limited access +tokens with the \`npm token create\` command. + +#### \`color\` + +* Default: true unless the NO_COLOR environ is set to something other than '0' +* Type: "always" or Boolean + +If false, never shows colors. If \`"always"\` then always shows colors. If +true, then only prints color codes for tty file descriptors. + +#### \`commit-hooks\` + +* Default: true +* Type: Boolean + +Run git commit hooks when using the \`npm version\` command. + +#### \`depth\` + +* Default: \`Infinity\` if \`--all\` is set, otherwise \`1\` +* Type: null or Number + +The depth to go when recursing packages for \`npm ls\`. + +If not set, \`npm ls\` will show only the immediate dependencies of the root +project. If \`--all\` is set, then npm will show all dependencies by default. + +#### \`description\` + +* Default: true +* Type: Boolean + +Show the description in \`npm search\` + +#### \`diff\` + +* Default: +* Type: String (can be set multiple times) + +Define arguments to compare in \`npm diff\`. + +#### \`diff-dst-prefix\` + +* Default: "b/" +* Type: String + +Destination prefix to be used in \`npm diff\` output. + +#### \`diff-ignore-all-space\` + +* Default: false +* Type: Boolean + +Ignore whitespace when comparing lines in \`npm diff\`. + +#### \`diff-name-only\` + +* Default: false +* Type: Boolean + +Prints only filenames when using \`npm diff\`. + +#### \`diff-no-prefix\` + +* Default: false +* Type: Boolean + +Do not show any source or destination prefix in \`npm diff\` output. + +Note: this causes \`npm diff\` to ignore the \`--diff-src-prefix\` and +\`--diff-dst-prefix\` configs. + +#### \`diff-src-prefix\` + +* Default: "a/" +* Type: String + +Source prefix to be used in \`npm diff\` output. + +#### \`diff-text\` + +* Default: false +* Type: Boolean + +Treat all files as text in \`npm diff\`. + +#### \`diff-unified\` + +* Default: 3 +* Type: Number + +The number of lines of context to print in \`npm diff\`. + +#### \`dry-run\` + +* Default: false +* Type: Boolean + +Indicates that you don't want npm to make any changes and that it should +only report what it would have done. This can be passed into any of the +commands that modify your local installation, eg, \`install\`, \`update\`, +\`dedupe\`, \`uninstall\`, as well as \`pack\` and \`publish\`. + +Note: This is NOT honored by other network related commands, eg \`dist-tags\`, +\`owner\`, etc. + +#### \`editor\` + +* Default: The EDITOR or VISUAL environment variables, or 'notepad.exe' on + Windows, or 'vim' on Unix systems +* Type: String + +The command to run for \`npm edit\` and \`npm config edit\`. + +#### \`engine-strict\` + +* Default: false +* Type: Boolean + +If set to true, then npm will stubbornly refuse to install (or even consider +installing) any package that claims to not be compatible with the current +Node.js version. + +This can be overridden by setting the \`--force\` flag. + +#### \`fetch-retries\` + +* Default: 2 +* Type: Number + +The "retries" config for the \`retry\` module to use when fetching packages +from the registry. + +npm will retry idempotent read requests to the registry in the case of +network failures or 5xx HTTP errors. + +#### \`fetch-retry-factor\` + +* Default: 10 +* Type: Number + +The "factor" config for the \`retry\` module to use when fetching packages. + +#### \`fetch-retry-maxtimeout\` + +* Default: 60000 (1 minute) +* Type: Number + +The "maxTimeout" config for the \`retry\` module to use when fetching +packages. + +#### \`fetch-retry-mintimeout\` + +* Default: 10000 (10 seconds) +* Type: Number + +The "minTimeout" config for the \`retry\` module to use when fetching +packages. + +#### \`fetch-timeout\` + +* Default: 300000 (5 minutes) +* Type: Number + +The maximum amount of time to wait for HTTP requests to complete. + +#### \`force\` + +* Default: false +* Type: Boolean + +Removes various protections against unfortunate side effects, common +mistakes, unnecessary performance degradation, and malicious input. + +* Allow clobbering non-npm files in global installs. +* Allow the \`npm version\` command to work on an unclean git repository. +* Allow deleting the cache folder with \`npm cache clean\`. +* Allow installing packages that have an \`engines\` declaration requiring a + different version of npm. +* Allow installing packages that have an \`engines\` declaration requiring a + different version of \`node\`, even if \`--engine-strict\` is enabled. +* Allow \`npm audit fix\` to install modules outside your stated dependency + range (including SemVer-major changes). +* Allow unpublishing all versions of a published package. +* Allow conflicting peerDependencies to be installed in the root project. +* Implicitly set \`--yes\` during \`npm init\`. +* Allow clobbering existing values in \`npm pkg\` +* Allow unpublishing of entire packages (not just a single version). + +If you don't have a clear idea of what you want to do, it is strongly +recommended that you do not use this option! + +#### \`foreground-scripts\` + +* Default: false +* Type: Boolean + +Run all build scripts (ie, \`preinstall\`, \`install\`, and \`postinstall\`) +scripts for installed packages in the foreground process, sharing standard +input, output, and error with the main npm process. + +Note that this will generally make installs run slower, and be much noisier, +but can be useful for debugging. + +#### \`format-package-lock\` + +* Default: true +* Type: Boolean + +Format \`package-lock.json\` or \`npm-shrinkwrap.json\` as a human readable +file. + +#### \`fund\` + +* Default: true +* Type: Boolean + +When "true" displays the message at the end of each \`npm install\` +acknowledging the number of dependencies looking for funding. See [\`npm +fund\`](/commands/npm-fund) for details. + +#### \`git\` + +* Default: "git" +* Type: String + +The command to use for git commands. If git is installed on the computer, +but is not in the \`PATH\`, then set this to the full path to the git binary. + +#### \`git-tag-version\` + +* Default: true +* Type: Boolean + +Tag the commit when using the \`npm version\` command. Setting this to false +results in no commit being made at all. + +#### \`global\` + +* Default: false +* Type: Boolean + +Operates in "global" mode, so that packages are installed into the \`prefix\` +folder instead of the current working directory. See +[folders](/configuring-npm/folders) for more on the differences in behavior. + +* packages are installed into the \`{prefix}/lib/node_modules\` folder, instead + of the current working directory. +* bin files are linked to \`{prefix}/bin\` +* man pages are linked to \`{prefix}/share/man\` + +#### \`globalconfig\` + +* Default: The global --prefix setting plus 'etc/npmrc'. For example, + '/usr/local/etc/npmrc' +* Type: Path + +The config file to read for global config options. + +#### \`heading\` + +* Default: "npm" +* Type: String + +The string that starts all the debugging log output. + +#### \`https-proxy\` + +* Default: null +* Type: null or URL + +A proxy to use for outgoing https requests. If the \`HTTPS_PROXY\` or +\`https_proxy\` or \`HTTP_PROXY\` or \`http_proxy\` environment variables are set, +proxy settings will be honored by the underlying \`make-fetch-happen\` +library. + +#### \`if-present\` + +* Default: false +* Type: Boolean + +If true, npm will not exit with an error code when \`run-script\` is invoked +for a script that isn't defined in the \`scripts\` section of \`package.json\`. +This option can be used when it's desirable to optionally run a script when +it's present and fail if the script fails. This is useful, for example, when +running scripts that may only apply for some builds in an otherwise generic +CI setup. + +This value is not exported to the environment for child processes. + +#### \`ignore-scripts\` + +* Default: false +* Type: Boolean + +If true, npm does not run scripts specified in package.json files. + +Note that commands explicitly intended to run a particular script, such as +\`npm start\`, \`npm stop\`, \`npm restart\`, \`npm test\`, and \`npm run-script\` +will still run their intended script if \`ignore-scripts\` is set, but they +will *not* run any pre- or post-scripts. + +#### \`include\` + +* Default: +* Type: "prod", "dev", "optional", or "peer" (can be set multiple times) + +Option that allows for defining which types of dependencies to install. + +This is the inverse of \`--omit=<type>\`. + +Dependency types specified in \`--include\` will not be omitted, regardless of +the order in which omit/include are specified on the command-line. + +#### \`include-staged\` + +* Default: false +* Type: Boolean + +Allow installing "staged" published packages, as defined by [npm RFC PR +#92](https://github.com/npm/rfcs/pull/92). + +This is experimental, and not implemented by the npm public registry. + +#### \`include-workspace-root\` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the \`workspace\` config, or +all workspaces via the \`workspaces\` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + +This value is not exported to the environment for child processes. + +#### \`init-author-email\` + +* Default: "" +* Type: String + +The value \`npm init\` should use by default for the package author's email. + +#### \`init-author-name\` + +* Default: "" +* Type: String + +The value \`npm init\` should use by default for the package author's name. + +#### \`init-author-url\` + +* Default: "" +* Type: "" or URL + +The value \`npm init\` should use by default for the package author's +homepage. + +#### \`init-license\` + +* Default: "ISC" +* Type: String + +The value \`npm init\` should use by default for the package license. + +#### \`init-module\` + +* Default: "~/.npm-init.js" +* Type: Path + +A module that will be loaded by the \`npm init\` command. See the +documentation for the +[init-package-json](https://github.com/npm/init-package-json) module for +more information, or [npm init](/commands/npm-init). + +#### \`init-version\` + +* Default: "1.0.0" +* Type: SemVer string + +The value that \`npm init\` should use by default for the package version +number, if not already set in package.json. + +#### \`install-links\` + +* Default: true +* Type: Boolean + +When set file: protocol dependencies will be packed and installed as regular +dependencies instead of creating a symlink. This option has no effect on +workspaces. + +#### \`install-strategy\` + +* Default: "hoisted" +* Type: "hoisted", "nested", or "shallow" + +Sets the strategy for installing packages in node_modules. hoisted +(default): Install non-duplicated in top-level, and duplicated as necessary +within directory structure. nested: (formerly --legacy-bundling) install in +place, no hoisting. shallow (formerly --global-style) only install direct +deps at top-level. linked: (coming soon) install in node_modules/.store, +link in place, unhoisted. + +#### \`json\` + +* Default: false +* Type: Boolean + +Whether or not to output JSON data, rather than the normal output. + +* In \`npm pkg set\` it enables parsing set values with JSON.parse() before + saving them to your \`package.json\`. + +Not supported by all npm commands. + +#### \`legacy-peer-deps\` + +* Default: false +* Type: Boolean + +Causes npm to completely ignore \`peerDependencies\` when building a package +tree, as in npm versions 3 through 6. + +If a package cannot be installed because of overly strict \`peerDependencies\` +that collide, it provides a way to move forward resolving the situation. + +This differs from \`--omit=peer\`, in that \`--omit=peer\` will avoid unpacking +\`peerDependencies\` on disk, but will still design a tree such that +\`peerDependencies\` _could_ be unpacked in a correct place. + +Use of \`legacy-peer-deps\` is not recommended, as it will not enforce the +\`peerDependencies\` contract that meta-dependencies may rely on. + +#### \`link\` + +* Default: false +* Type: Boolean + +Used with \`npm ls\`, limiting output to only those packages that are linked. + +#### \`local-address\` + +* Default: null +* Type: IP Address + +The IP address of the local interface to use when making connections to the +npm registry. Must be IPv4 in versions of Node prior to 0.12. + +#### \`location\` + +* Default: "user" unless \`--global\` is passed, which will also set this value + to "global" +* Type: "global", "user", or "project" + +When passed to \`npm config\` this refers to which config file to use. + +When set to "global" mode, packages are installed into the \`prefix\` folder +instead of the current working directory. See +[folders](/configuring-npm/folders) for more on the differences in behavior. + +* packages are installed into the \`{prefix}/lib/node_modules\` folder, instead + of the current working directory. +* bin files are linked to \`{prefix}/bin\` +* man pages are linked to \`{prefix}/share/man\` + +#### \`lockfile-version\` + +* Default: Version 3 if no lockfile, auto-converting v1 lockfiles to v3, + otherwise maintain current lockfile version. +* Type: null, 1, 2, 3, "1", "2", or "3" + +Set the lockfile format version to be used in package-lock.json and +npm-shrinkwrap-json files. Possible options are: + +1: The lockfile version used by npm versions 5 and 6. Lacks some data that +is used during the install, resulting in slower and possibly less +deterministic installs. Prevents lockfile churn when interoperating with +older npm versions. + +2: The default lockfile version used by npm version 7 and 8. Includes both +the version 1 lockfile data and version 3 lockfile data, for maximum +determinism and interoperability, at the expense of more bytes on disk. + +3: Only the new lockfile information introduced in npm version 7. Smaller on +disk than lockfile version 2, but not interoperable with older npm versions. +Ideal if all users are on npm version 7 and higher. + +#### \`loglevel\` + +* Default: "notice" +* Type: "silent", "error", "warn", "notice", "http", "info", "verbose", or + "silly" + +What level of logs to report. All logs are written to a debug log, with the +path to that file printed if the execution of a command fails. + +Any logs of a higher level than the setting are shown. The default is +"notice". + +See also the \`foreground-scripts\` config. + +#### \`logs-dir\` + +* Default: A directory named \`_logs\` inside the cache +* Type: null or Path + +The location of npm's log directory. See [\`npm logging\`](/using-npm/logging) +for more information. + +#### \`logs-max\` + +* Default: 10 +* Type: Number + +The maximum number of log files to store. + +If set to 0, no log files will be written for the current run. + +#### \`long\` + +* Default: false +* Type: Boolean + +Show extended information in \`ls\`, \`search\`, and \`help-search\`. + +#### \`maxsockets\` + +* Default: 15 +* Type: Number + +The maximum number of connections to use per origin (protocol/host/port +combination). + +#### \`message\` + +* Default: "%s" +* Type: String + +Commit message which is used by \`npm version\` when creating version commit. + +Any "%s" in the message will be replaced with the version number. + +#### \`node-options\` + +* Default: null +* Type: null or String + +Options to pass through to Node.js via the \`NODE_OPTIONS\` environment +variable. This does not impact how npm itself is executed but it does impact +how lifecycle scripts are called. + +#### \`noproxy\` + +* Default: The value of the NO_PROXY environment variable +* Type: String (can be set multiple times) + +Domain extensions that should bypass any proxies. + +Also accepts a comma-delimited string. + +#### \`offline\` + +* Default: false +* Type: Boolean + +Force offline mode: no network requests will be done during install. To +allow the CLI to fill in missing cache data, see \`--prefer-offline\`. + +#### \`omit\` + +* Default: 'dev' if the \`NODE_ENV\` environment variable is set to + 'production', otherwise empty. +* Type: "dev", "optional", or "peer" (can be set multiple times) + +Dependency types to omit from the installation tree on disk. + +Note that these dependencies _are_ still resolved and added to the +\`package-lock.json\` or \`npm-shrinkwrap.json\` file. They are just not +physically installed on disk. + +If a package type appears in both the \`--include\` and \`--omit\` lists, then +it will be included. + +If the resulting omit list includes \`'dev'\`, then the \`NODE_ENV\` environment +variable will be set to \`'production'\` for all lifecycle scripts. + +#### \`omit-lockfile-registry-resolved\` + +* Default: false +* Type: Boolean + +This option causes npm to create lock files without a \`resolved\` key for +registry dependencies. Subsequent installs will need to resolve tarball +endpoints with the configured registry, likely resulting in a longer install +time. + +#### \`otp\` + +* Default: null +* Type: null or String + +This is a one-time password from a two-factor authenticator. It's needed +when publishing or changing package permissions with \`npm access\`. + +If not set, and a registry response fails with a challenge for a one-time +password, npm will prompt on the command line for one. + +#### \`pack-destination\` + +* Default: "." +* Type: String + +Directory in which \`npm pack\` will save tarballs. + +#### \`package\` + +* Default: +* Type: String (can be set multiple times) + +The package or packages to install for [\`npm exec\`](/commands/npm-exec) + +#### \`package-lock\` + +* Default: true +* Type: Boolean + +If set to false, then ignore \`package-lock.json\` files when installing. This +will also prevent _writing_ \`package-lock.json\` if \`save\` is true. + +This configuration does not affect \`npm ci\`. + +#### \`package-lock-only\` + +* Default: false +* Type: Boolean + +If set to true, the current operation will only use the \`package-lock.json\`, +ignoring \`node_modules\`. + +For \`update\` this means only the \`package-lock.json\` will be updated, +instead of checking \`node_modules\` and downloading dependencies. + +For \`list\` this means the output will be based on the tree described by the +\`package-lock.json\`, rather than the contents of \`node_modules\`. + +#### \`parseable\` + +* Default: false +* Type: Boolean + +Output parseable results from commands that write to standard output. For +\`npm search\`, this will be tab-separated table format. + +#### \`prefer-offline\` + +* Default: false +* Type: Boolean + +If true, staleness checks for cached data will be bypassed, but missing data +will be requested from the server. To force full offline mode, use +\`--offline\`. + +#### \`prefer-online\` + +* Default: false +* Type: Boolean + +If true, staleness checks for cached data will be forced, making the CLI +look for updates immediately even for fresh package data. + +#### \`prefix\` + +* Default: In global mode, the folder where the node executable is installed. + Otherwise, the nearest parent folder containing either a package.json file + or a node_modules folder. +* Type: Path + +The location to install global items. If set on the command line, then it +forces non-global commands to run in the specified folder. + +#### \`preid\` + +* Default: "" +* Type: String + +The "prerelease identifier" to use as a prefix for the "prerelease" part of +a semver. Like the \`rc\` in \`1.2.0-rc.8\`. + +#### \`progress\` + +* Default: \`true\` unless running in a known CI system +* Type: Boolean + +When set to \`true\`, npm will display a progress bar during time intensive +operations, if \`process.stderr\` is a TTY. + +Set to \`false\` to suppress the progress bar. + +#### \`proxy\` + +* Default: null +* Type: null, false, or URL + +A proxy to use for outgoing http requests. If the \`HTTP_PROXY\` or +\`http_proxy\` environment variables are set, proxy settings will be honored +by the underlying \`request\` library. + +#### \`read-only\` + +* Default: false +* Type: Boolean + +This is used to mark a token as unable to publish when configuring limited +access tokens with the \`npm token create\` command. + +#### \`rebuild-bundle\` + +* Default: true +* Type: Boolean + +Rebuild bundled dependencies after installation. + +#### \`registry\` + +* Default: "https://registry.npmjs.org/" +* Type: URL + +The base URL of the npm registry. + +#### \`replace-registry-host\` + +* Default: "npmjs" +* Type: "npmjs", "never", "always", or String + +Defines behavior for replacing the registry host in a lockfile with the +configured registry. + +The default behavior is to replace package dist URLs from the default +registry (https://registry.npmjs.org) to the configured registry. If set to +"never", then use the registry value. If set to "always", then replace the +registry host with the configured host every time. + +You may also specify a bare hostname (e.g., "registry.npmjs.org"). + +#### \`save\` + +* Default: \`true\` unless when using \`npm update\` where it defaults to \`false\` +* Type: Boolean + +Save installed packages to a \`package.json\` file as dependencies. + +When used with the \`npm rm\` command, removes the dependency from +\`package.json\`. + +Will also prevent writing to \`package-lock.json\` if set to \`false\`. + +#### \`save-bundle\` + +* Default: false +* Type: Boolean + +If a package would be saved at install time by the use of \`--save\`, +\`--save-dev\`, or \`--save-optional\`, then also put it in the +\`bundleDependencies\` list. + +Ignored if \`--save-peer\` is set, since peerDependencies cannot be bundled. + +#### \`save-dev\` + +* Default: false +* Type: Boolean + +Save installed packages to a package.json file as \`devDependencies\`. + +#### \`save-exact\` + +* Default: false +* Type: Boolean + +Dependencies saved to package.json will be configured with an exact version +rather than using npm's default semver range operator. + +#### \`save-optional\` + +* Default: false +* Type: Boolean + +Save installed packages to a package.json file as \`optionalDependencies\`. + +#### \`save-peer\` + +* Default: false +* Type: Boolean + +Save installed packages to a package.json file as \`peerDependencies\` + +#### \`save-prefix\` + +* Default: "^" +* Type: String + +Configure how versions of packages installed to a package.json file via +\`--save\` or \`--save-dev\` get prefixed. + +For example if a package has version \`1.2.3\`, by default its version is set +to \`^1.2.3\` which allows minor upgrades for that package, but after \`npm +config set save-prefix='~'\` it would be set to \`~1.2.3\` which only allows +patch upgrades. + +#### \`save-prod\` + +* Default: false +* Type: Boolean + +Save installed packages into \`dependencies\` specifically. This is useful if +a package already exists in \`devDependencies\` or \`optionalDependencies\`, but +you want to move it to be a non-optional production dependency. + +This is the default behavior if \`--save\` is true, and neither \`--save-dev\` +or \`--save-optional\` are true. + +#### \`scope\` + +* Default: the scope of the current project, if any, or "" +* Type: String + +Associate an operation with a scope for a scoped registry. + +Useful when logging in to or out of a private registry: + +\`\`\` +# log in, linking the scope to the custom registry +npm login --scope=@mycorp --registry=https://registry.mycorp.com + +# log out, removing the link and the auth token +npm logout --scope=@mycorp +\`\`\` + +This will cause \`@mycorp\` to be mapped to the registry for future +installation of packages specified according to the pattern +\`@mycorp/package\`. + +This will also cause \`npm init\` to create a scoped package. + +\`\`\` +# accept all defaults, and create a package named "@foo/whatever", +# instead of just named "whatever" +npm init --scope=@foo --yes +\`\`\` + + +#### \`script-shell\` + +* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows +* Type: null or String + +The shell to use for scripts run with the \`npm exec\`, \`npm run\` and \`npm +init <package-spec>\` commands. + +#### \`searchexclude\` + +* Default: "" +* Type: String + +Space-separated options that limit the results from search. + +#### \`searchlimit\` + +* Default: 20 +* Type: Number + +Number of items to limit search results to. Will not apply at all to legacy +searches. + +#### \`searchopts\` + +* Default: "" +* Type: String + +Space-separated options that are always passed to search. + +#### \`searchstaleness\` + +* Default: 900 +* Type: Number + +The age of the cache, in seconds, before another registry request is made if +using legacy search endpoint. + +#### \`shell\` + +* Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on + Windows +* Type: String + +The shell to run for the \`npm explore\` command. + +#### \`sign-git-commit\` + +* Default: false +* Type: Boolean + +If set to true, then the \`npm version\` command will commit the new package +version using \`-S\` to add a signature. + +Note that git requires you to have set up GPG keys in your git configs for +this to work properly. + +#### \`sign-git-tag\` + +* Default: false +* Type: Boolean + +If set to true, then the \`npm version\` command will tag the version using +\`-s\` to add a signature. + +Note that git requires you to have set up GPG keys in your git configs for +this to work properly. + +#### \`strict-peer-deps\` + +* Default: false +* Type: Boolean + +If set to \`true\`, and \`--legacy-peer-deps\` is not set, then _any_ +conflicting \`peerDependencies\` will be treated as an install failure, even +if npm could reasonably guess the appropriate resolution based on non-peer +dependency relationships. + +By default, conflicting \`peerDependencies\` deep in the dependency graph will +be resolved using the nearest non-peer dependency specification, even if +doing so will result in some packages receiving a peer dependency outside +the range set in their package's \`peerDependencies\` object. + +When such and override is performed, a warning is printed, explaining the +conflict and the packages involved. If \`--strict-peer-deps\` is set, then +this warning is treated as a failure. + +#### \`strict-ssl\` + +* Default: true +* Type: Boolean + +Whether or not to do SSL key validation when making requests to the registry +via https. + +See also the \`ca\` config. + +#### \`tag\` + +* Default: "latest" +* Type: String + +If you ask npm to install a package and don't tell it a specific version, +then it will install the specified tag. + +Also the tag that is added to the package@version specified by the \`npm tag\` +command, if no explicit tag is given. + +When used by the \`npm diff\` command, this is the tag used to fetch the +tarball that will be compared with the local files by default. + +#### \`tag-version-prefix\` + +* Default: "v" +* Type: String + +If set, alters the prefix used when tagging a new version when performing a +version increment using \`npm version\`. To remove the prefix altogether, set +it to the empty string: \`""\`. + +Because other tools may rely on the convention that npm version tags look +like \`v1.0.0\`, _only use this property if it is absolutely necessary_. In +particular, use care when overriding this setting for public packages. + +#### \`timing\` + +* Default: false +* Type: Boolean + +If true, writes timing information to a process specific json file in the +cache or \`logs-dir\`. The file name ends with \`-timing.json\`. + +You can quickly view it with this [json](https://npm.im/json) command line: +\`cat ~/.npm/_logs/*-timing.json | npm exec -- json -g\`. + +Timing information will also be reported in the terminal. To suppress this +while still writing the timing file, use \`--silent\`. + +#### \`umask\` + +* Default: 0 +* Type: Octal numeric string in range 0000..0777 (0..511) + +The "umask" value to use when setting the file creation mode on files and +folders. + +Folders and executables are given a mode which is \`0o777\` masked against +this value. Other files are given a mode which is \`0o666\` masked against +this value. + +Note that the underlying system will _also_ apply its own umask value to +files and folders that are created, and npm does not circumvent this, but +rather adds the \`--umask\` config to it. + +Thus, the effective default umask value on most POSIX systems is 0o22, +meaning that folders and executables are created with a mode of 0o755 and +other files are created with a mode of 0o644. + +#### \`unicode\` + +* Default: false on windows, true on mac/unix systems with a unicode locale, + as defined by the \`LC_ALL\`, \`LC_CTYPE\`, or \`LANG\` environment variables. +* Type: Boolean + +When set to true, npm uses unicode characters in the tree output. When +false, it uses ascii characters instead of unicode glyphs. + +#### \`update-notifier\` + +* Default: true +* Type: Boolean + +Set to false to suppress the update notification when using an older version +of npm than the latest. + +#### \`usage\` + +* Default: false +* Type: Boolean + +Show short usage output about the command specified. + +#### \`user-agent\` + +* Default: "npm/{npm-version} node/{node-version} {platform} {arch} + workspaces/{workspaces} {ci}" +* Type: String + +Sets the User-Agent request header. The following fields are replaced with +their actual counterparts: + +* \`{npm-version}\` - The npm version in use +* \`{node-version}\` - The Node.js version in use +* \`{platform}\` - The value of \`process.platform\` +* \`{arch}\` - The value of \`process.arch\` +* \`{workspaces}\` - Set to \`true\` if the \`workspaces\` or \`workspace\` options + are set. +* \`{ci}\` - The value of the \`ci-name\` config, if set, prefixed with \`ci/\`, or + an empty string if \`ci-name\` is empty. + +#### \`userconfig\` + +* Default: "~/.npmrc" +* Type: Path + +The location of user-level configuration settings. + +This may be overridden by the \`npm_config_userconfig\` environment variable +or the \`--userconfig\` command line option, but may _not_ be overridden by +settings in the \`globalconfig\` file. + +#### \`version\` + +* Default: false +* Type: Boolean + +If true, output the npm version and exit successfully. + +Only relevant when specified explicitly on the command line. + +#### \`versions\` + +* Default: false +* Type: Boolean + +If true, output the npm version as well as node's \`process.versions\` map and +the version in the current working directory's \`package.json\` file if one +exists, and exit successfully. + +Only relevant when specified explicitly on the command line. + +#### \`viewer\` + +* Default: "man" on Posix, "browser" on Windows +* Type: String + +The program to use to view help content. + +Set to \`"browser"\` to view html help content in the default web browser. + +#### \`which\` + +* Default: null +* Type: null or Number + +If there are multiple funding sources, which 1-indexed source URL to open. + +#### \`workspace\` + +* Default: +* Type: String (can be set multiple times) + +Enable running a command in the context of the configured workspaces of the +current project while filtering by running only the workspaces defined by +this configuration option. + +Valid values for the \`workspace\` config are either: + +* Workspace names +* Path to a workspace directory +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) + +When set for the \`npm init\` command, this may be set to the folder of a +workspace which does not yet exist, to create the folder and set it up as a +brand new workspace within the project. + +This value is not exported to the environment for child processes. + +#### \`workspaces\` + +* Default: null +* Type: null or Boolean + +Set to true to run the command in the context of **all** configured +workspaces. + +Explicitly setting this to false will cause commands like \`install\` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the \`node_modules\` tree (install, update, etc.) +will link workspaces into the \`node_modules\` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the \`workspace\` config. + +This value is not exported to the environment for child processes. + +#### \`workspaces-update\` + +* Default: true +* Type: Boolean + +If set to true, the npm cli will run an update after operations that may +possibly change the workspaces installed to the \`node_modules\` folder. + +#### \`yes\` + +* Default: null +* Type: null or Boolean + +Automatically answer "yes" to any prompts that npm might print on the +command line. + +#### \`also\` + +* Default: null +* Type: null, "dev", or "development" +* DEPRECATED: Please use --include=dev instead. + +When set to \`dev\` or \`development\`, this is an alias for \`--include=dev\`. + +#### \`cache-max\` + +* Default: Infinity +* Type: Number +* DEPRECATED: This option has been deprecated in favor of \`--prefer-online\` + +\`--cache-max=0\` is an alias for \`--prefer-online\` + +#### \`cache-min\` + +* Default: 0 +* Type: Number +* DEPRECATED: This option has been deprecated in favor of \`--prefer-offline\`. + +\`--cache-min=9999 (or bigger)\` is an alias for \`--prefer-offline\`. + +#### \`cert\` + +* Default: null +* Type: null or String +* DEPRECATED: \`key\` and \`cert\` are no longer used for most registry + operations. Use registry scoped \`keyfile\` and \`certfile\` instead. Example: + //other-registry.tld/:keyfile=/path/to/key.pem + //other-registry.tld/:certfile=/path/to/cert.crt + +A client certificate to pass when accessing the registry. Values should be +in PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with +newlines replaced by the string "\\n". For example: + +\`\`\`ini +cert="-----BEGIN CERTIFICATE-----\\nXXXX\\nXXXX\\n-----END CERTIFICATE-----" +\`\`\` + +It is _not_ the path to a certificate file, though you can set a +registry-scoped "certfile" path like +"//other-registry.tld/:certfile=/path/to/cert.pem". + +#### \`dev\` + +* Default: false +* Type: Boolean +* DEPRECATED: Please use --include=dev instead. + +Alias for \`--include=dev\`. + +#### \`global-style\` + +* Default: false +* Type: Boolean +* DEPRECATED: This option has been deprecated in favor of + \`--install-strategy=shallow\` + +Only install direct dependencies in the top level \`node_modules\`, but hoist +on deeper dependendencies. Sets \`--install-strategy=shallow\`. + +#### \`init.author.email\` + +* Default: "" +* Type: String +* DEPRECATED: Use \`--init-author-email\` instead. + +Alias for \`--init-author-email\` + +#### \`init.author.name\` + +* Default: "" +* Type: String +* DEPRECATED: Use \`--init-author-name\` instead. + +Alias for \`--init-author-name\` + +#### \`init.author.url\` + +* Default: "" +* Type: "" or URL +* DEPRECATED: Use \`--init-author-url\` instead. + +Alias for \`--init-author-url\` + +#### \`init.license\` + +* Default: "ISC" +* Type: String +* DEPRECATED: Use \`--init-license\` instead. + +Alias for \`--init-license\` + +#### \`init.module\` + +* Default: "~/.npm-init.js" +* Type: Path +* DEPRECATED: Use \`--init-module\` instead. + +Alias for \`--init-module\` + +#### \`init.version\` + +* Default: "1.0.0" +* Type: SemVer string +* DEPRECATED: Use \`--init-version\` instead. + +Alias for \`--init-version\` + +#### \`key\` + +* Default: null +* Type: null or String +* DEPRECATED: \`key\` and \`cert\` are no longer used for most registry + operations. Use registry scoped \`keyfile\` and \`certfile\` instead. Example: + //other-registry.tld/:keyfile=/path/to/key.pem + //other-registry.tld/:certfile=/path/to/cert.crt + +A client key to pass when accessing the registry. Values should be in PEM +format with newlines replaced by the string "\\n". For example: + +\`\`\`ini +key="-----BEGIN PRIVATE KEY-----\\nXXXX\\nXXXX\\n-----END PRIVATE KEY-----" +\`\`\` + +It is _not_ the path to a key file, though you can set a registry-scoped +"keyfile" path like "//other-registry.tld/:keyfile=/path/to/key.pem". + +#### \`legacy-bundling\` + +* Default: false +* Type: Boolean +* DEPRECATED: This option has been deprecated in favor of + \`--install-strategy=nested\` + +Instead of hoisting package installs in \`node_modules\`, install packages in +the same manner that they are depended on. This may cause very deep +directory structures and duplicate package installs as there is no +de-duplicating. Sets \`--install-strategy=nested\`. + +#### \`only\` + +* Default: null +* Type: null, "prod", or "production" +* DEPRECATED: Use \`--omit=dev\` to omit dev dependencies from the install. + +When set to \`prod\` or \`production\`, this is an alias for \`--omit=dev\`. + +#### \`optional\` + +* Default: null +* Type: null or Boolean +* DEPRECATED: Use \`--omit=optional\` to exclude optional dependencies, or + \`--include=optional\` to include them. + +Default value does install optional deps unless otherwise omitted. + +Alias for --include=optional or --omit=optional + +#### \`production\` + +* Default: null +* Type: null or Boolean +* DEPRECATED: Use \`--omit=dev\` instead. + +Alias for \`--omit=dev\` + +#### \`shrinkwrap\` + +* Default: true +* Type: Boolean +* DEPRECATED: Use the --package-lock setting instead. + +Alias for --package-lock + +#### \`tmp\` + +* Default: The value returned by the Node.js \`os.tmpdir()\` method + <https://nodejs.org/api/os.html#os_os_tmpdir> +* Type: Path +* DEPRECATED: This setting is no longer used. npm stores temporary files in a + special location in the cache, and they are managed by + [\`cacache\`](http://npm.im/cacache). + +Historically, the location where temporary files were stored. No longer +relevant. +` + +exports[`test/lib/docs.js TAP config > all keys 1`] = ` +Array [ + "_auth", + "access", + "all", + "allow-same-version", + "also", + "audit", + "audit-level", + "auth-type", + "before", + "bin-links", + "browser", + "ca", + "cache", + "cache-max", + "cache-min", + "cafile", + "call", + "cert", + "ci-name", + "cidr", + "color", + "commit-hooks", + "depth", + "description", + "dev", + "diff", + "diff-ignore-all-space", + "diff-name-only", + "diff-no-prefix", + "diff-dst-prefix", + "diff-src-prefix", + "diff-text", + "diff-unified", + "dry-run", + "editor", + "engine-strict", + "fetch-retries", + "fetch-retry-factor", + "fetch-retry-maxtimeout", + "fetch-retry-mintimeout", + "fetch-timeout", + "force", + "foreground-scripts", + "format-package-lock", + "fund", + "git", + "git-tag-version", + "global", + "globalconfig", + "global-style", + "heading", + "https-proxy", + "if-present", + "ignore-scripts", + "include", + "include-staged", + "include-workspace-root", + "init-author-email", + "init-author-name", + "init-author-url", + "init-license", + "init-module", + "init-version", + "init.author.email", + "init.author.name", + "init.author.url", + "init.license", + "init.module", + "init.version", + "install-links", + "install-strategy", + "json", + "key", + "legacy-bundling", + "legacy-peer-deps", + "link", + "local-address", + "location", + "lockfile-version", + "loglevel", + "logs-dir", + "logs-max", + "long", + "maxsockets", + "message", + "node-options", + "noproxy", + "offline", + "omit", + "omit-lockfile-registry-resolved", + "only", + "optional", + "otp", + "package", + "package-lock", + "package-lock-only", + "pack-destination", + "parseable", + "prefer-offline", + "prefer-online", + "prefix", + "preid", + "production", + "progress", + "proxy", + "read-only", + "rebuild-bundle", + "registry", + "replace-registry-host", + "save", + "save-bundle", + "save-dev", + "save-exact", + "save-optional", + "save-peer", + "save-prefix", + "save-prod", + "scope", + "script-shell", + "searchexclude", + "searchlimit", + "searchopts", + "searchstaleness", + "shell", + "shrinkwrap", + "sign-git-commit", + "sign-git-tag", + "strict-peer-deps", + "strict-ssl", + "tag", + "tag-version-prefix", + "timing", + "tmp", + "umask", + "unicode", + "update-notifier", + "usage", + "user-agent", + "userconfig", + "version", + "versions", + "viewer", + "which", + "workspace", + "workspaces", + "workspaces-update", + "yes", +] +` + +exports[`test/lib/docs.js TAP config > keys that are flattened 1`] = ` +Array [ + "_auth", + "access", + "all", + "allow-same-version", + "also", + "audit", + "audit-level", + "auth-type", + "before", + "bin-links", + "browser", + "ca", + "cache", + "cache-max", + "cache-min", + "cafile", + "call", + "cert", + "ci-name", + "cidr", + "color", + "commit-hooks", + "depth", + "description", + "dev", + "diff", + "diff-ignore-all-space", + "diff-name-only", + "diff-no-prefix", + "diff-dst-prefix", + "diff-src-prefix", + "diff-text", + "diff-unified", + "dry-run", + "editor", + "engine-strict", + "fetch-retries", + "fetch-retry-factor", + "fetch-retry-maxtimeout", + "fetch-retry-mintimeout", + "fetch-timeout", + "force", + "foreground-scripts", + "format-package-lock", + "fund", + "git", + "git-tag-version", + "global", + "globalconfig", + "global-style", + "heading", + "https-proxy", + "if-present", + "ignore-scripts", + "include", + "include-staged", + "include-workspace-root", + "install-links", + "install-strategy", + "json", + "key", + "legacy-bundling", + "legacy-peer-deps", + "local-address", + "location", + "lockfile-version", + "loglevel", + "maxsockets", + "message", + "noproxy", + "offline", + "omit", + "omit-lockfile-registry-resolved", + "only", + "optional", + "otp", + "package", + "package-lock", + "package-lock-only", + "pack-destination", + "parseable", + "prefer-offline", + "prefer-online", + "preid", + "production", + "progress", + "proxy", + "read-only", + "rebuild-bundle", + "registry", + "replace-registry-host", + "save", + "save-bundle", + "save-dev", + "save-exact", + "save-optional", + "save-peer", + "save-prefix", + "save-prod", + "scope", + "script-shell", + "searchexclude", + "searchlimit", + "searchopts", + "searchstaleness", + "shell", + "shrinkwrap", + "sign-git-commit", + "sign-git-tag", + "strict-peer-deps", + "strict-ssl", + "tag", + "tag-version-prefix", + "umask", + "user-agent", + "workspace", + "workspaces", + "workspaces-update", +] +` + +exports[`test/lib/docs.js TAP config > keys that are not flattened 1`] = ` +Array [ + "init-author-email", + "init-author-name", + "init-author-url", + "init-license", + "init-module", + "init-version", + "init.author.email", + "init.author.name", + "init.author.url", + "init.license", + "init.module", + "init.version", + "link", + "logs-dir", + "logs-max", + "long", + "node-options", + "prefix", + "timing", + "tmp", + "unicode", + "update-notifier", + "usage", + "userconfig", + "version", + "versions", + "viewer", + "which", + "yes", +] +` + +exports[`test/lib/docs.js TAP shorthands > docs 1`] = ` +* \`-a\`: \`--all\` +* \`--enjoy-by\`: \`--before\` +* \`-c\`: \`--call\` +* \`--desc\`: \`--description\` +* \`-f\`: \`--force\` +* \`-g\`: \`--global\` +* \`--iwr\`: \`--include-workspace-root\` +* \`-L\`: \`--location\` +* \`-d\`: \`--loglevel info\` +* \`-s\`: \`--loglevel silent\` +* \`--silent\`: \`--loglevel silent\` +* \`--ddd\`: \`--loglevel silly\` +* \`--dd\`: \`--loglevel verbose\` +* \`--verbose\`: \`--loglevel verbose\` +* \`-q\`: \`--loglevel warn\` +* \`--quiet\`: \`--loglevel warn\` +* \`-l\`: \`--long\` +* \`-m\`: \`--message\` +* \`--local\`: \`--no-global\` +* \`-n\`: \`--no-yes\` +* \`--no\`: \`--no-yes\` +* \`-p\`: \`--parseable\` +* \`--porcelain\`: \`--parseable\` +* \`-C\`: \`--prefix\` +* \`--readonly\`: \`--read-only\` +* \`--reg\`: \`--registry\` +* \`-S\`: \`--save\` +* \`-B\`: \`--save-bundle\` +* \`-D\`: \`--save-dev\` +* \`-E\`: \`--save-exact\` +* \`-O\`: \`--save-optional\` +* \`-P\`: \`--save-prod\` +* \`-?\`: \`--usage\` +* \`-h\`: \`--usage\` +* \`-H\`: \`--usage\` +* \`--help\`: \`--usage\` +* \`-v\`: \`--version\` +* \`-w\`: \`--workspace\` +* \`--ws\`: \`--workspaces\` +* \`-y\`: \`--yes\` +` + +exports[`test/lib/docs.js TAP usage access > must match snapshot 1`] = ` +Set access level on published packages + +Usage: +npm access list packages [<user>|<scope>|<scope:team> [<package>] +npm access list collaborators [<package> [<user>]] +npm access get status [<package>] +npm access set status=public|private [<package>] +npm access set mfa=none|publish|automation [<package>] +npm access grant <read-only|read-write> <scope:team> [<package>] +npm access revoke <scope:team> [<package>] + +Options: +[--json] [--otp <otp>] [--registry <registry>] + +Run "npm help access" for more info + +\`\`\`bash +npm access list packages [<user>|<scope>|<scope:team> [<package>] +npm access list collaborators [<package> [<user>]] +npm access get status [<package>] +npm access set status=public|private [<package>] +npm access set mfa=none|publish|automation [<package>] +npm access grant <read-only|read-write> <scope:team> [<package>] +npm access revoke <scope:team> [<package>] +\`\`\` + +#### \`json\` +#### \`otp\` +#### \`registry\` +` + +exports[`test/lib/docs.js TAP usage adduser > must match snapshot 1`] = ` +Add a registry user account + +Usage: +npm adduser + +Options: +[--registry <registry>] [--scope <@scope>] [--auth-type <legacy|web>] + +alias: add-user + +Run "npm help adduser" for more info + +\`\`\`bash +npm adduser + +alias: add-user +\`\`\` + +#### \`registry\` +#### \`scope\` +#### \`auth-type\` +` + +exports[`test/lib/docs.js TAP usage audit > must match snapshot 1`] = ` +Run a security audit + +Usage: +npm audit [fix|signatures] + +Options: +[--audit-level <info|low|moderate|high|critical|none>] [--dry-run] [-f|--force] +[--json] [--package-lock-only] +[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] +[--foreground-scripts] [--ignore-scripts] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] + +Run "npm help audit" for more info + +\`\`\`bash +npm audit [fix|signatures] +\`\`\` + +#### \`audit-level\` +#### \`dry-run\` +#### \`force\` +#### \`json\` +#### \`package-lock-only\` +#### \`omit\` +#### \`foreground-scripts\` +#### \`ignore-scripts\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +#### \`install-links\` +` + +exports[`test/lib/docs.js TAP usage bugs > must match snapshot 1`] = ` +Report bugs for a package in a web browser + +Usage: +npm bugs [<pkgname> [<pkgname> ...]] + +Options: +[--no-browser|--browser <browser>] [--registry <registry>] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] + +alias: issues + +Run "npm help bugs" for more info + +\`\`\`bash +npm bugs [<pkgname> [<pkgname> ...]] + +alias: issues +\`\`\` + +#### \`browser\` +#### \`registry\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +` + +exports[`test/lib/docs.js TAP usage cache > must match snapshot 1`] = ` +Manipulates packages cache + +Usage: +npm cache add <package-spec> +npm cache clean [<key>] +npm cache ls [<name>@<version>] +npm cache verify + +Options: +[--cache <cache>] + +Run "npm help cache" for more info + +\`\`\`bash +npm cache add <package-spec> +npm cache clean [<key>] +npm cache ls [<name>@<version>] +npm cache verify +\`\`\` + +#### \`cache\` +` + +exports[`test/lib/docs.js TAP usage ci > must match snapshot 1`] = ` +Clean install a project + +Usage: +npm ci + +Options: +[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] +[-E|--save-exact] [-g|--global] [--install-strategy <hoisted|nested|shallow>] +[--legacy-bundling] [--global-style] +[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] +[--strict-peer-deps] [--no-package-lock] [--foreground-scripts] +[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] + +aliases: clean-install, ic, install-clean, isntall-clean + +Run "npm help ci" for more info + +\`\`\`bash +npm ci + +aliases: clean-install, ic, install-clean, isntall-clean +\`\`\` + +#### \`save\` +#### \`save-exact\` +#### \`global\` +#### \`install-strategy\` +#### \`legacy-bundling\` +#### \`global-style\` +#### \`omit\` +#### \`strict-peer-deps\` +#### \`package-lock\` +#### \`foreground-scripts\` +#### \`ignore-scripts\` +#### \`audit\` +#### \`bin-links\` +#### \`fund\` +#### \`dry-run\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +#### \`install-links\` +` + +exports[`test/lib/docs.js TAP usage completion > must match snapshot 1`] = ` +Tab Completion for npm + +Usage: +npm completion + +Run "npm help completion" for more info + +\`\`\`bash +npm completion +\`\`\` + +NO PARAMS +` + +exports[`test/lib/docs.js TAP usage config > must match snapshot 1`] = ` +Manage the npm configuration files + +Usage: +npm config set <key>=<value> [<key>=<value> ...] +npm config get [<key> [<key> ...]] +npm config delete <key> [<key> ...] +npm config list [--json] +npm config edit +npm config fix + +Options: +[--json] [-g|--global] [--editor <editor>] [-L|--location <global|user|project>] +[-l|--long] + +alias: c + +Run "npm help config" for more info + +\`\`\`bash +npm config set <key>=<value> [<key>=<value> ...] +npm config get [<key> [<key> ...]] +npm config delete <key> [<key> ...] +npm config list [--json] +npm config edit +npm config fix + +alias: c +\`\`\` + +#### \`json\` +#### \`global\` +#### \`editor\` +#### \`location\` +#### \`long\` +` + +exports[`test/lib/docs.js TAP usage dedupe > must match snapshot 1`] = ` +Reduce duplication in the package tree + +Usage: +npm dedupe + +Options: +[--install-strategy <hoisted|nested|shallow>] [--legacy-bundling] +[--global-style] [--strict-peer-deps] [--no-package-lock] +[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts] +[--no-audit] [--no-bin-links] [--no-fund] [--dry-run] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] + +alias: ddp + +Run "npm help dedupe" for more info + +\`\`\`bash +npm dedupe + +alias: ddp +\`\`\` + +#### \`install-strategy\` +#### \`legacy-bundling\` +#### \`global-style\` +#### \`strict-peer-deps\` +#### \`package-lock\` +#### \`omit\` +#### \`ignore-scripts\` +#### \`audit\` +#### \`bin-links\` +#### \`fund\` +#### \`dry-run\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +#### \`install-links\` +` + +exports[`test/lib/docs.js TAP usage deprecate > must match snapshot 1`] = ` +Deprecate a version of a package + +Usage: +npm deprecate <package-spec> <message> + +Options: +[--registry <registry>] [--otp <otp>] + +Run "npm help deprecate" for more info + +\`\`\`bash +npm deprecate <package-spec> <message> +\`\`\` + +#### \`registry\` +#### \`otp\` +` + +exports[`test/lib/docs.js TAP usage diff > must match snapshot 1`] = ` +The registry diff command + +Usage: +npm diff [...<paths>] + +Options: +[--diff <package-spec> [--diff <package-spec> ...]] [--diff-name-only] +[--diff-unified <number>] [--diff-ignore-all-space] [--diff-no-prefix] +[--diff-src-prefix <path>] [--diff-dst-prefix <path>] [--diff-text] [-g|--global] +[--tag <tag>] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] + +Run "npm help diff" for more info + +\`\`\`bash +npm diff [...<paths>] +\`\`\` + +#### \`diff\` +#### \`diff-name-only\` +#### \`diff-unified\` +#### \`diff-ignore-all-space\` +#### \`diff-no-prefix\` +#### \`diff-src-prefix\` +#### \`diff-dst-prefix\` +#### \`diff-text\` +#### \`global\` +#### \`tag\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +` + +exports[`test/lib/docs.js TAP usage dist-tag > must match snapshot 1`] = ` +Modify package distribution tags + +Usage: +npm dist-tag add <package-spec (with version)> [<tag>] +npm dist-tag rm <package-spec> <tag> +npm dist-tag ls [<package-spec>] + +Options: +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] + +alias: dist-tags + +Run "npm help dist-tag" for more info + +\`\`\`bash +npm dist-tag add <package-spec (with version)> [<tag>] +npm dist-tag rm <package-spec> <tag> +npm dist-tag ls [<package-spec>] + +alias: dist-tags +\`\`\` + +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +` + +exports[`test/lib/docs.js TAP usage docs > must match snapshot 1`] = ` +Open documentation for a package in a web browser + +Usage: +npm docs [<pkgname> [<pkgname> ...]] + +Options: +[--no-browser|--browser <browser>] [--registry <registry>] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] + +alias: home + +Run "npm help docs" for more info + +\`\`\`bash +npm docs [<pkgname> [<pkgname> ...]] + +alias: home +\`\`\` + +#### \`browser\` +#### \`registry\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +` + +exports[`test/lib/docs.js TAP usage doctor > must match snapshot 1`] = ` +Check your npm environment + +Usage: +npm doctor + +Options: +[--registry <registry>] + +Run "npm help doctor" for more info + +\`\`\`bash +npm doctor +\`\`\` + +#### \`registry\` +` + +exports[`test/lib/docs.js TAP usage edit > must match snapshot 1`] = ` +Edit an installed package + +Usage: +npm edit <pkg>[/<subpkg>...] + +Options: +[--editor <editor>] + +Run "npm help edit" for more info + +\`\`\`bash +npm edit <pkg>[/<subpkg>...] +\`\`\` + +#### \`editor\` +` + +exports[`test/lib/docs.js TAP usage exec > must match snapshot 1`] = ` +Run a command from a local or remote npm package + +Usage: +npm exec -- <pkg>[@<version>] [args...] +npm exec --package=<pkg>[@<version>] -- <cmd> [args...] +npm exec -c '<cmd> [args...]' +npm exec --package=foo -c '<cmd> [args...]' + +Options: +[--package <package-spec> [--package <package-spec> ...]] [-c|--call <call>] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] + +alias: x + +Run "npm help exec" for more info + +\`\`\`bash +npm exec -- <pkg>[@<version>] [args...] +npm exec --package=<pkg>[@<version>] -- <cmd> [args...] +npm exec -c '<cmd> [args...]' +npm exec --package=foo -c '<cmd> [args...]' + +alias: x +\`\`\` + +#### \`package\` +#### \`call\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +` + +exports[`test/lib/docs.js TAP usage explain > must match snapshot 1`] = ` +Explain installed packages + +Usage: +npm explain <package-spec> + +Options: +[--json] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] + +alias: why + +Run "npm help explain" for more info + +\`\`\`bash +npm explain <package-spec> + +alias: why +\`\`\` + +#### \`json\` +#### \`workspace\` +` + +exports[`test/lib/docs.js TAP usage explore > must match snapshot 1`] = ` +Browse an installed package + +Usage: +npm explore <pkg> [ -- <command>] + +Options: +[--shell <shell>] + +Run "npm help explore" for more info + +\`\`\`bash +npm explore <pkg> [ -- <command>] +\`\`\` + +#### \`shell\` +` + +exports[`test/lib/docs.js TAP usage find-dupes > must match snapshot 1`] = ` +Find duplication in the package tree + +Usage: +npm find-dupes + +Options: +[--install-strategy <hoisted|nested|shallow>] [--legacy-bundling] +[--global-style] [--strict-peer-deps] [--no-package-lock] +[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts] +[--no-audit] [--no-bin-links] [--no-fund] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] + +Run "npm help find-dupes" for more info + +\`\`\`bash +npm find-dupes +\`\`\` + +#### \`install-strategy\` +#### \`legacy-bundling\` +#### \`global-style\` +#### \`strict-peer-deps\` +#### \`package-lock\` +#### \`omit\` +#### \`ignore-scripts\` +#### \`audit\` +#### \`bin-links\` +#### \`fund\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +#### \`install-links\` +` + +exports[`test/lib/docs.js TAP usage fund > must match snapshot 1`] = ` +Retrieve funding information + +Usage: +npm fund [<package-spec>] + +Options: +[--json] [--no-browser|--browser <browser>] [--unicode] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[--which <fundingSourceNumber>] + +Run "npm help fund" for more info + +\`\`\`bash +npm fund [<package-spec>] +\`\`\` + +#### \`json\` +#### \`browser\` +#### \`unicode\` +#### \`workspace\` +#### \`which\` +` + +exports[`test/lib/docs.js TAP usage get > must match snapshot 1`] = ` +Get a value from the npm configuration + +Usage: +npm get [<key> ...] (See \`npm config\`) + +Run "npm help get" for more info + +\`\`\`bash +npm get [<key> ...] (See \`npm config\`) +\`\`\` + +NO PARAMS +` + +exports[`test/lib/docs.js TAP usage help > must match snapshot 1`] = ` +Get help on npm + +Usage: +npm help <term> [<terms..>] + +Options: +[--viewer <viewer>] + +alias: hlep + +Run "npm help help" for more info + +\`\`\`bash +npm help <term> [<terms..>] + +alias: hlep +\`\`\` + +#### \`viewer\` +` + +exports[`test/lib/docs.js TAP usage help-search > must match snapshot 1`] = ` +Search npm help documentation + +Usage: +npm help-search <text> + +Options: +[-l|--long] + +Run "npm help help-search" for more info + +\`\`\`bash +npm help-search <text> +\`\`\` + +#### \`long\` +` + +exports[`test/lib/docs.js TAP usage hook > must match snapshot 1`] = ` +Manage registry hooks + +Usage: +npm hook add <pkg> <url> <secret> [--type=<type>] +npm hook ls [pkg] +npm hook rm <id> +npm hook update <id> <url> <secret> + +Options: +[--registry <registry>] [--otp <otp>] + +Run "npm help hook" for more info + +\`\`\`bash +npm hook add <pkg> <url> <secret> [--type=<type>] +npm hook ls [pkg] +npm hook rm <id> +npm hook update <id> <url> <secret> +\`\`\` + +#### \`registry\` +#### \`otp\` +` + +exports[`test/lib/docs.js TAP usage init > must match snapshot 1`] = ` +Create a package.json file + +Usage: +npm init <package-spec> (same as \`npx <package-spec>) +npm init <@scope> (same as \`npx <@scope>/create\`) + +Options: +[-y|--yes] [-f|--force] [--scope <@scope>] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--no-workspaces-update] [--include-workspace-root] + +aliases: create, innit + +Run "npm help init" for more info + +\`\`\`bash +npm init <package-spec> (same as \`npx <package-spec>) +npm init <@scope> (same as \`npx <@scope>/create\`) + +aliases: create, innit +\`\`\` + +#### \`yes\` +#### \`force\` +#### \`scope\` +#### \`workspace\` +#### \`workspaces\` +#### \`workspaces-update\` +#### \`include-workspace-root\` +` + +exports[`test/lib/docs.js TAP usage install > must match snapshot 1`] = ` +Install a package + +Usage: +npm install [<package-spec> ...] + +Options: +[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] +[-E|--save-exact] [-g|--global] [--install-strategy <hoisted|nested|shallow>] +[--legacy-bundling] [--global-style] +[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] +[--strict-peer-deps] [--no-package-lock] [--foreground-scripts] +[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] + +aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall + +Run "npm help install" for more info + +\`\`\`bash +npm install [<package-spec> ...] + +aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall +\`\`\` + +#### \`save\` +#### \`save-exact\` +#### \`global\` +#### \`install-strategy\` +#### \`legacy-bundling\` +#### \`global-style\` +#### \`omit\` +#### \`strict-peer-deps\` +#### \`package-lock\` +#### \`foreground-scripts\` +#### \`ignore-scripts\` +#### \`audit\` +#### \`bin-links\` +#### \`fund\` +#### \`dry-run\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +#### \`install-links\` +` + +exports[`test/lib/docs.js TAP usage install-ci-test > must match snapshot 1`] = ` +Install a project with a clean slate and run tests + +Usage: +npm install-ci-test + +Options: +[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] +[-E|--save-exact] [-g|--global] [--install-strategy <hoisted|nested|shallow>] +[--legacy-bundling] [--global-style] +[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] +[--strict-peer-deps] [--no-package-lock] [--foreground-scripts] +[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] + +alias: cit + +Run "npm help install-ci-test" for more info + +\`\`\`bash +npm install-ci-test + +alias: cit +\`\`\` + +#### \`save\` +#### \`save-exact\` +#### \`global\` +#### \`install-strategy\` +#### \`legacy-bundling\` +#### \`global-style\` +#### \`omit\` +#### \`strict-peer-deps\` +#### \`package-lock\` +#### \`foreground-scripts\` +#### \`ignore-scripts\` +#### \`audit\` +#### \`bin-links\` +#### \`fund\` +#### \`dry-run\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +#### \`install-links\` +` + +exports[`test/lib/docs.js TAP usage install-test > must match snapshot 1`] = ` +Install package(s) and run tests + +Usage: +npm install-test [<package-spec> ...] + +Options: +[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] +[-E|--save-exact] [-g|--global] [--install-strategy <hoisted|nested|shallow>] +[--legacy-bundling] [--global-style] +[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] +[--strict-peer-deps] [--no-package-lock] [--foreground-scripts] +[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] + +alias: it + +Run "npm help install-test" for more info + +\`\`\`bash +npm install-test [<package-spec> ...] + +alias: it +\`\`\` + +#### \`save\` +#### \`save-exact\` +#### \`global\` +#### \`install-strategy\` +#### \`legacy-bundling\` +#### \`global-style\` +#### \`omit\` +#### \`strict-peer-deps\` +#### \`package-lock\` +#### \`foreground-scripts\` +#### \`ignore-scripts\` +#### \`audit\` +#### \`bin-links\` +#### \`fund\` +#### \`dry-run\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +#### \`install-links\` +` + +exports[`test/lib/docs.js TAP usage link > must match snapshot 1`] = ` +Symlink a package folder + +Usage: +npm link [<package-spec>] + +Options: +[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] +[-E|--save-exact] [-g|--global] [--install-strategy <hoisted|nested|shallow>] +[--legacy-bundling] [--global-style] [--strict-peer-deps] [--no-package-lock] +[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts] +[--no-audit] [--no-bin-links] [--no-fund] [--dry-run] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] + +alias: ln + +Run "npm help link" for more info + +\`\`\`bash +npm link [<package-spec>] + +alias: ln +\`\`\` + +#### \`save\` +#### \`save-exact\` +#### \`global\` +#### \`install-strategy\` +#### \`legacy-bundling\` +#### \`global-style\` +#### \`strict-peer-deps\` +#### \`package-lock\` +#### \`omit\` +#### \`ignore-scripts\` +#### \`audit\` +#### \`bin-links\` +#### \`fund\` +#### \`dry-run\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +#### \`install-links\` +` + +exports[`test/lib/docs.js TAP usage ll > must match snapshot 1`] = ` +List installed packages + +Usage: +npm ll [[<@scope>/]<pkg> ...] + +Options: +[-a|--all] [--json] [-l|--long] [-p|--parseable] [-g|--global] [--depth <depth>] +[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--link] +[--package-lock-only] [--unicode] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] + +alias: la + +Run "npm help ll" for more info + +\`\`\`bash +npm ll [[<@scope>/]<pkg> ...] + +alias: la +\`\`\` + +#### \`all\` +#### \`json\` +#### \`long\` +#### \`parseable\` +#### \`global\` +#### \`depth\` +#### \`omit\` +#### \`link\` +#### \`package-lock-only\` +#### \`unicode\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +#### \`install-links\` +` + +exports[`test/lib/docs.js TAP usage login > must match snapshot 1`] = ` +Login to a registry user account + +Usage: +npm login + +Options: +[--registry <registry>] [--scope <@scope>] [--auth-type <legacy|web>] + +Run "npm help login" for more info + +\`\`\`bash +npm login +\`\`\` + +#### \`registry\` +#### \`scope\` +#### \`auth-type\` +` + +exports[`test/lib/docs.js TAP usage logout > must match snapshot 1`] = ` +Log out of the registry + +Usage: +npm logout + +Options: +[--registry <registry>] [--scope <@scope>] + +Run "npm help logout" for more info + +\`\`\`bash +npm logout +\`\`\` + +#### \`registry\` +#### \`scope\` +` + +exports[`test/lib/docs.js TAP usage ls > must match snapshot 1`] = ` +List installed packages + +Usage: +npm ls <package-spec> + +Options: +[-a|--all] [--json] [-l|--long] [-p|--parseable] [-g|--global] [--depth <depth>] +[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--link] +[--package-lock-only] [--unicode] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] + +alias: list + +Run "npm help ls" for more info + +\`\`\`bash +npm ls <package-spec> + +alias: list +\`\`\` + +#### \`all\` +#### \`json\` +#### \`long\` +#### \`parseable\` +#### \`global\` +#### \`depth\` +#### \`omit\` +#### \`link\` +#### \`package-lock-only\` +#### \`unicode\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +#### \`install-links\` +` + +exports[`test/lib/docs.js TAP usage npm > must match snapshot 1`] = ` +\`\`\`bash +npm +\`\`\` + +NO PARAMS +` + +exports[`test/lib/docs.js TAP usage npx > must match snapshot 1`] = ` +\`\`\`bash +npx -- <pkg>[@<version>] [args...] +npx --package=<pkg>[@<version>] -- <cmd> [args...] +npx -c '<cmd> [args...]' +npx --package=foo -c '<cmd> [args...]' +\`\`\` + +NO PARAMS +` + +exports[`test/lib/docs.js TAP usage org > must match snapshot 1`] = ` +Manage orgs + +Usage: +npm org set orgname username [developer | admin | owner] +npm org rm orgname username +npm org ls orgname [<username>] + +Options: +[--registry <registry>] [--otp <otp>] [--json] [-p|--parseable] + +alias: ogr + +Run "npm help org" for more info + +\`\`\`bash +npm org set orgname username [developer | admin | owner] +npm org rm orgname username +npm org ls orgname [<username>] + +alias: ogr +\`\`\` + +#### \`registry\` +#### \`otp\` +#### \`json\` +#### \`parseable\` +` + +exports[`test/lib/docs.js TAP usage outdated > must match snapshot 1`] = ` +Check for outdated packages + +Usage: +npm outdated [<package-spec> ...] + +Options: +[-a|--all] [--json] [-l|--long] [-p|--parseable] [-g|--global] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] + +Run "npm help outdated" for more info + +\`\`\`bash +npm outdated [<package-spec> ...] +\`\`\` + +#### \`all\` +#### \`json\` +#### \`long\` +#### \`parseable\` +#### \`global\` +#### \`workspace\` +` + +exports[`test/lib/docs.js TAP usage owner > must match snapshot 1`] = ` +Manage package owners + +Usage: +npm owner add <user> <package-spec> +npm owner rm <user> <package-spec> +npm owner ls <package-spec> + +Options: +[--registry <registry>] [--otp <otp>] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] + +alias: author + +Run "npm help owner" for more info + +\`\`\`bash +npm owner add <user> <package-spec> +npm owner rm <user> <package-spec> +npm owner ls <package-spec> + +alias: author +\`\`\` + +#### \`registry\` +#### \`otp\` +#### \`workspace\` +#### \`workspaces\` +` + +exports[`test/lib/docs.js TAP usage pack > must match snapshot 1`] = ` +Create a tarball from a package + +Usage: +npm pack <package-spec> + +Options: +[--dry-run] [--json] [--pack-destination <pack-destination>] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] + +Run "npm help pack" for more info + +\`\`\`bash +npm pack <package-spec> +\`\`\` + +#### \`dry-run\` +#### \`json\` +#### \`pack-destination\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +` + +exports[`test/lib/docs.js TAP usage ping > must match snapshot 1`] = ` +Ping npm registry + +Usage: +npm ping + +Options: +[--registry <registry>] + +Run "npm help ping" for more info + +\`\`\`bash +npm ping +\`\`\` + +#### \`registry\` +` + +exports[`test/lib/docs.js TAP usage pkg > must match snapshot 1`] = ` +Manages your package.json + +Usage: +npm pkg set <key>=<value> [<key>=<value> ...] +npm pkg get [<key> [<key> ...]] +npm pkg delete <key> [<key> ...] +npm pkg set [<array>[<index>].<key>=<value> ...] +npm pkg set [<array>[].<key>=<value> ...] + +Options: +[-f|--force] [--json] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] + +Run "npm help pkg" for more info + +\`\`\`bash +npm pkg set <key>=<value> [<key>=<value> ...] +npm pkg get [<key> [<key> ...]] +npm pkg delete <key> [<key> ...] +npm pkg set [<array>[<index>].<key>=<value> ...] +npm pkg set [<array>[].<key>=<value> ...] +\`\`\` + +#### \`force\` +#### \`json\` +#### \`workspace\` +#### \`workspaces\` +` + +exports[`test/lib/docs.js TAP usage prefix > must match snapshot 1`] = ` +Display prefix + +Usage: +npm prefix [-g] + +Options: +[-g|--global] + +Run "npm help prefix" for more info + +\`\`\`bash +npm prefix [-g] +\`\`\` + +#### \`global\` +` + +exports[`test/lib/docs.js TAP usage profile > must match snapshot 1`] = ` +Change settings on your registry profile + +Usage: +npm profile enable-2fa [auth-only|auth-and-writes] +npm profile disable-2fa +npm profile get [<key>] +npm profile set <key> <value> + +Options: +[--registry <registry>] [--json] [-p|--parseable] [--otp <otp>] + +Run "npm help profile" for more info + +\`\`\`bash +npm profile enable-2fa [auth-only|auth-and-writes] +npm profile disable-2fa +npm profile get [<key>] +npm profile set <key> <value> +\`\`\` + +#### \`registry\` +#### \`json\` +#### \`parseable\` +#### \`otp\` +` + +exports[`test/lib/docs.js TAP usage prune > must match snapshot 1`] = ` +Remove extraneous packages + +Usage: +npm prune [[<@scope>/]<pkg>...] + +Options: +[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--dry-run] +[--json] [--foreground-scripts] [--ignore-scripts] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] + +Run "npm help prune" for more info + +\`\`\`bash +npm prune [[<@scope>/]<pkg>...] +\`\`\` + +#### \`omit\` +#### \`dry-run\` +#### \`json\` +#### \`foreground-scripts\` +#### \`ignore-scripts\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +#### \`install-links\` +` + +exports[`test/lib/docs.js TAP usage publish > must match snapshot 1`] = ` +Publish a package + +Usage: +npm publish <package-spec> + +Options: +[--tag <tag>] [--access <restricted|public>] [--dry-run] [--otp <otp>] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] + +Run "npm help publish" for more info + +\`\`\`bash +npm publish <package-spec> +\`\`\` + +#### \`tag\` +#### \`access\` +#### \`dry-run\` +#### \`otp\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +` + +exports[`test/lib/docs.js TAP usage query > must match snapshot 1`] = ` +Retrieve a filtered list of packages + +Usage: +npm query <selector> + +Options: +[-g|--global] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] + +Run "npm help query" for more info + +\`\`\`bash +npm query <selector> +\`\`\` + +#### \`global\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +` + +exports[`test/lib/docs.js TAP usage rebuild > must match snapshot 1`] = ` +Rebuild a package + +Usage: +npm rebuild [<package-spec>] ...] + +Options: +[-g|--global] [--no-bin-links] [--foreground-scripts] [--ignore-scripts] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] + +alias: rb + +Run "npm help rebuild" for more info + +\`\`\`bash +npm rebuild [<package-spec>] ...] + +alias: rb +\`\`\` + +#### \`global\` +#### \`bin-links\` +#### \`foreground-scripts\` +#### \`ignore-scripts\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +#### \`install-links\` +` + +exports[`test/lib/docs.js TAP usage repo > must match snapshot 1`] = ` +Open package repository page in the browser + +Usage: +npm repo [<pkgname> [<pkgname> ...]] + +Options: +[--no-browser|--browser <browser>] [--registry <registry>] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] + +Run "npm help repo" for more info + +\`\`\`bash +npm repo [<pkgname> [<pkgname> ...]] +\`\`\` + +#### \`browser\` +#### \`registry\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +` + +exports[`test/lib/docs.js TAP usage restart > must match snapshot 1`] = ` +Restart a package + +Usage: +npm restart [-- <args>] + +Options: +[--ignore-scripts] [--script-shell <script-shell>] + +Run "npm help restart" for more info + +\`\`\`bash +npm restart [-- <args>] +\`\`\` + +#### \`ignore-scripts\` +#### \`script-shell\` +` + +exports[`test/lib/docs.js TAP usage root > must match snapshot 1`] = ` +Display npm root + +Usage: +npm root + +Options: +[-g|--global] + +Run "npm help root" for more info + +\`\`\`bash +npm root +\`\`\` + +#### \`global\` +` + +exports[`test/lib/docs.js TAP usage run-script > must match snapshot 1`] = ` +Run arbitrary package scripts + +Usage: +npm run-script <command> [-- <args>] + +Options: +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] [--if-present] [--ignore-scripts] +[--foreground-scripts] [--script-shell <script-shell>] + +aliases: run, rum, urn + +Run "npm help run-script" for more info + +\`\`\`bash +npm run-script <command> [-- <args>] + +aliases: run, rum, urn +\`\`\` + +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +#### \`if-present\` +#### \`ignore-scripts\` +#### \`foreground-scripts\` +#### \`script-shell\` +` + +exports[`test/lib/docs.js TAP usage search > must match snapshot 1`] = ` +Search for packages + +Usage: +npm search [search terms ...] + +Options: +[-l|--long] [--json] [--color|--no-color|--color always] [-p|--parseable] +[--no-description] [--searchopts <searchopts>] [--searchexclude <searchexclude>] +[--registry <registry>] [--prefer-online] [--prefer-offline] [--offline] + +aliases: find, s, se + +Run "npm help search" for more info + +\`\`\`bash +npm search [search terms ...] + +aliases: find, s, se +\`\`\` + +#### \`long\` +#### \`json\` +#### \`color\` +#### \`parseable\` +#### \`description\` +#### \`searchopts\` +#### \`searchexclude\` +#### \`registry\` +#### \`prefer-online\` +#### \`prefer-offline\` +#### \`offline\` +` + +exports[`test/lib/docs.js TAP usage set > must match snapshot 1`] = ` +Set a value in the npm configuration + +Usage: +npm set <key>=<value> [<key>=<value> ...] (See \`npm config\`) + +Run "npm help set" for more info + +\`\`\`bash +npm set <key>=<value> [<key>=<value> ...] (See \`npm config\`) +\`\`\` + +NO PARAMS +` + +exports[`test/lib/docs.js TAP usage shrinkwrap > must match snapshot 1`] = ` +Lock down dependency versions for publication + +Usage: +npm shrinkwrap + +Run "npm help shrinkwrap" for more info + +\`\`\`bash +npm shrinkwrap +\`\`\` + +NO PARAMS +` + +exports[`test/lib/docs.js TAP usage star > must match snapshot 1`] = ` +Mark your favorite packages + +Usage: +npm star [<package-spec>...] + +Options: +[--registry <registry>] [--unicode] [--otp <otp>] + +Run "npm help star" for more info + +\`\`\`bash +npm star [<package-spec>...] +\`\`\` + +#### \`registry\` +#### \`unicode\` +#### \`otp\` +` + +exports[`test/lib/docs.js TAP usage stars > must match snapshot 1`] = ` +View packages marked as favorites + +Usage: +npm stars [<user>] + +Options: +[--registry <registry>] + +Run "npm help stars" for more info + +\`\`\`bash +npm stars [<user>] +\`\`\` + +#### \`registry\` +` + +exports[`test/lib/docs.js TAP usage start > must match snapshot 1`] = ` +Start a package + +Usage: +npm start [-- <args>] + +Options: +[--ignore-scripts] [--script-shell <script-shell>] + +Run "npm help start" for more info + +\`\`\`bash +npm start [-- <args>] +\`\`\` + +#### \`ignore-scripts\` +#### \`script-shell\` +` + +exports[`test/lib/docs.js TAP usage stop > must match snapshot 1`] = ` +Stop a package + +Usage: +npm stop [-- <args>] + +Options: +[--ignore-scripts] [--script-shell <script-shell>] + +Run "npm help stop" for more info + +\`\`\`bash +npm stop [-- <args>] +\`\`\` + +#### \`ignore-scripts\` +#### \`script-shell\` +` + +exports[`test/lib/docs.js TAP usage team > must match snapshot 1`] = ` +Manage organization teams and team memberships + +Usage: +npm team create <scope:team> [--otp <otpcode>] +npm team destroy <scope:team> [--otp <otpcode>] +npm team add <scope:team> <user> [--otp <otpcode>] +npm team rm <scope:team> <user> [--otp <otpcode>] +npm team ls <scope>|<scope:team> + +Options: +[--registry <registry>] [--otp <otp>] [-p|--parseable] [--json] + +Run "npm help team" for more info + +\`\`\`bash +npm team create <scope:team> [--otp <otpcode>] +npm team destroy <scope:team> [--otp <otpcode>] +npm team add <scope:team> <user> [--otp <otpcode>] +npm team rm <scope:team> <user> [--otp <otpcode>] +npm team ls <scope>|<scope:team> +\`\`\` + +#### \`registry\` +#### \`otp\` +#### \`parseable\` +#### \`json\` +` + +exports[`test/lib/docs.js TAP usage test > must match snapshot 1`] = ` +Test a package + +Usage: +npm test [-- <args>] + +Options: +[--ignore-scripts] [--script-shell <script-shell>] + +aliases: tst, t + +Run "npm help test" for more info + +\`\`\`bash +npm test [-- <args>] + +aliases: tst, t +\`\`\` + +#### \`ignore-scripts\` +#### \`script-shell\` +` + +exports[`test/lib/docs.js TAP usage token > must match snapshot 1`] = ` +Manage your authentication tokens + +Usage: +npm token list +npm token revoke <id|token> +npm token create [--read-only] [--cidr=list] + +Options: +[--read-only] [--cidr <cidr> [--cidr <cidr> ...]] [--registry <registry>] +[--otp <otp>] + +Run "npm help token" for more info + +\`\`\`bash +npm token list +npm token revoke <id|token> +npm token create [--read-only] [--cidr=list] +\`\`\` + +#### \`read-only\` +#### \`cidr\` +#### \`registry\` +#### \`otp\` +` + +exports[`test/lib/docs.js TAP usage uninstall > must match snapshot 1`] = ` +Remove a package + +Usage: +npm uninstall [<@scope>/]<pkg>... + +Options: +[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] + +aliases: unlink, remove, rm, r, un + +Run "npm help uninstall" for more info + +\`\`\`bash +npm uninstall [<@scope>/]<pkg>... + +aliases: unlink, remove, rm, r, un +\`\`\` + +#### \`save\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +#### \`install-links\` +` + +exports[`test/lib/docs.js TAP usage unpublish > must match snapshot 1`] = ` +Remove a package from the registry + +Usage: +npm unpublish [<package-spec>] + +Options: +[--dry-run] [-f|--force] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] + +Run "npm help unpublish" for more info + +\`\`\`bash +npm unpublish [<package-spec>] +\`\`\` + +#### \`dry-run\` +#### \`force\` +#### \`workspace\` +#### \`workspaces\` +` + +exports[`test/lib/docs.js TAP usage unstar > must match snapshot 1`] = ` +Remove an item from your favorite packages + +Usage: +npm unstar [<package-spec>...] + +Options: +[--registry <registry>] [--unicode] [--otp <otp>] + +Run "npm help unstar" for more info + +\`\`\`bash +npm unstar [<package-spec>...] +\`\`\` + +#### \`registry\` +#### \`unicode\` +#### \`otp\` +` + +exports[`test/lib/docs.js TAP usage update > must match snapshot 1`] = ` +Update packages + +Usage: +npm update [<pkg>...] + +Options: +[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] +[-g|--global] [--install-strategy <hoisted|nested|shallow>] [--legacy-bundling] +[--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] +[--strict-peer-deps] [--no-package-lock] [--foreground-scripts] +[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] + +aliases: up, upgrade, udpate + +Run "npm help update" for more info + +\`\`\`bash +npm update [<pkg>...] + +aliases: up, upgrade, udpate +\`\`\` + +#### \`save\` +#### \`global\` +#### \`install-strategy\` +#### \`legacy-bundling\` +#### \`global-style\` +#### \`omit\` +#### \`strict-peer-deps\` +#### \`package-lock\` +#### \`foreground-scripts\` +#### \`ignore-scripts\` +#### \`audit\` +#### \`bin-links\` +#### \`fund\` +#### \`dry-run\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +#### \`install-links\` +` + +exports[`test/lib/docs.js TAP usage version > must match snapshot 1`] = ` +Bump a package version + +Usage: +npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git] + +Options: +[--allow-same-version] [--no-commit-hooks] [--no-git-tag-version] [--json] +[--preid prerelease-id] [--sign-git-tag] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--no-workspaces-update] [--include-workspace-root] + +alias: verison + +Run "npm help version" for more info + +\`\`\`bash +npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git] + +alias: verison +\`\`\` + +#### \`allow-same-version\` +#### \`commit-hooks\` +#### \`git-tag-version\` +#### \`json\` +#### \`preid\` +#### \`sign-git-tag\` +#### \`workspace\` +#### \`workspaces\` +#### \`workspaces-update\` +#### \`include-workspace-root\` +` + +exports[`test/lib/docs.js TAP usage view > must match snapshot 1`] = ` +View registry info + +Usage: +npm view [<package-spec>] [<field>[.subfield]...] + +Options: +[--json] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] + +aliases: info, show, v + +Run "npm help view" for more info + +\`\`\`bash +npm view [<package-spec>] [<field>[.subfield]...] + +aliases: info, show, v +\`\`\` + +#### \`json\` +#### \`workspace\` +#### \`workspaces\` +#### \`include-workspace-root\` +` + +exports[`test/lib/docs.js TAP usage whoami > must match snapshot 1`] = ` +Display npm username + +Usage: +npm whoami + +Options: +[--registry <registry>] + +Run "npm help whoami" for more info + +\`\`\`bash +npm whoami +\`\`\` + +#### \`registry\` +` diff --git a/tap-snapshots/test/lib/load-all-commands.js.test.cjs b/tap-snapshots/test/lib/load-all-commands.js.test.cjs deleted file mode 100644 index e3d3d02fc4395..0000000000000 --- a/tap-snapshots/test/lib/load-all-commands.js.test.cjs +++ /dev/null @@ -1,984 +0,0 @@ -/* IMPORTANT - * This snapshot file is auto-generated, but designed for humans. - * It should be checked into source control and tracked carefully. - * Re-generate by setting TAP_SNAPSHOT=1 and running tests. - * Make sure to inspect the output below. Do not ignore changes! - */ -'use strict' -exports[`test/lib/load-all-commands.js TAP load each command access > must match snapshot 1`] = ` -Set access level on published packages - -Usage: -npm access list packages [<user>|<scope>|<scope:team> [<package>] -npm access list collaborators [<package> [<user>]] -npm access get status [<package>] -npm access set status=public|private [<package>] -npm access set mfa=none|publish|automation [<package>] -npm access grant <read-only|read-write> <scope:team> [<package>] -npm access revoke <scope:team> [<package>] - -Options: -[--json] [--otp <otp>] [--registry <registry>] - -Run "npm help access" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command adduser > must match snapshot 1`] = ` -Add a registry user account - -Usage: -npm adduser - -Options: -[--registry <registry>] [--scope <@scope>] [--auth-type <legacy|web>] - -alias: add-user - -Run "npm help adduser" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command audit > must match snapshot 1`] = ` -Run a security audit - -Usage: -npm audit [fix|signatures] - -Options: -[--audit-level <info|low|moderate|high|critical|none>] [--dry-run] [-f|--force] -[--json] [--package-lock-only] -[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] -[--foreground-scripts] [--ignore-scripts] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] [--no-install-links] - -Run "npm help audit" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command bugs > must match snapshot 1`] = ` -Report bugs for a package in a web browser - -Usage: -npm bugs [<pkgname> [<pkgname> ...]] - -Options: -[--no-browser|--browser <browser>] [--registry <registry>] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] - -alias: issues - -Run "npm help bugs" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command cache > must match snapshot 1`] = ` -Manipulates packages cache - -Usage: -npm cache add <package-spec> -npm cache clean [<key>] -npm cache ls [<name>@<version>] -npm cache verify - -Options: -[--cache <cache>] - -Run "npm help cache" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command ci > must match snapshot 1`] = ` -Clean install a project - -Usage: -npm ci - -Options: -[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] -[-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling] -[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] -[--strict-peer-deps] [--no-package-lock] [--foreground-scripts] -[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] [--no-install-links] - -aliases: clean-install, ic, install-clean, isntall-clean - -Run "npm help ci" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command completion > must match snapshot 1`] = ` -Tab Completion for npm - -Usage: -npm completion - -Run "npm help completion" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command config > must match snapshot 1`] = ` -Manage the npm configuration files - -Usage: -npm config set <key>=<value> [<key>=<value> ...] -npm config get [<key> [<key> ...]] -npm config delete <key> [<key> ...] -npm config list [--json] -npm config edit - -Options: -[--json] [-g|--global] [--editor <editor>] [-L|--location <global|user|project>] -[-l|--long] - -alias: c - -Run "npm help config" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command dedupe > must match snapshot 1`] = ` -Reduce duplication in the package tree - -Usage: -npm dedupe - -Options: -[--global-style] [--legacy-bundling] [--strict-peer-deps] [--no-package-lock] -[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts] -[--no-audit] [--no-bin-links] [--no-fund] [--dry-run] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] [--no-install-links] - -alias: ddp - -Run "npm help dedupe" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command deprecate > must match snapshot 1`] = ` -Deprecate a version of a package - -Usage: -npm deprecate <package-spec> <message> - -Options: -[--registry <registry>] [--otp <otp>] - -Run "npm help deprecate" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command diff > must match snapshot 1`] = ` -The registry diff command - -Usage: -npm diff [...<paths>] - -Options: -[--diff <package-spec> [--diff <package-spec> ...]] [--diff-name-only] -[--diff-unified <number>] [--diff-ignore-all-space] [--diff-no-prefix] -[--diff-src-prefix <path>] [--diff-dst-prefix <path>] [--diff-text] [-g|--global] -[--tag <tag>] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] - -Run "npm help diff" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command dist-tag > must match snapshot 1`] = ` -Modify package distribution tags - -Usage: -npm dist-tag add <package-spec (with version)> [<tag>] -npm dist-tag rm <package-spec> <tag> -npm dist-tag ls [<package-spec>] - -Options: -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] - -alias: dist-tags - -Run "npm help dist-tag" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command docs > must match snapshot 1`] = ` -Open documentation for a package in a web browser - -Usage: -npm docs [<pkgname> [<pkgname> ...]] - -Options: -[--no-browser|--browser <browser>] [--registry <registry>] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] - -alias: home - -Run "npm help docs" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command doctor > must match snapshot 1`] = ` -Check your npm environment - -Usage: -npm doctor - -Options: -[--registry <registry>] - -Run "npm help doctor" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command edit > must match snapshot 1`] = ` -Edit an installed package - -Usage: -npm edit <pkg>[/<subpkg>...] - -Options: -[--editor <editor>] - -Run "npm help edit" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command exec > must match snapshot 1`] = ` -Run a command from a local or remote npm package - -Usage: -npm exec -- <pkg>[@<version>] [args...] -npm exec --package=<pkg>[@<version>] -- <cmd> [args...] -npm exec -c '<cmd> [args...]' -npm exec --package=foo -c '<cmd> [args...]' - -Options: -[--package <package-spec> [--package <package-spec> ...]] [-c|--call <call>] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] - -alias: x - -Run "npm help exec" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command explain > must match snapshot 1`] = ` -Explain installed packages - -Usage: -npm explain <package-spec> - -Options: -[--json] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - -alias: why - -Run "npm help explain" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command explore > must match snapshot 1`] = ` -Browse an installed package - -Usage: -npm explore <pkg> [ -- <command>] - -Options: -[--shell <shell>] - -Run "npm help explore" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command find-dupes > must match snapshot 1`] = ` -Find duplication in the package tree - -Usage: -npm find-dupes - -Options: -[--global-style] [--legacy-bundling] [--strict-peer-deps] [--no-package-lock] -[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts] -[--no-audit] [--no-bin-links] [--no-fund] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] [--no-install-links] - -Run "npm help find-dupes" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command fund > must match snapshot 1`] = ` -Retrieve funding information - -Usage: -npm fund [<package-spec>] - -Options: -[--json] [--no-browser|--browser <browser>] [--unicode] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[--which <fundingSourceNumber>] - -Run "npm help fund" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command get > must match snapshot 1`] = ` -Get a value from the npm configuration - -Usage: -npm get [<key> ...] (See \`npm config\`) - -Run "npm help get" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command help > must match snapshot 1`] = ` -Get help on npm - -Usage: -npm help <term> [<terms..>] - -Options: -[--viewer <viewer>] - -alias: hlep - -Run "npm help help" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command help-search > must match snapshot 1`] = ` -Search npm help documentation - -Usage: -npm help-search <text> - -Options: -[-l|--long] - -Run "npm help help-search" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command hook > must match snapshot 1`] = ` -Manage registry hooks - -Usage: -npm hook add <pkg> <url> <secret> [--type=<type>] -npm hook ls [pkg] -npm hook rm <id> -npm hook update <id> <url> <secret> - -Options: -[--registry <registry>] [--otp <otp>] - -Run "npm help hook" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command init > must match snapshot 1`] = ` -Create a package.json file - -Usage: -npm init <package-spec> (same as \`npx <package-spec>) -npm init <@scope> (same as \`npx <@scope>/create\`) - -Options: -[-y|--yes] [-f|--force] [--scope <@scope>] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--no-workspaces-update] [--include-workspace-root] - -aliases: create, innit - -Run "npm help init" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command install > must match snapshot 1`] = ` -Install a package - -Usage: -npm install [<package-spec> ...] - -Options: -[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] -[-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling] -[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] -[--strict-peer-deps] [--no-package-lock] [--foreground-scripts] -[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] [--no-install-links] - -aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall - -Run "npm help install" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command install-ci-test > must match snapshot 1`] = ` -Install a project with a clean slate and run tests - -Usage: -npm install-ci-test - -Options: -[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] -[-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling] -[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] -[--strict-peer-deps] [--no-package-lock] [--foreground-scripts] -[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] [--no-install-links] - -alias: cit - -Run "npm help install-ci-test" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command install-test > must match snapshot 1`] = ` -Install package(s) and run tests - -Usage: -npm install-test [<package-spec> ...] - -Options: -[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] -[-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling] -[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] -[--strict-peer-deps] [--no-package-lock] [--foreground-scripts] -[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] [--no-install-links] - -alias: it - -Run "npm help install-test" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command link > must match snapshot 1`] = ` -Symlink a package folder - -Usage: -npm link [<package-spec>] - -Options: -[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] -[-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling] -[--strict-peer-deps] [--no-package-lock] -[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts] -[--no-audit] [--no-bin-links] [--no-fund] [--dry-run] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] [--no-install-links] - -alias: ln - -Run "npm help link" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command ll > must match snapshot 1`] = ` -List installed packages - -Usage: -npm ll [[<@scope>/]<pkg> ...] - -Options: -[-a|--all] [--json] [-l|--long] [-p|--parseable] [-g|--global] [--depth <depth>] -[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--link] -[--package-lock-only] [--unicode] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] [--no-install-links] - -alias: la - -Run "npm help ll" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command login > must match snapshot 1`] = ` -Login to a registry user account - -Usage: -npm login - -Options: -[--registry <registry>] [--scope <@scope>] [--auth-type <legacy|web>] - -Run "npm help login" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command logout > must match snapshot 1`] = ` -Log out of the registry - -Usage: -npm logout - -Options: -[--registry <registry>] [--scope <@scope>] - -Run "npm help logout" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command ls > must match snapshot 1`] = ` -List installed packages - -Usage: -npm ls <package-spec> - -Options: -[-a|--all] [--json] [-l|--long] [-p|--parseable] [-g|--global] [--depth <depth>] -[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--link] -[--package-lock-only] [--unicode] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] [--no-install-links] - -alias: list - -Run "npm help ls" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command org > must match snapshot 1`] = ` -Manage orgs - -Usage: -npm org set orgname username [developer | admin | owner] -npm org rm orgname username -npm org ls orgname [<username>] - -Options: -[--registry <registry>] [--otp <otp>] [--json] [-p|--parseable] - -alias: ogr - -Run "npm help org" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command outdated > must match snapshot 1`] = ` -Check for outdated packages - -Usage: -npm outdated [<package-spec> ...] - -Options: -[-a|--all] [--json] [-l|--long] [-p|--parseable] [-g|--global] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - -Run "npm help outdated" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command owner > must match snapshot 1`] = ` -Manage package owners - -Usage: -npm owner add <user> <package-spec> -npm owner rm <user> <package-spec> -npm owner ls <package-spec> - -Options: -[--registry <registry>] [--otp <otp>] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] - -alias: author - -Run "npm help owner" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command pack > must match snapshot 1`] = ` -Create a tarball from a package - -Usage: -npm pack <package-spec> - -Options: -[--dry-run] [--json] [--pack-destination <pack-destination>] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] - -Run "npm help pack" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command ping > must match snapshot 1`] = ` -Ping npm registry - -Usage: -npm ping - -Options: -[--registry <registry>] - -Run "npm help ping" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command pkg > must match snapshot 1`] = ` -Manages your package.json - -Usage: -npm pkg set <key>=<value> [<key>=<value> ...] -npm pkg get [<key> [<key> ...]] -npm pkg delete <key> [<key> ...] -npm pkg set [<array>[<index>].<key>=<value> ...] -npm pkg set [<array>[].<key>=<value> ...] - -Options: -[-f|--force] [--json] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] - -Run "npm help pkg" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command prefix > must match snapshot 1`] = ` -Display prefix - -Usage: -npm prefix [-g] - -Options: -[-g|--global] - -Run "npm help prefix" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command profile > must match snapshot 1`] = ` -Change settings on your registry profile - -Usage: -npm profile enable-2fa [auth-only|auth-and-writes] -npm profile disable-2fa -npm profile get [<key>] -npm profile set <key> <value> - -Options: -[--registry <registry>] [--json] [-p|--parseable] [--otp <otp>] - -Run "npm help profile" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command prune > must match snapshot 1`] = ` -Remove extraneous packages - -Usage: -npm prune [[<@scope>/]<pkg>...] - -Options: -[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--dry-run] -[--json] [--foreground-scripts] [--ignore-scripts] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] [--no-install-links] - -Run "npm help prune" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command publish > must match snapshot 1`] = ` -Publish a package - -Usage: -npm publish <package-spec> - -Options: -[--tag <tag>] [--access <restricted|public>] [--dry-run] [--otp <otp>] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] - -Run "npm help publish" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command query > must match snapshot 1`] = ` -Retrieve a filtered list of packages - -Usage: -npm query <selector> - -Options: -[-g|--global] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] - -Run "npm help query" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command rebuild > must match snapshot 1`] = ` -Rebuild a package - -Usage: -npm rebuild [<package-spec>] ...] - -Options: -[-g|--global] [--no-bin-links] [--foreground-scripts] [--ignore-scripts] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] [--no-install-links] - -alias: rb - -Run "npm help rebuild" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command repo > must match snapshot 1`] = ` -Open package repository page in the browser - -Usage: -npm repo [<pkgname> [<pkgname> ...]] - -Options: -[--no-browser|--browser <browser>] [--registry <registry>] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] - -Run "npm help repo" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command restart > must match snapshot 1`] = ` -Restart a package - -Usage: -npm restart [-- <args>] - -Options: -[--ignore-scripts] [--script-shell <script-shell>] - -Run "npm help restart" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command root > must match snapshot 1`] = ` -Display npm root - -Usage: -npm root - -Options: -[-g|--global] - -Run "npm help root" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command run-script > must match snapshot 1`] = ` -Run arbitrary package scripts - -Usage: -npm run-script <command> [-- <args>] - -Options: -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] [--if-present] [--ignore-scripts] -[--foreground-scripts] [--script-shell <script-shell>] - -aliases: run, rum, urn - -Run "npm help run-script" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command search > must match snapshot 1`] = ` -Search for packages - -Usage: -npm search [search terms ...] - -Options: -[-l|--long] [--json] [--color|--no-color|--color always] [-p|--parseable] -[--no-description] [--searchopts <searchopts>] [--searchexclude <searchexclude>] -[--registry <registry>] [--prefer-online] [--prefer-offline] [--offline] - -aliases: find, s, se - -Run "npm help search" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command set > must match snapshot 1`] = ` -Set a value in the npm configuration - -Usage: -npm set <key>=<value> [<key>=<value> ...] (See \`npm config\`) - -Run "npm help set" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command shrinkwrap > must match snapshot 1`] = ` -Lock down dependency versions for publication - -Usage: -npm shrinkwrap - -Run "npm help shrinkwrap" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command star > must match snapshot 1`] = ` -Mark your favorite packages - -Usage: -npm star [<package-spec>...] - -Options: -[--registry <registry>] [--unicode] [--otp <otp>] - -Run "npm help star" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command stars > must match snapshot 1`] = ` -View packages marked as favorites - -Usage: -npm stars [<user>] - -Options: -[--registry <registry>] - -Run "npm help stars" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command start > must match snapshot 1`] = ` -Start a package - -Usage: -npm start [-- <args>] - -Options: -[--ignore-scripts] [--script-shell <script-shell>] - -Run "npm help start" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command stop > must match snapshot 1`] = ` -Stop a package - -Usage: -npm stop [-- <args>] - -Options: -[--ignore-scripts] [--script-shell <script-shell>] - -Run "npm help stop" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command team > must match snapshot 1`] = ` -Manage organization teams and team memberships - -Usage: -npm team create <scope:team> [--otp <otpcode>] -npm team destroy <scope:team> [--otp <otpcode>] -npm team add <scope:team> <user> [--otp <otpcode>] -npm team rm <scope:team> <user> [--otp <otpcode>] -npm team ls <scope>|<scope:team> - -Options: -[--registry <registry>] [--otp <otp>] [-p|--parseable] [--json] - -Run "npm help team" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command test > must match snapshot 1`] = ` -Test a package - -Usage: -npm test [-- <args>] - -Options: -[--ignore-scripts] [--script-shell <script-shell>] - -aliases: tst, t - -Run "npm help test" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command token > must match snapshot 1`] = ` -Manage your authentication tokens - -Usage: -npm token list -npm token revoke <id|token> -npm token create [--read-only] [--cidr=list] - -Options: -[--read-only] [--cidr <cidr> [--cidr <cidr> ...]] [--registry <registry>] -[--otp <otp>] - -Run "npm help token" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command uninstall > must match snapshot 1`] = ` -Remove a package - -Usage: -npm uninstall [<@scope>/]<pkg>... - -Options: -[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] [--no-install-links] - -aliases: unlink, remove, rm, r, un - -Run "npm help uninstall" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command unpublish > must match snapshot 1`] = ` -Remove a package from the registry - -Usage: -npm unpublish [<package-spec>] - -Options: -[--dry-run] [-f|--force] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] - -Run "npm help unpublish" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command unstar > must match snapshot 1`] = ` -Remove an item from your favorite packages - -Usage: -npm unstar [<package-spec>...] - -Options: -[--registry <registry>] [--unicode] [--otp <otp>] - -Run "npm help unstar" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command update > must match snapshot 1`] = ` -Update packages - -Usage: -npm update [<pkg>...] - -Options: -[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] -[-g|--global] [--global-style] [--legacy-bundling] -[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] -[--strict-peer-deps] [--no-package-lock] [--foreground-scripts] -[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] [--no-install-links] - -aliases: up, upgrade, udpate - -Run "npm help update" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command version > must match snapshot 1`] = ` -Bump a package version - -Usage: -npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git] - -Options: -[--allow-same-version] [--no-commit-hooks] [--no-git-tag-version] [--json] -[--preid prerelease-id] [--sign-git-tag] -[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--no-workspaces-update] [--include-workspace-root] - -alias: verison - -Run "npm help version" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command view > must match snapshot 1`] = ` -View registry info - -Usage: -npm view [<package-spec>] [<field>[.subfield]...] - -Options: -[--json] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] - -aliases: info, show, v - -Run "npm help view" for more info -` - -exports[`test/lib/load-all-commands.js TAP load each command whoami > must match snapshot 1`] = ` -Display npm username - -Usage: -npm whoami - -Options: -[--registry <registry>] - -Run "npm help whoami" for more info -` diff --git a/tap-snapshots/test/lib/npm.js.test.cjs b/tap-snapshots/test/lib/npm.js.test.cjs deleted file mode 100644 index 35a5ee4da3e64..0000000000000 --- a/tap-snapshots/test/lib/npm.js.test.cjs +++ /dev/null @@ -1,1012 +0,0 @@ -/* IMPORTANT - * This snapshot file is auto-generated, but designed for humans. - * It should be checked into source control and tracked carefully. - * Re-generate by setting TAP_SNAPSHOT=1 and running tests. - * Make sure to inspect the output below. Do not ignore changes! - */ -'use strict' -exports[`test/lib/npm.js TAP usage basic usage > must match snapshot 1`] = ` -npm <command> - -Usage: - -npm install install all the dependencies in your project -npm install <foo> add the <foo> dependency to your project -npm test run this project's tests -npm run <foo> run the script named <foo> -npm <command> -h quick help on <command> -npm -l display usage info for all commands -npm help <term> search for help on <term> -npm help npm more involved overview - -All commands: - - access, adduser, audit, bugs, cache, ci, completion, - config, dedupe, deprecate, diff, dist-tag, docs, doctor, - edit, exec, explain, explore, find-dupes, fund, get, help, - hook, init, install, install-ci-test, install-test, link, - ll, login, logout, ls, org, outdated, owner, pack, ping, - pkg, prefix, profile, prune, publish, query, rebuild, repo, - restart, root, run-script, search, set, shrinkwrap, star, - stars, start, stop, team, test, token, uninstall, unpublish, - unstar, update, version, view, whoami - -Specify configs in the ini-formatted file: - /some/config/file/.npmrc -or on the command line via: npm <command> --key=value - -More configuration info: npm help config -Configuration fields: npm help 7 config - -npm@{VERSION} {BASEDIR} -` - -exports[`test/lib/npm.js TAP usage set process.stdout.columns columns=0 > must match snapshot 1`] = ` -npm <command> - -Usage: - -npm install install all the dependencies in your project -npm install <foo> add the <foo> dependency to your project -npm test run this project's tests -npm run <foo> run the script named <foo> -npm <command> -h quick help on <command> -npm -l display usage info for all commands -npm help <term> search for help on <term> -npm help npm more involved overview - -All commands: - - access, adduser, audit, bugs, cache, ci, completion, - config, dedupe, deprecate, diff, dist-tag, docs, doctor, - edit, exec, explain, explore, find-dupes, fund, get, help, - hook, init, install, install-ci-test, install-test, link, - ll, login, logout, ls, org, outdated, owner, pack, ping, - pkg, prefix, profile, prune, publish, query, rebuild, repo, - restart, root, run-script, search, set, shrinkwrap, star, - stars, start, stop, team, test, token, uninstall, unpublish, - unstar, update, version, view, whoami - -Specify configs in the ini-formatted file: - /some/config/file/.npmrc -or on the command line via: npm <command> --key=value - -More configuration info: npm help config -Configuration fields: npm help 7 config - -npm@{VERSION} {BASEDIR} -` - -exports[`test/lib/npm.js TAP usage set process.stdout.columns columns=90 > must match snapshot 1`] = ` -npm <command> - -Usage: - -npm install install all the dependencies in your project -npm install <foo> add the <foo> dependency to your project -npm test run this project's tests -npm run <foo> run the script named <foo> -npm <command> -h quick help on <command> -npm -l display usage info for all commands -npm help <term> search for help on <term> -npm help npm more involved overview - -All commands: - - access, adduser, audit, bugs, cache, ci, completion, - config, dedupe, deprecate, diff, dist-tag, docs, doctor, - edit, exec, explain, explore, find-dupes, fund, get, help, - hook, init, install, install-ci-test, install-test, link, - ll, login, logout, ls, org, outdated, owner, pack, ping, - pkg, prefix, profile, prune, publish, query, rebuild, repo, - restart, root, run-script, search, set, shrinkwrap, star, - stars, start, stop, team, test, token, uninstall, unpublish, - unstar, update, version, view, whoami - -Specify configs in the ini-formatted file: - /some/config/file/.npmrc -or on the command line via: npm <command> --key=value - -More configuration info: npm help config -Configuration fields: npm help 7 config - -npm@{VERSION} {BASEDIR} -` - -exports[`test/lib/npm.js TAP usage with browser > must match snapshot 1`] = ` -npm <command> - -Usage: - -npm install install all the dependencies in your project -npm install <foo> add the <foo> dependency to your project -npm test run this project's tests -npm run <foo> run the script named <foo> -npm <command> -h quick help on <command> -npm -l display usage info for all commands -npm help <term> search for help on <term> (in a browser) -npm help npm more involved overview (in a browser) - -All commands: - - access, adduser, audit, bugs, cache, ci, completion, - config, dedupe, deprecate, diff, dist-tag, docs, doctor, - edit, exec, explain, explore, find-dupes, fund, get, help, - hook, init, install, install-ci-test, install-test, link, - ll, login, logout, ls, org, outdated, owner, pack, ping, - pkg, prefix, profile, prune, publish, query, rebuild, repo, - restart, root, run-script, search, set, shrinkwrap, star, - stars, start, stop, team, test, token, uninstall, unpublish, - unstar, update, version, view, whoami - -Specify configs in the ini-formatted file: - /some/config/file/.npmrc -or on the command line via: npm <command> --key=value - -More configuration info: npm help config -Configuration fields: npm help 7 config - -npm@{VERSION} {BASEDIR} -` - -exports[`test/lib/npm.js TAP usage with long > must match snapshot 1`] = ` -npm <command> - -Usage: - -npm install install all the dependencies in your project -npm install <foo> add the <foo> dependency to your project -npm test run this project's tests -npm run <foo> run the script named <foo> -npm <command> -h quick help on <command> -npm -l display usage info for all commands -npm help <term> search for help on <term> -npm help npm more involved overview - -All commands: - - access Set access level on published packages - - Usage: - npm access list packages [<user>|<scope>|<scope:team> [<package>] - npm access list collaborators [<package> [<user>]] - npm access get status [<package>] - npm access set status=public|private [<package>] - npm access set mfa=none|publish|automation [<package>] - npm access grant <read-only|read-write> <scope:team> [<package>] - npm access revoke <scope:team> [<package>] - - Options: - [--json] [--otp <otp>] [--registry <registry>] - - Run "npm help access" for more info - - adduser Add a registry user account - - Usage: - npm adduser - - Options: - [--registry <registry>] [--scope <@scope>] [--auth-type <legacy|web>] - - alias: add-user - - Run "npm help adduser" for more info - - audit Run a security audit - - Usage: - npm audit [fix|signatures] - - Options: - [--audit-level <info|low|moderate|high|critical|none>] [--dry-run] [-f|--force] - [--json] [--package-lock-only] - [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] - [--foreground-scripts] [--ignore-scripts] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] [--no-install-links] - - Run "npm help audit" for more info - - bugs Report bugs for a package in a web browser - - Usage: - npm bugs [<pkgname> [<pkgname> ...]] - - Options: - [--no-browser|--browser <browser>] [--registry <registry>] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] - - alias: issues - - Run "npm help bugs" for more info - - cache Manipulates packages cache - - Usage: - npm cache add <package-spec> - npm cache clean [<key>] - npm cache ls [<name>@<version>] - npm cache verify - - Options: - [--cache <cache>] - - Run "npm help cache" for more info - - ci Clean install a project - - Usage: - npm ci - - Options: - [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] - [-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling] - [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] - [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] - [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] [--no-install-links] - - aliases: clean-install, ic, install-clean, isntall-clean - - Run "npm help ci" for more info - - completion Tab Completion for npm - - Usage: - npm completion - - Run "npm help completion" for more info - - config Manage the npm configuration files - - Usage: - npm config set <key>=<value> [<key>=<value> ...] - npm config get [<key> [<key> ...]] - npm config delete <key> [<key> ...] - npm config list [--json] - npm config edit - - Options: - [--json] [-g|--global] [--editor <editor>] [-L|--location <global|user|project>] - [-l|--long] - - alias: c - - Run "npm help config" for more info - - dedupe Reduce duplication in the package tree - - Usage: - npm dedupe - - Options: - [--global-style] [--legacy-bundling] [--strict-peer-deps] [--no-package-lock] - [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts] - [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] [--no-install-links] - - alias: ddp - - Run "npm help dedupe" for more info - - deprecate Deprecate a version of a package - - Usage: - npm deprecate <package-spec> <message> - - Options: - [--registry <registry>] [--otp <otp>] - - Run "npm help deprecate" for more info - - diff The registry diff command - - Usage: - npm diff [...<paths>] - - Options: - [--diff <package-spec> [--diff <package-spec> ...]] [--diff-name-only] - [--diff-unified <number>] [--diff-ignore-all-space] [--diff-no-prefix] - [--diff-src-prefix <path>] [--diff-dst-prefix <path>] [--diff-text] [-g|--global] - [--tag <tag>] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] - - Run "npm help diff" for more info - - dist-tag Modify package distribution tags - - Usage: - npm dist-tag add <package-spec (with version)> [<tag>] - npm dist-tag rm <package-spec> <tag> - npm dist-tag ls [<package-spec>] - - Options: - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] - - alias: dist-tags - - Run "npm help dist-tag" for more info - - docs Open documentation for a package in a web browser - - Usage: - npm docs [<pkgname> [<pkgname> ...]] - - Options: - [--no-browser|--browser <browser>] [--registry <registry>] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] - - alias: home - - Run "npm help docs" for more info - - doctor Check your npm environment - - Usage: - npm doctor - - Options: - [--registry <registry>] - - Run "npm help doctor" for more info - - edit Edit an installed package - - Usage: - npm edit <pkg>[/<subpkg>...] - - Options: - [--editor <editor>] - - Run "npm help edit" for more info - - exec Run a command from a local or remote npm package - - Usage: - npm exec -- <pkg>[@<version>] [args...] - npm exec --package=<pkg>[@<version>] -- <cmd> [args...] - npm exec -c '<cmd> [args...]' - npm exec --package=foo -c '<cmd> [args...]' - - Options: - [--package <package-spec> [--package <package-spec> ...]] [-c|--call <call>] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] - - alias: x - - Run "npm help exec" for more info - - explain Explain installed packages - - Usage: - npm explain <package-spec> - - Options: - [--json] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - - alias: why - - Run "npm help explain" for more info - - explore Browse an installed package - - Usage: - npm explore <pkg> [ -- <command>] - - Options: - [--shell <shell>] - - Run "npm help explore" for more info - - find-dupes Find duplication in the package tree - - Usage: - npm find-dupes - - Options: - [--global-style] [--legacy-bundling] [--strict-peer-deps] [--no-package-lock] - [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts] - [--no-audit] [--no-bin-links] [--no-fund] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] [--no-install-links] - - Run "npm help find-dupes" for more info - - fund Retrieve funding information - - Usage: - npm fund [<package-spec>] - - Options: - [--json] [--no-browser|--browser <browser>] [--unicode] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [--which <fundingSourceNumber>] - - Run "npm help fund" for more info - - get Get a value from the npm configuration - - Usage: - npm get [<key> ...] (See \`npm config\`) - - Run "npm help get" for more info - - help Get help on npm - - Usage: - npm help <term> [<terms..>] - - Options: - [--viewer <viewer>] - - alias: hlep - - Run "npm help help" for more info - - hook Manage registry hooks - - Usage: - npm hook add <pkg> <url> <secret> [--type=<type>] - npm hook ls [pkg] - npm hook rm <id> - npm hook update <id> <url> <secret> - - Options: - [--registry <registry>] [--otp <otp>] - - Run "npm help hook" for more info - - init Create a package.json file - - Usage: - npm init <package-spec> (same as \`npx <package-spec>) - npm init <@scope> (same as \`npx <@scope>/create\`) - - Options: - [-y|--yes] [-f|--force] [--scope <@scope>] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--no-workspaces-update] [--include-workspace-root] - - aliases: create, innit - - Run "npm help init" for more info - - install Install a package - - Usage: - npm install [<package-spec> ...] - - Options: - [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] - [-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling] - [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] - [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] - [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] [--no-install-links] - - aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall - - Run "npm help install" for more info - - install-ci-test Install a project with a clean slate and run tests - - Usage: - npm install-ci-test - - Options: - [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] - [-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling] - [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] - [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] - [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] [--no-install-links] - - alias: cit - - Run "npm help install-ci-test" for more info - - install-test Install package(s) and run tests - - Usage: - npm install-test [<package-spec> ...] - - Options: - [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] - [-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling] - [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] - [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] - [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] [--no-install-links] - - alias: it - - Run "npm help install-test" for more info - - link Symlink a package folder - - Usage: - npm link [<package-spec>] - - Options: - [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] - [-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling] - [--strict-peer-deps] [--no-package-lock] - [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts] - [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] [--no-install-links] - - alias: ln - - Run "npm help link" for more info - - ll List installed packages - - Usage: - npm ll [[<@scope>/]<pkg> ...] - - Options: - [-a|--all] [--json] [-l|--long] [-p|--parseable] [-g|--global] [--depth <depth>] - [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--link] - [--package-lock-only] [--unicode] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] [--no-install-links] - - alias: la - - Run "npm help ll" for more info - - login Login to a registry user account - - Usage: - npm login - - Options: - [--registry <registry>] [--scope <@scope>] [--auth-type <legacy|web>] - - Run "npm help login" for more info - - logout Log out of the registry - - Usage: - npm logout - - Options: - [--registry <registry>] [--scope <@scope>] - - Run "npm help logout" for more info - - ls List installed packages - - Usage: - npm ls <package-spec> - - Options: - [-a|--all] [--json] [-l|--long] [-p|--parseable] [-g|--global] [--depth <depth>] - [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--link] - [--package-lock-only] [--unicode] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] [--no-install-links] - - alias: list - - Run "npm help ls" for more info - - org Manage orgs - - Usage: - npm org set orgname username [developer | admin | owner] - npm org rm orgname username - npm org ls orgname [<username>] - - Options: - [--registry <registry>] [--otp <otp>] [--json] [-p|--parseable] - - alias: ogr - - Run "npm help org" for more info - - outdated Check for outdated packages - - Usage: - npm outdated [<package-spec> ...] - - Options: - [-a|--all] [--json] [-l|--long] [-p|--parseable] [-g|--global] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - - Run "npm help outdated" for more info - - owner Manage package owners - - Usage: - npm owner add <user> <package-spec> - npm owner rm <user> <package-spec> - npm owner ls <package-spec> - - Options: - [--registry <registry>] [--otp <otp>] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] - - alias: author - - Run "npm help owner" for more info - - pack Create a tarball from a package - - Usage: - npm pack <package-spec> - - Options: - [--dry-run] [--json] [--pack-destination <pack-destination>] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] - - Run "npm help pack" for more info - - ping Ping npm registry - - Usage: - npm ping - - Options: - [--registry <registry>] - - Run "npm help ping" for more info - - pkg Manages your package.json - - Usage: - npm pkg set <key>=<value> [<key>=<value> ...] - npm pkg get [<key> [<key> ...]] - npm pkg delete <key> [<key> ...] - npm pkg set [<array>[<index>].<key>=<value> ...] - npm pkg set [<array>[].<key>=<value> ...] - - Options: - [-f|--force] [--json] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] - - Run "npm help pkg" for more info - - prefix Display prefix - - Usage: - npm prefix [-g] - - Options: - [-g|--global] - - Run "npm help prefix" for more info - - profile Change settings on your registry profile - - Usage: - npm profile enable-2fa [auth-only|auth-and-writes] - npm profile disable-2fa - npm profile get [<key>] - npm profile set <key> <value> - - Options: - [--registry <registry>] [--json] [-p|--parseable] [--otp <otp>] - - Run "npm help profile" for more info - - prune Remove extraneous packages - - Usage: - npm prune [[<@scope>/]<pkg>...] - - Options: - [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--dry-run] - [--json] [--foreground-scripts] [--ignore-scripts] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] [--no-install-links] - - Run "npm help prune" for more info - - publish Publish a package - - Usage: - npm publish <package-spec> - - Options: - [--tag <tag>] [--access <restricted|public>] [--dry-run] [--otp <otp>] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] - - Run "npm help publish" for more info - - query Retrieve a filtered list of packages - - Usage: - npm query <selector> - - Options: - [-g|--global] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] - - Run "npm help query" for more info - - rebuild Rebuild a package - - Usage: - npm rebuild [<package-spec>] ...] - - Options: - [-g|--global] [--no-bin-links] [--foreground-scripts] [--ignore-scripts] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] [--no-install-links] - - alias: rb - - Run "npm help rebuild" for more info - - repo Open package repository page in the browser - - Usage: - npm repo [<pkgname> [<pkgname> ...]] - - Options: - [--no-browser|--browser <browser>] [--registry <registry>] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] - - Run "npm help repo" for more info - - restart Restart a package - - Usage: - npm restart [-- <args>] - - Options: - [--ignore-scripts] [--script-shell <script-shell>] - - Run "npm help restart" for more info - - root Display npm root - - Usage: - npm root - - Options: - [-g|--global] - - Run "npm help root" for more info - - run-script Run arbitrary package scripts - - Usage: - npm run-script <command> [-- <args>] - - Options: - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] [--if-present] [--ignore-scripts] - [--foreground-scripts] [--script-shell <script-shell>] - - aliases: run, rum, urn - - Run "npm help run-script" for more info - - search Search for packages - - Usage: - npm search [search terms ...] - - Options: - [-l|--long] [--json] [--color|--no-color|--color always] [-p|--parseable] - [--no-description] [--searchopts <searchopts>] [--searchexclude <searchexclude>] - [--registry <registry>] [--prefer-online] [--prefer-offline] [--offline] - - aliases: find, s, se - - Run "npm help search" for more info - - set Set a value in the npm configuration - - Usage: - npm set <key>=<value> [<key>=<value> ...] (See \`npm config\`) - - Run "npm help set" for more info - - shrinkwrap Lock down dependency versions for publication - - Usage: - npm shrinkwrap - - Run "npm help shrinkwrap" for more info - - star Mark your favorite packages - - Usage: - npm star [<package-spec>...] - - Options: - [--registry <registry>] [--unicode] [--otp <otp>] - - Run "npm help star" for more info - - stars View packages marked as favorites - - Usage: - npm stars [<user>] - - Options: - [--registry <registry>] - - Run "npm help stars" for more info - - start Start a package - - Usage: - npm start [-- <args>] - - Options: - [--ignore-scripts] [--script-shell <script-shell>] - - Run "npm help start" for more info - - stop Stop a package - - Usage: - npm stop [-- <args>] - - Options: - [--ignore-scripts] [--script-shell <script-shell>] - - Run "npm help stop" for more info - - team Manage organization teams and team memberships - - Usage: - npm team create <scope:team> [--otp <otpcode>] - npm team destroy <scope:team> [--otp <otpcode>] - npm team add <scope:team> <user> [--otp <otpcode>] - npm team rm <scope:team> <user> [--otp <otpcode>] - npm team ls <scope>|<scope:team> - - Options: - [--registry <registry>] [--otp <otp>] [-p|--parseable] [--json] - - Run "npm help team" for more info - - test Test a package - - Usage: - npm test [-- <args>] - - Options: - [--ignore-scripts] [--script-shell <script-shell>] - - aliases: tst, t - - Run "npm help test" for more info - - token Manage your authentication tokens - - Usage: - npm token list - npm token revoke <id|token> - npm token create [--read-only] [--cidr=list] - - Options: - [--read-only] [--cidr <cidr> [--cidr <cidr> ...]] [--registry <registry>] - [--otp <otp>] - - Run "npm help token" for more info - - uninstall Remove a package - - Usage: - npm uninstall [<@scope>/]<pkg>... - - Options: - [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] [--no-install-links] - - aliases: unlink, remove, rm, r, un - - Run "npm help uninstall" for more info - - unpublish Remove a package from the registry - - Usage: - npm unpublish [<package-spec>] - - Options: - [--dry-run] [-f|--force] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] - - Run "npm help unpublish" for more info - - unstar Remove an item from your favorite packages - - Usage: - npm unstar [<package-spec>...] - - Options: - [--registry <registry>] [--unicode] [--otp <otp>] - - Run "npm help unstar" for more info - - update Update packages - - Usage: - npm update [<pkg>...] - - Options: - [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] - [-g|--global] [--global-style] [--legacy-bundling] - [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] - [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] - [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] [--no-install-links] - - aliases: up, upgrade, udpate - - Run "npm help update" for more info - - version Bump a package version - - Usage: - npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git] - - Options: - [--allow-same-version] [--no-commit-hooks] [--no-git-tag-version] [--json] - [--preid prerelease-id] [--sign-git-tag] - [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--no-workspaces-update] [--include-workspace-root] - - alias: verison - - Run "npm help version" for more info - - view View registry info - - Usage: - npm view [<package-spec>] [<field>[.subfield]...] - - Options: - [--json] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] - - aliases: info, show, v - - Run "npm help view" for more info - - whoami Display npm username - - Usage: - npm whoami - - Options: - [--registry <registry>] - - Run "npm help whoami" for more info - -Specify configs in the ini-formatted file: - /some/config/file/.npmrc -or on the command line via: npm <command> --key=value - -More configuration info: npm help config -Configuration fields: npm help 7 config - -npm@{VERSION} {BASEDIR} -` diff --git a/tap-snapshots/test/lib/utils/cmd-list.js.test.cjs b/tap-snapshots/test/lib/utils/cmd-list.js.test.cjs deleted file mode 100644 index 574b0855bc456..0000000000000 --- a/tap-snapshots/test/lib/utils/cmd-list.js.test.cjs +++ /dev/null @@ -1,479 +0,0 @@ -/* IMPORTANT - * This snapshot file is auto-generated, but designed for humans. - * It should be checked into source control and tracked carefully. - * Re-generate by setting TAP_SNAPSHOT=1 and running tests. - * Make sure to inspect the output below. Do not ignore changes! - */ -'use strict' -exports[`test/lib/utils/cmd-list.js TAP > must match snapshot 1`] = ` -Object { - "abbrevs": Object { - "ac": "access", - "acc": "access", - "acce": "access", - "acces": "access", - "access": "access", - "add": "add", - "add-": "add-user", - "add-u": "add-user", - "add-us": "add-user", - "add-use": "add-user", - "add-user": "add-user", - "addu": "adduser", - "addus": "adduser", - "adduse": "adduser", - "adduser": "adduser", - "aud": "audit", - "audi": "audit", - "audit": "audit", - "aut": "author", - "auth": "author", - "autho": "author", - "author": "author", - "b": "bugs", - "bu": "bugs", - "bug": "bugs", - "bugs": "bugs", - "c": "c", - "ca": "cache", - "cac": "cache", - "cach": "cache", - "cache": "cache", - "ci": "ci", - "cit": "cit", - "clean-install": "clean-install", - "clean-install-": "clean-install-test", - "clean-install-t": "clean-install-test", - "clean-install-te": "clean-install-test", - "clean-install-tes": "clean-install-test", - "clean-install-test": "clean-install-test", - "com": "completion", - "comp": "completion", - "compl": "completion", - "comple": "completion", - "complet": "completion", - "completi": "completion", - "completio": "completion", - "completion": "completion", - "con": "config", - "conf": "config", - "confi": "config", - "config": "config", - "cr": "create", - "cre": "create", - "crea": "create", - "creat": "create", - "create": "create", - "dd": "ddp", - "ddp": "ddp", - "ded": "dedupe", - "dedu": "dedupe", - "dedup": "dedupe", - "dedupe": "dedupe", - "dep": "deprecate", - "depr": "deprecate", - "depre": "deprecate", - "deprec": "deprecate", - "depreca": "deprecate", - "deprecat": "deprecate", - "deprecate": "deprecate", - "dif": "diff", - "diff": "diff", - "dist-tag": "dist-tag", - "dist-tags": "dist-tags", - "docs": "docs", - "doct": "doctor", - "docto": "doctor", - "doctor": "doctor", - "ed": "edit", - "edi": "edit", - "edit": "edit", - "exe": "exec", - "exec": "exec", - "expla": "explain", - "explai": "explain", - "explain": "explain", - "explo": "explore", - "explor": "explore", - "explore": "explore", - "find": "find", - "find-": "find-dupes", - "find-d": "find-dupes", - "find-du": "find-dupes", - "find-dup": "find-dupes", - "find-dupe": "find-dupes", - "find-dupes": "find-dupes", - "fu": "fund", - "fun": "fund", - "fund": "fund", - "g": "get", - "ge": "get", - "get": "get", - "he": "help", - "hel": "help", - "help": "help", - "hl": "hlep", - "hle": "hlep", - "hlep": "hlep", - "hom": "home", - "home": "home", - "hoo": "hook", - "hook": "hook", - "i": "i", - "ic": "ic", - "in": "in", - "inf": "info", - "info": "info", - "ini": "init", - "init": "init", - "inn": "innit", - "inni": "innit", - "innit": "innit", - "ins": "ins", - "inst": "inst", - "insta": "insta", - "instal": "instal", - "install": "install", - "install-ci": "install-ci-test", - "install-ci-": "install-ci-test", - "install-ci-t": "install-ci-test", - "install-ci-te": "install-ci-test", - "install-ci-tes": "install-ci-test", - "install-ci-test": "install-ci-test", - "install-cl": "install-clean", - "install-cle": "install-clean", - "install-clea": "install-clean", - "install-clean": "install-clean", - "install-t": "install-test", - "install-te": "install-test", - "install-tes": "install-test", - "install-test": "install-test", - "isnt": "isnt", - "isnta": "isnta", - "isntal": "isntal", - "isntall": "isntall", - "isntall-": "isntall-clean", - "isntall-c": "isntall-clean", - "isntall-cl": "isntall-clean", - "isntall-cle": "isntall-clean", - "isntall-clea": "isntall-clean", - "isntall-clean": "isntall-clean", - "iss": "issues", - "issu": "issues", - "issue": "issues", - "issues": "issues", - "it": "it", - "la": "la", - "lin": "link", - "link": "link", - "lis": "list", - "list": "list", - "ll": "ll", - "ln": "ln", - "logi": "login", - "login": "login", - "logo": "logout", - "logou": "logout", - "logout": "logout", - "ls": "ls", - "og": "ogr", - "ogr": "ogr", - "or": "org", - "org": "org", - "ou": "outdated", - "out": "outdated", - "outd": "outdated", - "outda": "outdated", - "outdat": "outdated", - "outdate": "outdated", - "outdated": "outdated", - "ow": "owner", - "own": "owner", - "owne": "owner", - "owner": "owner", - "pa": "pack", - "pac": "pack", - "pack": "pack", - "pi": "ping", - "pin": "ping", - "ping": "ping", - "pk": "pkg", - "pkg": "pkg", - "pre": "prefix", - "pref": "prefix", - "prefi": "prefix", - "prefix": "prefix", - "pro": "profile", - "prof": "profile", - "profi": "profile", - "profil": "profile", - "profile": "profile", - "pru": "prune", - "prun": "prune", - "prune": "prune", - "pu": "publish", - "pub": "publish", - "publ": "publish", - "publi": "publish", - "publis": "publish", - "publish": "publish", - "q": "query", - "qu": "query", - "que": "query", - "quer": "query", - "query": "query", - "r": "r", - "rb": "rb", - "reb": "rebuild", - "rebu": "rebuild", - "rebui": "rebuild", - "rebuil": "rebuild", - "rebuild": "rebuild", - "rem": "remove", - "remo": "remove", - "remov": "remove", - "remove": "remove", - "rep": "repo", - "repo": "repo", - "res": "restart", - "rest": "restart", - "resta": "restart", - "restar": "restart", - "restart": "restart", - "rm": "rm", - "ro": "root", - "roo": "root", - "root": "root", - "rum": "rum", - "run": "run", - "run-": "run-script", - "run-s": "run-script", - "run-sc": "run-script", - "run-scr": "run-script", - "run-scri": "run-script", - "run-scrip": "run-script", - "run-script": "run-script", - "s": "s", - "se": "se", - "sea": "search", - "sear": "search", - "searc": "search", - "search": "search", - "set": "set", - "sho": "show", - "show": "show", - "shr": "shrinkwrap", - "shri": "shrinkwrap", - "shrin": "shrinkwrap", - "shrink": "shrinkwrap", - "shrinkw": "shrinkwrap", - "shrinkwr": "shrinkwrap", - "shrinkwra": "shrinkwrap", - "shrinkwrap": "shrinkwrap", - "si": "sit", - "sit": "sit", - "star": "star", - "stars": "stars", - "start": "start", - "sto": "stop", - "stop": "stop", - "t": "t", - "tea": "team", - "team": "team", - "tes": "test", - "test": "test", - "to": "token", - "tok": "token", - "toke": "token", - "token": "token", - "ts": "tst", - "tst": "tst", - "ud": "udpate", - "udp": "udpate", - "udpa": "udpate", - "udpat": "udpate", - "udpate": "udpate", - "un": "un", - "uni": "uninstall", - "unin": "uninstall", - "unins": "uninstall", - "uninst": "uninstall", - "uninsta": "uninstall", - "uninstal": "uninstall", - "uninstall": "uninstall", - "unl": "unlink", - "unli": "unlink", - "unlin": "unlink", - "unlink": "unlink", - "unp": "unpublish", - "unpu": "unpublish", - "unpub": "unpublish", - "unpubl": "unpublish", - "unpubli": "unpublish", - "unpublis": "unpublish", - "unpublish": "unpublish", - "uns": "unstar", - "unst": "unstar", - "unsta": "unstar", - "unstar": "unstar", - "up": "up", - "upd": "update", - "upda": "update", - "updat": "update", - "update": "update", - "upg": "upgrade", - "upgr": "upgrade", - "upgra": "upgrade", - "upgrad": "upgrade", - "upgrade": "upgrade", - "ur": "urn", - "urn": "urn", - "v": "v", - "veri": "verison", - "veris": "verison", - "veriso": "verison", - "verison": "verison", - "vers": "version", - "versi": "version", - "versio": "version", - "version": "version", - "vi": "view", - "vie": "view", - "view": "view", - "who": "whoami", - "whoa": "whoami", - "whoam": "whoami", - "whoami": "whoami", - "why": "why", - "x": "x", - }, - "aliases": Object { - "add": "install", - "add-user": "adduser", - "author": "owner", - "c": "config", - "cit": "install-ci-test", - "clean-install": "ci", - "clean-install-test": "cit", - "create": "init", - "ddp": "dedupe", - "dist-tags": "dist-tag", - "find": "search", - "hlep": "help", - "home": "docs", - "i": "install", - "ic": "ci", - "in": "install", - "info": "view", - "innit": "init", - "ins": "install", - "inst": "install", - "insta": "install", - "instal": "install", - "install-clean": "ci", - "isnt": "install", - "isnta": "install", - "isntal": "install", - "isntall": "install", - "isntall-clean": "ci", - "issues": "bugs", - "it": "install-test", - "la": "ll", - "list": "ls", - "ln": "link", - "ogr": "org", - "r": "uninstall", - "rb": "rebuild", - "remove": "uninstall", - "rm": "uninstall", - "rum": "run-script", - "run": "run-script", - "s": "search", - "se": "search", - "show": "view", - "sit": "cit", - "t": "test", - "tst": "test", - "udpate": "update", - "un": "uninstall", - "unlink": "uninstall", - "up": "update", - "upgrade": "update", - "urn": "run-script", - "v": "view", - "verison": "version", - "why": "explain", - "x": "exec", - }, - "cmdList": Array [ - "access", - "adduser", - "audit", - "bugs", - "cache", - "ci", - "completion", - "config", - "dedupe", - "deprecate", - "diff", - "dist-tag", - "docs", - "doctor", - "edit", - "exec", - "explain", - "explore", - "find-dupes", - "fund", - "get", - "help", - "hook", - "init", - "install", - "install-ci-test", - "install-test", - "link", - "ll", - "login", - "logout", - "ls", - "org", - "outdated", - "owner", - "pack", - "ping", - "pkg", - "prefix", - "profile", - "prune", - "publish", - "query", - "rebuild", - "repo", - "restart", - "root", - "run-script", - "search", - "set", - "shrinkwrap", - "star", - "stars", - "start", - "stop", - "team", - "test", - "token", - "uninstall", - "unpublish", - "unstar", - "update", - "version", - "view", - "whoami", - ], - "plumbing": Array [ - "help-search", - ], -} -` diff --git a/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs b/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs deleted file mode 100644 index 92a8e6222320c..0000000000000 --- a/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs +++ /dev/null @@ -1,1976 +0,0 @@ -/* IMPORTANT - * This snapshot file is auto-generated, but designed for humans. - * It should be checked into source control and tracked carefully. - * Re-generate by setting TAP_SNAPSHOT=1 and running tests. - * Make sure to inspect the output below. Do not ignore changes! - */ -'use strict' -exports[`test/lib/utils/config/definitions.js TAP > all config keys 1`] = ` -Array [ - "_auth", - "access", - "all", - "allow-same-version", - "also", - "audit", - "audit-level", - "auth-type", - "before", - "bin-links", - "browser", - "ca", - "cache", - "cache-max", - "cache-min", - "cafile", - "call", - "cert", - "ci-name", - "cidr", - "color", - "commit-hooks", - "depth", - "description", - "dev", - "diff", - "diff-ignore-all-space", - "diff-name-only", - "diff-no-prefix", - "diff-dst-prefix", - "diff-src-prefix", - "diff-text", - "diff-unified", - "dry-run", - "editor", - "engine-strict", - "fetch-retries", - "fetch-retry-factor", - "fetch-retry-maxtimeout", - "fetch-retry-mintimeout", - "fetch-timeout", - "force", - "foreground-scripts", - "format-package-lock", - "fund", - "git", - "git-tag-version", - "global", - "global-style", - "globalconfig", - "heading", - "https-proxy", - "if-present", - "ignore-scripts", - "include", - "include-staged", - "include-workspace-root", - "init-author-email", - "init-author-name", - "init-author-url", - "init-license", - "init-module", - "init-version", - "init.author.email", - "init.author.name", - "init.author.url", - "init.license", - "init.module", - "init.version", - "install-links", - "json", - "key", - "legacy-bundling", - "legacy-peer-deps", - "link", - "local-address", - "location", - "lockfile-version", - "loglevel", - "logs-dir", - "logs-max", - "long", - "maxsockets", - "message", - "node-options", - "node-version", - "noproxy", - "npm-version", - "offline", - "omit", - "omit-lockfile-registry-resolved", - "only", - "optional", - "otp", - "package", - "package-lock", - "package-lock-only", - "pack-destination", - "parseable", - "prefer-offline", - "prefer-online", - "prefix", - "preid", - "production", - "progress", - "proxy", - "read-only", - "rebuild-bundle", - "registry", - "replace-registry-host", - "save", - "save-bundle", - "save-dev", - "save-exact", - "save-optional", - "save-peer", - "save-prefix", - "save-prod", - "scope", - "script-shell", - "searchexclude", - "searchlimit", - "searchopts", - "searchstaleness", - "shell", - "shrinkwrap", - "sign-git-commit", - "sign-git-tag", - "strict-peer-deps", - "strict-ssl", - "tag", - "tag-version-prefix", - "timing", - "tmp", - "umask", - "unicode", - "update-notifier", - "usage", - "user-agent", - "userconfig", - "version", - "versions", - "viewer", - "which", - "workspace", - "workspaces", - "workspaces-update", - "yes", -] -` - -exports[`test/lib/utils/config/definitions.js TAP > all config keys that are shared to flatOptions 1`] = ` -Array [] -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for _auth 1`] = ` -#### \`_auth\` - -* Default: null -* Type: null or String - -A basic-auth string to use when authenticating against the npm registry. -This will ONLY be used to authenticate against the npm registry. For other -registries you will need to scope it like "//other-registry.tld/:_auth" - -Warning: This should generally not be set via a command-line option. It is -safer to use a registry-provided authentication bearer token stored in the -~/.npmrc file by running \`npm login\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for access 1`] = ` -#### \`access\` - -* Default: 'public' for new packages, existing packages it will not change the - current level -* Type: null, "restricted", or "public" - -If do not want your scoped package to be publicly viewable (and installable) -set \`--access=restricted\`. - -Unscoped packages can not be set to \`restricted\`. - -Note: This defaults to not changing the current access level for existing -packages. Specifying a value of \`restricted\` or \`public\` during publish will -change the access for an existing package the same way that \`npm access set -status\` would. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for all 1`] = ` -#### \`all\` - -* Default: false -* Type: Boolean - -When running \`npm outdated\` and \`npm ls\`, setting \`--all\` will show all -outdated or installed packages, rather than only those directly depended -upon by the current project. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for allow-same-version 1`] = ` -#### \`allow-same-version\` - -* Default: false -* Type: Boolean - -Prevents throwing an error when \`npm version\` is used to set the new version -to the same value as the current version. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for also 1`] = ` -#### \`also\` - -* Default: null -* Type: null, "dev", or "development" -* DEPRECATED: Please use --include=dev instead. - -When set to \`dev\` or \`development\`, this is an alias for \`--include=dev\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for audit 1`] = ` -#### \`audit\` - -* Default: true -* Type: Boolean - -When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for [\`npm audit\`](/commands/npm-audit) for details on what is -submitted. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for audit-level 1`] = ` -#### \`audit-level\` - -* Default: null -* Type: null, "info", "low", "moderate", "high", "critical", or "none" - -The minimum level of vulnerability for \`npm audit\` to exit with a non-zero -exit code. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for auth-type 1`] = ` -#### \`auth-type\` - -* Default: "web" -* Type: "legacy" or "web" - -What authentication strategy to use with \`login\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for before 1`] = ` -#### \`before\` - -* Default: null -* Type: null or Date - -If passed to \`npm install\`, will rebuild the npm tree such that only -versions that were available **on or before** the \`--before\` time get -installed. If there's no versions available for the current set of direct -dependencies, the command will error. - -If the requested version is a \`dist-tag\` and the given tag does not pass the -\`--before\` filter, the most recent version less than or equal to that tag -will be used. For example, \`foo@latest\` might install \`foo@1.2\` even though -\`latest\` is \`2.0\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for bin-links 1`] = ` -#### \`bin-links\` - -* Default: true -* Type: Boolean - -Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package -executables. - -Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for browser 1`] = ` -#### \`browser\` - -* Default: OS X: \`"open"\`, Windows: \`"start"\`, Others: \`"xdg-open"\` -* Type: null, Boolean, or String - -The browser that is called by npm commands to open websites. - -Set to \`false\` to suppress browser behavior and instead print urls to -terminal. - -Set to \`true\` to use default system URL opener. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for ca 1`] = ` -#### \`ca\` - -* Default: null -* Type: null or String (can be set multiple times) - -The Certificate Authority signing certificate that is trusted for SSL -connections to the registry. Values should be in PEM format (Windows calls -it "Base-64 encoded X.509 (.CER)") with newlines replaced by the string -"\\n". For example: - -\`\`\`ini -ca="-----BEGIN CERTIFICATE-----\\nXXXX\\nXXXX\\n-----END CERTIFICATE-----" -\`\`\` - -Set to \`null\` to only allow "known" registrars, or to a specific CA cert to -trust only that specific signing authority. - -Multiple CAs can be trusted by specifying an array of certificates: - -\`\`\`ini -ca[]="..." -ca[]="..." -\`\`\` - -See also the \`strict-ssl\` config. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for cache 1`] = ` -#### \`cache\` - -* Default: Windows: \`%LocalAppData%\\npm-cache\`, Posix: \`~/.npm\` -* Type: Path - -The location of npm's cache directory. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for cache-max 1`] = ` -#### \`cache-max\` - -* Default: Infinity -* Type: Number -* DEPRECATED: This option has been deprecated in favor of \`--prefer-online\` - -\`--cache-max=0\` is an alias for \`--prefer-online\` -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for cache-min 1`] = ` -#### \`cache-min\` - -* Default: 0 -* Type: Number -* DEPRECATED: This option has been deprecated in favor of \`--prefer-offline\`. - -\`--cache-min=9999 (or bigger)\` is an alias for \`--prefer-offline\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for cafile 1`] = ` -#### \`cafile\` - -* Default: null -* Type: Path - -A path to a file containing one or multiple Certificate Authority signing -certificates. Similar to the \`ca\` setting, but allows for multiple CA's, as -well as for the CA information to be stored in a file on disk. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for call 1`] = ` -#### \`call\` - -* Default: "" -* Type: String - -Optional companion option for \`npm exec\`, \`npx\` that allows for specifying a -custom command to be run along with the installed packages. - -\`\`\`bash -npm exec --package yo --package generator-node --call "yo node" -\`\`\` - -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for cert 1`] = ` -#### \`cert\` - -* Default: null -* Type: null or String - -A client certificate to pass when accessing the registry. Values should be -in PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with -newlines replaced by the string "\\n". For example: - -\`\`\`ini -cert="-----BEGIN CERTIFICATE-----\\nXXXX\\nXXXX\\n-----END CERTIFICATE-----" -\`\`\` - -It is _not_ the path to a certificate file, though you can set a -registry-scoped "certfile" path like -"//other-registry.tld/:certfile=/path/to/cert.pem". -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for ci-name 1`] = ` -#### \`ci-name\` - -* Default: The name of the current CI system, or \`null\` when not on a known CI - platform. -* Type: null or String - -The name of a continuous integration system. If not set explicitly, npm will -detect the current CI environment using the -[\`@npmcli/ci-detect\`](http://npm.im/@npmcli/ci-detect) module. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for cidr 1`] = ` -#### \`cidr\` - -* Default: null -* Type: null or String (can be set multiple times) - -This is a list of CIDR address to be used when configuring limited access -tokens with the \`npm token create\` command. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for color 1`] = ` -#### \`color\` - -* Default: true unless the NO_COLOR environ is set to something other than '0' -* Type: "always" or Boolean - -If false, never shows colors. If \`"always"\` then always shows colors. If -true, then only prints color codes for tty file descriptors. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for commit-hooks 1`] = ` -#### \`commit-hooks\` - -* Default: true -* Type: Boolean - -Run git commit hooks when using the \`npm version\` command. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for depth 1`] = ` -#### \`depth\` - -* Default: \`Infinity\` if \`--all\` is set, otherwise \`1\` -* Type: null or Number - -The depth to go when recursing packages for \`npm ls\`. - -If not set, \`npm ls\` will show only the immediate dependencies of the root -project. If \`--all\` is set, then npm will show all dependencies by default. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for description 1`] = ` -#### \`description\` - -* Default: true -* Type: Boolean - -Show the description in \`npm search\` -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for dev 1`] = ` -#### \`dev\` - -* Default: false -* Type: Boolean -* DEPRECATED: Please use --include=dev instead. - -Alias for \`--include=dev\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for diff 1`] = ` -#### \`diff\` - -* Default: -* Type: String (can be set multiple times) - -Define arguments to compare in \`npm diff\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for diff-dst-prefix 1`] = ` -#### \`diff-dst-prefix\` - -* Default: "b/" -* Type: String - -Destination prefix to be used in \`npm diff\` output. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for diff-ignore-all-space 1`] = ` -#### \`diff-ignore-all-space\` - -* Default: false -* Type: Boolean - -Ignore whitespace when comparing lines in \`npm diff\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for diff-name-only 1`] = ` -#### \`diff-name-only\` - -* Default: false -* Type: Boolean - -Prints only filenames when using \`npm diff\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for diff-no-prefix 1`] = ` -#### \`diff-no-prefix\` - -* Default: false -* Type: Boolean - -Do not show any source or destination prefix in \`npm diff\` output. - -Note: this causes \`npm diff\` to ignore the \`--diff-src-prefix\` and -\`--diff-dst-prefix\` configs. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for diff-src-prefix 1`] = ` -#### \`diff-src-prefix\` - -* Default: "a/" -* Type: String - -Source prefix to be used in \`npm diff\` output. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for diff-text 1`] = ` -#### \`diff-text\` - -* Default: false -* Type: Boolean - -Treat all files as text in \`npm diff\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for diff-unified 1`] = ` -#### \`diff-unified\` - -* Default: 3 -* Type: Number - -The number of lines of context to print in \`npm diff\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for dry-run 1`] = ` -#### \`dry-run\` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, \`install\`, \`update\`, -\`dedupe\`, \`uninstall\`, as well as \`pack\` and \`publish\`. - -Note: This is NOT honored by other network related commands, eg \`dist-tags\`, -\`owner\`, etc. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for editor 1`] = ` -#### \`editor\` - -* Default: The EDITOR or VISUAL environment variables, or 'notepad.exe' on - Windows, or 'vim' on Unix systems -* Type: String - -The command to run for \`npm edit\` and \`npm config edit\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for engine-strict 1`] = ` -#### \`engine-strict\` - -* Default: false -* Type: Boolean - -If set to true, then npm will stubbornly refuse to install (or even consider -installing) any package that claims to not be compatible with the current -Node.js version. - -This can be overridden by setting the \`--force\` flag. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for fetch-retries 1`] = ` -#### \`fetch-retries\` - -* Default: 2 -* Type: Number - -The "retries" config for the \`retry\` module to use when fetching packages -from the registry. - -npm will retry idempotent read requests to the registry in the case of -network failures or 5xx HTTP errors. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for fetch-retry-factor 1`] = ` -#### \`fetch-retry-factor\` - -* Default: 10 -* Type: Number - -The "factor" config for the \`retry\` module to use when fetching packages. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for fetch-retry-maxtimeout 1`] = ` -#### \`fetch-retry-maxtimeout\` - -* Default: 60000 (1 minute) -* Type: Number - -The "maxTimeout" config for the \`retry\` module to use when fetching -packages. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for fetch-retry-mintimeout 1`] = ` -#### \`fetch-retry-mintimeout\` - -* Default: 10000 (10 seconds) -* Type: Number - -The "minTimeout" config for the \`retry\` module to use when fetching -packages. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for fetch-timeout 1`] = ` -#### \`fetch-timeout\` - -* Default: 300000 (5 minutes) -* Type: Number - -The maximum amount of time to wait for HTTP requests to complete. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for force 1`] = ` -#### \`force\` - -* Default: false -* Type: Boolean - -Removes various protections against unfortunate side effects, common -mistakes, unnecessary performance degradation, and malicious input. - -* Allow clobbering non-npm files in global installs. -* Allow the \`npm version\` command to work on an unclean git repository. -* Allow deleting the cache folder with \`npm cache clean\`. -* Allow installing packages that have an \`engines\` declaration requiring a - different version of npm. -* Allow installing packages that have an \`engines\` declaration requiring a - different version of \`node\`, even if \`--engine-strict\` is enabled. -* Allow \`npm audit fix\` to install modules outside your stated dependency - range (including SemVer-major changes). -* Allow unpublishing all versions of a published package. -* Allow conflicting peerDependencies to be installed in the root project. -* Implicitly set \`--yes\` during \`npm init\`. -* Allow clobbering existing values in \`npm pkg\` -* Allow unpublishing of entire packages (not just a single version). - -If you don't have a clear idea of what you want to do, it is strongly -recommended that you do not use this option! -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for foreground-scripts 1`] = ` -#### \`foreground-scripts\` - -* Default: false -* Type: Boolean - -Run all build scripts (ie, \`preinstall\`, \`install\`, and \`postinstall\`) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process. - -Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for format-package-lock 1`] = ` -#### \`format-package-lock\` - -* Default: true -* Type: Boolean - -Format \`package-lock.json\` or \`npm-shrinkwrap.json\` as a human readable -file. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for fund 1`] = ` -#### \`fund\` - -* Default: true -* Type: Boolean - -When "true" displays the message at the end of each \`npm install\` -acknowledging the number of dependencies looking for funding. See [\`npm -fund\`](/commands/npm-fund) for details. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for git 1`] = ` -#### \`git\` - -* Default: "git" -* Type: String - -The command to use for git commands. If git is installed on the computer, -but is not in the \`PATH\`, then set this to the full path to the git binary. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for git-tag-version 1`] = ` -#### \`git-tag-version\` - -* Default: true -* Type: Boolean - -Tag the commit when using the \`npm version\` command. Setting this to false -results in no commit being made at all. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for global 1`] = ` -#### \`global\` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the \`prefix\` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the \`{prefix}/lib/node_modules\` folder, instead - of the current working directory. -* bin files are linked to \`{prefix}/bin\` -* man pages are linked to \`{prefix}/share/man\` -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for global-style 1`] = ` -#### \`global-style\` - -* Default: false -* Type: Boolean - -Causes npm to install the package into your local \`node_modules\` folder with -the same layout it uses with the global \`node_modules\` folder. Only your -direct dependencies will show in \`node_modules\` and everything they depend -on will be flattened in their \`node_modules\` folders. This obviously will -eliminate some deduping. If used with \`legacy-bundling\`, \`legacy-bundling\` -will be preferred. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for globalconfig 1`] = ` -#### \`globalconfig\` - -* Default: The global --prefix setting plus 'etc/npmrc'. For example, - '/usr/local/etc/npmrc' -* Type: Path - -The config file to read for global config options. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for heading 1`] = ` -#### \`heading\` - -* Default: "npm" -* Type: String - -The string that starts all the debugging log output. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for https-proxy 1`] = ` -#### \`https-proxy\` - -* Default: null -* Type: null or URL - -A proxy to use for outgoing https requests. If the \`HTTPS_PROXY\` or -\`https_proxy\` or \`HTTP_PROXY\` or \`http_proxy\` environment variables are set, -proxy settings will be honored by the underlying \`make-fetch-happen\` -library. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for if-present 1`] = ` -#### \`if-present\` - -* Default: false -* Type: Boolean - -If true, npm will not exit with an error code when \`run-script\` is invoked -for a script that isn't defined in the \`scripts\` section of \`package.json\`. -This option can be used when it's desirable to optionally run a script when -it's present and fail if the script fails. This is useful, for example, when -running scripts that may only apply for some builds in an otherwise generic -CI setup. - -This value is not exported to the environment for child processes. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for ignore-scripts 1`] = ` -#### \`ignore-scripts\` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -\`npm start\`, \`npm stop\`, \`npm restart\`, \`npm test\`, and \`npm run-script\` -will still run their intended script if \`ignore-scripts\` is set, but they -will *not* run any pre- or post-scripts. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for include 1`] = ` -#### \`include\` - -* Default: -* Type: "prod", "dev", "optional", or "peer" (can be set multiple times) - -Option that allows for defining which types of dependencies to install. - -This is the inverse of \`--omit=<type>\`. - -Dependency types specified in \`--include\` will not be omitted, regardless of -the order in which omit/include are specified on the command-line. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for include-staged 1`] = ` -#### \`include-staged\` - -* Default: false -* Type: Boolean - -Allow installing "staged" published packages, as defined by [npm RFC PR -#92](https://github.com/npm/rfcs/pull/92). - -This is experimental, and not implemented by the npm public registry. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for include-workspace-root 1`] = ` -#### \`include-workspace-root\` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the \`workspace\` config, or -all workspaces via the \`workspaces\` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for init-author-email 1`] = ` -#### \`init-author-email\` - -* Default: "" -* Type: String - -The value \`npm init\` should use by default for the package author's email. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for init-author-name 1`] = ` -#### \`init-author-name\` - -* Default: "" -* Type: String - -The value \`npm init\` should use by default for the package author's name. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for init-author-url 1`] = ` -#### \`init-author-url\` - -* Default: "" -* Type: "" or URL - -The value \`npm init\` should use by default for the package author's -homepage. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for init-license 1`] = ` -#### \`init-license\` - -* Default: "ISC" -* Type: String - -The value \`npm init\` should use by default for the package license. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for init-module 1`] = ` -#### \`init-module\` - -* Default: "~/.npm-init.js" -* Type: Path - -A module that will be loaded by the \`npm init\` command. See the -documentation for the -[init-package-json](https://github.com/npm/init-package-json) module for -more information, or [npm init](/commands/npm-init). -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for init-version 1`] = ` -#### \`init-version\` - -* Default: "1.0.0" -* Type: SemVer string - -The value that \`npm init\` should use by default for the package version -number, if not already set in package.json. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for init.author.email 1`] = ` -#### \`init.author.email\` - -* Default: "" -* Type: String -* DEPRECATED: Use \`--init-author-email\` instead. - -Alias for \`--init-author-email\` -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for init.author.name 1`] = ` -#### \`init.author.name\` - -* Default: "" -* Type: String -* DEPRECATED: Use \`--init-author-name\` instead. - -Alias for \`--init-author-name\` -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for init.author.url 1`] = ` -#### \`init.author.url\` - -* Default: "" -* Type: "" or URL -* DEPRECATED: Use \`--init-author-url\` instead. - -Alias for \`--init-author-url\` -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for init.license 1`] = ` -#### \`init.license\` - -* Default: "ISC" -* Type: String -* DEPRECATED: Use \`--init-license\` instead. - -Alias for \`--init-license\` -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for init.module 1`] = ` -#### \`init.module\` - -* Default: "~/.npm-init.js" -* Type: Path -* DEPRECATED: Use \`--init-module\` instead. - -Alias for \`--init-module\` -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for init.version 1`] = ` -#### \`init.version\` - -* Default: "1.0.0" -* Type: SemVer string -* DEPRECATED: Use \`--init-version\` instead. - -Alias for \`--init-version\` -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for install-links 1`] = ` -#### \`install-links\` - -* Default: true -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for json 1`] = ` -#### \`json\` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In \`npm pkg set\` it enables parsing set values with JSON.parse() before - saving them to your \`package.json\`. - -Not supported by all npm commands. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for key 1`] = ` -#### \`key\` - -* Default: null -* Type: null or String - -A client key to pass when accessing the registry. Values should be in PEM -format with newlines replaced by the string "\\n". For example: - -\`\`\`ini -key="-----BEGIN PRIVATE KEY-----\\nXXXX\\nXXXX\\n-----END PRIVATE KEY-----" -\`\`\` - -It is _not_ the path to a key file, though you can set a registry-scoped -"keyfile" path like "//other-registry.tld/:keyfile=/path/to/key.pem". -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for legacy-bundling 1`] = ` -#### \`legacy-bundling\` - -* Default: false -* Type: Boolean - -Causes npm to install the package such that versions of npm prior to 1.4, -such as the one included with node 0.8, can install the package. This -eliminates all automatic deduping. If used with \`global-style\` this option -will be preferred. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for legacy-peer-deps 1`] = ` -#### \`legacy-peer-deps\` - -* Default: false -* Type: Boolean - -Causes npm to completely ignore \`peerDependencies\` when building a package -tree, as in npm versions 3 through 6. - -If a package cannot be installed because of overly strict \`peerDependencies\` -that collide, it provides a way to move forward resolving the situation. - -This differs from \`--omit=peer\`, in that \`--omit=peer\` will avoid unpacking -\`peerDependencies\` on disk, but will still design a tree such that -\`peerDependencies\` _could_ be unpacked in a correct place. - -Use of \`legacy-peer-deps\` is not recommended, as it will not enforce the -\`peerDependencies\` contract that meta-dependencies may rely on. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for link 1`] = ` -#### \`link\` - -* Default: false -* Type: Boolean - -Used with \`npm ls\`, limiting output to only those packages that are linked. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for local-address 1`] = ` -#### \`local-address\` - -* Default: null -* Type: IP Address - -The IP address of the local interface to use when making connections to the -npm registry. Must be IPv4 in versions of Node prior to 0.12. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for location 1`] = ` -#### \`location\` - -* Default: "user" unless \`--global\` is passed, which will also set this value - to "global" -* Type: "global", "user", or "project" - -When passed to \`npm config\` this refers to which config file to use. - -When set to "global" mode, packages are installed into the \`prefix\` folder -instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the \`{prefix}/lib/node_modules\` folder, instead - of the current working directory. -* bin files are linked to \`{prefix}/bin\` -* man pages are linked to \`{prefix}/share/man\` -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for lockfile-version 1`] = ` -#### \`lockfile-version\` - -* Default: Version 3 if no lockfile, auto-converting v1 lockfiles to v3, - otherwise maintain current lockfile version. -* Type: null, 1, 2, 3, "1", "2", or "3" - -Set the lockfile format version to be used in package-lock.json and -npm-shrinkwrap-json files. Possible options are: - -1: The lockfile version used by npm versions 5 and 6. Lacks some data that -is used during the install, resulting in slower and possibly less -deterministic installs. Prevents lockfile churn when interoperating with -older npm versions. - -2: The default lockfile version used by npm version 7 and 8. Includes both -the version 1 lockfile data and version 3 lockfile data, for maximum -determinism and interoperability, at the expense of more bytes on disk. - -3: Only the new lockfile information introduced in npm version 7. Smaller on -disk than lockfile version 2, but not interoperable with older npm versions. -Ideal if all users are on npm version 7 and higher. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for loglevel 1`] = ` -#### \`loglevel\` - -* Default: "notice" -* Type: "silent", "error", "warn", "notice", "http", "timing", "info", - "verbose", or "silly" - -What level of logs to report. All logs are written to a debug log, with the -path to that file printed if the execution of a command fails. - -Any logs of a higher level than the setting are shown. The default is -"notice". - -See also the \`foreground-scripts\` config. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for logs-dir 1`] = ` -#### \`logs-dir\` - -* Default: A directory named \`_logs\` inside the cache -* Type: null or Path - -The location of npm's log directory. See [\`npm logging\`](/using-npm/logging) -for more information. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for logs-max 1`] = ` -#### \`logs-max\` - -* Default: 10 -* Type: Number - -The maximum number of log files to store. - -If set to 0, no log files will be written for the current run. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for long 1`] = ` -#### \`long\` - -* Default: false -* Type: Boolean - -Show extended information in \`ls\`, \`search\`, and \`help-search\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for maxsockets 1`] = ` -#### \`maxsockets\` - -* Default: 15 -* Type: Number - -The maximum number of connections to use per origin (protocol/host/port -combination). -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for message 1`] = ` -#### \`message\` - -* Default: "%s" -* Type: String - -Commit message which is used by \`npm version\` when creating version commit. - -Any "%s" in the message will be replaced with the version number. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for node-options 1`] = ` -#### \`node-options\` - -* Default: null -* Type: null or String - -Options to pass through to Node.js via the \`NODE_OPTIONS\` environment -variable. This does not impact how npm itself is executed but it does impact -how lifecycle scripts are called. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for node-version 1`] = ` -#### \`node-version\` - -* Default: Node.js \`process.version\` value -* Type: SemVer string - -The node version to use when checking a package's \`engines\` setting. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for noproxy 1`] = ` -#### \`noproxy\` - -* Default: The value of the NO_PROXY environment variable -* Type: String (can be set multiple times) - -Domain extensions that should bypass any proxies. - -Also accepts a comma-delimited string. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for npm-version 1`] = ` -#### \`npm-version\` - -* Default: Output of \`npm --version\` -* Type: SemVer string - -The npm version to use when checking a package's \`engines\` setting. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for offline 1`] = ` -#### \`offline\` - -* Default: false -* Type: Boolean - -Force offline mode: no network requests will be done during install. To -allow the CLI to fill in missing cache data, see \`--prefer-offline\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for omit 1`] = ` -#### \`omit\` - -* Default: 'dev' if the \`NODE_ENV\` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -\`package-lock.json\` or \`npm-shrinkwrap.json\` file. They are just not -physically installed on disk. - -If a package type appears in both the \`--include\` and \`--omit\` lists, then -it will be included. - -If the resulting omit list includes \`'dev'\`, then the \`NODE_ENV\` environment -variable will be set to \`'production'\` for all lifecycle scripts. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for omit-lockfile-registry-resolved 1`] = ` -#### \`omit-lockfile-registry-resolved\` - -* Default: false -* Type: Boolean - -This option causes npm to create lock files without a \`resolved\` key for -registry dependencies. Subsequent installs will need to resolve tarball -endpoints with the configured registry, likely resulting in a longer install -time. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for only 1`] = ` -#### \`only\` - -* Default: null -* Type: null, "prod", or "production" -* DEPRECATED: Use \`--omit=dev\` to omit dev dependencies from the install. - -When set to \`prod\` or \`production\`, this is an alias for \`--omit=dev\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for optional 1`] = ` -#### \`optional\` - -* Default: null -* Type: null or Boolean -* DEPRECATED: Use \`--omit=optional\` to exclude optional dependencies, or - \`--include=optional\` to include them. - -Default value does install optional deps unless otherwise omitted. - -Alias for --include=optional or --omit=optional -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for otp 1`] = ` -#### \`otp\` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with \`npm access\`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for pack-destination 1`] = ` -#### \`pack-destination\` - -* Default: "." -* Type: String - -Directory in which \`npm pack\` will save tarballs. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for package 1`] = ` -#### \`package\` - -* Default: -* Type: String (can be set multiple times) - -The package or packages to install for [\`npm exec\`](/commands/npm-exec) -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for package-lock 1`] = ` -#### \`package-lock\` - -* Default: true -* Type: Boolean - -If set to false, then ignore \`package-lock.json\` files when installing. This -will also prevent _writing_ \`package-lock.json\` if \`save\` is true. - -This configuration does not affect \`npm ci\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for package-lock-only 1`] = ` -#### \`package-lock-only\` - -* Default: false -* Type: Boolean - -If set to true, the current operation will only use the \`package-lock.json\`, -ignoring \`node_modules\`. - -For \`update\` this means only the \`package-lock.json\` will be updated, -instead of checking \`node_modules\` and downloading dependencies. - -For \`list\` this means the output will be based on the tree described by the -\`package-lock.json\`, rather than the contents of \`node_modules\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for parseable 1`] = ` -#### \`parseable\` - -* Default: false -* Type: Boolean - -Output parseable results from commands that write to standard output. For -\`npm search\`, this will be tab-separated table format. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for prefer-offline 1`] = ` -#### \`prefer-offline\` - -* Default: false -* Type: Boolean - -If true, staleness checks for cached data will be bypassed, but missing data -will be requested from the server. To force full offline mode, use -\`--offline\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for prefer-online 1`] = ` -#### \`prefer-online\` - -* Default: false -* Type: Boolean - -If true, staleness checks for cached data will be forced, making the CLI -look for updates immediately even for fresh package data. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for prefix 1`] = ` -#### \`prefix\` - -* Default: In global mode, the folder where the node executable is installed. - In local mode, the nearest parent folder containing either a package.json - file or a node_modules folder. -* Type: Path - -The location to install global items. If set on the command line, then it -forces non-global commands to run in the specified folder. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for preid 1`] = ` -#### \`preid\` - -* Default: "" -* Type: String - -The "prerelease identifier" to use as a prefix for the "prerelease" part of -a semver. Like the \`rc\` in \`1.2.0-rc.8\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for production 1`] = ` -#### \`production\` - -* Default: null -* Type: null or Boolean -* DEPRECATED: Use \`--omit=dev\` instead. - -Alias for \`--omit=dev\` -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for progress 1`] = ` -#### \`progress\` - -* Default: \`true\` unless running in a known CI system -* Type: Boolean - -When set to \`true\`, npm will display a progress bar during time intensive -operations, if \`process.stderr\` is a TTY. - -Set to \`false\` to suppress the progress bar. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for proxy 1`] = ` -#### \`proxy\` - -* Default: null -* Type: null, false, or URL - -A proxy to use for outgoing http requests. If the \`HTTP_PROXY\` or -\`http_proxy\` environment variables are set, proxy settings will be honored -by the underlying \`request\` library. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for read-only 1`] = ` -#### \`read-only\` - -* Default: false -* Type: Boolean - -This is used to mark a token as unable to publish when configuring limited -access tokens with the \`npm token create\` command. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for rebuild-bundle 1`] = ` -#### \`rebuild-bundle\` - -* Default: true -* Type: Boolean - -Rebuild bundled dependencies after installation. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for registry 1`] = ` -#### \`registry\` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for replace-registry-host 1`] = ` -#### \`replace-registry-host\` - -* Default: "npmjs" -* Type: "npmjs", "never", "always", or String - -Defines behavior for replacing the registry host in a lockfile with the -configured registry. - -The default behavior is to replace package dist URLs from the default -registry (https://registry.npmjs.org) to the configured registry. If set to -"never", then use the registry value. If set to "always", then replace the -registry host with the configured host every time. - -You may also specify a bare hostname (e.g., "registry.npmjs.org"). -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for save 1`] = ` -#### \`save\` - -* Default: \`true\` unless when using \`npm update\` where it defaults to \`false\` -* Type: Boolean - -Save installed packages to a \`package.json\` file as dependencies. - -When used with the \`npm rm\` command, removes the dependency from -\`package.json\`. - -Will also prevent writing to \`package-lock.json\` if set to \`false\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for save-bundle 1`] = ` -#### \`save-bundle\` - -* Default: false -* Type: Boolean - -If a package would be saved at install time by the use of \`--save\`, -\`--save-dev\`, or \`--save-optional\`, then also put it in the -\`bundleDependencies\` list. - -Ignored if \`--save-peer\` is set, since peerDependencies cannot be bundled. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for save-dev 1`] = ` -#### \`save-dev\` - -* Default: false -* Type: Boolean - -Save installed packages to a package.json file as \`devDependencies\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for save-exact 1`] = ` -#### \`save-exact\` - -* Default: false -* Type: Boolean - -Dependencies saved to package.json will be configured with an exact version -rather than using npm's default semver range operator. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for save-optional 1`] = ` -#### \`save-optional\` - -* Default: false -* Type: Boolean - -Save installed packages to a package.json file as \`optionalDependencies\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for save-peer 1`] = ` -#### \`save-peer\` - -* Default: false -* Type: Boolean - -Save installed packages to a package.json file as \`peerDependencies\` -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for save-prefix 1`] = ` -#### \`save-prefix\` - -* Default: "^" -* Type: String - -Configure how versions of packages installed to a package.json file via -\`--save\` or \`--save-dev\` get prefixed. - -For example if a package has version \`1.2.3\`, by default its version is set -to \`^1.2.3\` which allows minor upgrades for that package, but after \`npm -config set save-prefix='~'\` it would be set to \`~1.2.3\` which only allows -patch upgrades. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for save-prod 1`] = ` -#### \`save-prod\` - -* Default: false -* Type: Boolean - -Save installed packages into \`dependencies\` specifically. This is useful if -a package already exists in \`devDependencies\` or \`optionalDependencies\`, but -you want to move it to be a non-optional production dependency. - -This is the default behavior if \`--save\` is true, and neither \`--save-dev\` -or \`--save-optional\` are true. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for scope 1`] = ` -#### \`scope\` - -* Default: the scope of the current project, if any, or "" -* Type: String - -Associate an operation with a scope for a scoped registry. - -Useful when logging in to or out of a private registry: - -\`\`\` -# log in, linking the scope to the custom registry -npm login --scope=@mycorp --registry=https://registry.mycorp.com - -# log out, removing the link and the auth token -npm logout --scope=@mycorp -\`\`\` - -This will cause \`@mycorp\` to be mapped to the registry for future -installation of packages specified according to the pattern -\`@mycorp/package\`. - -This will also cause \`npm init\` to create a scoped package. - -\`\`\` -# accept all defaults, and create a package named "@foo/whatever", -# instead of just named "whatever" -npm init --scope=@foo --yes -\`\`\` - -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for script-shell 1`] = ` -#### \`script-shell\` - -* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows -* Type: null or String - -The shell to use for scripts run with the \`npm exec\`, \`npm run\` and \`npm -init <package-spec>\` commands. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for searchexclude 1`] = ` -#### \`searchexclude\` - -* Default: "" -* Type: String - -Space-separated options that limit the results from search. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for searchlimit 1`] = ` -#### \`searchlimit\` - -* Default: 20 -* Type: Number - -Number of items to limit search results to. Will not apply at all to legacy -searches. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for searchopts 1`] = ` -#### \`searchopts\` - -* Default: "" -* Type: String - -Space-separated options that are always passed to search. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for searchstaleness 1`] = ` -#### \`searchstaleness\` - -* Default: 900 -* Type: Number - -The age of the cache, in seconds, before another registry request is made if -using legacy search endpoint. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for shell 1`] = ` -#### \`shell\` - -* Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on - Windows -* Type: String - -The shell to run for the \`npm explore\` command. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for shrinkwrap 1`] = ` -#### \`shrinkwrap\` - -* Default: true -* Type: Boolean -* DEPRECATED: Use the --package-lock setting instead. - -Alias for --package-lock -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for sign-git-commit 1`] = ` -#### \`sign-git-commit\` - -* Default: false -* Type: Boolean - -If set to true, then the \`npm version\` command will commit the new package -version using \`-S\` to add a signature. - -Note that git requires you to have set up GPG keys in your git configs for -this to work properly. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for sign-git-tag 1`] = ` -#### \`sign-git-tag\` - -* Default: false -* Type: Boolean - -If set to true, then the \`npm version\` command will tag the version using -\`-s\` to add a signature. - -Note that git requires you to have set up GPG keys in your git configs for -this to work properly. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for strict-peer-deps 1`] = ` -#### \`strict-peer-deps\` - -* Default: false -* Type: Boolean - -If set to \`true\`, and \`--legacy-peer-deps\` is not set, then _any_ -conflicting \`peerDependencies\` will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships. - -By default, conflicting \`peerDependencies\` deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's \`peerDependencies\` object. - -When such and override is performed, a warning is printed, explaining the -conflict and the packages involved. If \`--strict-peer-deps\` is set, then -this warning is treated as a failure. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for strict-ssl 1`] = ` -#### \`strict-ssl\` - -* Default: true -* Type: Boolean - -Whether or not to do SSL key validation when making requests to the registry -via https. - -See also the \`ca\` config. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for tag 1`] = ` -#### \`tag\` - -* Default: "latest" -* Type: String - -If you ask npm to install a package and don't tell it a specific version, -then it will install the specified tag. - -Also the tag that is added to the package@version specified by the \`npm tag\` -command, if no explicit tag is given. - -When used by the \`npm diff\` command, this is the tag used to fetch the -tarball that will be compared with the local files by default. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for tag-version-prefix 1`] = ` -#### \`tag-version-prefix\` - -* Default: "v" -* Type: String - -If set, alters the prefix used when tagging a new version when performing a -version increment using \`npm-version\`. To remove the prefix altogether, set -it to the empty string: \`""\`. - -Because other tools may rely on the convention that npm version tags look -like \`v1.0.0\`, _only use this property if it is absolutely necessary_. In -particular, use care when overriding this setting for public packages. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for timing 1`] = ` -#### \`timing\` - -* Default: false -* Type: Boolean - -If true, writes timing information to a process specific json file in the -cache or \`logs-dir\`. The file name ends with \`-timing.json\`. - -You can quickly view it with this [json](https://npm.im/json) command line: -\`cat ~/.npm/_logs/*-timing.json | npm exec -- json -g\`. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for tmp 1`] = ` -#### \`tmp\` - -* Default: The value returned by the Node.js \`os.tmpdir()\` method - <https://nodejs.org/api/os.html#os_os_tmpdir> -* Type: Path -* DEPRECATED: This setting is no longer used. npm stores temporary files in a - special location in the cache, and they are managed by - [\`cacache\`](http://npm.im/cacache). - -Historically, the location where temporary files were stored. No longer -relevant. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for umask 1`] = ` -#### \`umask\` - -* Default: 0 -* Type: Octal numeric string in range 0000..0777 (0..511) - -The "umask" value to use when setting the file creation mode on files and -folders. - -Folders and executables are given a mode which is \`0o777\` masked against -this value. Other files are given a mode which is \`0o666\` masked against -this value. - -Note that the underlying system will _also_ apply its own umask value to -files and folders that are created, and npm does not circumvent this, but -rather adds the \`--umask\` config to it. - -Thus, the effective default umask value on most POSIX systems is 0o22, -meaning that folders and executables are created with a mode of 0o755 and -other files are created with a mode of 0o644. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for unicode 1`] = ` -#### \`unicode\` - -* Default: false on windows, true on mac/unix systems with a unicode locale, - as defined by the \`LC_ALL\`, \`LC_CTYPE\`, or \`LANG\` environment variables. -* Type: Boolean - -When set to true, npm uses unicode characters in the tree output. When -false, it uses ascii characters instead of unicode glyphs. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for update-notifier 1`] = ` -#### \`update-notifier\` - -* Default: true -* Type: Boolean - -Set to false to suppress the update notification when using an older version -of npm than the latest. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for usage 1`] = ` -#### \`usage\` - -* Default: false -* Type: Boolean - -Show short usage output about the command specified. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for user-agent 1`] = ` -#### \`user-agent\` - -* Default: "npm/{npm-version} node/{node-version} {platform} {arch} - workspaces/{workspaces} {ci}" -* Type: String - -Sets the User-Agent request header. The following fields are replaced with -their actual counterparts: - -* \`{npm-version}\` - The npm version in use -* \`{node-version}\` - The Node.js version in use -* \`{platform}\` - The value of \`process.platform\` -* \`{arch}\` - The value of \`process.arch\` -* \`{workspaces}\` - Set to \`true\` if the \`workspaces\` or \`workspace\` options - are set. -* \`{ci}\` - The value of the \`ci-name\` config, if set, prefixed with \`ci/\`, or - an empty string if \`ci-name\` is empty. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for userconfig 1`] = ` -#### \`userconfig\` - -* Default: "~/.npmrc" -* Type: Path - -The location of user-level configuration settings. - -This may be overridden by the \`npm_config_userconfig\` environment variable -or the \`--userconfig\` command line option, but may _not_ be overridden by -settings in the \`globalconfig\` file. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for version 1`] = ` -#### \`version\` - -* Default: false -* Type: Boolean - -If true, output the npm version and exit successfully. - -Only relevant when specified explicitly on the command line. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for versions 1`] = ` -#### \`versions\` - -* Default: false -* Type: Boolean - -If true, output the npm version as well as node's \`process.versions\` map and -the version in the current working directory's \`package.json\` file if one -exists, and exit successfully. - -Only relevant when specified explicitly on the command line. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for viewer 1`] = ` -#### \`viewer\` - -* Default: "man" on Posix, "browser" on Windows -* Type: String - -The program to use to view help content. - -Set to \`"browser"\` to view html help content in the default web browser. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for which 1`] = ` -#### \`which\` - -* Default: null -* Type: null or Number - -If there are multiple funding sources, which 1-indexed source URL to open. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for workspace 1`] = ` -#### \`workspace\` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the \`workspace\` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the \`npm init\` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for workspaces 1`] = ` -#### \`workspaces\` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like \`install\` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the \`node_modules\` tree (install, update, etc.) -will link workspaces into the \`node_modules\` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the \`workspace\` config. - -This value is not exported to the environment for child processes. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for workspaces-update 1`] = ` -#### \`workspaces-update\` - -* Default: true -* Type: Boolean - -If set to true, the npm cli will run an update after operations that may -possibly change the workspaces installed to the \`node_modules\` folder. -` - -exports[`test/lib/utils/config/definitions.js TAP > config description for yes 1`] = ` -#### \`yes\` - -* Default: null -* Type: null or Boolean - -Automatically answer "yes" to any prompts that npm might print on the -command line. -` diff --git a/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs b/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs deleted file mode 100644 index 999b3859fff2e..0000000000000 --- a/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs +++ /dev/null @@ -1,1966 +0,0 @@ -/* IMPORTANT - * This snapshot file is auto-generated, but designed for humans. - * It should be checked into source control and tracked carefully. - * Re-generate by setting TAP_SNAPSHOT=1 and running tests. - * Make sure to inspect the output below. Do not ignore changes! - */ -'use strict' -exports[`test/lib/utils/config/describe-all.js TAP > must match snapshot 1`] = ` -#### \`_auth\` - -* Default: null -* Type: null or String - -A basic-auth string to use when authenticating against the npm registry. -This will ONLY be used to authenticate against the npm registry. For other -registries you will need to scope it like "//other-registry.tld/:_auth" - -Warning: This should generally not be set via a command-line option. It is -safer to use a registry-provided authentication bearer token stored in the -~/.npmrc file by running \`npm login\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`access\` - -* Default: 'public' for new packages, existing packages it will not change the - current level -* Type: null, "restricted", or "public" - -If do not want your scoped package to be publicly viewable (and installable) -set \`--access=restricted\`. - -Unscoped packages can not be set to \`restricted\`. - -Note: This defaults to not changing the current access level for existing -packages. Specifying a value of \`restricted\` or \`public\` during publish will -change the access for an existing package the same way that \`npm access set -status\` would. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`all\` - -* Default: false -* Type: Boolean - -When running \`npm outdated\` and \`npm ls\`, setting \`--all\` will show all -outdated or installed packages, rather than only those directly depended -upon by the current project. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`allow-same-version\` - -* Default: false -* Type: Boolean - -Prevents throwing an error when \`npm version\` is used to set the new version -to the same value as the current version. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`audit\` - -* Default: true -* Type: Boolean - -When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for [\`npm audit\`](/commands/npm-audit) for details on what is -submitted. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`audit-level\` - -* Default: null -* Type: null, "info", "low", "moderate", "high", "critical", or "none" - -The minimum level of vulnerability for \`npm audit\` to exit with a non-zero -exit code. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`auth-type\` - -* Default: "web" -* Type: "legacy" or "web" - -What authentication strategy to use with \`login\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`before\` - -* Default: null -* Type: null or Date - -If passed to \`npm install\`, will rebuild the npm tree such that only -versions that were available **on or before** the \`--before\` time get -installed. If there's no versions available for the current set of direct -dependencies, the command will error. - -If the requested version is a \`dist-tag\` and the given tag does not pass the -\`--before\` filter, the most recent version less than or equal to that tag -will be used. For example, \`foo@latest\` might install \`foo@1.2\` even though -\`latest\` is \`2.0\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`bin-links\` - -* Default: true -* Type: Boolean - -Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package -executables. - -Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`browser\` - -* Default: OS X: \`"open"\`, Windows: \`"start"\`, Others: \`"xdg-open"\` -* Type: null, Boolean, or String - -The browser that is called by npm commands to open websites. - -Set to \`false\` to suppress browser behavior and instead print urls to -terminal. - -Set to \`true\` to use default system URL opener. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`ca\` - -* Default: null -* Type: null or String (can be set multiple times) - -The Certificate Authority signing certificate that is trusted for SSL -connections to the registry. Values should be in PEM format (Windows calls -it "Base-64 encoded X.509 (.CER)") with newlines replaced by the string -"\\n". For example: - -\`\`\`ini -ca="-----BEGIN CERTIFICATE-----\\nXXXX\\nXXXX\\n-----END CERTIFICATE-----" -\`\`\` - -Set to \`null\` to only allow "known" registrars, or to a specific CA cert to -trust only that specific signing authority. - -Multiple CAs can be trusted by specifying an array of certificates: - -\`\`\`ini -ca[]="..." -ca[]="..." -\`\`\` - -See also the \`strict-ssl\` config. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`cache\` - -* Default: Windows: \`%LocalAppData%\\npm-cache\`, Posix: \`~/.npm\` -* Type: Path - -The location of npm's cache directory. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`cafile\` - -* Default: null -* Type: Path - -A path to a file containing one or multiple Certificate Authority signing -certificates. Similar to the \`ca\` setting, but allows for multiple CA's, as -well as for the CA information to be stored in a file on disk. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`call\` - -* Default: "" -* Type: String - -Optional companion option for \`npm exec\`, \`npx\` that allows for specifying a -custom command to be run along with the installed packages. - -\`\`\`bash -npm exec --package yo --package generator-node --call "yo node" -\`\`\` - - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`cert\` - -* Default: null -* Type: null or String - -A client certificate to pass when accessing the registry. Values should be -in PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with -newlines replaced by the string "\\n". For example: - -\`\`\`ini -cert="-----BEGIN CERTIFICATE-----\\nXXXX\\nXXXX\\n-----END CERTIFICATE-----" -\`\`\` - -It is _not_ the path to a certificate file, though you can set a -registry-scoped "certfile" path like -"//other-registry.tld/:certfile=/path/to/cert.pem". - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`ci-name\` - -* Default: The name of the current CI system, or \`null\` when not on a known CI - platform. -* Type: null or String - -The name of a continuous integration system. If not set explicitly, npm will -detect the current CI environment using the -[\`@npmcli/ci-detect\`](http://npm.im/@npmcli/ci-detect) module. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`cidr\` - -* Default: null -* Type: null or String (can be set multiple times) - -This is a list of CIDR address to be used when configuring limited access -tokens with the \`npm token create\` command. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`color\` - -* Default: true unless the NO_COLOR environ is set to something other than '0' -* Type: "always" or Boolean - -If false, never shows colors. If \`"always"\` then always shows colors. If -true, then only prints color codes for tty file descriptors. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`commit-hooks\` - -* Default: true -* Type: Boolean - -Run git commit hooks when using the \`npm version\` command. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`depth\` - -* Default: \`Infinity\` if \`--all\` is set, otherwise \`1\` -* Type: null or Number - -The depth to go when recursing packages for \`npm ls\`. - -If not set, \`npm ls\` will show only the immediate dependencies of the root -project. If \`--all\` is set, then npm will show all dependencies by default. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`description\` - -* Default: true -* Type: Boolean - -Show the description in \`npm search\` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`diff\` - -* Default: -* Type: String (can be set multiple times) - -Define arguments to compare in \`npm diff\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`diff-dst-prefix\` - -* Default: "b/" -* Type: String - -Destination prefix to be used in \`npm diff\` output. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`diff-ignore-all-space\` - -* Default: false -* Type: Boolean - -Ignore whitespace when comparing lines in \`npm diff\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`diff-name-only\` - -* Default: false -* Type: Boolean - -Prints only filenames when using \`npm diff\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`diff-no-prefix\` - -* Default: false -* Type: Boolean - -Do not show any source or destination prefix in \`npm diff\` output. - -Note: this causes \`npm diff\` to ignore the \`--diff-src-prefix\` and -\`--diff-dst-prefix\` configs. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`diff-src-prefix\` - -* Default: "a/" -* Type: String - -Source prefix to be used in \`npm diff\` output. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`diff-text\` - -* Default: false -* Type: Boolean - -Treat all files as text in \`npm diff\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`diff-unified\` - -* Default: 3 -* Type: Number - -The number of lines of context to print in \`npm diff\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`dry-run\` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, \`install\`, \`update\`, -\`dedupe\`, \`uninstall\`, as well as \`pack\` and \`publish\`. - -Note: This is NOT honored by other network related commands, eg \`dist-tags\`, -\`owner\`, etc. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`editor\` - -* Default: The EDITOR or VISUAL environment variables, or 'notepad.exe' on - Windows, or 'vim' on Unix systems -* Type: String - -The command to run for \`npm edit\` and \`npm config edit\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`engine-strict\` - -* Default: false -* Type: Boolean - -If set to true, then npm will stubbornly refuse to install (or even consider -installing) any package that claims to not be compatible with the current -Node.js version. - -This can be overridden by setting the \`--force\` flag. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`fetch-retries\` - -* Default: 2 -* Type: Number - -The "retries" config for the \`retry\` module to use when fetching packages -from the registry. - -npm will retry idempotent read requests to the registry in the case of -network failures or 5xx HTTP errors. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`fetch-retry-factor\` - -* Default: 10 -* Type: Number - -The "factor" config for the \`retry\` module to use when fetching packages. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`fetch-retry-maxtimeout\` - -* Default: 60000 (1 minute) -* Type: Number - -The "maxTimeout" config for the \`retry\` module to use when fetching -packages. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`fetch-retry-mintimeout\` - -* Default: 10000 (10 seconds) -* Type: Number - -The "minTimeout" config for the \`retry\` module to use when fetching -packages. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`fetch-timeout\` - -* Default: 300000 (5 minutes) -* Type: Number - -The maximum amount of time to wait for HTTP requests to complete. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`force\` - -* Default: false -* Type: Boolean - -Removes various protections against unfortunate side effects, common -mistakes, unnecessary performance degradation, and malicious input. - -* Allow clobbering non-npm files in global installs. -* Allow the \`npm version\` command to work on an unclean git repository. -* Allow deleting the cache folder with \`npm cache clean\`. -* Allow installing packages that have an \`engines\` declaration requiring a - different version of npm. -* Allow installing packages that have an \`engines\` declaration requiring a - different version of \`node\`, even if \`--engine-strict\` is enabled. -* Allow \`npm audit fix\` to install modules outside your stated dependency - range (including SemVer-major changes). -* Allow unpublishing all versions of a published package. -* Allow conflicting peerDependencies to be installed in the root project. -* Implicitly set \`--yes\` during \`npm init\`. -* Allow clobbering existing values in \`npm pkg\` -* Allow unpublishing of entire packages (not just a single version). - -If you don't have a clear idea of what you want to do, it is strongly -recommended that you do not use this option! - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`foreground-scripts\` - -* Default: false -* Type: Boolean - -Run all build scripts (ie, \`preinstall\`, \`install\`, and \`postinstall\`) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process. - -Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`format-package-lock\` - -* Default: true -* Type: Boolean - -Format \`package-lock.json\` or \`npm-shrinkwrap.json\` as a human readable -file. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`fund\` - -* Default: true -* Type: Boolean - -When "true" displays the message at the end of each \`npm install\` -acknowledging the number of dependencies looking for funding. See [\`npm -fund\`](/commands/npm-fund) for details. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`git\` - -* Default: "git" -* Type: String - -The command to use for git commands. If git is installed on the computer, -but is not in the \`PATH\`, then set this to the full path to the git binary. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`git-tag-version\` - -* Default: true -* Type: Boolean - -Tag the commit when using the \`npm version\` command. Setting this to false -results in no commit being made at all. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`global\` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the \`prefix\` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the \`{prefix}/lib/node_modules\` folder, instead - of the current working directory. -* bin files are linked to \`{prefix}/bin\` -* man pages are linked to \`{prefix}/share/man\` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`global-style\` - -* Default: false -* Type: Boolean - -Causes npm to install the package into your local \`node_modules\` folder with -the same layout it uses with the global \`node_modules\` folder. Only your -direct dependencies will show in \`node_modules\` and everything they depend -on will be flattened in their \`node_modules\` folders. This obviously will -eliminate some deduping. If used with \`legacy-bundling\`, \`legacy-bundling\` -will be preferred. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`globalconfig\` - -* Default: The global --prefix setting plus 'etc/npmrc'. For example, - '/usr/local/etc/npmrc' -* Type: Path - -The config file to read for global config options. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`heading\` - -* Default: "npm" -* Type: String - -The string that starts all the debugging log output. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`https-proxy\` - -* Default: null -* Type: null or URL - -A proxy to use for outgoing https requests. If the \`HTTPS_PROXY\` or -\`https_proxy\` or \`HTTP_PROXY\` or \`http_proxy\` environment variables are set, -proxy settings will be honored by the underlying \`make-fetch-happen\` -library. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`if-present\` - -* Default: false -* Type: Boolean - -If true, npm will not exit with an error code when \`run-script\` is invoked -for a script that isn't defined in the \`scripts\` section of \`package.json\`. -This option can be used when it's desirable to optionally run a script when -it's present and fail if the script fails. This is useful, for example, when -running scripts that may only apply for some builds in an otherwise generic -CI setup. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`ignore-scripts\` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -\`npm start\`, \`npm stop\`, \`npm restart\`, \`npm test\`, and \`npm run-script\` -will still run their intended script if \`ignore-scripts\` is set, but they -will *not* run any pre- or post-scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`include\` - -* Default: -* Type: "prod", "dev", "optional", or "peer" (can be set multiple times) - -Option that allows for defining which types of dependencies to install. - -This is the inverse of \`--omit=<type>\`. - -Dependency types specified in \`--include\` will not be omitted, regardless of -the order in which omit/include are specified on the command-line. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`include-staged\` - -* Default: false -* Type: Boolean - -Allow installing "staged" published packages, as defined by [npm RFC PR -#92](https://github.com/npm/rfcs/pull/92). - -This is experimental, and not implemented by the npm public registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`include-workspace-root\` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the \`workspace\` config, or -all workspaces via the \`workspaces\` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`init-author-email\` - -* Default: "" -* Type: String - -The value \`npm init\` should use by default for the package author's email. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`init-author-name\` - -* Default: "" -* Type: String - -The value \`npm init\` should use by default for the package author's name. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`init-author-url\` - -* Default: "" -* Type: "" or URL - -The value \`npm init\` should use by default for the package author's -homepage. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`init-license\` - -* Default: "ISC" -* Type: String - -The value \`npm init\` should use by default for the package license. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`init-module\` - -* Default: "~/.npm-init.js" -* Type: Path - -A module that will be loaded by the \`npm init\` command. See the -documentation for the -[init-package-json](https://github.com/npm/init-package-json) module for -more information, or [npm init](/commands/npm-init). - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`init-version\` - -* Default: "1.0.0" -* Type: SemVer string - -The value that \`npm init\` should use by default for the package version -number, if not already set in package.json. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`install-links\` - -* Default: true -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`json\` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In \`npm pkg set\` it enables parsing set values with JSON.parse() before - saving them to your \`package.json\`. - -Not supported by all npm commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`key\` - -* Default: null -* Type: null or String - -A client key to pass when accessing the registry. Values should be in PEM -format with newlines replaced by the string "\\n". For example: - -\`\`\`ini -key="-----BEGIN PRIVATE KEY-----\\nXXXX\\nXXXX\\n-----END PRIVATE KEY-----" -\`\`\` - -It is _not_ the path to a key file, though you can set a registry-scoped -"keyfile" path like "//other-registry.tld/:keyfile=/path/to/key.pem". - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`legacy-bundling\` - -* Default: false -* Type: Boolean - -Causes npm to install the package such that versions of npm prior to 1.4, -such as the one included with node 0.8, can install the package. This -eliminates all automatic deduping. If used with \`global-style\` this option -will be preferred. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`legacy-peer-deps\` - -* Default: false -* Type: Boolean - -Causes npm to completely ignore \`peerDependencies\` when building a package -tree, as in npm versions 3 through 6. - -If a package cannot be installed because of overly strict \`peerDependencies\` -that collide, it provides a way to move forward resolving the situation. - -This differs from \`--omit=peer\`, in that \`--omit=peer\` will avoid unpacking -\`peerDependencies\` on disk, but will still design a tree such that -\`peerDependencies\` _could_ be unpacked in a correct place. - -Use of \`legacy-peer-deps\` is not recommended, as it will not enforce the -\`peerDependencies\` contract that meta-dependencies may rely on. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`link\` - -* Default: false -* Type: Boolean - -Used with \`npm ls\`, limiting output to only those packages that are linked. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`local-address\` - -* Default: null -* Type: IP Address - -The IP address of the local interface to use when making connections to the -npm registry. Must be IPv4 in versions of Node prior to 0.12. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`location\` - -* Default: "user" unless \`--global\` is passed, which will also set this value - to "global" -* Type: "global", "user", or "project" - -When passed to \`npm config\` this refers to which config file to use. - -When set to "global" mode, packages are installed into the \`prefix\` folder -instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the \`{prefix}/lib/node_modules\` folder, instead - of the current working directory. -* bin files are linked to \`{prefix}/bin\` -* man pages are linked to \`{prefix}/share/man\` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`lockfile-version\` - -* Default: Version 3 if no lockfile, auto-converting v1 lockfiles to v3, - otherwise maintain current lockfile version. -* Type: null, 1, 2, 3, "1", "2", or "3" - -Set the lockfile format version to be used in package-lock.json and -npm-shrinkwrap-json files. Possible options are: - -1: The lockfile version used by npm versions 5 and 6. Lacks some data that -is used during the install, resulting in slower and possibly less -deterministic installs. Prevents lockfile churn when interoperating with -older npm versions. - -2: The default lockfile version used by npm version 7 and 8. Includes both -the version 1 lockfile data and version 3 lockfile data, for maximum -determinism and interoperability, at the expense of more bytes on disk. - -3: Only the new lockfile information introduced in npm version 7. Smaller on -disk than lockfile version 2, but not interoperable with older npm versions. -Ideal if all users are on npm version 7 and higher. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`loglevel\` - -* Default: "notice" -* Type: "silent", "error", "warn", "notice", "http", "timing", "info", - "verbose", or "silly" - -What level of logs to report. All logs are written to a debug log, with the -path to that file printed if the execution of a command fails. - -Any logs of a higher level than the setting are shown. The default is -"notice". - -See also the \`foreground-scripts\` config. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`logs-dir\` - -* Default: A directory named \`_logs\` inside the cache -* Type: null or Path - -The location of npm's log directory. See [\`npm logging\`](/using-npm/logging) -for more information. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`logs-max\` - -* Default: 10 -* Type: Number - -The maximum number of log files to store. - -If set to 0, no log files will be written for the current run. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`long\` - -* Default: false -* Type: Boolean - -Show extended information in \`ls\`, \`search\`, and \`help-search\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`maxsockets\` - -* Default: 15 -* Type: Number - -The maximum number of connections to use per origin (protocol/host/port -combination). - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`message\` - -* Default: "%s" -* Type: String - -Commit message which is used by \`npm version\` when creating version commit. - -Any "%s" in the message will be replaced with the version number. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`node-options\` - -* Default: null -* Type: null or String - -Options to pass through to Node.js via the \`NODE_OPTIONS\` environment -variable. This does not impact how npm itself is executed but it does impact -how lifecycle scripts are called. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`node-version\` - -* Default: Node.js \`process.version\` value -* Type: SemVer string - -The node version to use when checking a package's \`engines\` setting. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`noproxy\` - -* Default: The value of the NO_PROXY environment variable -* Type: String (can be set multiple times) - -Domain extensions that should bypass any proxies. - -Also accepts a comma-delimited string. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`npm-version\` - -* Default: Output of \`npm --version\` -* Type: SemVer string - -The npm version to use when checking a package's \`engines\` setting. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`offline\` - -* Default: false -* Type: Boolean - -Force offline mode: no network requests will be done during install. To -allow the CLI to fill in missing cache data, see \`--prefer-offline\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`omit\` - -* Default: 'dev' if the \`NODE_ENV\` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -\`package-lock.json\` or \`npm-shrinkwrap.json\` file. They are just not -physically installed on disk. - -If a package type appears in both the \`--include\` and \`--omit\` lists, then -it will be included. - -If the resulting omit list includes \`'dev'\`, then the \`NODE_ENV\` environment -variable will be set to \`'production'\` for all lifecycle scripts. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`omit-lockfile-registry-resolved\` - -* Default: false -* Type: Boolean - -This option causes npm to create lock files without a \`resolved\` key for -registry dependencies. Subsequent installs will need to resolve tarball -endpoints with the configured registry, likely resulting in a longer install -time. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`otp\` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with \`npm access\`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`pack-destination\` - -* Default: "." -* Type: String - -Directory in which \`npm pack\` will save tarballs. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`package\` - -* Default: -* Type: String (can be set multiple times) - -The package or packages to install for [\`npm exec\`](/commands/npm-exec) - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`package-lock\` - -* Default: true -* Type: Boolean - -If set to false, then ignore \`package-lock.json\` files when installing. This -will also prevent _writing_ \`package-lock.json\` if \`save\` is true. - -This configuration does not affect \`npm ci\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`package-lock-only\` - -* Default: false -* Type: Boolean - -If set to true, the current operation will only use the \`package-lock.json\`, -ignoring \`node_modules\`. - -For \`update\` this means only the \`package-lock.json\` will be updated, -instead of checking \`node_modules\` and downloading dependencies. - -For \`list\` this means the output will be based on the tree described by the -\`package-lock.json\`, rather than the contents of \`node_modules\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`parseable\` - -* Default: false -* Type: Boolean - -Output parseable results from commands that write to standard output. For -\`npm search\`, this will be tab-separated table format. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`prefer-offline\` - -* Default: false -* Type: Boolean - -If true, staleness checks for cached data will be bypassed, but missing data -will be requested from the server. To force full offline mode, use -\`--offline\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`prefer-online\` - -* Default: false -* Type: Boolean - -If true, staleness checks for cached data will be forced, making the CLI -look for updates immediately even for fresh package data. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`prefix\` - -* Default: In global mode, the folder where the node executable is installed. - In local mode, the nearest parent folder containing either a package.json - file or a node_modules folder. -* Type: Path - -The location to install global items. If set on the command line, then it -forces non-global commands to run in the specified folder. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`preid\` - -* Default: "" -* Type: String - -The "prerelease identifier" to use as a prefix for the "prerelease" part of -a semver. Like the \`rc\` in \`1.2.0-rc.8\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`progress\` - -* Default: \`true\` unless running in a known CI system -* Type: Boolean - -When set to \`true\`, npm will display a progress bar during time intensive -operations, if \`process.stderr\` is a TTY. - -Set to \`false\` to suppress the progress bar. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`proxy\` - -* Default: null -* Type: null, false, or URL - -A proxy to use for outgoing http requests. If the \`HTTP_PROXY\` or -\`http_proxy\` environment variables are set, proxy settings will be honored -by the underlying \`request\` library. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`read-only\` - -* Default: false -* Type: Boolean - -This is used to mark a token as unable to publish when configuring limited -access tokens with the \`npm token create\` command. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`rebuild-bundle\` - -* Default: true -* Type: Boolean - -Rebuild bundled dependencies after installation. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`registry\` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`replace-registry-host\` - -* Default: "npmjs" -* Type: "npmjs", "never", "always", or String - -Defines behavior for replacing the registry host in a lockfile with the -configured registry. - -The default behavior is to replace package dist URLs from the default -registry (https://registry.npmjs.org) to the configured registry. If set to -"never", then use the registry value. If set to "always", then replace the -registry host with the configured host every time. - -You may also specify a bare hostname (e.g., "registry.npmjs.org"). - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`save\` - -* Default: \`true\` unless when using \`npm update\` where it defaults to \`false\` -* Type: Boolean - -Save installed packages to a \`package.json\` file as dependencies. - -When used with the \`npm rm\` command, removes the dependency from -\`package.json\`. - -Will also prevent writing to \`package-lock.json\` if set to \`false\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`save-bundle\` - -* Default: false -* Type: Boolean - -If a package would be saved at install time by the use of \`--save\`, -\`--save-dev\`, or \`--save-optional\`, then also put it in the -\`bundleDependencies\` list. - -Ignored if \`--save-peer\` is set, since peerDependencies cannot be bundled. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`save-dev\` - -* Default: false -* Type: Boolean - -Save installed packages to a package.json file as \`devDependencies\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`save-exact\` - -* Default: false -* Type: Boolean - -Dependencies saved to package.json will be configured with an exact version -rather than using npm's default semver range operator. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`save-optional\` - -* Default: false -* Type: Boolean - -Save installed packages to a package.json file as \`optionalDependencies\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`save-peer\` - -* Default: false -* Type: Boolean - -Save installed packages to a package.json file as \`peerDependencies\` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`save-prefix\` - -* Default: "^" -* Type: String - -Configure how versions of packages installed to a package.json file via -\`--save\` or \`--save-dev\` get prefixed. - -For example if a package has version \`1.2.3\`, by default its version is set -to \`^1.2.3\` which allows minor upgrades for that package, but after \`npm -config set save-prefix='~'\` it would be set to \`~1.2.3\` which only allows -patch upgrades. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`save-prod\` - -* Default: false -* Type: Boolean - -Save installed packages into \`dependencies\` specifically. This is useful if -a package already exists in \`devDependencies\` or \`optionalDependencies\`, but -you want to move it to be a non-optional production dependency. - -This is the default behavior if \`--save\` is true, and neither \`--save-dev\` -or \`--save-optional\` are true. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`scope\` - -* Default: the scope of the current project, if any, or "" -* Type: String - -Associate an operation with a scope for a scoped registry. - -Useful when logging in to or out of a private registry: - -\`\`\` -# log in, linking the scope to the custom registry -npm login --scope=@mycorp --registry=https://registry.mycorp.com - -# log out, removing the link and the auth token -npm logout --scope=@mycorp -\`\`\` - -This will cause \`@mycorp\` to be mapped to the registry for future -installation of packages specified according to the pattern -\`@mycorp/package\`. - -This will also cause \`npm init\` to create a scoped package. - -\`\`\` -# accept all defaults, and create a package named "@foo/whatever", -# instead of just named "whatever" -npm init --scope=@foo --yes -\`\`\` - - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`script-shell\` - -* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows -* Type: null or String - -The shell to use for scripts run with the \`npm exec\`, \`npm run\` and \`npm -init <package-spec>\` commands. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`searchexclude\` - -* Default: "" -* Type: String - -Space-separated options that limit the results from search. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`searchlimit\` - -* Default: 20 -* Type: Number - -Number of items to limit search results to. Will not apply at all to legacy -searches. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`searchopts\` - -* Default: "" -* Type: String - -Space-separated options that are always passed to search. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`searchstaleness\` - -* Default: 900 -* Type: Number - -The age of the cache, in seconds, before another registry request is made if -using legacy search endpoint. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`shell\` - -* Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on - Windows -* Type: String - -The shell to run for the \`npm explore\` command. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`sign-git-commit\` - -* Default: false -* Type: Boolean - -If set to true, then the \`npm version\` command will commit the new package -version using \`-S\` to add a signature. - -Note that git requires you to have set up GPG keys in your git configs for -this to work properly. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`sign-git-tag\` - -* Default: false -* Type: Boolean - -If set to true, then the \`npm version\` command will tag the version using -\`-s\` to add a signature. - -Note that git requires you to have set up GPG keys in your git configs for -this to work properly. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`strict-peer-deps\` - -* Default: false -* Type: Boolean - -If set to \`true\`, and \`--legacy-peer-deps\` is not set, then _any_ -conflicting \`peerDependencies\` will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships. - -By default, conflicting \`peerDependencies\` deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's \`peerDependencies\` object. - -When such and override is performed, a warning is printed, explaining the -conflict and the packages involved. If \`--strict-peer-deps\` is set, then -this warning is treated as a failure. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`strict-ssl\` - -* Default: true -* Type: Boolean - -Whether or not to do SSL key validation when making requests to the registry -via https. - -See also the \`ca\` config. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`tag\` - -* Default: "latest" -* Type: String - -If you ask npm to install a package and don't tell it a specific version, -then it will install the specified tag. - -Also the tag that is added to the package@version specified by the \`npm tag\` -command, if no explicit tag is given. - -When used by the \`npm diff\` command, this is the tag used to fetch the -tarball that will be compared with the local files by default. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`tag-version-prefix\` - -* Default: "v" -* Type: String - -If set, alters the prefix used when tagging a new version when performing a -version increment using \`npm-version\`. To remove the prefix altogether, set -it to the empty string: \`""\`. - -Because other tools may rely on the convention that npm version tags look -like \`v1.0.0\`, _only use this property if it is absolutely necessary_. In -particular, use care when overriding this setting for public packages. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`timing\` - -* Default: false -* Type: Boolean - -If true, writes timing information to a process specific json file in the -cache or \`logs-dir\`. The file name ends with \`-timing.json\`. - -You can quickly view it with this [json](https://npm.im/json) command line: -\`cat ~/.npm/_logs/*-timing.json | npm exec -- json -g\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`umask\` - -* Default: 0 -* Type: Octal numeric string in range 0000..0777 (0..511) - -The "umask" value to use when setting the file creation mode on files and -folders. - -Folders and executables are given a mode which is \`0o777\` masked against -this value. Other files are given a mode which is \`0o666\` masked against -this value. - -Note that the underlying system will _also_ apply its own umask value to -files and folders that are created, and npm does not circumvent this, but -rather adds the \`--umask\` config to it. - -Thus, the effective default umask value on most POSIX systems is 0o22, -meaning that folders and executables are created with a mode of 0o755 and -other files are created with a mode of 0o644. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`unicode\` - -* Default: false on windows, true on mac/unix systems with a unicode locale, - as defined by the \`LC_ALL\`, \`LC_CTYPE\`, or \`LANG\` environment variables. -* Type: Boolean - -When set to true, npm uses unicode characters in the tree output. When -false, it uses ascii characters instead of unicode glyphs. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`update-notifier\` - -* Default: true -* Type: Boolean - -Set to false to suppress the update notification when using an older version -of npm than the latest. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`usage\` - -* Default: false -* Type: Boolean - -Show short usage output about the command specified. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`user-agent\` - -* Default: "npm/{npm-version} node/{node-version} {platform} {arch} - workspaces/{workspaces} {ci}" -* Type: String - -Sets the User-Agent request header. The following fields are replaced with -their actual counterparts: - -* \`{npm-version}\` - The npm version in use -* \`{node-version}\` - The Node.js version in use -* \`{platform}\` - The value of \`process.platform\` -* \`{arch}\` - The value of \`process.arch\` -* \`{workspaces}\` - Set to \`true\` if the \`workspaces\` or \`workspace\` options - are set. -* \`{ci}\` - The value of the \`ci-name\` config, if set, prefixed with \`ci/\`, or - an empty string if \`ci-name\` is empty. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`userconfig\` - -* Default: "~/.npmrc" -* Type: Path - -The location of user-level configuration settings. - -This may be overridden by the \`npm_config_userconfig\` environment variable -or the \`--userconfig\` command line option, but may _not_ be overridden by -settings in the \`globalconfig\` file. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`version\` - -* Default: false -* Type: Boolean - -If true, output the npm version and exit successfully. - -Only relevant when specified explicitly on the command line. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`versions\` - -* Default: false -* Type: Boolean - -If true, output the npm version as well as node's \`process.versions\` map and -the version in the current working directory's \`package.json\` file if one -exists, and exit successfully. - -Only relevant when specified explicitly on the command line. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`viewer\` - -* Default: "man" on Posix, "browser" on Windows -* Type: String - -The program to use to view help content. - -Set to \`"browser"\` to view html help content in the default web browser. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`which\` - -* Default: null -* Type: null or Number - -If there are multiple funding sources, which 1-indexed source URL to open. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`workspace\` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the \`workspace\` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the \`npm init\` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`workspaces\` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like \`install\` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the \`node_modules\` tree (install, update, etc.) -will link workspaces into the \`node_modules\` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the \`workspace\` config. - -This value is not exported to the environment for child processes. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`workspaces-update\` - -* Default: true -* Type: Boolean - -If set to true, the npm cli will run an update after operations that may -possibly change the workspaces installed to the \`node_modules\` folder. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`yes\` - -* Default: null -* Type: null or Boolean - -Automatically answer "yes" to any prompts that npm might print on the -command line. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`also\` - -* Default: null -* Type: null, "dev", or "development" -* DEPRECATED: Please use --include=dev instead. - -When set to \`dev\` or \`development\`, this is an alias for \`--include=dev\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`cache-max\` - -* Default: Infinity -* Type: Number -* DEPRECATED: This option has been deprecated in favor of \`--prefer-online\` - -\`--cache-max=0\` is an alias for \`--prefer-online\` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`cache-min\` - -* Default: 0 -* Type: Number -* DEPRECATED: This option has been deprecated in favor of \`--prefer-offline\`. - -\`--cache-min=9999 (or bigger)\` is an alias for \`--prefer-offline\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`dev\` - -* Default: false -* Type: Boolean -* DEPRECATED: Please use --include=dev instead. - -Alias for \`--include=dev\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`init.author.email\` - -* Default: "" -* Type: String -* DEPRECATED: Use \`--init-author-email\` instead. - -Alias for \`--init-author-email\` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`init.author.name\` - -* Default: "" -* Type: String -* DEPRECATED: Use \`--init-author-name\` instead. - -Alias for \`--init-author-name\` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`init.author.url\` - -* Default: "" -* Type: "" or URL -* DEPRECATED: Use \`--init-author-url\` instead. - -Alias for \`--init-author-url\` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`init.license\` - -* Default: "ISC" -* Type: String -* DEPRECATED: Use \`--init-license\` instead. - -Alias for \`--init-license\` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`init.module\` - -* Default: "~/.npm-init.js" -* Type: Path -* DEPRECATED: Use \`--init-module\` instead. - -Alias for \`--init-module\` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`init.version\` - -* Default: "1.0.0" -* Type: SemVer string -* DEPRECATED: Use \`--init-version\` instead. - -Alias for \`--init-version\` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`only\` - -* Default: null -* Type: null, "prod", or "production" -* DEPRECATED: Use \`--omit=dev\` to omit dev dependencies from the install. - -When set to \`prod\` or \`production\`, this is an alias for \`--omit=dev\`. - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`optional\` - -* Default: null -* Type: null or Boolean -* DEPRECATED: Use \`--omit=optional\` to exclude optional dependencies, or - \`--include=optional\` to include them. - -Default value does install optional deps unless otherwise omitted. - -Alias for --include=optional or --omit=optional - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`production\` - -* Default: null -* Type: null or Boolean -* DEPRECATED: Use \`--omit=dev\` instead. - -Alias for \`--omit=dev\` - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`shrinkwrap\` - -* Default: true -* Type: Boolean -* DEPRECATED: Use the --package-lock setting instead. - -Alias for --package-lock - -<!-- automatically generated, do not edit manually --> -<!-- see lib/utils/config/definitions.js --> - -#### \`tmp\` - -* Default: The value returned by the Node.js \`os.tmpdir()\` method - <https://nodejs.org/api/os.html#os_os_tmpdir> -* Type: Path -* DEPRECATED: This setting is no longer used. npm stores temporary files in a - special location in the cache, and they are managed by - [\`cacache\`](http://npm.im/cacache). - -Historically, the location where temporary files were stored. No longer -relevant. -` diff --git a/tap-snapshots/test/lib/utils/config/index.js.test.cjs b/tap-snapshots/test/lib/utils/config/index.js.test.cjs deleted file mode 100644 index 78055d5bc720b..0000000000000 --- a/tap-snapshots/test/lib/utils/config/index.js.test.cjs +++ /dev/null @@ -1,139 +0,0 @@ -/* IMPORTANT - * This snapshot file is auto-generated, but designed for humans. - * It should be checked into source control and tracked carefully. - * Re-generate by setting TAP_SNAPSHOT=1 and running tests. - * Make sure to inspect the output below. Do not ignore changes! - */ -'use strict' -exports[`test/lib/utils/config/index.js TAP > shorthands 1`] = ` -Object { - "?": Array [ - "--usage", - ], - "a": Array [ - "--all", - ], - "B": Array [ - "--save-bundle", - ], - "c": Array [ - "--call", - ], - "C": Array [ - "--prefix", - ], - "d": Array [ - "--loglevel", - "info", - ], - "D": Array [ - "--save-dev", - ], - "dd": Array [ - "--loglevel", - "verbose", - ], - "ddd": Array [ - "--loglevel", - "silly", - ], - "desc": Array [ - "--description", - ], - "E": Array [ - "--save-exact", - ], - "enjoy-by": Array [ - "--before", - ], - "f": Array [ - "--force", - ], - "g": Array [ - "--global", - ], - "h": Array [ - "--usage", - ], - "H": Array [ - "--usage", - ], - "help": Array [ - "--usage", - ], - "iwr": Array [ - "--include-workspace-root", - ], - "l": Array [ - "--long", - ], - "L": Array [ - "--location", - ], - "local": Array [ - "--no-global", - ], - "m": Array [ - "--message", - ], - "n": Array [ - "--no-yes", - ], - "no": Array [ - "--no-yes", - ], - "O": Array [ - "--save-optional", - ], - "p": Array [ - "--parseable", - ], - "P": Array [ - "--save-prod", - ], - "porcelain": Array [ - "--parseable", - ], - "q": Array [ - "--loglevel", - "warn", - ], - "quiet": Array [ - "--loglevel", - "warn", - ], - "readonly": Array [ - "--read-only", - ], - "reg": Array [ - "--registry", - ], - "s": Array [ - "--loglevel", - "silent", - ], - "S": Array [ - "--save", - ], - "silent": Array [ - "--loglevel", - "silent", - ], - "v": Array [ - "--version", - ], - "verbose": Array [ - "--loglevel", - "verbose", - ], - "w": Array [ - "--workspace", - ], - "ws": Array [ - "--workspaces", - ], - "y": Array [ - "--yes", - ], -} -` diff --git a/tap-snapshots/test/lib/utils/exit-handler.js.test.cjs b/tap-snapshots/test/lib/utils/exit-handler.js.test.cjs index 4d52c02d97dd3..1c0bb1c38c811 100644 --- a/tap-snapshots/test/lib/utils/exit-handler.js.test.cjs +++ b/tap-snapshots/test/lib/utils/exit-handler.js.test.cjs @@ -7,34 +7,34 @@ 'use strict' exports[`test/lib/utils/exit-handler.js TAP handles unknown error with logs and debug file > debug file contents 1`] = ` 0 timing npm:load:whichnode Completed in {TIME}ms -15 timing config:load Completed in {TIME}ms -16 timing npm:load:configload Completed in {TIME}ms -17 timing npm:load:mkdirpcache Completed in {TIME}ms -18 timing npm:load:mkdirplogs Completed in {TIME}ms -19 verbose title npm -20 verbose argv -21 timing npm:load:setTitle Completed in {TIME}ms -23 timing npm:load:display Completed in {TIME}ms -24 verbose logfile logs-max:10 dir:{CWD}/test/lib/utils/tap-testdir-exit-handler-handles-unknown-error-with-logs-and-debug-file/cache/_logs/{DATE}- -25 verbose logfile {CWD}/test/lib/utils/tap-testdir-exit-handler-handles-unknown-error-with-logs-and-debug-file/cache/_logs/{DATE}-debug-0.log -26 timing npm:load:logFile Completed in {TIME}ms -27 timing npm:load:timers Completed in {TIME}ms -28 timing npm:load:configScope Completed in {TIME}ms -29 timing npm:load Completed in {TIME}ms -30 silly logfile done cleaning log files -31 verbose stack Error: Unknown error -32 verbose cwd {CWD} -33 verbose Foo 1.0.0 -34 verbose node v1.0.0 -35 verbose npm v1.0.0 -36 error code ECODE -37 error ERR SUMMARY Unknown error -38 error ERR DETAIL Unknown error -39 verbose exit 1 -41 timing npm Completed in {TIME}ms -42 verbose code 1 -43 error A complete log of this run can be found in: -43 error {CWD}/test/lib/utils/tap-testdir-exit-handler-handles-unknown-error-with-logs-and-debug-file/cache/_logs/{DATE}-debug-0.log +13 timing config:load Completed in {TIME}ms +14 timing npm:load:configload Completed in {TIME}ms +15 timing npm:load:mkdirpcache Completed in {TIME}ms +16 timing npm:load:mkdirplogs Completed in {TIME}ms +17 verbose title npm +18 verbose argv +19 timing npm:load:setTitle Completed in {TIME}ms +21 timing npm:load:display Completed in {TIME}ms +22 verbose logfile logs-max:10 dir:{CWD}/test/lib/utils/tap-testdir-exit-handler-handles-unknown-error-with-logs-and-debug-file/cache/_logs/{DATE}- +23 verbose logfile {CWD}/test/lib/utils/tap-testdir-exit-handler-handles-unknown-error-with-logs-and-debug-file/cache/_logs/{DATE}-debug-0.log +24 timing npm:load:logFile Completed in {TIME}ms +25 timing npm:load:timers Completed in {TIME}ms +26 timing npm:load:configScope Completed in {TIME}ms +27 timing npm:load Completed in {TIME}ms +28 silly logfile done cleaning log files +29 verbose stack Error: Unknown error +30 verbose cwd {CWD} +31 verbose Foo 1.0.0 +32 verbose node v1.0.0 +33 verbose npm v1.0.0 +34 error code ECODE +35 error ERR SUMMARY Unknown error +36 error ERR DETAIL Unknown error +37 verbose exit 1 +39 timing npm Completed in {TIME}ms +40 verbose code 1 +41 error A complete log of this run can be found in: +41 error {CWD}/test/lib/utils/tap-testdir-exit-handler-handles-unknown-error-with-logs-and-debug-file/cache/_logs/{DATE}-debug-0.log ` exports[`test/lib/utils/exit-handler.js TAP handles unknown error with logs and debug file > logs 1`] = ` diff --git a/test/fixtures/mock-logs.js b/test/fixtures/mock-logs.js index 706c9a3050ac4..c75de5e509463 100644 --- a/test/fixtures/mock-logs.js +++ b/test/fixtures/mock-logs.js @@ -2,6 +2,9 @@ const NPMLOG = require('npmlog') const { LEVELS } = require('proc-log') +const npmEmitLog = NPMLOG.emitLog.bind(NPMLOG) +const npmLog = NPMLOG.log.bind(NPMLOG) + const merge = (...objs) => objs.reduce((acc, obj) => ({ ...acc, ...obj })) const mockLogs = (otherMocks = {}) => { @@ -22,6 +25,25 @@ const mockLogs = (otherMocks = {}) => { }, {}) ) + // the above logs array is anything logged and it not filtered by level. + // this display array is filtered and will not include items that + // would not be shown in the terminal + const display = Object.defineProperties( + [], + ['timing', ...LEVELS].reduce((acc, level) => { + acc[level] = { + get () { + return this + .filter(([l]) => level === l) + .map(([l, ...args]) => args) + }, + } + return acc + }, {}) + ) + + const npmLogBuffer = [] + // This returns an object with mocked versions of all necessary // logging modules. It mocks them with methods that add logs // to an array which it also returns. The reason it also returns @@ -53,15 +75,33 @@ const mockLogs = (otherMocks = {}) => { // that reflected in the npmlog singleton. // XXX: remove with npmlog npmlog: Object.assign(NPMLOG, merge( - // no-op all npmlog methods by default so tests - // dont output anything to the terminal - Object.keys(NPMLOG.levels).reduce((acc, k) => { - acc[k] = () => {} - return acc - }, {}), - // except collect timing logs { - timing: (...args) => logs.push(['timing', ...args]), + log: (level, ...args) => { + // timing does not exist on proclog, so if it got logged + // with npmlog we need to push it to our logs + if (level === 'timing') { + logs.push([level, ...args]) + } + npmLog(level, ...args) + }, + write: (msg) => { + // npmlog.write is what outputs to the terminal. + // it writes in chunks so we push each chunk to an + // array that we will log and zero out + npmLogBuffer.push(msg) + }, + emitLog: (m) => { + // this calls the original emitLog method + // which will filter based on loglevel + npmEmitLog(m) + // if anything was logged then we push to our display + // array which we can assert against in tests + if (npmLogBuffer.length) { + // first two parts are 'npm' and a single space + display.push(npmLogBuffer.slice(2)) + } + npmLogBuffer.length = 0 + }, newItem: () => { return { info: (...p) => { @@ -85,7 +125,7 @@ const mockLogs = (otherMocks = {}) => { )), } - return { logs, logMocks } + return { logs, logMocks, display } } module.exports = mockLogs diff --git a/test/fixtures/mock-npm.js b/test/fixtures/mock-npm.js index 72cfa4b0c4beb..8a744cd559eaf 100644 --- a/test/fixtures/mock-npm.js +++ b/test/fixtures/mock-npm.js @@ -216,6 +216,7 @@ class MockNpm { } }, list: [{ ...realConfig.defaults, ...config }], + validate: () => {}, } if (t && config.loglevel) { @@ -237,6 +238,15 @@ class MockNpm { } this._mockOutputs.push(msg) } + + // with the older fake mock npm there is no + // difference between output and outputBuffer + // since it just collects the output and never + // calls the exit handler, so we just mock the + // method the same as output. + outputBuffer (...msg) { + this.output(...msg) + } } const FakeMockNpm = (base = {}, t) => { diff --git a/test/fixtures/sandbox.js b/test/fixtures/sandbox.js index 7e57468e0c5bb..b53c8f173a3a0 100644 --- a/test/fixtures/sandbox.js +++ b/test/fixtures/sandbox.js @@ -3,9 +3,10 @@ const { EventEmitter } = require('events') const { homedir, tmpdir } = require('os') const { dirname, join } = require('path') const { promisify } = require('util') -const mkdirp = require('mkdirp-infer-owner') +const { mkdir } = require('fs/promises') const rimraf = promisify(require('rimraf')) const mockLogs = require('./mock-logs') +const pkg = require('../../package.json') const chain = new Map() const sandboxes = new Map() @@ -45,8 +46,6 @@ const _logs = Symbol('sandbox.logs') // these config keys can be redacted widely const redactedDefaults = [ - 'node-version', - 'npm-version', 'tmp', ] @@ -155,6 +154,8 @@ class Sandbox extends EventEmitter { .split(normalize(homedir())).join('{REALHOME}') .split(this[_proxy].platform).join('{PLATFORM}') .split(this[_proxy].arch).join('{ARCH}') + .replace(new RegExp(process.version, 'g'), '{NODE-VERSION}') + .replace(new RegExp(pkg.version, 'g'), '{NPM-VERSION}') // We do the defaults after everything else so that they don't cause the // other cleaners to miss values we would have clobbered here. For @@ -238,9 +239,9 @@ class Sandbox extends EventEmitter { async run (command, argv = []) { await Promise.all([ - mkdirp(this.project), - mkdirp(this.home), - mkdirp(this.global), + mkdir(this.project, { recursive: true }), + mkdir(this.home, { recursive: true }), + mkdir(this.global, { recursive: true }), ]) // attach the sandbox process now, doing it after the promise above is @@ -289,9 +290,9 @@ class Sandbox extends EventEmitter { } await Promise.all([ - mkdirp(this.project), - mkdirp(this.home), - mkdirp(this.global), + mkdir(this.project, { recursive: true }), + mkdir(this.home, { recursive: true }), + mkdir(this.global, { recursive: true }), ]) // attach the sandbox process now, doing it after the promise above is diff --git a/test/index.js b/test/index.js index 081c89cee9c70..5075597b5d93c 100644 --- a/test/index.js +++ b/test/index.js @@ -11,7 +11,7 @@ t.test('loading as main module will load the cli', t => { const cwd = t.testdir() const { spawn } = require('child_process') const LS = require('../lib/commands/ls.js') - const ls = new LS({}) + const ls = new LS({ config: { validate: () => {} } }) const p = spawn(process.execPath, [index, 'ls', '-h', '--cache', cwd]) const out = [] p.stdout.on('data', c => out.push(c)) diff --git a/test/lib/arborist-cmd.js b/test/lib/arborist-cmd.js index 91d8a7b333bf9..d2497efe129dc 100644 --- a/test/lib/arborist-cmd.js +++ b/test/lib/arborist-cmd.js @@ -44,8 +44,7 @@ t.test('arborist-cmd', async t => { class TestCmd extends ArboristCmd {} - const cmd = new TestCmd() - cmd.npm = { localPrefix: path } + const cmd = new TestCmd({ localPrefix: path, config: { validate: () => {} } }) // check filtering for a single workspace name cmd.exec = async function (args) { @@ -97,8 +96,7 @@ t.test('handle getWorkspaces raising an error', async t => { }, }) class TestCmd extends ArboristCmd {} - const cmd = new TestCmd() - cmd.npm = { localPrefix: t.testdir() } + const cmd = new TestCmd({ localPrefix: t.testdir(), config: { validate: () => {} } }) await t.rejects( cmd.execWorkspaces(['foo'], ['a']), diff --git a/test/lib/commands/adduser.js b/test/lib/commands/adduser.js index 04fe8dc8c3147..73e446309ef3b 100644 --- a/test/lib/commands/adduser.js +++ b/test/lib/commands/adduser.js @@ -27,15 +27,7 @@ t.test('legacy', async t => { const { npm, home } = await loadMockNpm(t, { config: { 'auth-type': 'legacy' }, homeDir: { - // These all get cleaned up by config.setCredentialsByURI '.npmrc': [ - '_token=user', - '_password=user', - 'username=user', - '_auth=user', - '_authtoken=user', - '-authtoken=user', - '_authToken=user', '//registry.npmjs.org/:_authToken=user', '//registry.npmjs.org/:always-auth=user', '//registry.npmjs.org/:email=test-email-old@npmjs.org', diff --git a/test/lib/commands/bugs.js b/test/lib/commands/bugs.js index dbd618b0848a4..91d144b6bdc97 100644 --- a/test/lib/commands/bugs.js +++ b/test/lib/commands/bugs.js @@ -62,7 +62,7 @@ const Bugs = t.mock('../../../lib/commands/bugs.js', { '../../../lib/utils/open-url.js': openUrl, }) -const bugs = new Bugs({ flatOptions: {} }) +const bugs = new Bugs({ flatOptions: {}, config: { validate: () => {} } }) t.test('usage', (t) => { t.match(bugs.usage, 'bugs', 'usage has command name in it') diff --git a/test/lib/commands/cache.js b/test/lib/commands/cache.js index 72a7ce96aa47c..625caf7ffc0b6 100644 --- a/test/lib/commands/cache.js +++ b/test/lib/commands/cache.js @@ -4,7 +4,7 @@ const MockRegistry = require('../../fixtures/mock-registry.js') const mockGlobals = require('../../fixtures/mock-globals') const cacache = require('cacache') -const fs = require('@npmcli/fs') +const fs = require('fs') const path = require('path') const pkg = 'test-package' diff --git a/test/lib/commands/ci.js b/test/lib/commands/ci.js index 179cee6c9b7e7..7019cb177e01e 100644 --- a/test/lib/commands/ci.js +++ b/test/lib/commands/ci.js @@ -3,7 +3,7 @@ const { load: _loadMockNpm } = require('../../fixtures/mock-npm') const MockRegistry = require('../../fixtures/mock-registry.js') const path = require('path') -const fs = require('@npmcli/fs') +const fs = require('fs') // t.cleanSnapshot = str => str.replace(/ in [0-9ms]+/g, ' in {TIME}') @@ -73,16 +73,10 @@ t.test('reifies, audits, removes node_modules', async t => { registry.nock.post('/-/npm/v1/security/advisories/bulk').reply(200, {}) await npm.exec('ci', []) t.match(joinedOutput(), 'added 1 package, and audited 2 packages in') - await t.resolveMatch( - fs.exists(path.join(npm.prefix, 'node_modules', 'test')), - false, - 'existing node_modules is removed' - ) - await t.resolveMatch( - fs.exists(path.join(npm.prefix, 'node_modules', 'abbrev')), - true, - 'installs abbrev' - ) + const nmTest = path.join(npm.prefix, 'node_modules', 'test') + t.equal(fs.existsSync(nmTest), false, 'existing node_modules is removed') + const nmAbbrev = path.join(npm.prefix, 'node_modules', 'abbrev') + t.equal(fs.existsSync(nmAbbrev), true, 'installs abbrev') }) t.test('--no-audit and --ignore-scripts', async t => { @@ -159,11 +153,8 @@ t.test('should throw if package-lock.json or npm-shrinkwrap missing', async t => }, }) await t.rejects(npm.exec('ci', []), { code: 'EUSAGE', message: /package-lock.json/ }) - await t.resolveMatch( - fs.exists(path.join(npm.prefix, 'node_modules', 'test-file')), - true, - 'does not remove node_modules' - ) + const nmTestFile = path.join(npm.prefix, 'node_modules', 'test-file') + t.equal(fs.existsSync(nmTestFile), true, 'does not remove node_modules') }) t.test('should throw ECIGLOBAL', async t => { @@ -193,9 +184,6 @@ t.test('should throw error when ideal inventory mismatches virtual', async t => npm.exec('ci', []), { code: 'EUSAGE', message: /in sync/ } ) - await t.resolveMatch( - fs.exists(path.join(npm.prefix, 'node_modules', 'test-file')), - true, - 'does not remove node_modules' - ) + const nmTestFile = path.join(npm.prefix, 'node_modules', 'test-file') + t.equal(fs.existsSync(nmTestFile), true, 'does not remove node_modules') }) diff --git a/test/lib/commands/config.js b/test/lib/commands/config.js index 42df8b52d8e57..35872e722e17e 100644 --- a/test/lib/commands/config.js +++ b/test/lib/commands/config.js @@ -1,13 +1,11 @@ const { join } = require('path') -const { promisify } = require('util') -const fs = require('fs') +const fs = require('fs/promises') +const ini = require('ini') const tspawk = require('../../fixtures/tspawk') const t = require('tap') const spawk = tspawk(t) -const readFile = promisify(fs.readFile) - const Sandbox = require('../../fixtures/sandbox.js') t.test('config no args', async t => { @@ -142,60 +140,100 @@ t.test('config delete no args', async t => { t.test('config delete single key', async t => { // location defaults to user, so we work with a userconfig const home = t.testdir({ - '.npmrc': 'foo=bar\nbar=baz', + '.npmrc': 'access=public\nall=true', }) const sandbox = new Sandbox(t) - await sandbox.run('config', ['delete', 'foo'], { home }) + await sandbox.run('config', ['delete', 'access'], { home }) - t.equal(sandbox.config.get('foo'), undefined, 'foo should no longer be set') + t.equal(sandbox.config.get('access'), null, 'acces should be defaulted') - const contents = await readFile(join(home, '.npmrc'), { encoding: 'utf8' }) - t.not(contents.includes('foo='), 'foo was removed on disk') + const contents = await fs.readFile(join(home, '.npmrc'), { encoding: 'utf8' }) + const rc = ini.parse(contents) + t.not(rc.access, 'access is not set') }) t.test('config delete multiple keys', async t => { const home = t.testdir({ - '.npmrc': 'foo=bar\nbar=baz\nbaz=buz', + '.npmrc': 'access=public\nall=true\naudit=false', }) const sandbox = new Sandbox(t) - await sandbox.run('config', ['delete', 'foo', 'bar'], { home }) + await sandbox.run('config', ['delete', 'access', 'all'], { home }) - t.equal(sandbox.config.get('foo'), undefined, 'foo should no longer be set') - t.equal(sandbox.config.get('bar'), undefined, 'bar should no longer be set') + t.equal(sandbox.config.get('access'), null, 'access should be defaulted') + t.equal(sandbox.config.get('all'), false, 'all should be defaulted') - const contents = await readFile(join(home, '.npmrc'), { encoding: 'utf8' }) - t.not(contents.includes('foo='), 'foo was removed on disk') - t.not(contents.includes('bar='), 'bar was removed on disk') + const contents = await fs.readFile(join(home, '.npmrc'), { encoding: 'utf8' }) + const rc = ini.parse(contents) + t.not(rc.access, 'access is not set') + t.not(rc.all, 'all is not set') }) t.test('config delete key --location=global', async t => { const global = t.testdir({ - npmrc: 'foo=bar\nbar=baz', + npmrc: 'access=public\nall=true', }) const sandbox = new Sandbox(t) - await sandbox.run('config', ['delete', 'foo', '--location=global'], { global }) + await sandbox.run('config', ['delete', 'access', '--location=global'], { global }) - t.equal(sandbox.config.get('foo', 'global'), undefined, 'foo should no longer be set') + t.equal(sandbox.config.get('access', 'global'), undefined, 'access should be defaulted') - const contents = await readFile(join(global, 'npmrc'), { encoding: 'utf8' }) - t.not(contents.includes('foo='), 'foo was removed on disk') + const contents = await fs.readFile(join(global, 'npmrc'), { encoding: 'utf8' }) + const rc = ini.parse(contents) + t.not(rc.access, 'access is not set') }) t.test('config delete key --global', async t => { const global = t.testdir({ - npmrc: 'foo=bar\nbar=baz', + npmrc: 'access=public\nall=true', }) const sandbox = new Sandbox(t) - await sandbox.run('config', ['delete', 'foo', '--global'], { global }) + await sandbox.run('config', ['delete', 'access', '--global'], { global }) - t.equal(sandbox.config.get('foo', 'global'), undefined, 'foo should no longer be set') + t.equal(sandbox.config.get('access', 'global'), undefined, 'access should no longer be set') + + const contents = await fs.readFile(join(global, 'npmrc'), { encoding: 'utf8' }) + const rc = ini.parse(contents) + t.not(rc.access, 'access is not set') +}) - const contents = await readFile(join(global, 'npmrc'), { encoding: 'utf8' }) - t.not(contents.includes('foo='), 'foo was removed on disk') +t.test('config set invalid option', async t => { + const sandbox = new Sandbox(t) + await t.rejects( + sandbox.run('config', ['set', 'nonexistantconfigoption', 'something']), + /not a valid npm option/ + ) +}) + +t.test('config set deprecated option', async t => { + const sandbox = new Sandbox(t) + await t.rejects( + sandbox.run('config', ['set', 'shrinkwrap', 'true']), + /deprecated/ + ) +}) + +t.test('config set nerf-darted option', async t => { + const sandbox = new Sandbox(t) + await sandbox.run('config', ['set', '//npm.pkg.github.com/:_authToken', '0xdeadbeef']) + t.equal( + sandbox.config.get('//npm.pkg.github.com/:_authToken'), + '0xdeadbeef', + 'nerf-darted config is set' + ) +}) + +t.test('config set scoped optoin', async t => { + const sandbox = new Sandbox(t) + await sandbox.run('config', ['set', '@npm:registry', 'https://registry.npmjs.org/']) + t.equal( + sandbox.config.get('@npm:registry'), + 'https://registry.npmjs.org/', + 'scoped config is set' + ) }) t.test('config set no args', async t => { @@ -212,65 +250,67 @@ t.test('config set no args', async t => { t.test('config set key', async t => { const home = t.testdir({ - '.npmrc': 'foo=bar', + '.npmrc': 'access=public', }) const sandbox = new Sandbox(t, { home }) - await sandbox.run('config', ['set', 'foo']) + await sandbox.run('config', ['set', 'access']) - t.equal(sandbox.config.get('foo'), '', 'set the value for foo') + t.equal(sandbox.config.get('access'), null, 'set the value for access') - const contents = await readFile(join(home, '.npmrc'), { encoding: 'utf8' }) - t.ok(contents.includes('foo='), 'wrote foo to disk') + await t.rejects(fs.stat(join(home, '.npmrc'), { encoding: 'utf8' }), 'removed empty config') }) t.test('config set key value', async t => { const home = t.testdir({ - '.npmrc': 'foo=bar', + '.npmrc': 'access=public', }) const sandbox = new Sandbox(t, { home }) - await sandbox.run('config', ['set', 'foo', 'baz']) + await sandbox.run('config', ['set', 'access', 'restricted']) - t.equal(sandbox.config.get('foo'), 'baz', 'set the value for foo') + t.equal(sandbox.config.get('access'), 'restricted', 'set the value for access') - const contents = await readFile(join(home, '.npmrc'), { encoding: 'utf8' }) - t.ok(contents.includes('foo=baz'), 'wrote foo to disk') + const contents = await fs.readFile(join(home, '.npmrc'), { encoding: 'utf8' }) + const rc = ini.parse(contents) + t.equal(rc.access, 'restricted', 'access is set to restricted') }) t.test('config set key=value', async t => { const home = t.testdir({ - '.npmrc': 'foo=bar', + '.npmrc': 'access=public', }) const sandbox = new Sandbox(t, { home }) - await sandbox.run('config', ['set', 'foo=baz']) + await sandbox.run('config', ['set', 'access=restricted']) - t.equal(sandbox.config.get('foo'), 'baz', 'set the value for foo') + t.equal(sandbox.config.get('access'), 'restricted', 'set the value for access') - const contents = await readFile(join(home, '.npmrc'), { encoding: 'utf8' }) - t.ok(contents.includes('foo=baz'), 'wrote foo to disk') + const contents = await fs.readFile(join(home, '.npmrc'), { encoding: 'utf8' }) + const rc = ini.parse(contents) + t.equal(rc.access, 'restricted', 'access is set to restricted') }) t.test('config set key1 value1 key2=value2 key3', async t => { const home = t.testdir({ - '.npmrc': 'foo=bar\nbar=baz\nbaz=foo', + '.npmrc': 'access=public\nall=true\naudit=true', }) const sandbox = new Sandbox(t, { home }) - await sandbox.run('config', ['set', 'foo', 'oof', 'bar=rab', 'baz']) + await sandbox.run('config', ['set', 'access', 'restricted', 'all=false', 'audit']) - t.equal(sandbox.config.get('foo'), 'oof', 'foo was set') - t.equal(sandbox.config.get('bar'), 'rab', 'bar was set') - t.equal(sandbox.config.get('baz'), '', 'baz was set') + t.equal(sandbox.config.get('access'), 'restricted', 'access was set') + t.equal(sandbox.config.get('all'), false, 'all was set') + t.equal(sandbox.config.get('audit'), false, 'audit was set') - const contents = await readFile(join(home, '.npmrc'), { encoding: 'utf8' }) - t.ok(contents.includes('foo=oof'), 'foo was written to disk') - t.ok(contents.includes('bar=rab'), 'bar was written to disk') - t.ok(contents.includes('baz='), 'baz was written to disk') + const contents = await fs.readFile(join(home, '.npmrc'), { encoding: 'utf8' }) + const rc = ini.parse(contents) + t.equal(rc.access, 'restricted', 'access is set to restricted') + t.equal(rc.all, false, 'all is set to false') + t.equal(rc.audit, false, 'audit is set to false') }) t.test('config set invalid key logs warning', async t => { @@ -287,30 +327,32 @@ t.test('config set invalid key logs warning', async t => { t.test('config set key=value --location=global', async t => { const global = t.testdir({ - npmrc: 'foo=bar\nbar=baz', + npmrc: 'access=public\nall=true', }) const sandbox = new Sandbox(t, { global }) - await sandbox.run('config', ['set', 'foo=buzz', '--location=global']) + await sandbox.run('config', ['set', 'access=restricted', '--location=global']) - t.equal(sandbox.config.get('foo', 'global'), 'buzz', 'foo should be set') + t.equal(sandbox.config.get('access', 'global'), 'restricted', 'foo should be set') - const contents = await readFile(join(global, 'npmrc'), { encoding: 'utf8' }) - t.not(contents.includes('foo=buzz'), 'foo was saved on disk') + const contents = await fs.readFile(join(global, 'npmrc'), { encoding: 'utf8' }) + const rc = ini.parse(contents) + t.equal(rc.access, 'restricted', 'access is set to restricted') }) t.test('config set key=value --global', async t => { const global = t.testdir({ - npmrc: 'foo=bar\nbar=baz', + npmrc: 'access=public\nall=true', }) const sandbox = new Sandbox(t, { global }) - await sandbox.run('config', ['set', 'foo=buzz', '--global']) + await sandbox.run('config', ['set', 'access=restricted', '--global']) - t.equal(sandbox.config.get('foo', 'global'), 'buzz', 'foo should be set') + t.equal(sandbox.config.get('access', 'global'), 'restricted', 'access should be set') - const contents = await readFile(join(global, 'npmrc'), { encoding: 'utf8' }) - t.not(contents.includes('foo=buzz'), 'foo was saved on disk') + const contents = await fs.readFile(join(global, 'npmrc'), { encoding: 'utf8' }) + const rc = ini.parse(contents) + t.equal(rc.access, 'restricted', 'access is set to restricted') }) t.test('config get no args', async t => { @@ -330,21 +372,21 @@ t.test('config get no args', async t => { t.test('config get single key', async t => { const sandbox = new Sandbox(t) - await sandbox.run('config', ['get', 'node-version']) - t.equal(sandbox.output, sandbox.config.get('node-version'), 'should get the value') + await sandbox.run('config', ['get', 'all']) + t.equal(sandbox.output, `${sandbox.config.get('all')}`, 'should get the value') }) t.test('config get multiple keys', async t => { const sandbox = new Sandbox(t) - await sandbox.run('config', ['get', 'node-version', 'npm-version']) + await sandbox.run('config', ['get', 'yes', 'all']) t.ok( - sandbox.output.includes(`node-version=${sandbox.config.get('node-version')}`), - 'outputs node-version' + sandbox.output.includes(`yes=${sandbox.config.get('yes')}`), + 'outputs yes' ) t.ok( - sandbox.output.includes(`npm-version=${sandbox.config.get('npm-version')}`), - 'outputs npm-version' + sandbox.output.includes(`all=${sandbox.config.get('all')}`), + 'outputs all' ) }) @@ -383,7 +425,7 @@ t.test('config edit', async t => { 'editor opened the user config file' ) - const contents = await readFile(join(home, '.npmrc'), { encoding: 'utf8' }) + const contents = await fs.readFile(join(home, '.npmrc'), { encoding: 'utf8' }) t.ok(contents.includes('foo=bar'), 'kept foo') t.ok(contents.includes('bar=baz'), 'kept bar') t.ok(contents.includes('shown below with default values'), 'appends defaults to file') @@ -411,6 +453,102 @@ t.test('config edit - editor exits non-0', async t => { ) }) +t.test('config fix', (t) => { + t.test('no problems', async (t) => { + const home = t.testdir({ + '.npmrc': '', + }) + + const sandbox = new Sandbox(t, { home }) + await sandbox.run('config', ['fix']) + t.equal(sandbox.output, '', 'printed nothing') + }) + + t.test('repairs all configs by default', async (t) => { + const root = t.testdir({ + global: { + npmrc: '_authtoken=notatoken\n_authToken=afaketoken', + }, + home: { + '.npmrc': '_authtoken=thisisinvalid\n_auth=beef', + }, + }) + const registry = `//registry.npmjs.org/` + + const sandbox = new Sandbox(t, { + global: join(root, 'global'), + home: join(root, 'home'), + }) + await sandbox.run('config', ['fix']) + + // global config fixes + t.match(sandbox.output, '`_authtoken` deleted from global config', + 'output has deleted global _authtoken') + t.match(sandbox.output, `\`_authToken\` renamed to \`${registry}:_authToken\` in global config`, + 'output has renamed global _authToken') + t.not(sandbox.config.get('_authtoken', 'global'), '_authtoken is not set globally') + t.not(sandbox.config.get('_authToken', 'global'), '_authToken is not set globally') + t.equal(sandbox.config.get(`${registry}:_authToken`, 'global'), 'afaketoken', + 'global _authToken was scoped') + const globalConfig = await fs.readFile(join(root, 'global', 'npmrc'), { encoding: 'utf8' }) + t.equal(globalConfig, `${registry}:_authToken=afaketoken\n`, 'global config was written') + + // user config fixes + t.match(sandbox.output, '`_authtoken` deleted from user config', + 'output has deleted user _authtoken') + t.match(sandbox.output, `\`_auth\` renamed to \`${registry}:_auth\` in user config`, + 'output has renamed user _auth') + t.not(sandbox.config.get('_authtoken', 'user'), '_authtoken is not set in user config') + t.not(sandbox.config.get('_auth'), '_auth is not set in user config') + t.equal(sandbox.config.get(`${registry}:_auth`, 'user'), 'beef', 'user _auth was scoped') + const userConfig = await fs.readFile(join(root, 'home', '.npmrc'), { encoding: 'utf8' }) + t.equal(userConfig, `${registry}:_auth=beef\n`, 'user config was written') + }) + + t.test('repairs only the config specified by --location if asked', async (t) => { + const root = t.testdir({ + global: { + npmrc: '_authtoken=notatoken\n_authToken=afaketoken', + }, + home: { + '.npmrc': '_authtoken=thisisinvalid\n_auth=beef', + }, + }) + const registry = `//registry.npmjs.org/` + + const sandbox = new Sandbox(t, { + global: join(root, 'global'), + home: join(root, 'home'), + }) + await sandbox.run('config', ['fix', '--location=user']) + + // global config should be untouched + t.notMatch(sandbox.output, '`_authtoken` deleted from global', + 'output has deleted global _authtoken') + t.notMatch(sandbox.output, `\`_authToken\` renamed to \`${registry}:_authToken\` in global`, + 'output has renamed global _authToken') + t.equal(sandbox.config.get('_authtoken', 'global'), 'notatoken', 'global _authtoken untouched') + t.equal(sandbox.config.get('_authToken', 'global'), 'afaketoken', 'global _authToken untouched') + t.not(sandbox.config.get(`${registry}:_authToken`, 'global'), 'global _authToken not scoped') + const globalConfig = await fs.readFile(join(root, 'global', 'npmrc'), { encoding: 'utf8' }) + t.equal(globalConfig, '_authtoken=notatoken\n_authToken=afaketoken', + 'global config was not written') + + // user config fixes + t.match(sandbox.output, '`_authtoken` deleted from user', + 'output has deleted user _authtoken') + t.match(sandbox.output, `\`_auth\` renamed to \`${registry}:_auth\` in user`, + 'output has renamed user _auth') + t.not(sandbox.config.get('_authtoken', 'user'), '_authtoken is not set in user config') + t.not(sandbox.config.get('_auth', 'user'), '_auth is not set in user config') + t.equal(sandbox.config.get(`${registry}:_auth`, 'user'), 'beef', 'user _auth was scoped') + const userConfig = await fs.readFile(join(root, 'home', '.npmrc'), { encoding: 'utf8' }) + t.equal(userConfig, `${registry}:_auth=beef\n`, 'user config was written') + }) + + t.end() +}) + t.test('completion', async t => { const sandbox = new Sandbox(t) @@ -423,13 +561,14 @@ t.test('completion', async t => { sandbox.reset() } - await testComp([], ['get', 'set', 'delete', 'ls', 'rm', 'edit', 'list']) + await testComp([], ['get', 'set', 'delete', 'ls', 'rm', 'edit', 'fix', 'list']) await testComp(['set', 'foo'], []) await testComp(['get'], allKeys) await testComp(['set'], allKeys) await testComp(['delete'], allKeys) await testComp(['rm'], allKeys) await testComp(['edit'], []) + await testComp(['fix'], []) await testComp(['list'], []) await testComp(['ls'], []) diff --git a/test/lib/commands/diff.js b/test/lib/commands/diff.js index 0adaa6568d8f7..0ca9c3b8d078b 100644 --- a/test/lib/commands/diff.js +++ b/test/lib/commands/diff.js @@ -216,7 +216,7 @@ t.test('single arg', t => { }) libnpmdiff = async ([a, b], opts) => { - t.equal(a, 'simple-output@latest', 'should forward single spec') + t.equal(a, 'simple-output@*', 'should forward single spec') t.equal(b, `file:${path}`, 'should compare to cwd') t.match(opts, npm.flatOptions, 'should forward flat options') } @@ -460,7 +460,7 @@ t.test('single arg', t => { } }, libnpmdiff: async ([a, b], opts) => { - t.equal(a, 'lorem@latest', 'should target latest version of pkg name') + t.equal(a, 'lorem@*', 'should target any version of pkg name') t.equal(b, `file:${path}`, 'should target current cwd') }, }) @@ -479,7 +479,7 @@ t.test('single arg', t => { 'package.json': JSON.stringify({ version: '1.0.0' }), }) libnpmdiff = async ([a, b], opts) => { - t.equal(a, 'bar@latest', 'should target latest tag of name') + t.equal(a, 'bar@*', 'should target any version of pkg name') t.equal(b, `file:${path}`, 'should compare to cwd') } @@ -493,7 +493,7 @@ t.test('single arg', t => { t.plan(2) libnpmdiff = async ([a, b], opts) => { - t.equal(a, 'foo@latest', 'should target latest tag of name') + t.equal(a, 'foo@*', 'should target any version of pkg name') t.equal(b, `file:${fooPath}`, 'should compare to cwd') } @@ -592,7 +592,7 @@ t.test('first arg is a qualified spec', t => { libnpmdiff = async ([a, b], opts) => { t.equal(a, 'bar@1.0.0', 'should set expected first spec') - t.equal(b, 'bar-fork@latest', 'should target latest tag if not a dep') + t.equal(b, 'bar-fork@*', 'should target any version if not a dep') } config.diff = ['bar@1.0.0', 'bar-fork'] @@ -753,7 +753,7 @@ t.test('first arg is a known dependency name', async t => { `bar@file:${resolve(path, 'node_modules/bar')}`, 'should target local node_modules pkg' ) - t.equal(b, 'bar-fork@latest', 'should set expected second spec') + t.equal(b, 'bar-fork@*', 'should set expected second spec') } npm.prefix = path @@ -840,7 +840,7 @@ t.test('first arg is a valid semver range', t => { libnpmdiff = async ([a, b], opts) => { t.equal(a, 'bar@1.0.0', 'should use name from second arg') - t.equal(b, 'bar@latest', 'should compare against latest tag') + t.equal(b, 'bar@*', 'should compare against any version') } config.diff = ['1.0.0', 'bar'] @@ -884,7 +884,7 @@ t.test('first arg is an unknown dependency name', t => { t.plan(4) libnpmdiff = async ([a, b], opts) => { - t.equal(a, 'bar@latest', 'should set expected first spec') + t.equal(a, 'bar@*', 'should set expected first spec') t.equal(b, 'bar@2.0.0', 'should set expected second spec') t.match(opts, npm.flatOptions, 'should forward flat options') t.match(opts, { where: fooPath }, 'should forward pacote options') @@ -919,7 +919,7 @@ t.test('first arg is an unknown dependency name', t => { }) libnpmdiff = async ([a, b], opts) => { - t.equal(a, 'bar-fork@latest', 'should use latest tag') + t.equal(a, 'bar-fork@*', 'should use any version') t.equal( b, `bar@file:${resolve(path, 'node_modules/bar')}`, @@ -940,7 +940,7 @@ t.test('first arg is an unknown dependency name', t => { t.plan(2) libnpmdiff = async ([a, b], opts) => { - t.equal(a, 'bar@latest', 'should use latest tag') + t.equal(a, 'bar@*', 'should use any version') t.equal(b, 'bar@^1.0.0', 'should use name from first arg') } @@ -956,8 +956,8 @@ t.test('first arg is an unknown dependency name', t => { t.plan(2) libnpmdiff = async ([a, b], opts) => { - t.equal(a, 'bar@latest', 'should use latest tag') - t.equal(b, 'bar-fork@latest', 'should use latest tag') + t.equal(a, 'bar@*', 'should use any version') + t.equal(b, 'bar-fork@*', 'should use any version') } config.diff = ['bar', 'bar-fork'] @@ -973,8 +973,8 @@ t.test('first arg is an unknown dependency name', t => { const path = t.testdir({}) libnpmdiff = async ([a, b], opts) => { - t.equal(a, 'bar@latest', 'should use latest tag') - t.equal(b, 'bar-fork@latest', 'should use latest tag') + t.equal(a, 'bar@*', 'should use any version') + t.equal(b, 'bar-fork@*', 'should use any version') } config.diff = ['bar', 'bar-fork'] diff --git a/test/lib/commands/dist-tag.js b/test/lib/commands/dist-tag.js index eb13c7ff02fbe..464f5bc9392d8 100644 --- a/test/lib/commands/dist-tag.js +++ b/test/lib/commands/dist-tag.js @@ -277,7 +277,7 @@ t.test('workspaces', t => { await distTag.execWorkspaces([], []) t.equal(process.exitCode, 1, 'set the error status') process.exitCode = 0 - t.match(log, 'dist-tag ls Couldn\'t get dist-tag data for workspace-d@latest', 'logs the error') + t.match(log, 'dist-tag ls Couldn\'t get dist-tag data for workspace-d@*', 'logs the error') t.matchSnapshot(result, 'printed the expected output') }) diff --git a/test/lib/commands/exec.js b/test/lib/commands/exec.js index f2bccf9e0d85c..aef4c856df1f5 100644 --- a/test/lib/commands/exec.js +++ b/test/lib/commands/exec.js @@ -1,5 +1,5 @@ const t = require('tap') -const fs = require('@npmcli/fs') +const fs = require('fs/promises') const path = require('path') const { load: loadMockNpm } = require('../../fixtures/mock-npm.js') const MockRegistry = require('../../fixtures/mock-registry.js') diff --git a/test/lib/commands/explain.js b/test/lib/commands/explain.js index 63deb8bc78a4c..c92732e904e60 100644 --- a/test/lib/commands/explain.js +++ b/test/lib/commands/explain.js @@ -6,6 +6,9 @@ const npm = { output: (...args) => { OUTPUT.push(args) }, + config: { + validate: () => {}, + }, } const { resolve } = require('path') diff --git a/test/lib/commands/explore.js b/test/lib/commands/explore.js index 5bb211e4503c3..af6f4df908677 100644 --- a/test/lib/commands/explore.js +++ b/test/lib/commands/explore.js @@ -67,6 +67,9 @@ const getExplore = (windows) => { output: out => { output.push(out) }, + config: { + validate: () => {}, + }, } return new Explore(npm) } diff --git a/test/lib/commands/help.js b/test/lib/commands/help.js index f84f94ad2f8d9..1e623dab9386e 100644 --- a/test/lib/commands/help.js +++ b/test/lib/commands/help.js @@ -19,6 +19,7 @@ const npm = { parsedArgv: { cooked: [], }, + validate: () => {}, }, exec: async (cmd, args) => { if (cmd === 'help-search') { diff --git a/test/lib/commands/hook.js b/test/lib/commands/hook.js index 95bac83d7b6eb..0cd6a7490dda2 100644 --- a/test/lib/commands/hook.js +++ b/test/lib/commands/hook.js @@ -28,7 +28,7 @@ let hookArgs = null const libnpmhook = { add: async (pkg, uri, secret, opts) => { hookArgs = { pkg, uri, secret, opts } - return { id: 1, name: pkg.replace(/^@/, ''), type: pkgTypes[pkg], endpoint: uri } + return { id: 1, name: pkg, type: pkgTypes[pkg], endpoint: uri } }, ls: async opts => { hookArgs = opts @@ -39,7 +39,7 @@ const libnpmhook = { return Object.keys(pkgTypes).map(name => ({ id: ++id, - name: name.replace(/^@/, ''), + name, type: pkgTypes[name], endpoint: 'https://google.com/', last_delivery: id % 2 === 0 ? now : undefined, @@ -50,7 +50,7 @@ const libnpmhook = { const pkg = Object.keys(pkgTypes)[0] return { id: 1, - name: pkg.replace(/^@/, ''), + name: pkg, type: pkgTypes[pkg], endpoint: 'https://google.com/', } @@ -58,7 +58,7 @@ const libnpmhook = { update: async (id, uri, secret, opts) => { hookArgs = { id, uri, secret, opts } const pkg = Object.keys(pkgTypes)[0] - return { id, name: pkg.replace(/^@/, ''), type: pkgTypes[pkg], endpoint: uri } + return { id, name: pkg, type: pkgTypes[pkg], endpoint: uri } }, } @@ -92,6 +92,48 @@ t.test('npm hook add', async t => { t.strictSame(output, ['+ semver -> https://google.com'], 'prints the correct output') }) +t.test('npm hook add - correct owner hook output', async t => { + t.teardown(() => { + hookArgs = null + output.length = 0 + }) + + await hook.exec(['add', '~npm', 'https://google.com/', 'some-secret']) + + t.match( + hookArgs, + { + pkg: '~npm', + uri: 'https://google.com/', + secret: 'some-secret', + opts: npm.flatOptions, + }, + 'provided the correct arguments to libnpmhook' + ) + t.strictSame(output, ['+ ~npm -> https://google.com'], 'prints the correct output') +}) + +t.test('npm hook add - correct scope hook output', async t => { + t.teardown(() => { + hookArgs = null + output.length = 0 + }) + + await hook.exec(['add', '@npmcli', 'https://google.com/', 'some-secret']) + + t.match( + hookArgs, + { + pkg: '@npmcli', + uri: 'https://google.com/', + secret: 'some-secret', + opts: npm.flatOptions, + }, + 'provided the correct arguments to libnpmhook' + ) + t.strictSame(output, ['+ @npmcli -> https://google.com'], 'prints the correct output') +}) + t.test('npm hook add - unicode output', async t => { npm.flatOptions.unicode = true t.teardown(() => { @@ -139,7 +181,7 @@ t.test('npm hook add - json output', async t => { JSON.parse(output[0]), { id: 1, - name: 'npmcli', + name: '@npmcli', endpoint: 'https://google.com/', type: 'scope', }, @@ -174,7 +216,7 @@ t.test('npm hook add - parseable output', async t => { ) t.strictSame( output[1].split(/\t/), - ['1', 'npmcli', 'scope', 'https://google.com/'], + ['1', '@npmcli', 'scope', 'https://google.com/'], 'prints the correct parseable values' ) }) @@ -345,7 +387,7 @@ t.test('npm hook ls - parseable output', async t => { [ ['id', 'name', 'type', 'endpoint', 'last_delivery'], ['1', 'semver', 'package', 'https://google.com/', ''], - ['2', 'npmcli', 'scope', 'https://google.com/', `${now}`], + ['2', '@npmcli', 'scope', 'https://google.com/', `${now}`], ['3', 'npm', 'owner', 'https://google.com/', ''], ], 'prints the correct result' diff --git a/test/lib/commands/init.js b/test/lib/commands/init.js index 2dcca5b7f0adc..d11e0091b7cff 100644 --- a/test/lib/commands/init.js +++ b/test/lib/commands/init.js @@ -85,7 +85,7 @@ t.test('npm init <arg>', async t => { libnpmexec: ({ args, cache, npxCache }) => { t.same( args, - ['create-react-app'], + ['create-react-app@*'], 'should npx with listed packages' ) t.same(cache, flatOptions.cache) @@ -106,7 +106,7 @@ t.test('npm init <arg> -- other-args', async t => { libnpmexec: ({ args }) => { t.same( args, - ['create-react-app', 'my-path', '--some-option', 'some-value'], + ['create-react-app@*', 'my-path', '--some-option', 'some-value'], 'should npm exec with expected args' ) }, @@ -125,7 +125,7 @@ t.test('npm init @scope/name', async t => { libnpmexec: ({ args }) => { t.same( args, - ['@npmcli/create-something'], + ['@npmcli/create-something@*'], 'should npx with scoped packages' ) }, @@ -268,7 +268,7 @@ t.test('should not rewrite flatOptions', async t => { libnpmexec: async ({ args }) => { t.same( args, - ['create-react-app', 'my-app'], + ['create-react-app@*', 'my-app'], 'should npx with extra args' ) }, @@ -500,7 +500,7 @@ t.test('workspaces', t => { libnpmexec: ({ args, path }) => { t.same( args, - ['create-react-app'], + ['create-react-app@*'], 'should npx with listed packages' ) t.same( diff --git a/test/lib/commands/install-ci-test.js b/test/lib/commands/install-ci-test.js index 0828d2b24ed97..68b86be43a30f 100644 --- a/test/lib/commands/install-ci-test.js +++ b/test/lib/commands/install-ci-test.js @@ -23,6 +23,9 @@ const installCITest = new InstallCITest({ testCalled = true } }, + config: { + validate: () => {}, + }, }) t.test('the install-ci-test command', t => { diff --git a/test/lib/commands/install-test.js b/test/lib/commands/install-test.js index 223bbe106aec7..0e0cf47521c4e 100644 --- a/test/lib/commands/install-test.js +++ b/test/lib/commands/install-test.js @@ -23,6 +23,9 @@ const installTest = new InstallTest({ testCalled = true } }, + config: { + validate: () => {}, + }, }) t.test('the install-test command', t => { diff --git a/test/lib/commands/login.js b/test/lib/commands/login.js index 8d27421313406..6c1d40c0d6edb 100644 --- a/test/lib/commands/login.js +++ b/test/lib/commands/login.js @@ -26,15 +26,7 @@ t.test('legacy', t => { const { npm, home } = await loadMockNpm(t, { config: { 'auth-type': 'legacy' }, homeDir: { - // These all get cleaned up by config.setCredentialsByURI '.npmrc': [ - '_token=user', - '_password=user', - 'username=user', - '_auth=user', - '_authtoken=user', - '-authtoken=user', - '_authToken=user', '//registry.npmjs.org/:_authToken=user', '//registry.npmjs.org/:always-auth=user', '//registry.npmjs.org/:email=test-email-old@npmjs.org', diff --git a/test/lib/commands/publish.js b/test/lib/commands/publish.js index 00fba9ef218e0..b5cb72dbc98bd 100644 --- a/test/lib/commands/publish.js +++ b/test/lib/commands/publish.js @@ -4,7 +4,7 @@ const MockRegistry = require('../../fixtures/mock-registry.js') const pacote = require('pacote') const Arborist = require('@npmcli/arborist') const path = require('path') -const fs = require('@npmcli/fs') +const fs = require('fs') const npa = require('npm-package-arg') const pkg = 'test-package' @@ -80,14 +80,10 @@ t.test('respects publishConfig.registry, runs appropriate scripts', async t => { }).reply(200, {}) await npm.exec('publish', []) t.matchSnapshot(joinedOutput(), 'new package version') - t.resolveMatch(fs.exists(path.join(prefix, 'scripts-prepublishonly')), true, 'ran prepublishOnly') - t.resolveMatch( - fs.exists(path.join(prefix, 'scripts-prepublish')), - false, - 'did not run prepublish' - ) - t.resolveMatch(fs.exists(path.join(prefix, 'scripts-publish')), true, 'ran publish') - t.resolveMatch(fs.exists(path.join(prefix, 'scripts-postpublish')), true, 'ran postpublish') + t.equal(fs.existsSync(path.join(prefix, 'scripts-prepublishonly')), true, 'ran prepublishOnly') + t.equal(fs.existsSync(path.join(prefix, 'scripts-prepublish')), false, 'did not run prepublish') + t.equal(fs.existsSync(path.join(prefix, 'scripts-publish')), true, 'ran publish') + t.equal(fs.existsSync(path.join(prefix, 'scripts-postpublish')), true, 'ran postpublish') }) t.test('re-loads publishConfig.registry if added during script process', async t => { @@ -190,7 +186,7 @@ t.test('dry-run', async t => { t.test('shows usage with wrong set of arguments', async t => { t.plan(1) const Publish = t.mock('../../../lib/commands/publish.js') - const publish = new Publish({}) + const publish = new Publish({ config: { validate: () => {} } }) await t.rejects(publish.exec(['a', 'b', 'c']), publish.usage) }) @@ -230,7 +226,7 @@ t.test('tarball', async t => { }) const tarball = await pacote.tarball(home, { Arborist }) const tarFilename = path.join(home, 'tarball.tgz') - await fs.writeFile(tarFilename, tarball) + fs.writeFileSync(tarFilename, tarball) const registry = new MockRegistry({ tap: t, registry: npm.config.get('registry'), @@ -612,23 +608,23 @@ t.test('ignore-scripts', async t => { registry.nock.put(`/${pkg}`).reply(200, {}) await npm.exec('publish', []) t.matchSnapshot(joinedOutput(), 'new package version') - t.resolveMatch( - fs.exists(path.join(prefix, 'scripts-prepublishonly')), + t.equal( + fs.existsSync(path.join(prefix, 'scripts-prepublishonly')), false, 'did not run prepublishOnly' ) - t.resolveMatch( - fs.exists(path.join(prefix, 'scripts-prepublish')), + t.equal( + fs.existsSync(path.join(prefix, 'scripts-prepublish')), false, 'did not run prepublish' ) - t.resolveMatch( - fs.exists(path.join(prefix, 'scripts-publish')), + t.equal( + fs.existsSync(path.join(prefix, 'scripts-publish')), false, 'did not run publish' ) - t.resolveMatch( - fs.exists(path.join(prefix, 'scripts-postpublish')), + t.equal( + fs.existsSync(path.join(prefix, 'scripts-postpublish')), false, 'did not run postpublish' ) @@ -637,7 +633,7 @@ t.test('ignore-scripts', async t => { t.test('_auth config default registry', async t => { const { npm, joinedOutput } = await loadMockNpm(t, { config: { - _auth: basic, + '//registry.npmjs.org/:_auth': basic, }, prefixDir: { 'package.json': JSON.stringify(pkgJson), @@ -661,7 +657,7 @@ t.test('bare _auth and registry config', async t => { const { npm, joinedOutput } = await loadMockNpm(t, { config: { registry: alternateRegistry, - _auth: basic, + '//other.registry.npmjs.org/:_auth': basic, }, prefixDir: { 'package.json': JSON.stringify({ diff --git a/test/lib/commands/repo.js b/test/lib/commands/repo.js index 4c983f1353f00..86f1b8e27411f 100644 --- a/test/lib/commands/repo.js +++ b/test/lib/commands/repo.js @@ -221,7 +221,7 @@ t.test('open repo urls', async t => { unhostedgitsshobj: 'https://gothib.com/foo/unhostedgitsshobj', unhostedgithttpobj: 'http://gothib.com/foo/unhostedgithttpobj', unhostedgithttpsobj: 'https://gothib.com/foo/unhostedgithttpsobj', - directory: 'https://github.com/foo/test-repo-with-directory/tree/master/some/directory', + directory: 'https://github.com/foo/test-repo-with-directory/tree/HEAD/some/directory', '.': 'https://example.com/thispkg', } const keys = Object.keys(expect) diff --git a/test/lib/commands/set.js b/test/lib/commands/set.js index feeb901571768..9a68eaf32d457 100644 --- a/test/lib/commands/set.js +++ b/test/lib/commands/set.js @@ -40,6 +40,9 @@ const npm = { configArgs = args } }, + config: { + validate: () => {}, + }, } const Set = t.mock('../../../lib/commands/set.js') diff --git a/test/lib/commands/stars.js b/test/lib/commands/stars.js index 094b530d8c610..44de6ba1fb960 100644 --- a/test/lib/commands/stars.js +++ b/test/lib/commands/stars.js @@ -4,7 +4,7 @@ let result = '' const noop = () => null const npm = { - config: { get () {} }, + config: { get () {}, validate: () => {} }, flatOptions: {}, output: (...msg) => { result = [result, ...msg].join('\n') diff --git a/test/lib/commands/token.js b/test/lib/commands/token.js index c32c0b74a96f4..af53f49a130f5 100644 --- a/test/lib/commands/token.js +++ b/test/lib/commands/token.js @@ -7,6 +7,7 @@ const mocks = { } const npm = { output: (...args) => mocks.output(...args), + config: { validate: () => {} }, } const mockToken = (otherMocks) => t.mock('../../../lib/commands/token.js', { @@ -21,6 +22,7 @@ const tokenWithMocks = (options = {}) => { for (const mod in mockRequests) { if (mod === 'npm') { mockRequests.npm = { ...npm, ...mockRequests.npm } + mockRequests.npm.config.validate = () => {} } else { if (typeof mockRequests[mod] === 'function') { mocks[mod] = mockRequests[mod] diff --git a/test/lib/docs.js b/test/lib/docs.js new file mode 100644 index 0000000000000..166651f6020d8 --- /dev/null +++ b/test/lib/docs.js @@ -0,0 +1,98 @@ +const t = require('tap') +const { join, resolve, basename, extname, dirname } = require('path') +const fs = require('fs/promises') +const localeCompare = require('@isaacs/string-locale-compare')('en') +const docs = require('@npmcli/docs') + +const { load: loadMockNpm } = require('../fixtures/mock-npm.js') +const mockGlobals = require('../fixtures/mock-globals.js') +const { definitions } = require('../../lib/utils/config/index.js') +const cmdList = require('../../lib/utils/cmd-list.js') +const pkg = require('../../package.json') + +t.test('command list', async t => { + for (const [key, value] of Object.entries(cmdList)) { + t.matchSnapshot(value, key) + } +}) + +t.test('shorthands', async t => { + t.matchSnapshot(docs.shorthands(docs.TAGS.SHORTHANDS, {}), 'docs') +}) + +t.test('config', async t => { + const keys = Object.keys(definitions) + const flat = Object.entries(definitions).filter(([_, d]) => d.flatten).map(([k]) => k) + const notFlat = keys.filter(k => !flat.includes(k)) + t.matchSnapshot(keys, 'all keys') + t.matchSnapshot(flat, 'keys that are flattened') + t.matchSnapshot(notFlat, 'keys that are not flattened') + t.matchSnapshot(docs.config(docs.TAGS.CONFIG, {}), 'all definitions') +}) + +t.test('basic usage', async t => { + mockGlobals(t, { process: { platform: 'posix' } }) + + t.cleanSnapshot = str => str + .split(dirname(dirname(__dirname))).join('{BASEDIR}') + .split(pkg.version).join('{VERSION}') + + // snapshot basic usage without commands since all the command snapshots + // are generated in the following test + const { npm } = await loadMockNpm(t, { + mocks: { + '../../lib/utils/cmd-list.js': { commands: [] }, + }, + }) + + npm.config.set('userconfig', '/some/config/file/.npmrc') + t.matchSnapshot(await npm.usage) +}) + +t.test('usage', async t => { + const readdir = async (dir, ext) => { + const files = await fs.readdir(dir) + return files.filter(f => extname(f) === ext).map(f => basename(f, ext)) + } + + const fsCommands = await readdir(resolve(__dirname, '../../lib/commands'), '.js') + const docsCommands = await readdir(join(docs.paths.content, 'commands'), docs.DOC_EXT) + const bareCommands = ['npm', 'npx'] + + // XXX: These extra commands exist as js files but not as docs pages + const allDocs = docsCommands.concat(['get', 'set', 'll']).map(n => n.replace('npm-', '')) + + // ensure that the list of js files in commands, docs files, and the command list + // are all in sync. eg, this will error if a command is removed but not its docs file + t.strictSame( + fsCommands.sort(localeCompare), + cmdList.allCommands, + 'command list and fs are the same' + ) + t.strictSame( + allDocs.filter(f => !bareCommands.includes(f)).sort(localeCompare), + cmdList.allCommands, + 'command list and docs files are the same' + ) + + // use the list of files from the docs since those include the special cases + // for the bare npm and npx usage + for (const cmd of allDocs) { + t.test(cmd, async t => { + let output = null + if (!bareCommands.includes(cmd)) { + const { npm } = await loadMockNpm(t) + const impl = await npm.cmd(cmd) + output = impl.usage + } + + const usage = docs.usage(docs.TAGS.USAGE, { path: cmd }) + const params = docs.params(docs.TAGS.CONFIG, { path: cmd }) + .split('\n') + .filter(l => l.startsWith('#### ')) + .join('\n') || 'NO PARAMS' + + t.matchSnapshot([output, usage, params].filter(Boolean).join('\n\n')) + }) + } +}) diff --git a/test/lib/lifecycle-cmd.js b/test/lib/lifecycle-cmd.js index eb03f19270be0..22011197ead54 100644 --- a/test/lib/lifecycle-cmd.js +++ b/test/lib/lifecycle-cmd.js @@ -8,6 +8,9 @@ const npm = { return 'called the right thing' } }, + config: { + validate: () => {}, + }, } t.test('create a lifecycle command', async t => { t.plan(5) diff --git a/test/lib/load-all-commands.js b/test/lib/load-all-commands.js index 34773bba04662..aaf6a69c27cd6 100644 --- a/test/lib/load-all-commands.js +++ b/test/lib/load-all-commands.js @@ -5,12 +5,10 @@ const t = require('tap') const util = require('util') const { load: loadMockNpm } = require('../fixtures/mock-npm.js') -const { cmdList, plumbing } = require('../../lib/utils/cmd-list.js') -const allCmds = [...cmdList, ...plumbing] +const { allCommands } = require('../../lib/utils/cmd-list.js') t.test('load each command', async t => { - t.plan(allCmds.length) - for (const cmd of allCmds.sort((a, b) => a.localeCompare(b, 'en'))) { + for (const cmd of allCommands) { t.test(cmd, async t => { const { npm, outputs } = await loadMockNpm(t, { config: { usage: true }, @@ -29,13 +27,11 @@ t.test('load each command', async t => { ) t.ok(impl.description, 'implementation has a description') t.ok(impl.name, 'implementation has a name') + t.equal(cmd, impl.name, 'command list and name are the same') t.ok(impl.ignoreImplicitWorkspace !== undefined, 'implementation has ignoreImplictWorkspace') t.match(impl.usage, cmd, 'usage contains the command') await npm.exec(cmd, []) t.match(outputs[0][0], impl.usage, 'usage is what is output') - // This ties usage to a snapshot so we have to re-run snap if usage - // changes, which rebuilds the man pages - t.matchSnapshot(outputs[0][0]) }) } }) diff --git a/test/lib/npm.js b/test/lib/npm.js index 2bf7f426db409..f850ff6aff8a4 100644 --- a/test/lib/npm.js +++ b/test/lib/npm.js @@ -1,9 +1,10 @@ const t = require('tap') const { resolve, dirname, join } = require('path') +const fs = require('fs') const { load: loadMockNpm } = require('../fixtures/mock-npm.js') const mockGlobals = require('../fixtures/mock-globals') -const fs = require('@npmcli/fs') +const { commands } = require('../../lib/utils/cmd-list.js') // delete this so that we don't have configs from the fact that it // is being run by 'npm test' @@ -48,7 +49,6 @@ t.test('not yet loaded', async t => { t.throws(() => npm.config.set('foo', 'bar')) t.throws(() => npm.config.get('foo')) t.same(logs, []) - t.end() }) t.test('npm.load', async t => { @@ -448,7 +448,7 @@ t.test('debug log', async t => { const logsDir = join(testdir, 'my_logs_dir') // make logs dir a file before load so it files - await fs.writeFile(logsDir, 'A_TEXT_FILE') + fs.writeFileSync(logsDir, 'A_TEXT_FILE') await t.resolves(npm.load(), 'loads with invalid logs dir') t.equal(npm.logFiles.length, 0, 'no log files array') @@ -502,7 +502,6 @@ t.test('timings', async t => { t.notOk(npm.unfinishedTimers.has('foo'), 'foo timer is gone') t.notOk(npm.unfinishedTimers.has('bar'), 'bar timer is gone') t.match(npm.finishedTimers, { foo: Number, bar: Number, npm: Number }) - t.end() }) t.test('writes timings file', async t => { @@ -535,11 +534,26 @@ t.test('timings', async t => { t.test('does not write timings file with timers:false', async t => { const { npm, timingFile } = await loadMockNpm(t, { - config: { false: true }, + config: { timing: false }, }) npm.writeTimingFile() await t.rejects(() => timingFile()) }) + + const timingDisplay = [ + [{ loglevel: 'silly' }, true, false], + [{ loglevel: 'silly', timing: true }, true, true], + [{ loglevel: 'silent', timing: true }, false, false], + ] + + for (const [config, expectedDisplay, expectedTiming] of timingDisplay) { + const msg = `${JSON.stringify(config)}, display:${expectedDisplay}, timing:${expectedTiming}` + await t.test(`timing display: ${msg}`, async t => { + const { display } = await loadMockNpm(t, { config }) + t.equal(!!display.length, expectedDisplay, 'display') + t.equal(!!display.timing.length, expectedTiming, 'timing display') + }) + } }) t.test('output clears progress and console.logs the message', async t => { @@ -571,7 +585,6 @@ t.test('output clears progress and console.logs the message', async t => { t.match(logs, [['hello']]) t.match(errors, [['error']]) - t.end() }) t.test('aliases and typos', async t => { @@ -682,59 +695,85 @@ t.test('implicit workspace accept', async t => { }) t.test('usage', async t => { - const { npm } = await loadMockNpm(t) - t.afterEach(() => { - npm.config.set('viewer', null) - npm.config.set('long', false) - npm.config.set('userconfig', '/some/config/file/.npmrc') - }) - const { dirname } = require('path') - const basedir = dirname(dirname(__dirname)) - t.cleanSnapshot = str => str.split(basedir).join('{BASEDIR}') - .split(require('../../package.json').version).join('{VERSION}') - - npm.config.set('viewer', null) - npm.config.set('long', false) - npm.config.set('userconfig', '/some/config/file/.npmrc') - - t.test('basic usage', async t => { - t.matchSnapshot(await npm.usage) - t.end() + t.test('with browser', async t => { + mockGlobals(t, { process: { platform: 'posix' } }) + const { npm } = await loadMockNpm(t) + const usage = await npm.usage + npm.config.set('viewer', 'browser') + const browserUsage = await npm.usage + t.notMatch(usage, '(in a browser)') + t.match(browserUsage, '(in a browser)') }) - t.test('with browser', async t => { + t.test('windows always uses browser', async t => { + mockGlobals(t, { process: { platform: 'win32' } }) + const { npm } = await loadMockNpm(t) + const usage = await npm.usage npm.config.set('viewer', 'browser') - t.matchSnapshot(await npm.usage) - t.end() + const browserUsage = await npm.usage + t.match(usage, '(in a browser)') + t.match(browserUsage, '(in a browser)') }) - t.test('with long', async t => { + t.test('includes commands', async t => { + const { npm } = await loadMockNpm(t) + const usage = await npm.usage npm.config.set('long', true) - t.matchSnapshot(await npm.usage) - t.end() + const longUsage = await npm.usage + + const lastCmd = commands[commands.length - 1] + for (const cmd of commands) { + const isLast = cmd === lastCmd + const shortCmd = new RegExp(`\\s${cmd}${isLast ? '\\n' : ',[\\s\\n]'}`) + const longCmd = new RegExp(`^\\s+${cmd}\\s+\\w.*\n\\s+Usage:\\n`, 'm') + + t.match(usage, shortCmd, `usage includes ${cmd}`) + t.notMatch(usage, longCmd, `usage does not include long ${cmd}`) + + t.match(longUsage, longCmd, `long usage includes ${cmd}`) + if (!isLast) { + // long usage includes false positives for the last command since it is + // not followed by a comma + t.notMatch(longUsage, shortCmd, `long usage does not include short ${cmd}`) + } + } }) t.test('set process.stdout.columns', async t => { - const { columns } = process.stdout - t.teardown(() => { - Object.defineProperty(process.stdout, 'columns', { - value: columns, - enumerable: true, - configurable: true, - writable: true, - }) - }) - const cases = [0, 90] - for (const cols of cases) { - t.test(`columns=${cols}`, async t => { - Object.defineProperty(process.stdout, 'columns', { - value: cols, - enumerable: true, - configurable: true, - writable: true, - }) - t.matchSnapshot(await npm.usage) - }) + const { npm } = await loadMockNpm(t) + + const colUsage = async (cols) => { + const usages = [] + for (const col of cols) { + mockGlobals(t, { 'process.stdout.columns': col }) + const usage = await npm.usage + usages.push(usage) + } + return usages } + + t.test('max size', async t => { + const usages = await colUsage([0, 76, 90, 100]) + t.equal(usages.filter(Boolean).length, 4) + t.equal(new Set([...usages]).size, 1) + }) + + t.test('across max boundary', async t => { + const usages = await colUsage([75, 76]) + t.equal(usages.filter(Boolean).length, 2) + t.equal(new Set([...usages]).size, 2) + }) + + t.test('min size', async t => { + const usages = await colUsage([1, 10, 24, 40]) + t.equal(usages.filter(Boolean).length, 4) + t.equal(new Set([...usages]).size, 1) + }) + + t.test('different cols within min/max', async t => { + const usages = await colUsage([40, 41]) + t.equal(usages.filter(Boolean).length, 2) + t.equal(new Set([...usages]).size, 2) + }) }) }) diff --git a/test/lib/utils/cmd-list.js b/test/lib/utils/cmd-list.js deleted file mode 100644 index 8e936946b9938..0000000000000 --- a/test/lib/utils/cmd-list.js +++ /dev/null @@ -1,4 +0,0 @@ -const t = require('tap') -const cmdList = require('../../../lib/utils/cmd-list.js') -// just snapshot it so we are made aware if it changes unexpectedly -t.matchSnapshot(cmdList) diff --git a/test/lib/utils/config/definitions.js b/test/lib/utils/config/definitions.js index 200ee9e5536d1..21eba1617affd 100644 --- a/test/lib/utils/config/definitions.js +++ b/test/lib/utils/config/definitions.js @@ -1,37 +1,19 @@ const t = require('tap') const { resolve } = require('path') const mockGlobals = require('../../../fixtures/mock-globals') +const pkg = require('../../../../package.json') // have to fake the node version, or else it'll only pass on this one mockGlobals(t, { 'process.version': 'v14.8.0', 'process.env.NODE_ENV': undefined }) -// also fake the npm version, so that it doesn't get reset every time -const pkg = require('../../../../package.json') - -// this is a pain to keep typing -const defpath = '../../../../lib/utils/config/definitions.js' - -const definitions = require(defpath) - -// Tie the definitions to a snapshot so that if they change we are forced to -// update snapshots, which rebuilds the docs -for (const key of Object.keys(definitions)) { - t.matchSnapshot(definitions[key].describe(), `config description for ${key}`) -} - -const isWin = '../../../../lib/utils/is-windows.js' +const mockDefs = (mocks = {}) => t.mock('../../../../lib/utils/config/definitions.js', mocks) -// snapshot these just so we note when they change -t.matchSnapshot(Object.keys(definitions), 'all config keys') -t.matchSnapshot(Object.keys(definitions).filter(d => d.flatten), - 'all config keys that are shared to flatOptions') - -t.equal(definitions['npm-version'].default, pkg.version, 'npm-version default') -t.equal(definitions['node-version'].default, process.version, 'node-version default') +const isWin = (isWindows) => ({ '../../../../lib/utils/is-windows.js': { isWindows } }) t.test('basic flattening function camelCases from css-case', t => { const flat = {} const obj = { 'prefer-online': true } + const definitions = mockDefs() definitions['prefer-online'].flatten('prefer-online', obj, flat) t.strictSame(flat, { preferOnline: true }) t.end() @@ -40,25 +22,21 @@ t.test('basic flattening function camelCases from css-case', t => { t.test('editor', t => { t.test('has EDITOR and VISUAL, use EDITOR', t => { mockGlobals(t, { 'process.env': { EDITOR: 'vim', VISUAL: 'mate' } }) - const defs = t.mock(defpath) + const defs = mockDefs() t.equal(defs.editor.default, 'vim') t.end() }) t.test('has VISUAL but no EDITOR, use VISUAL', t => { mockGlobals(t, { 'process.env': { EDITOR: undefined, VISUAL: 'mate' } }) - const defs = t.mock(defpath) + const defs = mockDefs() t.equal(defs.editor.default, 'mate') t.end() }) t.test('has neither EDITOR nor VISUAL, system specific', t => { mockGlobals(t, { 'process.env': { EDITOR: undefined, VISUAL: undefined } }) - const defsWin = t.mock(defpath, { - [isWin]: { isWindows: true }, - }) + const defsWin = mockDefs(isWin(true)) t.equal(defsWin.editor.default, 'notepad.exe') - const defsNix = t.mock(defpath, { - [isWin]: { isWindows: false }, - }) + const defsNix = mockDefs(isWin(false)) t.equal(defsNix.editor.default, 'vi') t.end() }) @@ -68,28 +46,20 @@ t.test('editor', t => { t.test('shell', t => { t.test('windows, env.ComSpec then cmd.exe', t => { mockGlobals(t, { 'process.env.ComSpec': 'command.com' }) - const defsComSpec = t.mock(defpath, { - [isWin]: { isWindows: true }, - }) + const defsComSpec = mockDefs(isWin(true)) t.equal(defsComSpec.shell.default, 'command.com') mockGlobals(t, { 'process.env.ComSpec': undefined }) - const defsNoComSpec = t.mock(defpath, { - [isWin]: { isWindows: true }, - }) + const defsNoComSpec = mockDefs(isWin(true)) t.equal(defsNoComSpec.shell.default, 'cmd') t.end() }) t.test('nix, SHELL then sh', t => { mockGlobals(t, { 'process.env.SHELL': '/usr/local/bin/bash' }) - const defsShell = t.mock(defpath, { - [isWin]: { isWindows: false }, - }) + const defsShell = mockDefs(isWin(false)) t.equal(defsShell.shell.default, '/usr/local/bin/bash') mockGlobals(t, { 'process.env.SHELL': undefined }) - const defsNoShell = t.mock(defpath, { - [isWin]: { isWindows: false }, - }) + const defsNoShell = mockDefs(isWin(false)) t.equal(defsNoShell.shell.default, 'sh') t.end() }) @@ -106,7 +76,7 @@ t.test('local-address allowed types', t => { eth69: [{ address: 'no place like home' }], }), } - const defs = t.mock(defpath, { os }) + const defs = mockDefs({ os }) t.same(defs['local-address'].type, [ null, '127.0.0.1', @@ -121,7 +91,7 @@ t.test('local-address allowed types', t => { throw new Error('no network interfaces for some reason') }, } - const defs = t.mock(defpath, { os }) + const defs = mockDefs({ os }) t.same(defs['local-address'].type, [null]) t.end() }) @@ -133,44 +103,38 @@ t.test('unicode allowed?', t => { setGlobal({ LC_ALL: 'utf8', LC_CTYPE: 'UTF-8', LANG: 'Unicode utf-8' }) - const lcAll = t.mock(defpath) + const lcAll = mockDefs() t.equal(lcAll.unicode.default, true) setGlobal({ LC_ALL: 'no unicode for youUUUU!' }) - const noLcAll = t.mock(defpath) + const noLcAll = mockDefs() t.equal(noLcAll.unicode.default, false) setGlobal({ LC_ALL: undefined }) - const lcCtype = t.mock(defpath) + const lcCtype = mockDefs() t.equal(lcCtype.unicode.default, true) setGlobal({ LC_CTYPE: 'something other than unicode version 8' }) - const noLcCtype = t.mock(defpath) + const noLcCtype = mockDefs() t.equal(noLcCtype.unicode.default, false) setGlobal({ LC_CTYPE: undefined }) - const lang = t.mock(defpath) + const lang = mockDefs() t.equal(lang.unicode.default, true) setGlobal({ LANG: 'ISO-8859-1' }) - const noLang = t.mock(defpath) + const noLang = mockDefs() t.equal(noLang.unicode.default, false) t.end() }) t.test('cache', t => { mockGlobals(t, { 'process.env.LOCALAPPDATA': 'app/data/local' }) - const defsWinLocalAppData = t.mock(defpath, { - [isWin]: { isWindows: true }, - }) + const defsWinLocalAppData = mockDefs(isWin(true)) t.equal(defsWinLocalAppData.cache.default, 'app/data/local/npm-cache') mockGlobals(t, { 'process.env.LOCALAPPDATA': undefined }) - const defsWinNoLocalAppData = t.mock(defpath, { - [isWin]: { isWindows: true }, - }) + const defsWinNoLocalAppData = mockDefs(isWin(true)) t.equal(defsWinNoLocalAppData.cache.default, '~/npm-cache') - const defsNix = t.mock(defpath, { - [isWin]: { isWindows: false }, - }) + const defsNix = mockDefs(isWin(false)) t.equal(defsNix.cache.default, '~/.npm') const flat = {} @@ -189,12 +153,12 @@ t.test('flatteners that populate flat.omit array', t => { // ignored if setting is not dev or development obj.also = 'ignored' - definitions.also.flatten('also', obj, flat) + mockDefs().also.flatten('also', obj, flat) t.strictSame(obj, { also: 'ignored', omit: [], include: [] }, 'nothing done') t.strictSame(flat, { omit: [] }, 'nothing done') obj.also = 'development' - definitions.also.flatten('also', obj, flat) + mockDefs().also.flatten('also', obj, flat) t.strictSame(obj, { also: 'development', omit: [], @@ -204,7 +168,7 @@ t.test('flatteners that populate flat.omit array', t => { obj.omit = ['dev', 'optional'] obj.include = [] - definitions.also.flatten('also', obj, flat) + mockDefs().also.flatten('also', obj, flat) t.strictSame(obj, { also: 'development', omit: ['optional'], @@ -217,10 +181,10 @@ t.test('flatteners that populate flat.omit array', t => { t.test('include', t => { const flat = {} const obj = { include: ['dev'] } - definitions.include.flatten('include', obj, flat) + mockDefs().include.flatten('include', obj, flat) t.strictSame(flat, { omit: [] }, 'not omitting anything') obj.omit = ['optional', 'dev'] - definitions.include.flatten('include', obj, flat) + mockDefs().include.flatten('include', obj, flat) t.strictSame(flat, { omit: ['optional'] }, 'only omitting optional') t.end() }) @@ -228,11 +192,11 @@ t.test('flatteners that populate flat.omit array', t => { t.test('omit', t => { const flat = {} const obj = { include: ['dev'], omit: ['dev', 'optional'] } - definitions.omit.flatten('omit', obj, flat) + mockDefs().omit.flatten('omit', obj, flat) t.strictSame(flat, { omit: ['optional'] }, 'do not omit what is included') mockGlobals(t, { 'process.env.NODE_ENV': 'production' }) - const defProdEnv = t.mock(defpath) + const defProdEnv = mockDefs() t.strictSame(defProdEnv.omit.default, ['dev'], 'omit dev in production') t.end() }) @@ -240,16 +204,16 @@ t.test('flatteners that populate flat.omit array', t => { t.test('only', t => { const flat = {} const obj = { only: 'asdf' } - definitions.only.flatten('only', obj, flat) + mockDefs().only.flatten('only', obj, flat) t.strictSame(flat, { omit: [] }, 'ignored if value is not production') obj.only = 'prod' - definitions.only.flatten('only', obj, flat) + mockDefs().only.flatten('only', obj, flat) t.strictSame(flat, { omit: ['dev'] }, 'omit dev when --only=prod') obj.include = ['dev'] flat.omit = [] - definitions.only.flatten('only', obj, flat) + mockDefs().only.flatten('only', obj, flat) t.strictSame(flat, { omit: [] }, 'do not omit when included') t.end() @@ -259,7 +223,7 @@ t.test('flatteners that populate flat.omit array', t => { const flat = {} const obj = { optional: null } - definitions.optional.flatten('optional', obj, flat) + mockDefs().optional.flatten('optional', obj, flat) t.strictSame(obj, { optional: null, omit: [], @@ -268,7 +232,7 @@ t.test('flatteners that populate flat.omit array', t => { t.strictSame(flat, { omit: [] }, 'do nothing by default') obj.optional = true - definitions.optional.flatten('optional', obj, flat) + mockDefs().optional.flatten('optional', obj, flat) t.strictSame(obj, { omit: [], optional: true, @@ -278,7 +242,7 @@ t.test('flatteners that populate flat.omit array', t => { delete obj.include obj.optional = false - definitions.optional.flatten('optional', obj, flat) + mockDefs().optional.flatten('optional', obj, flat) t.strictSame(obj, { omit: ['optional'], optional: false, @@ -292,7 +256,7 @@ t.test('flatteners that populate flat.omit array', t => { t.test('production', t => { const flat = {} const obj = { production: true } - definitions.production.flatten('production', obj, flat) + mockDefs().production.flatten('production', obj, flat) t.strictSame(obj, { production: true, omit: ['dev'], @@ -303,7 +267,7 @@ t.test('flatteners that populate flat.omit array', t => { delete obj.omit obj.production = false delete flat.omit - definitions.production.flatten('production', obj, flat) + mockDefs().production.flatten('production', obj, flat) t.strictSame(obj, { production: false, include: ['dev'], @@ -313,7 +277,7 @@ t.test('flatteners that populate flat.omit array', t => { obj.production = true obj.include = ['dev'] - definitions.production.flatten('production', obj, flat) + mockDefs().production.flatten('production', obj, flat) t.strictSame(obj, { production: true, include: ['dev'], @@ -327,7 +291,7 @@ t.test('flatteners that populate flat.omit array', t => { t.test('dev', t => { const flat = {} const obj = { dev: true } - definitions.dev.flatten('dev', obj, flat) + mockDefs().dev.flatten('dev', obj, flat) t.strictSame(obj, { dev: true, omit: [], @@ -342,10 +306,10 @@ t.test('flatteners that populate flat.omit array', t => { t.test('cache-max', t => { const flat = {} const obj = { 'cache-max': 10342 } - definitions['cache-max'].flatten('cache-max', obj, flat) + mockDefs()['cache-max'].flatten('cache-max', obj, flat) t.strictSame(flat, {}, 'no effect if not <= 0') obj['cache-max'] = 0 - definitions['cache-max'].flatten('cache-max', obj, flat) + mockDefs()['cache-max'].flatten('cache-max', obj, flat) t.strictSame(flat, { preferOnline: true }, 'preferOnline if <= 0') t.end() }) @@ -353,10 +317,10 @@ t.test('cache-max', t => { t.test('cache-min', t => { const flat = {} const obj = { 'cache-min': 123 } - definitions['cache-min'].flatten('cache-min', obj, flat) + mockDefs()['cache-min'].flatten('cache-min', obj, flat) t.strictSame(flat, {}, 'no effect if not >= 9999') obj['cache-min'] = 9999 - definitions['cache-min'].flatten('cache-min', obj, flat) + mockDefs()['cache-min'].flatten('cache-min', obj, flat) t.strictSame(flat, { preferOffline: true }, 'preferOffline if >=9999') t.end() }) @@ -367,44 +331,44 @@ t.test('color', t => { const flat = {} const obj = { color: 'always' } - definitions.color.flatten('color', obj, flat) + mockDefs().color.flatten('color', obj, flat) t.strictSame(flat, { color: true, logColor: true }, 'true when --color=always') obj.color = false - definitions.color.flatten('color', obj, flat) + mockDefs().color.flatten('color', obj, flat) t.strictSame(flat, { color: false, logColor: false }, 'true when --no-color') setTTY('stdout', false) setTTY('stderr', false) obj.color = true - definitions.color.flatten('color', obj, flat) + mockDefs().color.flatten('color', obj, flat) t.strictSame(flat, { color: false, logColor: false }, 'no color when stdout not tty') setTTY('stdout', true) - definitions.color.flatten('color', obj, flat) + mockDefs().color.flatten('color', obj, flat) t.strictSame(flat, { color: true, logColor: false }, '--color turns on color when stdout is tty') setTTY('stdout', false) obj.color = true - definitions.color.flatten('color', obj, flat) + mockDefs().color.flatten('color', obj, flat) t.strictSame(flat, { color: false, logColor: false }, 'no color when stderr not tty') setTTY('stderr', true) - definitions.color.flatten('color', obj, flat) + mockDefs().color.flatten('color', obj, flat) t.strictSame(flat, { color: false, logColor: true }, '--color turns on color when stderr is tty') setTTY('stderr', false) const setColor = (value) => mockGlobals(t, { 'process.env.NO_COLOR': value }) setColor(undefined) - const defsAllowColor = t.mock(defpath) + const defsAllowColor = mockDefs() t.equal(defsAllowColor.color.default, true, 'default true when no NO_COLOR env') setColor('0') - const defsNoColor0 = t.mock(defpath) + const defsNoColor0 = mockDefs() t.equal(defsNoColor0.color.default, true, 'default true when no NO_COLOR=0') setColor('1') - const defsNoColor1 = t.mock(defpath) + const defsNoColor1 = mockDefs() t.equal(defsNoColor1.color.default, false, 'default false when no NO_COLOR=1') t.end() @@ -418,19 +382,19 @@ t.test('progress', t => { const flat = {} - definitions.progress.flatten('progress', {}, flat) + mockDefs().progress.flatten('progress', {}, flat) t.strictSame(flat, { progress: false }) setEnv({ tty: true, term: 'notdumb' }) - definitions.progress.flatten('progress', { progress: true }, flat) + mockDefs().progress.flatten('progress', { progress: true }, flat) t.strictSame(flat, { progress: true }) setEnv({ tty: false, term: 'notdumb' }) - definitions.progress.flatten('progress', { progress: true }, flat) + mockDefs().progress.flatten('progress', { progress: true }, flat) t.strictSame(flat, { progress: false }) setEnv({ tty: true, term: 'dumb' }) - definitions.progress.flatten('progress', { progress: true }, flat) + mockDefs().progress.flatten('progress', { progress: true }, flat) t.strictSame(flat, { progress: false }) t.end() @@ -449,7 +413,7 @@ t.test('retry options', t => { const msg = `${config} -> retry.${option}` const flat = {} obj[config] = 99 - definitions[config].flatten(config, obj, flat) + mockDefs()[config].flatten(config, obj, flat) t.strictSame(flat, { retry: { [option]: 99 } }, msg) delete obj[config] } @@ -477,14 +441,14 @@ t.test('search options', t => { const msg = `${config} -> search.${option}` const flat = {} obj[config] = vals[option] - definitions[config].flatten(config, obj, flat) + mockDefs()[config].flatten(config, obj, flat) t.strictSame(flat, { search: { limit: 20, [option]: vals[option] } }, msg) delete obj[config] } const flat = {} obj.searchopts = 'a=b&b=c' - definitions.searchopts.flatten('searchopts', obj, flat) + mockDefs().searchopts.flatten('searchopts', obj, flat) t.strictSame(flat, { search: { limit: 20, @@ -502,7 +466,7 @@ t.test('search options', t => { t.test('noProxy - array', t => { const obj = { noproxy: ['1.2.3.4,2.3.4.5', '3.4.5.6'] } const flat = {} - definitions.noproxy.flatten('noproxy', obj, flat) + mockDefs().noproxy.flatten('noproxy', obj, flat) t.strictSame(flat, { noProxy: '1.2.3.4,2.3.4.5,3.4.5.6' }) t.end() }) @@ -510,7 +474,7 @@ t.test('noProxy - array', t => { t.test('noProxy - string', t => { const obj = { noproxy: '1.2.3.4,2.3.4.5,3.4.5.6' } const flat = {} - definitions.noproxy.flatten('noproxy', obj, flat) + mockDefs().noproxy.flatten('noproxy', obj, flat) t.strictSame(flat, { noProxy: '1.2.3.4,2.3.4.5,3.4.5.6' }) t.end() }) @@ -518,7 +482,7 @@ t.test('noProxy - string', t => { t.test('maxSockets', t => { const obj = { maxsockets: 123 } const flat = {} - definitions.maxsockets.flatten('maxsockets', obj, flat) + mockDefs().maxsockets.flatten('maxsockets', obj, flat) t.strictSame(flat, { maxSockets: 123 }) t.end() }) @@ -526,11 +490,11 @@ t.test('maxSockets', t => { t.test('scope', t => { const obj = { scope: 'asdf' } const flat = {} - definitions.scope.flatten('scope', obj, flat) + mockDefs().scope.flatten('scope', obj, flat) t.strictSame(flat, { scope: '@asdf', projectScope: '@asdf' }, 'prepend @ if needed') obj.scope = '@asdf' - definitions.scope.flatten('scope', obj, flat) + mockDefs().scope.flatten('scope', obj, flat) t.strictSame(flat, { scope: '@asdf', projectScope: '@asdf' }, 'leave untouched if has @') t.end() @@ -539,10 +503,10 @@ t.test('scope', t => { t.test('strictSSL', t => { const obj = { 'strict-ssl': false } const flat = {} - definitions['strict-ssl'].flatten('strict-ssl', obj, flat) + mockDefs()['strict-ssl'].flatten('strict-ssl', obj, flat) t.strictSame(flat, { strictSSL: false }) obj['strict-ssl'] = true - definitions['strict-ssl'].flatten('strict-ssl', obj, flat) + mockDefs()['strict-ssl'].flatten('strict-ssl', obj, flat) t.strictSame(flat, { strictSSL: true }) t.end() }) @@ -550,18 +514,18 @@ t.test('strictSSL', t => { t.test('shrinkwrap/package-lock', t => { const obj = { shrinkwrap: false } const flat = {} - definitions.shrinkwrap.flatten('shrinkwrap', obj, flat) + mockDefs().shrinkwrap.flatten('shrinkwrap', obj, flat) t.strictSame(flat, { packageLock: false }) obj.shrinkwrap = true - definitions.shrinkwrap.flatten('shrinkwrap', obj, flat) + mockDefs().shrinkwrap.flatten('shrinkwrap', obj, flat) t.strictSame(flat, { packageLock: true }) delete obj.shrinkwrap obj['package-lock'] = false - definitions['package-lock'].flatten('package-lock', obj, flat) + mockDefs()['package-lock'].flatten('package-lock', obj, flat) t.strictSame(flat, { packageLock: false }) obj['package-lock'] = true - definitions['package-lock'].flatten('package-lock', obj, flat) + mockDefs()['package-lock'].flatten('package-lock', obj, flat) t.strictSame(flat, { packageLock: true }) t.end() @@ -570,13 +534,13 @@ t.test('shrinkwrap/package-lock', t => { t.test('scriptShell', t => { const obj = { 'script-shell': null } const flat = {} - definitions['script-shell'].flatten('script-shell', obj, flat) + mockDefs()['script-shell'].flatten('script-shell', obj, flat) t.ok(Object.prototype.hasOwnProperty.call(flat, 'scriptShell'), 'should set it to undefined explicitly') t.strictSame(flat, { scriptShell: undefined }, 'no other fields') obj['script-shell'] = 'asdf' - definitions['script-shell'].flatten('script-shell', obj, flat) + mockDefs()['script-shell'].flatten('script-shell', obj, flat) t.strictSame(flat, { scriptShell: 'asdf' }, 'sets if not falsey') t.end() @@ -585,7 +549,7 @@ t.test('scriptShell', t => { t.test('defaultTag', t => { const obj = { tag: 'next' } const flat = {} - definitions.tag.flatten('tag', obj, flat) + mockDefs().tag.flatten('tag', obj, flat) t.strictSame(flat, { defaultTag: 'next' }) t.end() }) @@ -593,7 +557,7 @@ t.test('defaultTag', t => { t.test('timeout', t => { const obj = { 'fetch-timeout': 123 } const flat = {} - definitions['fetch-timeout'].flatten('fetch-timeout', obj, flat) + mockDefs()['fetch-timeout'].flatten('fetch-timeout', obj, flat) t.strictSame(flat, { timeout: 123 }) t.end() }) @@ -602,16 +566,16 @@ t.test('saveType', t => { t.test('save-prod', t => { const obj = { 'save-prod': false } const flat = {} - definitions['save-prod'].flatten('save-prod', obj, flat) + mockDefs()['save-prod'].flatten('save-prod', obj, flat) t.strictSame(flat, {}, 'no effect if false and missing') flat.saveType = 'prod' - definitions['save-prod'].flatten('save-prod', obj, flat) + mockDefs()['save-prod'].flatten('save-prod', obj, flat) t.strictSame(flat, {}, 'remove if false and set to prod') flat.saveType = 'dev' - definitions['save-prod'].flatten('save-prod', obj, flat) + mockDefs()['save-prod'].flatten('save-prod', obj, flat) t.strictSame(flat, { saveType: 'dev' }, 'ignore if false and not already prod') obj['save-prod'] = true - definitions['save-prod'].flatten('save-prod', obj, flat) + mockDefs()['save-prod'].flatten('save-prod', obj, flat) t.strictSame(flat, { saveType: 'prod' }, 'set to prod if true') t.end() }) @@ -619,17 +583,17 @@ t.test('saveType', t => { t.test('save-dev', t => { const obj = { 'save-dev': false } const flat = {} - definitions['save-dev'].flatten('save-dev', obj, flat) + mockDefs()['save-dev'].flatten('save-dev', obj, flat) t.strictSame(flat, {}, 'no effect if false and missing') flat.saveType = 'dev' - definitions['save-dev'].flatten('save-dev', obj, flat) + mockDefs()['save-dev'].flatten('save-dev', obj, flat) t.strictSame(flat, {}, 'remove if false and set to dev') flat.saveType = 'prod' obj['save-dev'] = false - definitions['save-dev'].flatten('save-dev', obj, flat) + mockDefs()['save-dev'].flatten('save-dev', obj, flat) t.strictSame(flat, { saveType: 'prod' }, 'ignore if false and not already dev') obj['save-dev'] = true - definitions['save-dev'].flatten('save-dev', obj, flat) + mockDefs()['save-dev'].flatten('save-dev', obj, flat) t.strictSame(flat, { saveType: 'dev' }, 'set to dev if true') t.end() }) @@ -637,16 +601,16 @@ t.test('saveType', t => { t.test('save-bundle', t => { const obj = { 'save-bundle': true } const flat = {} - definitions['save-bundle'].flatten('save-bundle', obj, flat) + mockDefs()['save-bundle'].flatten('save-bundle', obj, flat) t.strictSame(flat, { saveBundle: true }, 'set the saveBundle flag') obj['save-bundle'] = false - definitions['save-bundle'].flatten('save-bundle', obj, flat) + mockDefs()['save-bundle'].flatten('save-bundle', obj, flat) t.strictSame(flat, { saveBundle: false }, 'unset the saveBundle flag') obj['save-bundle'] = true obj['save-peer'] = true - definitions['save-bundle'].flatten('save-bundle', obj, flat) + mockDefs()['save-bundle'].flatten('save-bundle', obj, flat) t.strictSame(flat, { saveBundle: false }, 'false if save-peer is set') t.end() @@ -655,27 +619,27 @@ t.test('saveType', t => { t.test('save-peer', t => { const obj = { 'save-peer': false } const flat = {} - definitions['save-peer'].flatten('save-peer', obj, flat) + mockDefs()['save-peer'].flatten('save-peer', obj, flat) t.strictSame(flat, {}, 'no effect if false and not yet set') obj['save-peer'] = true - definitions['save-peer'].flatten('save-peer', obj, flat) + mockDefs()['save-peer'].flatten('save-peer', obj, flat) t.strictSame(flat, { saveType: 'peer' }, 'set saveType to peer if unset') flat.saveType = 'optional' - definitions['save-peer'].flatten('save-peer', obj, flat) + mockDefs()['save-peer'].flatten('save-peer', obj, flat) t.strictSame(flat, { saveType: 'peerOptional' }, 'set to peerOptional if optional already') - definitions['save-peer'].flatten('save-peer', obj, flat) + mockDefs()['save-peer'].flatten('save-peer', obj, flat) t.strictSame(flat, { saveType: 'peerOptional' }, 'no effect if already peerOptional') obj['save-peer'] = false - definitions['save-peer'].flatten('save-peer', obj, flat) + mockDefs()['save-peer'].flatten('save-peer', obj, flat) t.strictSame(flat, { saveType: 'optional' }, 'switch peerOptional to optional if false') obj['save-peer'] = false flat.saveType = 'peer' - definitions['save-peer'].flatten('save-peer', obj, flat) + mockDefs()['save-peer'].flatten('save-peer', obj, flat) t.strictSame(flat, {}, 'remove saveType if peer and setting false') t.end() @@ -684,26 +648,26 @@ t.test('saveType', t => { t.test('save-optional', t => { const obj = { 'save-optional': false } const flat = {} - definitions['save-optional'].flatten('save-optional', obj, flat) + mockDefs()['save-optional'].flatten('save-optional', obj, flat) t.strictSame(flat, {}, 'no effect if false and not yet set') obj['save-optional'] = true - definitions['save-optional'].flatten('save-optional', obj, flat) + mockDefs()['save-optional'].flatten('save-optional', obj, flat) t.strictSame(flat, { saveType: 'optional' }, 'set saveType to optional if unset') flat.saveType = 'peer' - definitions['save-optional'].flatten('save-optional', obj, flat) + mockDefs()['save-optional'].flatten('save-optional', obj, flat) t.strictSame(flat, { saveType: 'peerOptional' }, 'set to peerOptional if peer already') - definitions['save-optional'].flatten('save-optional', obj, flat) + mockDefs()['save-optional'].flatten('save-optional', obj, flat) t.strictSame(flat, { saveType: 'peerOptional' }, 'no effect if already peerOptional') obj['save-optional'] = false - definitions['save-optional'].flatten('save-optional', obj, flat) + mockDefs()['save-optional'].flatten('save-optional', obj, flat) t.strictSame(flat, { saveType: 'peer' }, 'switch peerOptional to peer if false') flat.saveType = 'optional' - definitions['save-optional'].flatten('save-optional', obj, flat) + mockDefs()['save-optional'].flatten('save-optional', obj, flat) t.strictSame(flat, {}, 'remove saveType if optional and setting false') t.end() @@ -729,13 +693,13 @@ YYYY\r const obj = {} const flat = {} - definitions.cafile.flatten('cafile', obj, flat) + mockDefs().cafile.flatten('cafile', obj, flat) t.strictSame(flat, {}, 'no effect if no cafile set') obj.cafile = resolve(path, 'no/cafile/here') - definitions.cafile.flatten('cafile', obj, flat) + mockDefs().cafile.flatten('cafile', obj, flat) t.strictSame(flat, {}, 'no effect if cafile not found') obj.cafile = cafile - definitions.cafile.flatten('cafile', obj, flat) + mockDefs().cafile.flatten('cafile', obj, flat) t.strictSame(flat, { ca: [ '-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----', @@ -744,7 +708,7 @@ YYYY\r }) t.test('error other than ENOENT gets thrown', t => { const poo = new Error('poo') - const defnReadFileThrows = t.mock(defpath, { + const defnReadFileThrows = mockDefs({ fs: { ...require('fs'), readFileSync: () => { @@ -760,10 +724,10 @@ YYYY\r }) t.test('detect CI', t => { - const defnNoCI = t.mock(defpath, { + const defnNoCI = mockDefs({ '@npmcli/ci-detect': () => false, }) - const defnCIFoo = t.mock(defpath, { + const defnCIFoo = mockDefs({ '@npmcli/ci-detect': () => 'foo', }) t.equal(defnNoCI['ci-name'].default, null, 'null when not in CI') @@ -773,39 +737,37 @@ t.test('detect CI', t => { t.test('user-agent', t => { const obj = { - 'user-agent': definitions['user-agent'].default, - 'npm-version': '1.2.3', - 'node-version': '9.8.7', + 'user-agent': mockDefs()['user-agent'].default, } const flat = {} - const expectNoCI = `npm/1.2.3 node/9.8.7 ` + + const expectNoCI = `npm/${pkg.version} node/${process.version} ` + `${process.platform} ${process.arch} workspaces/false` - definitions['user-agent'].flatten('user-agent', obj, flat) + mockDefs()['user-agent'].flatten('user-agent', obj, flat) t.equal(flat.userAgent, expectNoCI) t.equal(process.env.npm_config_user_agent, flat.userAgent, 'npm_user_config environment is set') t.not(obj['user-agent'], flat.userAgent, 'config user-agent template is not translated') obj['ci-name'] = 'foo' - obj['user-agent'] = definitions['user-agent'].default + obj['user-agent'] = mockDefs()['user-agent'].default const expectCI = `${expectNoCI} ci/foo` - definitions['user-agent'].flatten('user-agent', obj, flat) + mockDefs()['user-agent'].flatten('user-agent', obj, flat) t.equal(flat.userAgent, expectCI) t.equal(process.env.npm_config_user_agent, flat.userAgent, 'npm_user_config environment is set') t.not(obj['user-agent'], flat.userAgent, 'config user-agent template is not translated') delete obj['ci-name'] obj.workspaces = true - obj['user-agent'] = definitions['user-agent'].default + obj['user-agent'] = mockDefs()['user-agent'].default const expectWorkspaces = expectNoCI.replace('workspaces/false', 'workspaces/true') - definitions['user-agent'].flatten('user-agent', obj, flat) + mockDefs()['user-agent'].flatten('user-agent', obj, flat) t.equal(flat.userAgent, expectWorkspaces) t.equal(process.env.npm_config_user_agent, flat.userAgent, 'npm_user_config environment is set') t.not(obj['user-agent'], flat.userAgent, 'config user-agent template is not translated') delete obj.workspaces obj.workspace = ['foo'] - obj['user-agent'] = definitions['user-agent'].default - definitions['user-agent'].flatten('user-agent', obj, flat) + obj['user-agent'] = mockDefs()['user-agent'].default + mockDefs()['user-agent'].flatten('user-agent', obj, flat) t.equal(flat.userAgent, expectWorkspaces) t.equal(process.env.npm_config_user_agent, flat.userAgent, 'npm_user_config environment is set') t.not(obj['user-agent'], flat.userAgent, 'config user-agent template is not translated') @@ -818,10 +780,10 @@ t.test('save-prefix', t => { 'save-prefix': '~1.2.3', } const flat = {} - definitions['save-prefix'] + mockDefs()['save-prefix'] .flatten('save-prefix', { ...obj, 'save-exact': true }, flat) t.strictSame(flat, { savePrefix: '' }) - definitions['save-prefix'] + mockDefs()['save-prefix'] .flatten('save-prefix', { ...obj, 'save-exact': false }, flat) t.strictSame(flat, { savePrefix: '~1.2.3' }) t.end() @@ -833,10 +795,10 @@ t.test('save-exact', t => { 'save-prefix': '~1.2.3', } const flat = {} - definitions['save-exact'] + mockDefs()['save-exact'] .flatten('save-exact', { ...obj, 'save-exact': true }, flat) t.strictSame(flat, { savePrefix: '' }) - definitions['save-exact'] + mockDefs()['save-exact'] .flatten('save-exact', { ...obj, 'save-exact': false }, flat) t.strictSame(flat, { savePrefix: '~1.2.3' }) t.end() @@ -849,8 +811,8 @@ t.test('location', t => { } const flat = {} // the global flattener is what sets location, so run that - definitions.global.flatten('global', obj, flat) - definitions.location.flatten('location', obj, flat) + mockDefs().global.flatten('global', obj, flat) + mockDefs().location.flatten('location', obj, flat) // global = true sets location in both places to global t.strictSame(flat, { global: true, location: 'global' }) // location here is still 'user' because flattening doesn't modify the object @@ -861,8 +823,8 @@ t.test('location', t => { delete flat.global delete flat.location - definitions.global.flatten('global', obj, flat) - definitions.location.flatten('location', obj, flat) + mockDefs().global.flatten('global', obj, flat) + mockDefs().location.flatten('location', obj, flat) // global = false leaves location unaltered t.strictSame(flat, { global: false, location: 'user' }) t.strictSame(obj, { global: false, location: 'user' }) @@ -876,16 +838,16 @@ t.test('package-lock-only', t => { } const flat = {} - definitions['package-lock-only'].flatten('package-lock-only', obj, flat) - definitions['package-lock'].flatten('package-lock', obj, flat) + mockDefs()['package-lock-only'].flatten('package-lock-only', obj, flat) + mockDefs()['package-lock'].flatten('package-lock', obj, flat) t.strictSame(flat, { packageLock: true, packageLockOnly: true }) obj['package-lock-only'] = false delete flat.packageLock delete flat.packageLockOnly - definitions['package-lock-only'].flatten('package-lock-only', obj, flat) - definitions['package-lock'].flatten('package-lock', obj, flat) + mockDefs()['package-lock-only'].flatten('package-lock-only', obj, flat) + mockDefs()['package-lock'].flatten('package-lock', obj, flat) t.strictSame(flat, { packageLock: false, packageLockOnly: false }) t.end() }) @@ -893,10 +855,10 @@ t.test('package-lock-only', t => { t.test('workspaces', t => { const obj = { workspaces: true, - 'user-agent': definitions['user-agent'].default, + 'user-agent': mockDefs()['user-agent'].default, } const flat = {} - definitions.workspaces.flatten('workspaces', obj, flat) + mockDefs().workspaces.flatten('workspaces', obj, flat) t.match(flat.userAgent, /workspaces\/true/) t.end() }) @@ -904,10 +866,10 @@ t.test('workspaces', t => { t.test('workspace', t => { const obj = { workspace: ['workspace-a'], - 'user-agent': definitions['user-agent'].default, + 'user-agent': mockDefs()['user-agent'].default, } const flat = {} - definitions.workspace.flatten('workspaces', obj, flat) + mockDefs().workspace.flatten('workspaces', obj, flat) t.match(flat.userAgent, /workspaces\/true/) t.end() }) @@ -915,23 +877,23 @@ t.test('workspace', t => { t.test('workspaces derived', t => { const obj = { workspaces: ['a'], - 'user-agent': definitions['user-agent'].default, + 'user-agent': mockDefs()['user-agent'].default, } const flat = {} - definitions.workspaces.flatten('workspaces', obj, flat) + mockDefs().workspaces.flatten('workspaces', obj, flat) t.equal(flat.workspacesEnabled, true) obj.workspaces = null - definitions.workspaces.flatten('workspaces', obj, flat) + mockDefs().workspaces.flatten('workspaces', obj, flat) t.equal(flat.workspacesEnabled, true) obj.workspaces = false - definitions.workspaces.flatten('workspaces', obj, flat) + mockDefs().workspaces.flatten('workspaces', obj, flat) t.equal(flat.workspacesEnabled, false) t.end() }) t.test('lockfile version', t => { const flat = {} - definitions['lockfile-version'].flatten('lockfile-version', { + mockDefs()['lockfile-version'].flatten('lockfile-version', { 'lockfile-version': '3', }, flat) t.match(flat.lockfileVersion, 3, 'flattens to a number') @@ -940,9 +902,25 @@ t.test('lockfile version', t => { t.test('loglevel silent', t => { const flat = {} - definitions.loglevel.flatten('loglevel', { + mockDefs().loglevel.flatten('loglevel', { loglevel: 'silent', }, flat) t.match(flat.silent, true, 'flattens to assign silent') t.end() }) + +t.test('remap legacy-bundling', t => { + const obj = { 'legacy-bundling': true } + const flat = {} + mockDefs()['legacy-bundling'].flatten('legacy-bundling', obj, flat) + t.strictSame(flat, { installStrategy: 'nested' }) + t.end() +}) + +t.test('remap global-style', t => { + const obj = { 'global-style': true } + const flat = {} + mockDefs()['global-style'].flatten('global-style', obj, flat) + t.strictSame(flat, { installStrategy: 'shallow' }) + t.end() +}) diff --git a/test/lib/utils/config/describe-all.js b/test/lib/utils/config/describe-all.js deleted file mode 100644 index 814d92ac95970..0000000000000 --- a/test/lib/utils/config/describe-all.js +++ /dev/null @@ -1,6 +0,0 @@ -const t = require('tap') -const describeAll = require('../../../../lib/utils/config/describe-all.js') -// this basically ends up being a duplicate of the helpdoc dumped into -// a snapshot, but it verifies that we get the same help output on every -// platform where we run CI. -t.matchSnapshot(describeAll()) diff --git a/test/lib/utils/config/flatten.js b/test/lib/utils/config/flatten.js deleted file mode 100644 index 7e13563920888..0000000000000 --- a/test/lib/utils/config/flatten.js +++ /dev/null @@ -1,38 +0,0 @@ -const t = require('tap') -const flatten = require('../../../../lib/utils/config/flatten.js') - -require.main.filename = '/path/to/npm' -delete process.env.NODE -process.execPath = '/path/to/node' - -const obj = { - 'save-exact': true, - 'save-prefix': 'ignored', - 'save-dev': true, - '@foobar:registry': 'https://foo.bar.com/', - '//foo.bar.com:_authToken': 'foobarbazquuxasdf', - userconfig: '/path/to/.npmrc', -} - -const flat = flatten(obj) -t.strictSame(flat, { - saveType: 'dev', - savePrefix: '', - '@foobar:registry': 'https://foo.bar.com/', - '//foo.bar.com:_authToken': 'foobarbazquuxasdf', - npmBin: '/path/to/npm', - nodeBin: '/path/to/node', - hashAlgorithm: 'sha1', -}) - -// now flatten something else on top of it. -process.env.NODE = '/usr/local/bin/node.exe' -flatten({ 'save-dev': false }, flat) -t.strictSame(flat, { - savePrefix: '', - '@foobar:registry': 'https://foo.bar.com/', - '//foo.bar.com:_authToken': 'foobarbazquuxasdf', - npmBin: '/path/to/npm', - nodeBin: '/usr/local/bin/node.exe', - hashAlgorithm: 'sha1', -}) diff --git a/test/lib/utils/config/index.js b/test/lib/utils/config/index.js index 75d72e784fd89..90931a96d7aa2 100644 --- a/test/lib/utils/config/index.js +++ b/test/lib/utils/config/index.js @@ -1,24 +1,63 @@ const t = require('tap') const config = require('../../../../lib/utils/config/index.js') -const flatten = require('../../../../lib/utils/config/flatten.js') const definitions = require('../../../../lib/utils/config/definitions.js') -const describeAll = require('../../../../lib/utils/config/describe-all.js') -t.matchSnapshot(config.shorthands, 'shorthands') +const mockGlobals = require('../../../fixtures/mock-globals.js') -// just spot check a few of these to show that we got defaults assembled -t.match(config.defaults, { - registry: definitions.registry.default, - 'init-module': definitions['init-module'].default, +t.test('defaults', t => { + // just spot check a few of these to show that we got defaults assembled + t.match(config.defaults, { + registry: definitions.registry.default, + 'init-module': definitions['init-module'].default, + }) + + // is a getter, so changes are reflected + definitions.registry.default = 'https://example.com/' + t.strictSame(config.defaults.registry, 'https://example.com/') + + t.end() }) -// is a getter, so changes are reflected -definitions.registry.default = 'https://example.com/' -t.strictSame(config.defaults.registry, 'https://example.com/') +t.test('flatten', t => { + // cant use mockGlobals since its not a configurable property + require.main.filename = '/path/to/npm' + mockGlobals(t, { process: { execPath: '/path/to/node', 'env.NODE': undefined } }) + + const obj = { + 'save-exact': true, + 'save-prefix': 'ignored', + 'save-dev': true, + '@foobar:registry': 'https://foo.bar.com/', + '//foo.bar.com:_authToken': 'foobarbazquuxasdf', + userconfig: '/path/to/.npmrc', + } + + const flat = config.flatten(obj) + + t.strictSame(flat, { + saveType: 'dev', + savePrefix: '', + '@foobar:registry': 'https://foo.bar.com/', + '//foo.bar.com:_authToken': 'foobarbazquuxasdf', + npmBin: '/path/to/npm', + nodeBin: '/path/to/node', + hashAlgorithm: 'sha1', + }) + + mockGlobals(t, { + 'process.env.NODE': '/usr/local/bin/node.exe', + }) + + // now flatten something else on top of it. + config.flatten({ 'save-dev': false }, flat) + + t.strictSame(flat, { + savePrefix: '', + '@foobar:registry': 'https://foo.bar.com/', + '//foo.bar.com:_authToken': 'foobarbazquuxasdf', + npmBin: '/path/to/npm', + nodeBin: '/usr/local/bin/node.exe', + hashAlgorithm: 'sha1', + }) -t.strictSame(config, { - defaults: config.defaults, - shorthands: config.shorthands, - flatten, - definitions, - describeAll, + t.end() }) diff --git a/test/lib/utils/display.js b/test/lib/utils/display.js index 30cd2cc270dc5..c7332bce8e249 100644 --- a/test/lib/utils/display.js +++ b/test/lib/utils/display.js @@ -18,7 +18,7 @@ t.test('setup', async (t) => { const { display } = mockDisplay(t) display.load({ timing: true, loglevel: 'notice' }) - t.equal(log.level, 'timing') + t.equal(log.level, 'notice') display.load({ timing: false, loglevel: 'notice' }) t.equal(log.level, 'notice') diff --git a/test/lib/utils/exit-handler.js b/test/lib/utils/exit-handler.js index 7d2e7e061c365..d22ec4dd141a8 100644 --- a/test/lib/utils/exit-handler.js +++ b/test/lib/utils/exit-handler.js @@ -1,6 +1,7 @@ const t = require('tap') const os = require('os') -const fs = require('@npmcli/fs') +const fs = require('fs') +const fsMiniPass = require('fs-minipass') const { join } = require('path') const EventEmitter = require('events') const { format } = require('../../../lib/utils/log-file') @@ -207,7 +208,7 @@ t.test('exit handler called - no npm with error without stack', async (t) => { }) t.test('console.log output using --json', async (t) => { - const { exitHandler, outputErrors } = await mockExitHandler(t, { + const { exitHandler, outputs } = await mockExitHandler(t, { config: { json: true }, }) @@ -215,7 +216,7 @@ t.test('console.log output using --json', async (t) => { t.equal(process.exitCode, 1) t.same( - JSON.parse(outputErrors[0]), + JSON.parse(outputs[0]), { error: { code: 'EBADTHING', // should default error code to E[A-Z]+ @@ -227,6 +228,50 @@ t.test('console.log output using --json', async (t) => { ) }) +t.test('merges output buffers errors with --json', async (t) => { + const { exitHandler, outputs, npm } = await mockExitHandler(t, { + config: { json: true }, + }) + + npm.outputBuffer({ output_data: 1 }) + npm.outputBuffer(JSON.stringify({ more_data: 2 })) + npm.outputBuffer('not json, will be ignored') + + await exitHandler(err('Error: EBADTHING Something happened')) + + t.equal(process.exitCode, 1) + t.same( + JSON.parse(outputs[0]), + { + output_data: 1, + more_data: 2, + error: { + code: 'EBADTHING', // should default error code to E[A-Z]+ + summary: 'Error: EBADTHING Something happened', + detail: 'Error: EBADTHING Something happened', + }, + }, + 'should output expected json output' + ) +}) + +t.test('output buffer without json', async (t) => { + const { exitHandler, outputs, npm, logs } = await mockExitHandler(t) + + npm.outputBuffer('output_data') + npm.outputBuffer('more_data') + + await exitHandler(err('Error: EBADTHING Something happened')) + + t.equal(process.exitCode, 1) + t.same( + outputs, + [['output_data'], ['more_data']], + 'should output expected output' + ) + t.match(logs.error, [['code', 'EBADTHING']]) +}) + t.test('throw a non-error obj', async (t) => { const { exitHandler, logs } = await mockExitHandler(t) @@ -291,23 +336,60 @@ t.test('no logs dir', async (t) => { ]) }) -t.test('log file error', async (t) => { +t.test('timers fail to write', async (t) => { + // we want the fs.writeFileSync in the Timers class to fail + const mockTimers = t.mock('../../../lib/utils/timers.js', { + fs: { + ...fs, + writeFileSync: (file, ...rest) => { + if (file.includes('LOGS_DIR')) { + throw new Error('err') + } + + return fs.writeFileSync(file, ...rest) + }, + }, + }) + const { exitHandler, logs } = await mockExitHandler(t, { config: { 'logs-dir': 'LOGS_DIR', timing: true, }, mocks: { - '@npmcli/fs': { - mkdir: async (dir) => { - if (dir.includes('LOGS_DIR')) { - throw new Error('err') - } - }, + // note, this is relative to test/fixtures/mock-npm.js not this file + '../../lib/utils/timers.js': mockTimers, + }, + }) + + await exitHandler(new Error()) + + t.match(logs.error.filter(([t]) => t === ''), [['', `error writing to the directory`]]) +}) + +t.test('log files fail to write', async (t) => { + // we want the fsMiniPass.WriteStreamSync in the LogFile class to fail + const mockLogFile = t.mock('../../../lib/utils/log-file.js', { + 'fs-minipass': { + ...fsMiniPass, + WriteStreamSync: (file, ...rest) => { + if (file.includes('LOGS_DIR')) { + throw new Error('err') + } }, }, }) + const { exitHandler, logs } = await mockExitHandler(t, { + config: { + 'logs-dir': 'LOGS_DIR', + }, + mocks: { + // note, this is relative to test/fixtures/mock-npm.js not this file + '../../lib/utils/log-file.js': mockLogFile, + }, + }) + await exitHandler(new Error()) t.match(logs.error.filter(([t]) => t === ''), [['', `error writing to the directory`]]) @@ -342,7 +424,7 @@ t.test('files from error message with error', async (t) => { ['error-file.txt', '# error file content'], ], mocks: { - '@npmcli/fs': { + fs: { ...fs, writeFileSync: (dir) => { if (dir.includes('LOGS_DIR') && dir.endsWith('error-file.txt')) { diff --git a/workspaces/arborist/CHANGELOG.md b/workspaces/arborist/CHANGELOG.md index af18d99fef9cb..4be4d348d35bd 100644 --- a/workspaces/arborist/CHANGELOG.md +++ b/workspaces/arborist/CHANGELOG.md @@ -1,5 +1,29 @@ # Changelog +## [6.0.0-pre.5](https://github.com/npm/cli/compare/arborist-v6.0.0-pre.4...arborist-v6.0.0-pre.5) (2022-10-19) + +### ⚠️ BREAKING CHANGES + +* deprecate boolean install flags in favor of `--install-strategy` + * deprecate --global-style, --global now sets --install-strategy=shallow + * deprecate --legacy-bundling, now sets --install-strategy=nested +* this package no longer attempts to change file ownership automatically + +### Features + +* [`de2d33f`](https://github.com/npm/cli/commit/de2d33f3ed42e187803bdd31db4f7a12f08f353c) add --install-strategy=hoisted|nested|shallow, deprecate --global-style, --legacy-bundling (#5709) (@fritzy) +* [`475e9b6`](https://github.com/npm/cli/commit/475e9b6c0c978a104dd2ee47bde22b0a031a95f9) [#5703](https://github.com/npm/cli/pull/5703) do not alter file ownership (@nlf) + +### Bug Fixes + +* [`1afe5ba`](https://github.com/npm/cli/commit/1afe5ba9647d1f0f55bf0a4bace543965d05daed) account for new npm-package-arg behavior (@wraithgar) + +### Dependencies + +* [`88137a3`](https://github.com/npm/cli/commit/88137a329c8ad418db265dd465768a7cf5ebccb1) `npmlog@7.0.1` +* [`2008ea6`](https://github.com/npm/cli/commit/2008ea6a807acbd97912799adfe97f276202cea6) `npm-package-arg@10.0.0`, `pacote@15.0.2` +* [`aa01072`](https://github.com/npm/cli/commit/aa010722996ef6de46e1bb937c6f8a94dc2844fa) [#5707](https://github.com/npm/cli/pull/5707) update the following dependencies + ## [6.0.0-pre.4](https://github.com/npm/cli/compare/arborist-v6.0.0-pre.3...arborist-v6.0.0-pre.4) (2022-10-05) ### Features diff --git a/workspaces/arborist/bin/lib/logging.js b/workspaces/arborist/bin/lib/logging.js index 8b04d6370e66c..ffb5544b21463 100644 --- a/workspaces/arborist/bin/lib/logging.js +++ b/workspaces/arborist/bin/lib/logging.js @@ -1,5 +1,4 @@ const log = require('proc-log') -const mkdirp = require('mkdirp') const fs = require('fs') const { dirname } = require('path') const os = require('os') @@ -70,7 +69,7 @@ if (options.loglevel !== 'silent') { if (options.logfile) { log.silly('logfile', options.logfile) - mkdirp.sync(dirname(options.logfile)) + fs.mkdirSync(dirname(options.logfile), { recursive: true }) const fd = fs.openSync(options.logfile, 'a') addLogListener((str) => fs.writeSync(fd, str)) } diff --git a/workspaces/arborist/docs/reify.md b/workspaces/arborist/docs/reify.md index 15b04726722ba..ac607ef842e0c 100644 --- a/workspaces/arborist/docs/reify.md +++ b/workspaces/arborist/docs/reify.md @@ -87,7 +87,7 @@ Fail: rename each retired `.${name}-hash` folder back to `${name}` ### step 2: create sparse tree -Now that the shallowest changing nodes are retired, `mkdirp` all leaf +Now that the shallowest changing nodes are retired, `mkdir` all leaf nodes. ``` diff --git a/workspaces/arborist/lib/add-rm-pkg-deps.js b/workspaces/arborist/lib/add-rm-pkg-deps.js index 59d5e32547c29..c5cdc097a9fab 100644 --- a/workspaces/arborist/lib/add-rm-pkg-deps.js +++ b/workspaces/arborist/lib/add-rm-pkg-deps.js @@ -35,8 +35,8 @@ const add = ({ pkg, add, saveBundle, saveType }) => { const depType = saveTypeMap.get(addSaveType) pkg[depType] = pkg[depType] || {} - if (rawSpec !== '' || pkg[depType][name] === undefined) { - pkg[depType][name] = rawSpec || '*' + if (rawSpec !== '*' || pkg[depType][name] === undefined) { + pkg[depType][name] = rawSpec } if (addSaveType === 'optional') { // Affordance for previous npm versions that require this behaviour diff --git a/workspaces/arborist/lib/arborist/build-ideal-tree.js b/workspaces/arborist/lib/arborist/build-ideal-tree.js index 4caf310d40d7e..afcb67903da6d 100644 --- a/workspaces/arborist/lib/arborist/build-ideal-tree.js +++ b/workspaces/arborist/lib/arborist/build-ideal-tree.js @@ -10,9 +10,7 @@ const { resolve, dirname } = require('path') const { promisify } = require('util') const treeCheck = require('../tree-check.js') const readdir = promisify(require('readdir-scoped-modules')) -const fs = require('fs') -const lstat = promisify(fs.lstat) -const readlink = promisify(fs.readlink) +const { lstat, readlink } = require('fs/promises') const { depth } = require('treeverse') const log = require('proc-log') @@ -48,7 +46,6 @@ const _flagsSuspect = Symbol.for('flagsSuspect') const _workspaces = Symbol.for('workspaces') const _prune = Symbol('prune') const _preferDedupe = Symbol('preferDedupe') -const _legacyBundling = Symbol('legacyBundling') const _parseSettings = Symbol('parseSettings') const _initTree = Symbol('initTree') const _applyUserRequests = Symbol('applyUserRequests') @@ -79,7 +76,7 @@ const _loadFailures = Symbol('loadFailures') const _pruneFailedOptional = Symbol('pruneFailedOptional') const _linkNodes = Symbol('linkNodes') const _follow = Symbol('follow') -const _globalStyle = Symbol('globalStyle') +const _installStrategy = Symbol('installStrategy') const _globalRootNode = Symbol('globalRootNode') const _usePackageLock = Symbol.for('usePackageLock') const _rpcache = Symbol.for('realpathCache') @@ -114,7 +111,7 @@ module.exports = cls => class IdealTreeBuilder extends cls { follow = false, force = false, global = false, - globalStyle = false, + installStrategy = 'hoisted', idealTree = null, includeWorkspaceRoot = false, installLinks = false, @@ -134,7 +131,7 @@ module.exports = cls => class IdealTreeBuilder extends cls { this[_usePackageLock] = packageLock this[_global] = !!global - this[_globalStyle] = this[_global] || globalStyle + this[_installStrategy] = global ? 'shallow' : installStrategy this[_follow] = !!follow if (this[_workspaces].length && this[_global]) { @@ -143,7 +140,6 @@ module.exports = cls => class IdealTreeBuilder extends cls { this[_explicitRequests] = new Set() this[_preferDedupe] = false - this[_legacyBundling] = false this[_depsSeen] = new Set() this[_depsQueue] = [] this[_currentDep] = null @@ -252,20 +248,18 @@ module.exports = cls => class IdealTreeBuilder extends cls { this[_complete] = !!options.complete this[_preferDedupe] = !!options.preferDedupe - this[_legacyBundling] = !!options.legacyBundling // validates list of update names, they must // be dep names only, no semver ranges are supported for (const name of update.names) { const spec = npa(name) const validationError = - new TypeError(`Update arguments must not contain package version specifiers - -Try using the package name instead, e.g: + new TypeError(`Update arguments must only contain package names, eg: npm update ${spec.name}`) validationError.code = 'EUPDATEARGS' - if (spec.fetchSpec !== 'latest') { + // If they gave us anything other than a bare package name + if (spec.raw !== spec.name) { throw validationError } } @@ -952,11 +946,10 @@ This is a one-time fix-up, please be patient... auditReport: this.auditReport, force: this[_force], preferDedupe: this[_preferDedupe], - legacyBundling: this[_legacyBundling], strictPeerDeps: this[_strictPeerDeps], installLinks: this.installLinks, legacyPeerDeps: this.legacyPeerDeps, - globalStyle: this[_globalStyle], + installStrategy: this[_installStrategy], })) const promises = [] diff --git a/workspaces/arborist/lib/arborist/index.js b/workspaces/arborist/lib/arborist/index.js index 6bffd843186ea..091e0b46574cc 100644 --- a/workspaces/arborist/lib/arborist/index.js +++ b/workspaces/arborist/lib/arborist/index.js @@ -76,6 +76,7 @@ class Arborist extends Base { workspacesEnabled: options.workspacesEnabled !== false, replaceRegistryHost: options.replaceRegistryHost, lockfileVersion: lockfileVersion(options.lockfileVersion), + installStrategy: options.global ? 'shallow' : (options.installStrategy ? options.installStrategy : 'hoisted'), } this.replaceRegistryHost = this.options.replaceRegistryHost = (!this.options.replaceRegistryHost || this.options.replaceRegistryHost === 'npmjs') ? diff --git a/workspaces/arborist/lib/arborist/reify.js b/workspaces/arborist/lib/arborist/reify.js index 82d65daa5cc2a..03b5c378d5052 100644 --- a/workspaces/arborist/lib/arborist/reify.js +++ b/workspaces/arborist/lib/arborist/reify.js @@ -12,14 +12,13 @@ const log = require('proc-log') const { dirname, resolve, relative } = require('path') const { depth: dfwalk } = require('treeverse') -const fs = require('fs') -const { promisify } = require('util') -const lstat = promisify(fs.lstat) -const symlink = promisify(fs.symlink) -const mkdirp = require('mkdirp-infer-owner') -const justMkdirp = require('mkdirp') +const { + lstat, + mkdir, + rm, + symlink, +} = require('fs/promises') const moveFile = require('@npmcli/move-file') -const rimraf = promisify(require('rimraf')) const PackageJson = require('@npmcli/package-json') const packageContents = require('@npmcli/installed-package-contents') const runScript = require('@npmcli/run-script') @@ -175,7 +174,7 @@ module.exports = cls => class Reifier extends cls { // we do NOT want to set ownership on this folder, especially // recursively, because it can have other side effects to do that // in a project directory. We just want to make it if it's missing. - await justMkdirp(resolve(this.path)) + await mkdir(resolve(this.path), { recursive: true }) // do not allow the top-level node_modules to be a symlink await this[_validateNodeModules](resolve(this.path, 'node_modules')) @@ -433,10 +432,10 @@ module.exports = cls => class Reifier extends cls { // handled the most common cause of ENOENT (dir doesn't exist yet), // then just ignore any ENOENT. if (er.code === 'ENOENT') { - return didMkdirp ? null : mkdirp(dirname(to)).then(() => + return didMkdirp ? null : mkdir(dirname(to), { recursive: true }).then(() => this[_renamePath](from, to, true)) } else if (er.code === 'EEXIST') { - return rimraf(to).then(() => moveFile(from, to)) + return rm(to, { recursive: true, force: true }).then(() => moveFile(from, to)) } else { throw er } @@ -518,7 +517,7 @@ module.exports = cls => class Reifier extends cls { await this[_renamePath](d, retired) } } - const made = await mkdirp(node.path) + const made = await mkdir(node.path, { recursive: true }) this[_sparseTreeDirs].add(node.path) this[_sparseTreeRoots].add(made) })) @@ -533,7 +532,7 @@ module.exports = cls => class Reifier extends cls { const failures = [] const targets = [...roots, ...Object.keys(this[_retiredPaths])] const unlinks = targets - .map(path => rimraf(path).catch(er => failures.push([path, er]))) + .map(path => rm(path, { recursive: true, force: true }).catch(er => failures.push([path, er]))) return promiseAllRejectLate(unlinks).then(() => { // eslint-disable-next-line promise/always-return if (failures.length) { @@ -630,7 +629,7 @@ module.exports = cls => class Reifier extends cls { return } log.warn('reify', 'Removing non-directory', nm) - await rimraf(nm) + await rm(nm, { recursive: true, force: true }) } async [_extractOrLink] (node) { @@ -664,7 +663,7 @@ module.exports = cls => class Reifier extends cls { await this[_validateNodeModules](nm) if (node.isLink) { - await rimraf(node.path) + await rm(node.path, { recursive: true, force: true }) await this[_symlink](node) } else { await debug(async () => { @@ -690,7 +689,7 @@ module.exports = cls => class Reifier extends cls { const dir = dirname(node.path) const target = node.realpath const rel = relative(dir, target) - await mkdirp(dir) + await mkdir(dir, { recursive: true }) return symlink(rel, node.path, 'junction') } @@ -953,7 +952,7 @@ module.exports = cls => class Reifier extends cls { // ok! actually unpack stuff into their target locations! // The sparse tree has already been created, so we walk the diff - // kicking off each unpack job. If any fail, we rimraf the sparse + // kicking off each unpack job. If any fail, we rm the sparse // tree entirely and try to put everything back where it was. [_unpackNewModules] () { process.emit('time', 'reify:unpack') @@ -1034,7 +1033,8 @@ module.exports = cls => class Reifier extends cls { return promiseAllRejectLate(diff.unchanged.map(node => { // no need to roll back links, since we'll just delete them anyway if (node.isLink) { - return mkdirp(dirname(node.path)).then(() => this[_reifyNode](node)) + return mkdir(dirname(node.path), { recursive: true, force: true }) + .then(() => this[_reifyNode](node)) } // will have been moved/unpacked along with bundler @@ -1050,7 +1050,7 @@ module.exports = cls => class Reifier extends cls { // skip it. const bd = node.package.bundleDependencies const dir = bd && bd.length ? node.path + '/node_modules' : node.path - return mkdirp(dir).then(() => this[_moveContents](node, fromPath)) + return mkdir(dir, { recursive: true }).then(() => this[_moveContents](node, fromPath)) })) })) .then(() => process.emit('timeEnd', 'reify:unretire')) @@ -1124,15 +1124,15 @@ module.exports = cls => class Reifier extends cls { // the tree is pretty much built now, so it's cleanup time. // remove the retired folders, and any deleted nodes // If this fails, there isn't much we can do but tell the user about it. - // Thankfully, it's pretty unlikely that it'll fail, since rimraf is a tank. + // Thankfully, it's pretty unlikely that it'll fail, since rm is a node builtin. async [_removeTrash] () { process.emit('time', 'reify:trash') const promises = [] const failures = [] - const rm = path => rimraf(path).catch(er => failures.push([path, er])) + const _rm = path => rm(path, { recursive: true, force: true }).catch(er => failures.push([path, er])) for (const path of this[_trashList]) { - promises.push(rm(path)) + promises.push(_rm(path)) } await promiseAllRejectLate(promises) diff --git a/workspaces/arborist/lib/consistent-resolve.js b/workspaces/arborist/lib/consistent-resolve.js index 5308dc7e2f95e..7c988048057c7 100644 --- a/workspaces/arborist/lib/consistent-resolve.js +++ b/workspaces/arborist/lib/consistent-resolve.js @@ -19,17 +19,23 @@ const consistentResolve = (resolved, fromPath, toPath, relPaths = false) => { rawSpec, raw, } = npa(resolved, fromPath) - const isPath = type === 'file' || type === 'directory' - return isPath && !relPaths ? `file:${fetchSpec.replace(/#/g, '%23')}` - : isPath ? 'file:' + (toPath ? relpath(toPath, fetchSpec.replace(/#/g, '%23')) : fetchSpec.replace(/#/g, '%23')) - : hosted ? `git+${ - hosted.auth ? hosted.https(hostedOpt) : hosted.sshurl(https://github.com/hostedOpt) - }` - : type === 'git' ? saveSpec - // always return something. 'foo' is interpreted as 'foo@' otherwise. - : rawSpec === '' && raw.slice(-1) !== '@' ? raw - // just strip off the name, but otherwise return as-is - : rawSpec + if (type === 'file' || type === 'directory') { + const cleanFetchSpec = fetchSpec.replace(/#/g, '%23') + if (relPaths && toPath) { + return `file:${relpath(toPath, cleanFetchSpec)}` + } + return `file:${cleanFetchSpec}` + } + if (hosted) { + return `git+${hosted.auth ? hosted.https(hostedOpt) : hosted.sshurl(https://github.com/hostedOpt)}` + } + if (type === 'git') { + return saveSpec + } + if (rawSpec === '*') { + return raw + } + return rawSpec } catch (_) { // whatever we passed in was not acceptable to npa. // leave it 100% untouched. diff --git a/workspaces/arborist/lib/edge.js b/workspaces/arborist/lib/edge.js index 5b248b9166208..84078ba050d10 100644 --- a/workspaces/arborist/lib/edge.js +++ b/workspaces/arborist/lib/edge.js @@ -166,7 +166,7 @@ class Edge { } get spec () { - if (this.overrides && this.overrides.value && this.overrides.name === this.name) { + if (this.overrides?.value && this.overrides.value !== '*' && this.overrides.name === this.name) { if (this.overrides.value.startsWith('$')) { const ref = this.overrides.value.slice(1) // we may be a virtual root, if we are we want to resolve reference overrides diff --git a/workspaces/arborist/lib/override-set.js b/workspaces/arborist/lib/override-set.js index e2e04e03e911e..742e3f08ec534 100644 --- a/workspaces/arborist/lib/override-set.js +++ b/workspaces/arborist/lib/override-set.js @@ -25,7 +25,7 @@ class OverrideSet { this.name = spec.name spec.name = '' this.key = key - this.keySpec = spec.rawSpec === '' ? '' : spec.toString() + this.keySpec = spec.toString() this.value = overrides['.'] || this.keySpec } @@ -50,8 +50,7 @@ class OverrideSet { continue } - if (rule.keySpec === '' || - semver.intersects(edge.spec, rule.keySpec)) { + if (semver.intersects(edge.spec, rule.keySpec)) { return rule } } @@ -65,8 +64,7 @@ class OverrideSet { continue } - if (rule.keySpec === '' || - semver.satisfies(node.version, rule.keySpec) || + if (semver.satisfies(node.version, rule.keySpec) || semver.satisfies(node.version, rule.value)) { return rule } @@ -81,8 +79,7 @@ class OverrideSet { continue } - if (rule.keySpec === '' || - semver.satisfies(node.version, rule.keySpec) || + if (semver.satisfies(node.version, rule.keySpec) || semver.satisfies(node.version, rule.value)) { return rule } diff --git a/workspaces/arborist/lib/place-dep.js b/workspaces/arborist/lib/place-dep.js index 9d84d3f1b08a5..2e37e35f6014b 100644 --- a/workspaces/arborist/lib/place-dep.js +++ b/workspaces/arborist/lib/place-dep.js @@ -43,11 +43,10 @@ class PlaceDep { explicitRequest, updateNames, auditReport, - legacyBundling, strictPeerDeps, installLinks, legacyPeerDeps, - globalStyle, + installStrategy, } = parent || options Object.assign(this, { preferDedupe, @@ -55,11 +54,10 @@ class PlaceDep { explicitRequest, updateNames, auditReport, - legacyBundling, strictPeerDeps, installLinks, + installStrategy, legacyPeerDeps, - globalStyle, }) this.children = [] @@ -78,10 +76,9 @@ class PlaceDep { edge, dep, preferDedupe, - globalStyle, - legacyBundling, explicitRequest, updateNames, + installStrategy, checks, } = this @@ -170,13 +167,13 @@ class PlaceDep { // nest packages like npm v1 and v2 // very disk-inefficient - if (legacyBundling) { + if (installStrategy === 'nested') { break } // when installing globally, or just in global style, we never place // deps above the first level. - if (globalStyle) { + if (installStrategy === 'shallow') { const rp = target.resolveParent if (rp && rp.isProjectRoot) { break @@ -463,7 +460,7 @@ class PlaceDep { // prune all the nodes in a branch of the tree that can be safely removed // This is only the most basic duplication detection; it finds if there // is another satisfying node further up the tree, and if so, dedupes. - // Even in legacyBundling mode, we do this amount of deduplication. + // Even in installStategy is nested, we do this amount of deduplication. pruneDedupable (node, descend = true) { if (node.canDedupe(this.preferDedupe)) { // gather up all deps that have no valid edges in from outside diff --git a/workspaces/arborist/lib/query-selector-all.js b/workspaces/arborist/lib/query-selector-all.js index 87a67bbed1885..5d21c92df78e5 100644 --- a/workspaces/arborist/lib/query-selector-all.js +++ b/workspaces/arborist/lib/query-selector-all.js @@ -120,13 +120,13 @@ class Results { this.#pendingCombinator = combinators[String(this.currentAstNode)] } - // name selectors (i.e. #foo, #foo@1.0.0) + // name selectors (i.e. #foo) // css calls this id, we interpret it as name idType () { - const spec = npa(this.currentAstNode.value) + const name = this.currentAstNode.value const nextResults = this.initialItems.filter(node => - (node.name === spec.name || node.package.name === spec.name) && - (semver.satisfies(node.version, spec.fetchSpec) || !spec.rawSpec)) + (name === node.name) || (name === node.package.name) + ) this.processPendingCombinator(nextResults) } diff --git a/workspaces/arborist/lib/realpath.js b/workspaces/arborist/lib/realpath.js index bc4bbbce38485..8dc20ab63d836 100644 --- a/workspaces/arborist/lib/realpath.js +++ b/workspaces/arborist/lib/realpath.js @@ -5,10 +5,7 @@ // built-in fs.realpath, because we only care about symbolic links, // so we can handle many fewer edge cases. -const fs = require('fs') -const promisify = require('util').promisify -const readlink = promisify(fs.readlink) -const lstat = promisify(fs.lstat) +const { lstat, readlink } = require('fs/promises') const { resolve, basename, dirname } = require('path') const realpathCached = (path, rpcache, stcache, depth) => { diff --git a/workspaces/arborist/lib/shrinkwrap.js b/workspaces/arborist/lib/shrinkwrap.js index 96551990b122b..a0fda5a4b567a 100644 --- a/workspaces/arborist/lib/shrinkwrap.js +++ b/workspaces/arborist/lib/shrinkwrap.js @@ -35,30 +35,14 @@ const mismatch = (a, b) => a && b && a !== b const log = require('proc-log') const YarnLock = require('./yarn-lock.js') -const { promisify } = require('util') -const rimraf = promisify(require('rimraf')) -const fs = require('fs') -const readFile = promisify(fs.readFile) -const writeFile = promisify(fs.writeFile) -const stat = promisify(fs.stat) -const readdir_ = promisify(fs.readdir) -const readlink = promisify(fs.readlink) - -// XXX remove when drop support for node v10 -const lstat = promisify(fs.lstat) -/* istanbul ignore next - version specific polyfill */ -const readdir = async (path, opt) => { - if (!opt || !opt.withFileTypes) { - return readdir_(path, opt) - } - const ents = await readdir_(path, opt) - if (typeof ents[0] === 'string') { - return Promise.all(ents.map(async ent => { - return Object.assign(await lstat(path + '/' + ent), { name: ent }) - })) - } - return ents -} +const { + readFile, + readdir, + readlink, + rm, + stat, + writeFile, +} = require('fs/promises') const { resolve, basename, relative } = require('path') const specFromLock = require('./spec-from-lock.js') @@ -1153,7 +1137,7 @@ class Shrinkwrap { // a node_modules folder, but then the lockfile is not important. // Remove the file, so that in case there WERE deps, but we just // failed to update the file for some reason, it's not out of sync. - return rimraf(this.filename) + return rm(this.filename, { recursive: true, force: true }) } throw er }), diff --git a/workspaces/arborist/package.json b/workspaces/arborist/package.json index 4d327961cd120..a2c0929aeeac5 100644 --- a/workspaces/arborist/package.json +++ b/workspaces/arborist/package.json @@ -1,48 +1,45 @@ { "name": "@npmcli/arborist", - "version": "6.0.0-pre.4", + "version": "6.0.0-pre.5", "description": "Manage node_modules trees", "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/installed-package-contents": "^1.0.7", - "@npmcli/map-workspaces": "^2.0.3", - "@npmcli/metavuln-calculator": "^4.0.0", - "@npmcli/move-file": "^2.0.0", + "@npmcli/installed-package-contents": "^2.0.0", + "@npmcli/map-workspaces": "^3.0.0", + "@npmcli/metavuln-calculator": "^5.0.0", + "@npmcli/move-file": "^3.0.0", "@npmcli/name-from-folder": "^1.0.1", - "@npmcli/node-gyp": "^2.0.0", - "@npmcli/package-json": "^2.0.0", - "@npmcli/query": "^2.0.0", - "@npmcli/run-script": "^4.1.3", - "bin-links": "^3.0.3", - "cacache": "^16.1.3", + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/package-json": "^3.0.0", + "@npmcli/query": "^3.0.0", + "@npmcli/run-script": "^5.0.0", + "bin-links": "^4.0.1", + "cacache": "^17.0.1", "common-ancestor-path": "^1.0.1", - "json-parse-even-better-errors": "^2.3.1", + "json-parse-even-better-errors": "^3.0.0", "json-stringify-nice": "^1.1.4", "minimatch": "^5.1.0", - "mkdirp": "^1.0.4", - "mkdirp-infer-owner": "^2.0.0", "nopt": "^6.0.0", - "npm-install-checks": "^5.0.0", - "npm-package-arg": "^9.0.0", - "npm-pick-manifest": "^7.0.2", - "npm-registry-fetch": "^13.0.0", - "npmlog": "^6.0.2", - "pacote": "^14.0.0", - "parse-conflict-json": "^2.0.1", - "proc-log": "^2.0.0", + "npm-install-checks": "^6.0.0", + "npm-package-arg": "^10.0.0", + "npm-pick-manifest": "^8.0.1", + "npm-registry-fetch": "^14.0.2", + "npmlog": "^7.0.1", + "pacote": "^15.0.2", + "parse-conflict-json": "^3.0.0", + "proc-log": "^3.0.0", "promise-all-reject-late": "^1.0.0", "promise-call-limit": "^1.0.1", - "read-package-json-fast": "^2.0.2", + "read-package-json-fast": "^3.0.1", "readdir-scoped-modules": "^1.1.0", - "rimraf": "^3.0.2", "semver": "^7.3.7", - "ssri": "^9.0.0", - "treeverse": "^2.0.0", + "ssri": "^10.0.0", + "treeverse": "^3.0.0", "walk-up-path": "^1.0.0" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "benchmark": "^2.1.4", "chalk": "^4.1.0", "minify-registry-metadata": "^2.1.0", @@ -104,7 +101,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.0", + "version": "4.6.2", "content": "../../scripts/template-oss/index.js" } } diff --git a/workspaces/arborist/scripts/benchmark.js b/workspaces/arborist/scripts/benchmark.js index f4d26871b5ecb..75f32e329ffdc 100644 --- a/workspaces/arborist/scripts/benchmark.js +++ b/workspaces/arborist/scripts/benchmark.js @@ -1,14 +1,13 @@ process.env.ARBORIST_DEBUG = '0' const { Suite } = require('benchmark') const { relative, resolve } = require('path') -const rimraf = require('rimraf') +const { mkdir, rm } = require('fs/promises') const { execSync } = require('child_process') const shaCmd = 'git show --no-patch --pretty=%H HEAD' const dirty = !!String(execSync('git status -s -uno')).trim() const currentSha = String(execSync(shaCmd)).trim() + (dirty ? '-dirty' : '') const { green, red } = require('chalk') const lastBenchmark = resolve(__dirname, 'benchmark/saved/last-benchmark.json') -const mkdirp = require('mkdirp') const { linkSync, writeFileSync, readdirSync } = require('fs') const registryServer = require('../test/fixtures/registry-mocks/server.js') @@ -152,8 +151,8 @@ const suite = new Suite({ }, async onComplete () { - rimraf.sync(lastBenchmark) - mkdirp.sync(resolve(__dirname, 'benchmark/saved')) + await rm(lastBenchmark, { recursive: true, force: true }) + await mkdir(resolve(__dirname, 'benchmark/saved'), { recursive: true }) // always save with sha const saveThis = resolve(__dirname, `benchmark/saved/${this.sha}.json`) const data = JSON.stringify(this.reduce((acc, bench) => { @@ -171,9 +170,7 @@ const suite = new Suite({ await teardown() await Promise.all([ registryServer.stop(), - new Promise((res, rej) => { - rimraf(this.cache, er => er ? rej(er) : res()) - }), + rm(this.cache, { recursive: true, force: true }), ]) }, }) diff --git a/workspaces/arborist/scripts/benchmark/load-actual.js b/workspaces/arborist/scripts/benchmark/load-actual.js index fc15dd24d2785..6194098fa9e4d 100644 --- a/workspaces/arborist/scripts/benchmark/load-actual.js +++ b/workspaces/arborist/scripts/benchmark/load-actual.js @@ -1,14 +1,16 @@ const Arborist = require('../..') const { resolve, basename } = require('path') const { writeFileSync } = require('fs') -const mkdirp = require('mkdirp') +const { + mkdir, + rm, +} = require('fs/promises') const dir = resolve(__dirname, basename(__filename, '.js')) -const rimraf = require('rimraf') const suite = async (suite, { registry, cache }) => { // setup two folders, one with a hidden lockfile, one without - await mkdirp(resolve(dir, 'with-hidden-lockfile')) - await mkdirp(resolve(dir, 'no-hidden-lockfile')) + await mkdir(resolve(dir, 'with-hidden-lockfile'), { recursive: true }) + await mkdir(resolve(dir, 'no-hidden-lockfile'), { recursive: true }) const dependencies = { 'flow-parser': '0.114.0', @@ -43,7 +45,7 @@ const suite = async (suite, { registry, cache }) => { dependencies, })) promises.push(await arb.reify().then(() => - rimraf.sync(resolve(arb.path, 'node_modules', '.package-lock.json')))) + rm(resolve(arb.path, 'node_modules', '.package-lock.json'), { recursive: true, force: true }))) } await Promise.all(promises) diff --git a/workspaces/arborist/scripts/benchmark/reify.js b/workspaces/arborist/scripts/benchmark/reify.js index f477cfbd19f29..84c7ab4b0471d 100644 --- a/workspaces/arborist/scripts/benchmark/reify.js +++ b/workspaces/arborist/scripts/benchmark/reify.js @@ -1,9 +1,9 @@ const Arborist = require('../..') const { resolve, basename } = require('path') const { writeFileSync } = require('fs') -const mkdirp = require('mkdirp') +const { mkdir } = require('fs/promises') +const { rmSync } = require('fs') const dir = resolve(__dirname, basename(__filename, '.js')) -const rimraf = require('rimraf') // these are not arbitrary, the empty/full and no-* bits matter const folders = [ @@ -19,7 +19,7 @@ const folders = [ const suite = async (suite, { registry, cache }) => { // setup two folders, one with a hidden lockfile, one without - await Promise.all(folders.map(f => mkdirp(f))) + await Promise.all(folders.map(f => mkdir(f, { recursive: true }))) const dependencies = { 'flow-parser': '0.114.0', @@ -86,13 +86,13 @@ const suite = async (suite, { registry, cache }) => { defer: true, setup () { if (/no-lockfile/.test(path)) { - rimraf.sync(resolve(path, 'package-lock.json')) + rmSync(resolve(path, 'package-lock.json'), { recursive: true, force: true }) } if (/empty/.test(path)) { - rimraf.sync(resolve(path, 'node_modules')) + rmSync(resolve(path, 'node_modules'), { recursive: true, force: true }) } if (/no-cache/.test(path)) { - rimraf.sync(resolve(path, 'cache')) + rmSync(resolve(path, 'cache'), { recursive: true, force: true }) } }, async fn (d) { diff --git a/workspaces/arborist/tap-snapshots/test/node.js.test.cjs b/workspaces/arborist/tap-snapshots/test/node.js.test.cjs index 5c7918a762364..bc571fc9ae443 100644 --- a/workspaces/arborist/tap-snapshots/test/node.js.test.cjs +++ b/workspaces/arborist/tap-snapshots/test/node.js.test.cjs @@ -32,7 +32,7 @@ exports[`test/node.js TAP basic instantiation > just a lone root node 1`] = ` "foo" => OverrideSet { "children": Map {}, "key": "foo", - "keySpec": "", + "keySpec": "*", "name": "foo", "parent": <*ref_2>, "value": "1", diff --git a/workspaces/arborist/tap-snapshots/test/spec-from-lock.js.test.cjs b/workspaces/arborist/tap-snapshots/test/spec-from-lock.js.test.cjs index 86a774fffb9ff..8a95e2347c48b 100644 --- a/workspaces/arborist/tap-snapshots/test/spec-from-lock.js.test.cjs +++ b/workspaces/arborist/tap-snapshots/test/spec-from-lock.js.test.cjs @@ -94,8 +94,10 @@ Result { "gitSubdir": undefined, "hosted": GitHost { "auth": null, - "browsefiletemplate": "function browsefiletemplate", + "blobpath": "blob", + "browseblobtemplate": "function browseblobtemplate", "browsetemplate": "function browsetemplate", + "browsetreetemplate": "function browsetreetemplate", "bugstemplate": "function bugstemplate", "committish": "a9ee72ebc8fe3975f1b0c7aeb3a8f2a806a432eb", "default": "sshurl", diff --git a/workspaces/arborist/test/arborist/build-ideal-tree.js b/workspaces/arborist/test/arborist/build-ideal-tree.js index 15378964b3eca..10a291065dfc2 100644 --- a/workspaces/arborist/test/arborist/build-ideal-tree.js +++ b/workspaces/arborist/test/arborist/build-ideal-tree.js @@ -364,7 +364,7 @@ t.test('dedupe example - deduped because preferDedupe=true', t => { t.test('dedupe example - nested because legacyBundling=true', t => { const path = resolve(fixtures, 'dedupe-tests') return t.resolveMatchSnapshot(printIdeal(path, { - legacyBundling: true, + installStrategy: 'nested', preferDedupe: true, })) }) @@ -607,7 +607,7 @@ t.test('link dep within node_modules and outside root', t => { }) t.test('global style', t => t.resolveMatchSnapshot(printIdeal(t.testdir(), { - globalStyle: true, + installStrategy: 'shallow', add: ['rimraf'], }))) @@ -1136,7 +1136,7 @@ t.test('resolve links in global mode', async t => { t.test('dont get confused if root matches duped metadep', async t => { const path = resolve(fixtures, 'test-root-matches-metadep') - const arb = new Arborist({ path, ...OPT }) + const arb = new Arborist({ path, installStrategy: 'hoisted', ...OPT }) const tree = await arb.buildIdealTree() t.matchSnapshot(printTree(tree)) }) diff --git a/workspaces/arborist/test/arborist/index.js b/workspaces/arborist/test/arborist/index.js index 7f69eb36ef74f..88da04b94ffed 100644 --- a/workspaces/arborist/test/arborist/index.js +++ b/workspaces/arborist/test/arborist/index.js @@ -213,7 +213,7 @@ t.test('excludeSet includes nonworkspace metadeps', async t => { spec: 'file:pkgs/b', }) - const arb = new Arborist() + const arb = new Arborist({}) const filter = arb.excludeWorkspacesDependencySet(tree) t.equal(filter.size, 3) @@ -245,3 +245,11 @@ t.test('valid replaceRegistryHost values', t => { t.equal(new Arborist({ replaceRegistryHost: 'never' }).options.replaceRegistryHost, 'never') t.end() }) + +t.test('valid global/installStrategy values', t => { + t.equal(new Arborist({ global: true }).options.installStrategy, 'shallow') + t.equal(new Arborist({ global: false }).options.installStrategy, 'hoisted') + t.equal(new Arborist({}).options.installStrategy, 'hoisted') + t.equal(new Arborist({ installStrategy: 'hoisted' }).options.installStrategy, 'hoisted') + t.end() +}) diff --git a/workspaces/arborist/test/arborist/reify.js b/workspaces/arborist/test/arborist/reify.js index 399031abbcfec..0c68bdd4dd748 100644 --- a/workspaces/arborist/test/arborist/reify.js +++ b/workspaces/arborist/test/arborist/reify.js @@ -4,36 +4,22 @@ const runScript = require('@npmcli/run-script') const localeCompare = require('@isaacs/string-locale-compare')('en') const tnock = require('../fixtures/tnock') -// mock rimraf so we can make it fail in rollback tests -const realRimraf = require('rimraf') -let failRimraf = false -const rimrafMock = (...args) => { - if (!failRimraf) { - return realRimraf(...args) - } else { - return args.pop()(new Error('rimraf fail')) - } -} -rimrafMock.sync = (...args) => { - if (!failRimraf) { - return realRimraf.sync(...args) - } else { - throw new Error('rimraf fail') - } -} const fs = require('fs') + +let failRm = false let failRename = null let failRenameOnce = null let failMkdir = null -const { rename: realRename, mkdir: realMkdir } = fs +const { rename: realRename, rm: realRm, mkdir: realMkdir } = fs const fsMock = { ...fs, mkdir (...args) { if (failMkdir) { process.nextTick(() => args.pop()(failMkdir)) + return } - realMkdir(...args) + return realMkdir(...args) }, rename (...args) { if (failRename) { @@ -43,13 +29,37 @@ const fsMock = { failRenameOnce = null process.nextTick(() => args.pop()(er)) } else { - realRename(...args) + return realRename(...args) } }, + rm (...args) { + if (failRm) { + process.nextTick(() => args.pop()(new Error('rm fail'))) + return + } + + realRm(...args) + }, } const mocks = { fs: fsMock, - rimraf: rimrafMock, + 'fs/promises': { + ...fs.promises, + mkdir: async (...args) => { + if (failMkdir) { + throw failMkdir + } + + return fs.promises.mkdir(...args) + }, + rm: async (...args) => { + if (failRm) { + throw new Error('rm fail') + } + + return fs.promises.rm(...args) + }, + }, } const oldLockfileWarning = [ @@ -66,10 +76,6 @@ This is a one-time fix-up, please be patient... // need this to be injected so that it doesn't pull from main cache const moveFile = t.mock('@npmcli/move-file', { fs: fsMock }) mocks['@npmcli/move-file'] = moveFile -const mkdirp = t.mock('mkdirp', mocks) -mocks.mkdirp = mkdirp -const mkdirpInferOwner = t.mock('mkdirp-infer-owner', mocks) -mocks['mkdirp-infer-owner'] = mkdirpInferOwner // track the warnings that are emitted. returns a function that removes // the listener and provides the list of what it saw. @@ -430,7 +436,7 @@ t.test('tracks changes of shrinkwrapped dep correctly', async t => { t.match(install2, update2, 'update maintains the same correct tree') // delete a dependency that was installed as part of the shrinkwrap - realRimraf.sync(resolve(path, 'node_modules/@nlf/shrinkwrapped-dep-updates-a/node_modules/@nlf/shrinkwrapped-dep-updates-b')) + fs.rmSync(resolve(path, 'node_modules/@nlf/shrinkwrapped-dep-updates-a/node_modules/@nlf/shrinkwrapped-dep-updates-b'), { recursive: true, force: true }) const repair = await printReified(path) t.match(repair, install2, 'tree got repaired') }) @@ -509,7 +515,7 @@ t.test('update a child of a node with bundled deps', t => { const path = fixture(t, 'testing-bundledeps-legacy-bundling') return t.resolveMatchSnapshot(printReified(path, { update: ['@isaacs/testing-bundledeps-c'], - legacyBundling: true, + installStrategy: 'nested', })) }) @@ -598,7 +604,7 @@ t.test('warn on reifying deprecated dependency', t => { t.test('rollbacks', { buffered: false }, t => { t.test('fail retiring shallow nodes', t => { const path = fixture(t, 'testing-bundledeps-3') - const a = newArb({ path, legacyBundling: true }) + const a = newArb({ path, installStrategy: 'nested' }) const expect = new Error('rename fail') const kRenamePath = Symbol.for('renamePath') const renamePath = a[kRenamePath] @@ -623,9 +629,9 @@ t.test('rollbacks', { buffered: false }, t => { }), expect).then(() => t.equal(rolledBack, true, 'rolled back')) }) - t.test('fail retiring nodes because rimraf fails after eexist', t => { + t.test('fail retiring nodes because rm fails after eexist', t => { const path = fixture(t, 'testing-bundledeps-3') - const a = newArb({ path, legacyBundling: true }) + const a = newArb({ path, installStrategy: 'nested' }) const eexist = new Error('rename fail') eexist.code = 'EEXIST' const kRenamePath = Symbol.for('renamePath') @@ -633,7 +639,7 @@ t.test('rollbacks', { buffered: false }, t => { a[kRenamePath] = (from, to) => { a[kRenamePath] = renamePath failRename = eexist - failRimraf = true + failRm = true return a[kRenamePath](from, to) } const kRollback = Symbol.for('rollbackRetireShallowNodes') @@ -642,8 +648,8 @@ t.test('rollbacks', { buffered: false }, t => { a[kRollback] = er => { rolledBack = true failRename = new Error('some other error') - failRimraf = false - t.match(er, new Error('rimraf fail')) + failRm = false + t.match(er, new Error('rm fail')) a[kRollback] = rollbackRetireShallowNodes return a[kRollback](er).then(er => { failRename = null @@ -656,13 +662,13 @@ t.test('rollbacks', { buffered: false }, t => { return t.rejects(a.reify({ update: ['@isaacs/testing-bundledeps-parent'], - }), new Error('rimraf fail')) + }), new Error('rm fail')) .then(() => t.equal(rolledBack, true, 'rolled back')) }) - t.test('fail retiring node, but then rimraf fixes it', t => { + t.test('fail retiring node, but then rm fixes it', async t => { const path = fixture(t, 'testing-bundledeps-3') - const a = newArb({ path, legacyBundling: true }) + const a = newArb({ path, installStrategy: 'nested' }) const eexist = new Error('rename fail') eexist.code = 'EEXIST' const kRenamePath = Symbol.for('renamePath') @@ -680,16 +686,17 @@ t.test('rollbacks', { buffered: false }, t => { return a[kRollback](er) } - return t.resolveMatchSnapshot(a.reify({ + const tree = await a.reify({ update: ['@isaacs/testing-bundledeps-parent'], save: false, - }).then(printTree)) + }) + return printTree(tree) }) t.test('fail creating sparse tree', t => { t.teardown(() => failMkdir = null) const path = fixture(t, 'testing-bundledeps-3') - const a = newArb({ path, legacyBundling: true }) + const a = newArb({ path, installStrategy: 'nested' }) const kCreateST = Symbol.for('createSparseTree') const createSparseTree = a[kCreateST] a[kCreateST] = () => { @@ -712,9 +719,9 @@ t.test('rollbacks', { buffered: false }, t => { t.test('fail rolling back from creating sparse tree', t => { failMkdir = null - failRimraf = null + failRm = null const path = fixture(t, 'testing-bundledeps-3') - const a = newArb({ path, legacyBundling: true }) + const a = newArb({ path, installStrategy: 'nested' }) const kCreateST = Symbol.for('createSparseTree') const kRetireShallowNodes = Symbol.for('retireShallowNodes') @@ -722,7 +729,7 @@ t.test('rollbacks', { buffered: false }, t => { a[kRetireShallowNodes] = async () => { a[kRetireShallowNodes] = retireShallowNodes await a[kRetireShallowNodes]() - failRimraf = true + failRm = true } const createSparseTree = a[kCreateST] t.teardown(() => failMkdir = null) @@ -753,16 +760,16 @@ t.test('rollbacks', { buffered: false }, t => { 'warn', 'cleanup', 'Failed to remove some directories', - [[String, new Error('rimraf fail')]], + [[String, new Error('rm fail')]], ], ]) }) - .then(() => failRimraf = false) + .then(() => failRm = false) }) t.test('fail loading shrinkwraps and updating trees', t => { const path = fixture(t, 'shrinkwrapped-dep-no-lock-empty') - const a = newArb({ path, legacyBundling: true }) + const a = newArb({ path, installStrategy: 'nested' }) const kLoadSW = Symbol.for('loadShrinkwrapsAndUpdateTrees') const loadShrinkwrapsAndUpdateTrees = a[kLoadSW] a[kLoadSW] = seen => { @@ -788,7 +795,7 @@ t.test('rollbacks', { buffered: false }, t => { t.test('fail loading bundles and updating trees', t => { const path = fixture(t, 'two-bundled-deps') - const a = newArb({ path, legacyBundling: true }) + const a = newArb({ path, installStrategy: 'nested' }) const kLoadBundles = Symbol.for('loadBundlesAndUpdateTrees') const loadBundlesAndUpdateTrees = a[kLoadBundles] a[kLoadBundles] = (depth, bundlesByDepth) => { @@ -806,7 +813,7 @@ t.test('rollbacks', { buffered: false }, t => { t.test('fail unpacking new modules', t => { const path = fixture(t, 'two-bundled-deps') - const a = newArb({ path, legacyBundling: true }) + const a = newArb({ path, installStrategy: 'nested' }) const kUnpack = Symbol.for('unpackNewModules') const unpackNewModules = a[kUnpack] a[kUnpack] = () => { @@ -824,7 +831,7 @@ t.test('rollbacks', { buffered: false }, t => { t.test('fail moving back retired unchanged', t => { const path = fixture(t, 'testing-bundledeps-3') - const a = newArb({ path, legacyBundling: true }) + const a = newArb({ path, installStrategy: 'nested' }) const kMoveback = Symbol.for('moveBackRetiredUnchanged') const moveBackRetiredUnchanged = a[kMoveback] @@ -852,11 +859,11 @@ t.test('rollbacks', { buffered: false }, t => { t.test('fail removing retired and deleted nodes', t => { const path = fixture(t, 'testing-bundledeps-3') - const a = newArb({ path, legacyBundling: true }) + const a = newArb({ path, installStrategy: 'nested' }) const kRemove = Symbol.for('removeTrash') const removeRetiredAndDeletedNodes = a[kRemove] a[kRemove] = () => { - failRimraf = true + failRm = true a[kRemove] = removeRetiredAndDeletedNodes return a[kRemove]() } @@ -875,11 +882,11 @@ t.test('rollbacks', { buffered: false }, t => { 'warn', 'cleanup', 'Failed to remove some directories', - [[String, new Error('rimraf fail')]], + [[String, new Error('rm fail')]], ], ]) }) - .then(() => failRimraf = false) + .then(() => failRm = false) }) t.end() @@ -1116,7 +1123,7 @@ t.test('global style', t => { const rbinPart = '.bin/rimraf' + (process.platform === 'win32' ? '.cmd' : '') const rbin = resolve(nm, rbinPart) - return reify(path, { add: ['rimraf@2'], globalStyle: true }) + return reify(path, { add: ['rimraf@2'], installStrategy: 'shallow' }) .then(() => fs.statSync(rbin)) .then(() => t.strictSame(fs.readdirSync(nm).sort(), ['.bin', '.package-lock.json', 'rimraf'])) }) @@ -1477,7 +1484,7 @@ t.test('rollback if process is terminated during reify process', async t => { // ensure that we end up with the same thing we started with, // if it was something other than we're installing const a = resolve(path, 'node_modules/abbrev') - mkdirp.sync(a) + fs.mkdirSync(a, { recursive: true }) const pj = resolve(a, 'package.json') fs.writeFileSync(pj, JSON.stringify({ name: 'abbrev', @@ -2337,7 +2344,7 @@ t.test('never unpack into anything other than a real directory', async t => { const wrappy = resolve(path, 'node_modules/once/node_modules/wrappy') arb[kUnpack] = () => { // will have already created it - realRimraf.sync(wrappy) + fs.rmSync(wrappy, { recursive: true, force: true }) const target = resolve(path, 'target') fs.symlinkSync(target, wrappy, 'junction') arb[kUnpack] = unpackNewModules diff --git a/workspaces/arborist/test/arborist/validate-path.js b/workspaces/arborist/test/arborist/validate-path.js index 503e3c094eac7..e5155d27d4e41 100644 --- a/workspaces/arborist/test/arborist/validate-path.js +++ b/workspaces/arborist/test/arborist/validate-path.js @@ -1,4 +1,4 @@ -// Arborist should be mkdirping the path, but not +// Arborist should be mkdir-ing the path, but not // changing its ownership in that case. // https://github.com/npm/arborist/issues/252 // This test has to club a lot of stuff, and provides no coverage, diff --git a/workspaces/arborist/test/consistent-resolve.js b/workspaces/arborist/test/consistent-resolve.js index 6145758fa1fff..3792e886fb04e 100644 --- a/workspaces/arborist/test/consistent-resolve.js +++ b/workspaces/arborist/test/consistent-resolve.js @@ -101,12 +101,6 @@ t.test('remotes returned as-is', t => { t.end() }) -t.test('just a tag name interpreted as a tag name, not a name@', t => { - t.equal(cr('foo'), 'foo') - t.equal(cr('foo@'), '') - t.end() -}) - t.test('falsey resolved returns null', t => { t.equal(cr(null), null) t.equal(cr(0), null) @@ -115,6 +109,16 @@ t.test('falsey resolved returns null', t => { t.end() }) +t.test('tag returns tag', t => { + t.equal(cr('foo@latest'), 'latest') + t.end() +}) + +t.test('package name returns package name', t => { + t.equal(cr('foo'), 'foo') + t.end() +}) + t.test('invalid resolved returns as-is', t => { t.equal(cr('not ! a : v@lid t*A*g'), 'not ! a : v@lid t*A*g') t.end() diff --git a/workspaces/arborist/test/override-set.js b/workspaces/arborist/test/override-set.js index d46e212647b92..b5695d36b0553 100644 --- a/workspaces/arborist/test/override-set.js +++ b/workspaces/arborist/test/override-set.js @@ -124,26 +124,26 @@ t.test('constructor', async (t) => { const fooRule = ruleset.get('foo') // these are both empty because the foo rule does not actually override // anything directly, it only carries child rules through - t.equal(fooRule.keySpec, '', 'keySpec is empty') - t.equal(fooRule.value, '', 'value is empty') + t.equal(fooRule.keySpec, '*', 'keySpec is *') + t.equal(fooRule.value, '*', 'value is *') const barRule = ruleset.get('bar') - t.equal(barRule.keySpec, '', 'keySpec is empty') + t.equal(barRule.keySpec, '*', 'keySpec is *') t.equal(barRule.value, '2.0.0', 'got the correct override for bar') const bazRule = ruleset.get('baz') - t.equal(bazRule.keySpec, '', 'keySpec is empty') + t.equal(bazRule.keySpec, '*', 'keySpec is *') t.equal(bazRule.value, '2.0.0', 'got the correct override for baz') const childRule = edgeRule.getEdgeRule({ name: 'bar', spec: '^1.0.0' }) const childRuleSet = childRule.ruleset const childBazRule = childRuleSet.get('baz') - t.equal(childBazRule.keySpec, '', 'keySpec is empty') + t.equal(childBazRule.keySpec, '*', 'keySpec is *') t.equal(childBazRule.value, '3.0.0', 'got the correct override for nested baz') const childBarRule = childRuleSet.get('bar') - t.equal(childBarRule.keySpec, '', 'keySpec is empty') + t.equal(childBarRule.keySpec, '*', 'keySpec is *') t.equal(childBarRule.value, '2.0.0', 'got the correct override for nested bar') const childFooRule = childRuleSet.get('foo') - t.equal(childFooRule.keySpec, '', 'keySpec is empty') - t.equal(childFooRule.value, '', 'value is empty') + t.equal(childFooRule.keySpec, '*', 'keySpec is *') + t.equal(childFooRule.value, '*', 'value is *') }) t.test('coerces empty string to *', async (t) => { @@ -161,6 +161,6 @@ t.test('constructor', async (t) => { t.equal(edgeRule.value, '*', 'empty string was replaced with *') const barEdgeRule = overrides.getEdgeRule({ name: 'bar', spec: '^1' }) - t.equal(barEdgeRule.value, '', 'when rule is omitted entirely value is an empty string') + t.equal(barEdgeRule.value, '*', 'when rule is omitted entirely value is *') }) }) diff --git a/workspaces/arborist/test/place-dep.js b/workspaces/arborist/test/place-dep.js index 418d22884ca17..292a2c8e23907 100644 --- a/workspaces/arborist/test/place-dep.js +++ b/workspaces/arborist/test/place-dep.js @@ -39,14 +39,12 @@ t.test('placement tests', t => { updateNames = [], // an audit report, telling us which nodes are vulnerable auditReport = null, - // --legacy-bundling set? - legacyBundling = false, // --strict-peer-deps set? strictPeerDeps = false, // --legacy-peer-deps set? legacyPeerDeps = false, // installing with --global or --global-style? - globalStyle = false, + installStrategy = 'hoisted', } = options const node = tree.inventory.get(nodeLoc) @@ -80,10 +78,9 @@ t.test('placement tests', t => { explicitRequest, updateNames, auditReport, - legacyBundling, strictPeerDeps, legacyPeerDeps, - globalStyle, + installStrategy, }) } @@ -271,7 +268,7 @@ t.test('placement tests', t => { }), dep: new Node({ pkg: { name: 'bar', version: '1.0.0' } }), nodeLoc: 'node_modules/foo', - legacyBundling: true, + installStrategy: 'nested', test: (t, tree) => { const foobar = tree.children.get('foo').resolve('bar') t.equal(foobar.location, 'node_modules/foo/node_modules/bar') @@ -291,7 +288,7 @@ t.test('placement tests', t => { }), dep: new Node({ pkg: { name: 'bar', version: '1.0.0' } }), nodeLoc: 'node_modules/foo', - globalStyle: true, + installStrategy: 'shallow', test: (t, tree) => { const foobar = tree.children.get('foo').resolve('bar') t.equal(foobar.location, 'node_modules/foo/node_modules/bar') @@ -323,7 +320,7 @@ t.test('placement tests', t => { }), dep: new Node({ pkg: { name: 'baz', version: '1.0.0' } }), nodeLoc: 'node_modules/foo/node_modules/bar', - globalStyle: true, + installStrategy: 'shallow', test: (t, tree) => { const foobar = tree.children.get('foo').resolve('bar') const foobarbaz = foobar.resolve('baz') diff --git a/workspaces/arborist/test/query-selector-all.js b/workspaces/arborist/test/query-selector-all.js index 2adf526dee9a2..e206e0bb36482 100644 --- a/workspaces/arborist/test/query-selector-all.js +++ b/workspaces/arborist/test/query-selector-all.js @@ -509,9 +509,9 @@ t.test('query-selector-all', async t => { ]], // has pseudo - [':root > *:has(* > #bar@1.4.0)', ['foo@2.2.2']], - ['*:has(* > #bar@1.4.0)', ['foo@2.2.2']], - ['*:has(> #bar@1.4.0)', ['foo@2.2.2']], + [':root > *:has(* > #bar:semver(1.4.0))', ['foo@2.2.2']], + ['*:has(* > #bar:semver(1.4.0))', ['foo@2.2.2']], + ['*:has(> #bar:semver(1.4.0))', ['foo@2.2.2']], ['.workspace:has(> * > #lorem)', ['a@1.0.0']], ['.workspace:has(* #lorem, ~ #b)', ['a@1.0.0']], @@ -931,8 +931,8 @@ t.test('query-selector-all', async t => { // id selector ['#bar', ['bar@2.0.0', 'bar@1.4.0']], - ['#bar@2.0.0', ['bar@2.0.0']], - ['#@npmcli/abbrev@2.0.0-beta.45', ['@npmcli/abbrev@2.0.0-beta.45']], + ['#bar:semver(2.0.0)', ['bar@2.0.0']], + ['#@npmcli/abbrev:semver(2.0.0-beta.45)', ['@npmcli/abbrev@2.0.0-beta.45']], ['#bar:semver(2.0)', ['bar@2.0.0']], ['#bar:semver(2)', ['bar@2.0.0']], ['#bar:semver(^2.0.0)', ['bar@2.0.0']], @@ -959,6 +959,6 @@ t.test('query-selector-all', async t => { [':root #bar:semver(1) > *', ['dasher@2.0.0']], [':root #bar:semver(1) ~ *', ['dash-separated-pkg@1.0.0']], ['#bar:semver(2), #foo', ['bar@2.0.0', 'foo@2.2.2']], - ['#a, #bar:semver(2), #foo@2.2.2', ['a@1.0.0', 'bar@2.0.0', 'foo@2.2.2']], + ['#a, #bar:semver(2), #foo:semver(2.2.2)', ['a@1.0.0', 'bar@2.0.0', 'foo@2.2.2']], ]) }) diff --git a/workspaces/arborist/test/shrinkwrap.js b/workspaces/arborist/test/shrinkwrap.js index 28e4167d35332..b5303f900c2a7 100644 --- a/workspaces/arborist/test/shrinkwrap.js +++ b/workspaces/arborist/test/shrinkwrap.js @@ -4,7 +4,6 @@ const Link = require('../lib/link.js') const calcDepFlags = require('../lib/calc-dep-flags.js') const fs = require('fs') const Arborist = require('../lib/arborist/index.js') -const rimraf = require('rimraf') const t = require('tap') @@ -893,8 +892,8 @@ t.test('hidden lockfile only used if up to date', async t => { // make the lockfile newer, but missing a folder from node_modules { - rimraf.sync(resolve(path, 'node_modules/abbrev')) - rimraf.sync(resolve(path, 'node_modules/xyz')) + fs.rmSync(resolve(path, 'node_modules/abbrev'), { recursive: true, force: true }) + fs.rmSync(resolve(path, 'node_modules/xyz'), { recursive: true, force: true }) const later = Date.now() + 10000 fs.utimesSync(resolve(path, hidden), new Date(later), new Date(later)) const s = await Shrinkwrap.load({ path, hiddenLockfile: true }) diff --git a/workspaces/libnpmaccess/CHANGELOG.md b/workspaces/libnpmaccess/CHANGELOG.md index 4bfe6ce9ebb53..fffbcab204b66 100644 --- a/workspaces/libnpmaccess/CHANGELOG.md +++ b/workspaces/libnpmaccess/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [7.0.0-pre.2](https://github.com/npm/cli/compare/libnpmaccess-v7.0.0-pre.1...libnpmaccess-v7.0.0-pre.2) (2022-10-19) + +### Dependencies + +* [`2008ea6`](https://github.com/npm/cli/commit/2008ea6a807acbd97912799adfe97f276202cea6) `npm-package-arg@10.0.0`, `pacote@15.0.2` +* [`aa01072`](https://github.com/npm/cli/commit/aa010722996ef6de46e1bb937c6f8a94dc2844fa) [#5707](https://github.com/npm/cli/pull/5707) update the following dependencies + ## [7.0.0-pre.1](https://github.com/npm/cli/compare/libnpmaccess-v7.0.0-pre.0...libnpmaccess-v7.0.0-pre.1) (2022-09-14) ### ⚠️ BREAKING CHANGES diff --git a/workspaces/libnpmaccess/package.json b/workspaces/libnpmaccess/package.json index 11a8963d821ce..e65f68ddf35fe 100644 --- a/workspaces/libnpmaccess/package.json +++ b/workspaces/libnpmaccess/package.json @@ -1,6 +1,6 @@ { "name": "libnpmaccess", - "version": "7.0.0-pre.1", + "version": "7.0.0-pre.2", "description": "programmatic library for `npm access` commands", "author": "GitHub Inc.", "license": "ISC", @@ -15,8 +15,8 @@ "template-oss-apply": "template-oss-apply --force" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "nock": "^13.2.4", "tap": "^16.0.1" }, @@ -28,8 +28,8 @@ "bugs": "https://github.com/npm/libnpmaccess/issues", "homepage": "https://npmjs.com/package/libnpmaccess", "dependencies": { - "npm-package-arg": "^9.0.1", - "npm-registry-fetch": "^13.0.0" + "npm-package-arg": "^10.0.0", + "npm-registry-fetch": "^14.0.2" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" @@ -40,7 +40,7 @@ ], "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.0", + "version": "4.6.2", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/workspaces/libnpmdiff/CHANGELOG.md b/workspaces/libnpmdiff/CHANGELOG.md index a0fc5f0e3f01e..e5496fef018af 100644 --- a/workspaces/libnpmdiff/CHANGELOG.md +++ b/workspaces/libnpmdiff/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [5.0.0-pre.3](https://github.com/npm/cli/compare/libnpmdiff-v5.0.0-pre.2...libnpmdiff-v5.0.0-pre.3) (2022-10-19) + +### Dependencies + +* [`2008ea6`](https://github.com/npm/cli/commit/2008ea6a807acbd97912799adfe97f276202cea6) `npm-package-arg@10.0.0`, `pacote@15.0.2` +* [`aa01072`](https://github.com/npm/cli/commit/aa010722996ef6de46e1bb937c6f8a94dc2844fa) [#5707](https://github.com/npm/cli/pull/5707) update the following dependencies +* [Workspace](https://github.com/npm/cli/compare/arborist-v6.0.0-pre.4...arborist-v6.0.0-pre.5): `@npmcli/arborist@6.0.0-pre.5` + ## [5.0.0-pre.2](https://github.com/npm/cli/compare/libnpmdiff-v5.0.0-pre.1...libnpmdiff-v5.0.0-pre.2) (2022-10-05) ### Dependencies diff --git a/workspaces/libnpmdiff/package.json b/workspaces/libnpmdiff/package.json index f30602d12bf4a..c88cba585b5df 100644 --- a/workspaces/libnpmdiff/package.json +++ b/workspaces/libnpmdiff/package.json @@ -1,6 +1,6 @@ { "name": "libnpmdiff", - "version": "5.0.0-pre.2", + "version": "5.0.0-pre.3", "description": "The registry diff", "repository": { "type": "git", @@ -42,24 +42,24 @@ "template-oss-apply": "template-oss-apply --force" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "tap": "^16.0.1" }, "dependencies": { - "@npmcli/arborist": "^6.0.0-pre.4", - "@npmcli/disparity-colors": "^2.0.0", - "@npmcli/installed-package-contents": "^1.0.7", + "@npmcli/arborist": "^6.0.0-pre.5", + "@npmcli/disparity-colors": "^3.0.0", + "@npmcli/installed-package-contents": "^2.0.0", "binary-extensions": "^2.2.0", "diff": "^5.1.0", "minimatch": "^5.0.1", - "npm-package-arg": "^9.0.1", - "pacote": "^14.0.0", + "npm-package-arg": "^10.0.0", + "pacote": "^15.0.2", "tar": "^6.1.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.0", + "version": "4.6.2", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/workspaces/libnpmexec/CHANGELOG.md b/workspaces/libnpmexec/CHANGELOG.md index e3156d8c95d95..1f241d760b4ed 100644 --- a/workspaces/libnpmexec/CHANGELOG.md +++ b/workspaces/libnpmexec/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## [5.0.0-pre.5](https://github.com/npm/cli/compare/libnpmexec-v5.0.0-pre.4...libnpmexec-v5.0.0-pre.5) (2022-10-19) + +### ⚠️ BREAKING CHANGES + +* this package no longer attempts to change file ownership automatically + +### Features + +* [`58065bc`](https://github.com/npm/cli/commit/58065bc679e6968742b5b15fa2fb82dd9e8ae988) [#5704](https://github.com/npm/cli/pull/5704) do not alter file ownership (@nlf) + +### Bug Fixes + +* [`1afe5ba`](https://github.com/npm/cli/commit/1afe5ba9647d1f0f55bf0a4bace543965d05daed) account for new npm-package-arg behavior (@wraithgar) + +### Dependencies + +* [`88137a3`](https://github.com/npm/cli/commit/88137a329c8ad418db265dd465768a7cf5ebccb1) `npmlog@7.0.1` +* [`2008ea6`](https://github.com/npm/cli/commit/2008ea6a807acbd97912799adfe97f276202cea6) `npm-package-arg@10.0.0`, `pacote@15.0.2` +* [`aa01072`](https://github.com/npm/cli/commit/aa010722996ef6de46e1bb937c6f8a94dc2844fa) [#5707](https://github.com/npm/cli/pull/5707) update the following dependencies +* [Workspace](https://github.com/npm/cli/compare/arborist-v6.0.0-pre.4...arborist-v6.0.0-pre.5): `@npmcli/arborist@6.0.0-pre.5` + ## [5.0.0-pre.4](https://github.com/npm/cli/compare/libnpmexec-v5.0.0-pre.3...libnpmexec-v5.0.0-pre.4) (2022-10-05) ### Dependencies diff --git a/workspaces/libnpmexec/lib/file-exists.js b/workspaces/libnpmexec/lib/file-exists.js index e5cd474dac388..0a8d79e83b256 100644 --- a/workspaces/libnpmexec/lib/file-exists.js +++ b/workspaces/libnpmexec/lib/file-exists.js @@ -1,10 +1,10 @@ const { resolve } = require('path') -const fs = require('@npmcli/fs') +const { stat } = require('fs/promises') const walkUp = require('walk-up-path') const fileExists = async (file) => { try { - const res = await fs.stat(file) + const res = await stat(file) return res.isFile() } catch { return false diff --git a/workspaces/libnpmexec/lib/index.js b/workspaces/libnpmexec/lib/index.js index 45c75d4715674..7a224ab7f0a62 100644 --- a/workspaces/libnpmexec/lib/index.js +++ b/workspaces/libnpmexec/lib/index.js @@ -1,12 +1,12 @@ 'use strict' +const { mkdir } = require('fs/promises') const { promisify } = require('util') const Arborist = require('@npmcli/arborist') const ciDetect = require('@npmcli/ci-detect') const crypto = require('crypto') const log = require('proc-log') -const mkdirp = require('mkdirp-infer-owner') const npa = require('npm-package-arg') const npmlog = require('npmlog') const pacote = require('pacote') @@ -38,23 +38,21 @@ const getManifest = async (spec, flatOptions) => { // Returns the required manifest if the spec is missing from the tree // Returns the found node if it is in the tree const missingFromTree = async ({ spec, tree, flatOptions }) => { - if (spec.registry && (spec.rawSpec === '' || spec.type !== 'tag')) { + if (spec.registry && spec.type !== 'tag') { // registry spec that is not a specific tag. const nodesBySpec = tree.inventory.query('packageName', spec.name) for (const node of nodesBySpec) { - if (spec.type === 'tag') { - // package requested by name only + // package requested by name only (or name@*) + if (spec.rawSpec === '*') { + return { node } + } + // package requested by specific version + if (spec.type === 'version' && (node.pkgid === spec.raw)) { + return { node } + } + // package requested by version range, only remaining registry type + if (semver.satisfies(node.package.version, spec.rawSpec)) { return { node } - } else if (spec.type === 'version') { - // package requested by specific version - if (node.pkgid === spec.raw) { - return { node } - } - } else { - // package requested by version range, only remaining registry type - if (semver.satisfies(node.package.version, spec.rawSpec)) { - return { node } - } } } const manifest = await getManifest(spec, flatOptions) @@ -205,7 +203,7 @@ const exec = async (opts) => { .digest('hex') .slice(0, 16) const installDir = resolve(npxCache, hash) - await mkdirp(installDir) + await mkdir(installDir, { recursive: true }) const npxArb = new Arborist({ ...flatOptions, path: installDir, diff --git a/workspaces/libnpmexec/package.json b/workspaces/libnpmexec/package.json index 0acdeabcadd42..21202eaab6839 100644 --- a/workspaces/libnpmexec/package.json +++ b/workspaces/libnpmexec/package.json @@ -1,6 +1,6 @@ { "name": "libnpmexec", - "version": "5.0.0-pre.4", + "version": "5.0.0-pre.5", "files": [ "bin/", "lib/" @@ -50,32 +50,30 @@ ] }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", - "bin-links": "^3.0.3", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", + "bin-links": "^4.0.1", "minify-registry-metadata": "^2.2.0", "mkdirp": "^1.0.4", "tap": "^16.0.1" }, "dependencies": { - "@npmcli/arborist": "^6.0.0-pre.4", + "@npmcli/arborist": "^6.0.0-pre.5", "@npmcli/ci-detect": "^3.0.0", - "@npmcli/fs": "^2.1.1", - "@npmcli/run-script": "^4.2.0", + "@npmcli/run-script": "^5.0.0", "chalk": "^4.1.0", - "mkdirp-infer-owner": "^2.0.0", - "npm-package-arg": "^9.0.1", - "npmlog": "^6.0.2", - "pacote": "^14.0.0", - "proc-log": "^2.0.0", + "npm-package-arg": "^10.0.0", + "npmlog": "^7.0.1", + "pacote": "^15.0.2", + "proc-log": "^3.0.0", "read": "^1.0.7", - "read-package-json-fast": "^2.0.2", + "read-package-json-fast": "^3.0.1", "semver": "^7.3.7", "walk-up-path": "^1.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.0", + "version": "4.6.2", "content": "../../scripts/template-oss/index.js" } } diff --git a/workspaces/libnpmfund/CHANGELOG.md b/workspaces/libnpmfund/CHANGELOG.md index 1033bad2f4b65..1fa67e5feab88 100644 --- a/workspaces/libnpmfund/CHANGELOG.md +++ b/workspaces/libnpmfund/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [4.0.0-pre.5](https://github.com/npm/cli/compare/libnpmfund-v4.0.0-pre.4...libnpmfund-v4.0.0-pre.5) (2022-10-19) + +### Dependencies + +* [Workspace](https://github.com/npm/cli/compare/arborist-v6.0.0-pre.4...arborist-v6.0.0-pre.5): `@npmcli/arborist@6.0.0-pre.5` + ## [4.0.0-pre.4](https://github.com/npm/cli/compare/libnpmfund-v4.0.0-pre.3...libnpmfund-v4.0.0-pre.4) (2022-10-05) ### Dependencies diff --git a/workspaces/libnpmfund/package.json b/workspaces/libnpmfund/package.json index 0e1c7e43c0662..45a3381da0426 100644 --- a/workspaces/libnpmfund/package.json +++ b/workspaces/libnpmfund/package.json @@ -1,6 +1,6 @@ { "name": "libnpmfund", - "version": "4.0.0-pre.4", + "version": "4.0.0-pre.5", "main": "lib/index.js", "files": [ "bin/", @@ -41,19 +41,19 @@ "template-oss-apply": "template-oss-apply --force" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "tap": "^16.0.1" }, "dependencies": { - "@npmcli/arborist": "^6.0.0-pre.4" + "@npmcli/arborist": "^6.0.0-pre.5" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.0", + "version": "4.6.2", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/workspaces/libnpmhook/CHANGELOG.md b/workspaces/libnpmhook/CHANGELOG.md index 630927087ca40..458bd0817e632 100644 --- a/workspaces/libnpmhook/CHANGELOG.md +++ b/workspaces/libnpmhook/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [9.0.0-pre.1](https://github.com/npm/cli/compare/libnpmhook-v9.0.0-pre.0...libnpmhook-v9.0.0-pre.1) (2022-10-19) + +### Dependencies + +* [`aa01072`](https://github.com/npm/cli/commit/aa010722996ef6de46e1bb937c6f8a94dc2844fa) [#5707](https://github.com/npm/cli/pull/5707) update the following dependencies + ## [9.0.0-pre.0](https://github.com/npm/cli/compare/libnpmhook-v8.0.4...libnpmhook-v9.0.0-pre.0) (2022-09-08) ### ⚠ BREAKING CHANGES diff --git a/workspaces/libnpmhook/package.json b/workspaces/libnpmhook/package.json index 5661da103eef1..c0ac8baf64dcf 100644 --- a/workspaces/libnpmhook/package.json +++ b/workspaces/libnpmhook/package.json @@ -1,6 +1,6 @@ { "name": "libnpmhook", - "version": "9.0.0-pre.0", + "version": "9.0.0-pre.1", "description": "programmatic API for managing npm registry hooks", "main": "lib/index.js", "files": [ @@ -33,11 +33,11 @@ "license": "ISC", "dependencies": { "aproba": "^2.0.0", - "npm-registry-fetch": "^13.0.0" + "npm-registry-fetch": "^14.0.2" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "nock": "^13.2.4", "tap": "^16.0.1" }, @@ -46,7 +46,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.0", + "version": "4.6.2", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/workspaces/libnpmorg/CHANGELOG.md b/workspaces/libnpmorg/CHANGELOG.md index db19f07a78bdf..6f4f7a01d5a8b 100644 --- a/workspaces/libnpmorg/CHANGELOG.md +++ b/workspaces/libnpmorg/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [5.0.0-pre.1](https://github.com/npm/cli/compare/libnpmorg-v5.0.0-pre.0...libnpmorg-v5.0.0-pre.1) (2022-10-19) + +### Dependencies + +* [`aa01072`](https://github.com/npm/cli/commit/aa010722996ef6de46e1bb937c6f8a94dc2844fa) [#5707](https://github.com/npm/cli/pull/5707) update the following dependencies + ## [5.0.0-pre.0](https://github.com/npm/cli/compare/libnpmorg-v4.0.4...libnpmorg-v5.0.0-pre.0) (2022-09-08) ### ⚠ BREAKING CHANGES diff --git a/workspaces/libnpmorg/package.json b/workspaces/libnpmorg/package.json index 0bd99c1b185e4..7df8915cc05bc 100644 --- a/workspaces/libnpmorg/package.json +++ b/workspaces/libnpmorg/package.json @@ -1,6 +1,6 @@ { "name": "libnpmorg", - "version": "5.0.0-pre.0", + "version": "5.0.0-pre.1", "description": "Programmatic api for `npm org` commands", "author": "GitHub Inc.", "main": "lib/index.js", @@ -27,8 +27,8 @@ "lib/" ], "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "minipass": "^3.1.1", "nock": "^13.2.4", "tap": "^16.0.1" @@ -42,14 +42,14 @@ "homepage": "https://npmjs.com/package/libnpmorg", "dependencies": { "aproba": "^2.0.0", - "npm-registry-fetch": "^13.0.0" + "npm-registry-fetch": "^14.0.2" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.0", + "version": "4.6.2", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/workspaces/libnpmpack/CHANGELOG.md b/workspaces/libnpmpack/CHANGELOG.md index 0bd62765a194f..ed1c69e88d8e3 100644 --- a/workspaces/libnpmpack/CHANGELOG.md +++ b/workspaces/libnpmpack/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [5.0.0-pre.4](https://github.com/npm/cli/compare/libnpmpack-v5.0.0-pre.3...libnpmpack-v5.0.0-pre.4) (2022-10-19) + +### Dependencies + +* [`2008ea6`](https://github.com/npm/cli/commit/2008ea6a807acbd97912799adfe97f276202cea6) `npm-package-arg@10.0.0`, `pacote@15.0.2` +* [`aa01072`](https://github.com/npm/cli/commit/aa010722996ef6de46e1bb937c6f8a94dc2844fa) [#5707](https://github.com/npm/cli/pull/5707) update the following dependencies +* [Workspace](https://github.com/npm/cli/compare/arborist-v6.0.0-pre.4...arborist-v6.0.0-pre.5): `@npmcli/arborist@6.0.0-pre.5` + +## [5.0.0-pre.3](https://github.com/npm/cli/compare/libnpmpack-v5.0.0-pre.2...libnpmpack-v5.0.0-pre.3) (2022-10-13) + +### Bug Fixes + +* [`a990c3c`](https://github.com/npm/cli/commit/a990c3c9a0e67f0a8b6454213675e159fe49432d) [#5651](https://github.com/npm/cli/pull/5651) libnpmpack: obey ignoreScripts (@winterqt) + ## [5.0.0-pre.2](https://github.com/npm/cli/compare/libnpmpack-v5.0.0-pre.1...libnpmpack-v5.0.0-pre.2) (2022-10-05) ### Bug Fixes diff --git a/workspaces/libnpmpack/lib/index.js b/workspaces/libnpmpack/lib/index.js index baccadc3354df..70d67d360f0d9 100644 --- a/workspaces/libnpmpack/lib/index.js +++ b/workspaces/libnpmpack/lib/index.js @@ -21,7 +21,7 @@ async function pack (spec = 'file:.', opts = {}) { const stdio = opts.foregroundScripts ? 'inherit' : 'pipe' - if (spec.type === 'directory') { + if (spec.type === 'directory' && !opts.ignoreScripts) { // prepack await runScript({ ...opts, @@ -48,7 +48,7 @@ async function pack (spec = 'file:.', opts = {}) { await writeFile(destination, tarball) } - if (spec.type === 'directory') { + if (spec.type === 'directory' && !opts.ignoreScripts) { // postpack await runScript({ ...opts, diff --git a/workspaces/libnpmpack/package.json b/workspaces/libnpmpack/package.json index 837361af67e68..260cf0477bcbe 100644 --- a/workspaces/libnpmpack/package.json +++ b/workspaces/libnpmpack/package.json @@ -1,6 +1,6 @@ { "name": "libnpmpack", - "version": "5.0.0-pre.2", + "version": "5.0.0-pre.4", "description": "Programmatic API for the bits behind npm pack", "author": "GitHub Inc.", "main": "lib/index.js", @@ -22,8 +22,8 @@ "template-oss-apply": "template-oss-apply --force" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "nock": "^13.0.7", "spawk": "^1.7.1", "tap": "^16.0.1" @@ -36,17 +36,17 @@ "bugs": "https://github.com/npm/libnpmpack/issues", "homepage": "https://npmjs.com/package/libnpmpack", "dependencies": { - "@npmcli/arborist": "^6.0.0-pre.4", - "@npmcli/run-script": "^4.1.3", - "npm-package-arg": "^9.0.1", - "pacote": "^14.0.0" + "@npmcli/arborist": "^6.0.0-pre.5", + "@npmcli/run-script": "^5.0.0", + "npm-package-arg": "^10.0.0", + "pacote": "^15.0.2" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.0", + "version": "4.6.2", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/workspaces/libnpmpack/test/fixtures/tspawk.js b/workspaces/libnpmpack/test/fixtures/tspawk.js index 554a9d402c32f..b2559fc3686e7 100644 --- a/workspaces/libnpmpack/test/fixtures/tspawk.js +++ b/workspaces/libnpmpack/test/fixtures/tspawk.js @@ -5,12 +5,9 @@ const spawk = require('spawk') module.exports = tspawk function tspawk (t) { - spawk.preventUnmatched() t.teardown(function () { - spawk.unload() - }) - t.afterEach(function () { spawk.done() + spawk.unload() }) return spawk } diff --git a/workspaces/libnpmpack/test/index.js b/workspaces/libnpmpack/test/index.js index fb50e197bceaf..aa4f955fac0b0 100644 --- a/workspaces/libnpmpack/test/index.js +++ b/workspaces/libnpmpack/test/index.js @@ -3,6 +3,7 @@ const t = require('tap') const tspawk = require('./fixtures/tspawk.js') +const spawk = tspawk(t) const fs = require('fs') const path = require('path') @@ -138,8 +139,6 @@ t.test('packs from registry spec', async t => { }) t.test('runs scripts in foreground when foregroundScripts === true', async t => { - const spawk = tspawk(t) - const testDir = t.testdir({ 'package.json': JSON.stringify({ name: 'my-cool-pkg', @@ -172,3 +171,39 @@ t.test('runs scripts in foreground when foregroundScripts === true', async t => process.chdir(cwd) }) }) + +t.test('doesn\'t run scripts when ignoreScripts === true', async t => { + const testDir = t.testdir({ + 'package.json': JSON.stringify({ + name: 'my-cool-pkg', + version: '1.0.0', + scripts: { + prepack: 'touch prepack', + }, + }, null, 2), + }) + + const cwd = process.cwd() + process.chdir(testDir) + + const [scriptShell, scriptArgs] = makeSpawnArgs({ + event: 'prepack', + path: testDir, + cmd: 'touch prepack', + }) + + const prepack = spawk.spawn(scriptShell, scriptArgs) + + await pack('file:.', { + packDestination: testDir, + foregroundScripts: true, + ignoreScripts: true, + }) + + t.ok(!prepack.called) + + t.teardown(async () => { + process.chdir(cwd) + spawk.clean() + }) +}) diff --git a/workspaces/libnpmpublish/CHANGELOG.md b/workspaces/libnpmpublish/CHANGELOG.md index 9a427ddbd34cc..154d4fc337e7c 100644 --- a/workspaces/libnpmpublish/CHANGELOG.md +++ b/workspaces/libnpmpublish/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [7.0.0-pre.4](https://github.com/npm/cli/compare/libnpmpublish-v7.0.0-pre.3...libnpmpublish-v7.0.0-pre.4) (2022-10-19) + +### Dependencies + +* [`2008ea6`](https://github.com/npm/cli/commit/2008ea6a807acbd97912799adfe97f276202cea6) `npm-package-arg@10.0.0`, `pacote@15.0.2` +* [`aa01072`](https://github.com/npm/cli/commit/aa010722996ef6de46e1bb937c6f8a94dc2844fa) [#5707](https://github.com/npm/cli/pull/5707) update the following dependencies +* [Workspace](https://github.com/npm/cli/compare/libnpmpack-v5.0.0-pre.3...libnpmpack-v5.0.0-pre.4): `libnpmpack@5.0.0-pre.4` + +## [7.0.0-pre.3](https://github.com/npm/cli/compare/libnpmpublish-v7.0.0-pre.2...libnpmpublish-v7.0.0-pre.3) (2022-10-13) + +### Dependencies + +* [Workspace](https://github.com/npm/cli/compare/libnpmpack-v5.0.0-pre.2...libnpmpack-v5.0.0-pre.3): `libnpmpack@5.0.0-pre.3` + ## [7.0.0-pre.2](https://github.com/npm/cli/compare/libnpmpublish-v7.0.0-pre.1...libnpmpublish-v7.0.0-pre.2) (2022-10-05) ### Dependencies diff --git a/workspaces/libnpmpublish/package.json b/workspaces/libnpmpublish/package.json index 63a07fe3896e4..75075e81f41b8 100644 --- a/workspaces/libnpmpublish/package.json +++ b/workspaces/libnpmpublish/package.json @@ -1,6 +1,6 @@ { "name": "libnpmpublish", - "version": "7.0.0-pre.2", + "version": "7.0.0-pre.4", "description": "Programmatic API for the bits behind npm publish and unpublish", "author": "GitHub Inc.", "main": "lib/index.js", @@ -24,9 +24,9 @@ "template-oss-apply": "template-oss-apply --force" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", - "libnpmpack": "^5.0.0-pre.2", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", + "libnpmpack": "^5.0.0-pre.4", "lodash.clonedeep": "^4.5.0", "nock": "^13.2.4", "tap": "^16.0.1" @@ -39,18 +39,18 @@ "bugs": "https://github.com/npm/cli/issues", "homepage": "https://npmjs.com/package/libnpmpublish", "dependencies": { - "normalize-package-data": "^4.0.0", - "npm-package-arg": "^9.0.1", - "npm-registry-fetch": "^13.0.0", + "normalize-package-data": "^5.0.0", + "npm-package-arg": "^10.0.0", + "npm-registry-fetch": "^14.0.2", "semver": "^7.3.7", - "ssri": "^9.0.0" + "ssri": "^10.0.0" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.0", + "version": "4.6.2", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/workspaces/libnpmsearch/CHANGELOG.md b/workspaces/libnpmsearch/CHANGELOG.md index 3781e5509064a..1776bfd51bb55 100644 --- a/workspaces/libnpmsearch/CHANGELOG.md +++ b/workspaces/libnpmsearch/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [6.0.0-pre.1](https://github.com/npm/cli/compare/libnpmsearch-v6.0.0-pre.0...libnpmsearch-v6.0.0-pre.1) (2022-10-19) + +### Dependencies + +* [`aa01072`](https://github.com/npm/cli/commit/aa010722996ef6de46e1bb937c6f8a94dc2844fa) [#5707](https://github.com/npm/cli/pull/5707) update the following dependencies + ## [6.0.0-pre.0](https://github.com/npm/cli/compare/libnpmsearch-v5.0.4...libnpmsearch-v6.0.0-pre.0) (2022-09-08) ### ⚠ BREAKING CHANGES diff --git a/workspaces/libnpmsearch/package.json b/workspaces/libnpmsearch/package.json index e2de6d468a286..2f058e1249e92 100644 --- a/workspaces/libnpmsearch/package.json +++ b/workspaces/libnpmsearch/package.json @@ -1,6 +1,6 @@ { "name": "libnpmsearch", - "version": "6.0.0-pre.0", + "version": "6.0.0-pre.1", "description": "Programmatic API for searching in npm and compatible registries.", "author": "GitHub Inc.", "main": "lib/index.js", @@ -25,8 +25,8 @@ "template-oss-apply": "template-oss-apply --force" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "nock": "^13.2.4", "tap": "^16.0.1" }, @@ -38,14 +38,14 @@ "bugs": "https://github.com/npm/libnpmsearch/issues", "homepage": "https://npmjs.com/package/libnpmsearch", "dependencies": { - "npm-registry-fetch": "^13.0.0" + "npm-registry-fetch": "^14.0.2" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.0", + "version": "4.6.2", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/workspaces/libnpmteam/CHANGELOG.md b/workspaces/libnpmteam/CHANGELOG.md index b60c408c685dd..19464fb867aae 100644 --- a/workspaces/libnpmteam/CHANGELOG.md +++ b/workspaces/libnpmteam/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [5.0.0-pre.1](https://github.com/npm/cli/compare/libnpmteam-v5.0.0-pre.0...libnpmteam-v5.0.0-pre.1) (2022-10-19) + +### Dependencies + +* [`aa01072`](https://github.com/npm/cli/commit/aa010722996ef6de46e1bb937c6f8a94dc2844fa) [#5707](https://github.com/npm/cli/pull/5707) update the following dependencies + ## [5.0.0-pre.0](https://github.com/npm/cli/compare/libnpmteam-v4.0.4...libnpmteam-v5.0.0-pre.0) (2022-09-08) ### ⚠ BREAKING CHANGES diff --git a/workspaces/libnpmteam/package.json b/workspaces/libnpmteam/package.json index d72edb526b4f2..47900228fa402 100644 --- a/workspaces/libnpmteam/package.json +++ b/workspaces/libnpmteam/package.json @@ -1,7 +1,7 @@ { "name": "libnpmteam", "description": "npm Team management APIs", - "version": "5.0.0-pre.0", + "version": "5.0.0-pre.1", "author": "GitHub Inc.", "license": "ISC", "main": "lib/index.js", @@ -15,8 +15,8 @@ "template-oss-apply": "template-oss-apply --force" }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "nock": "^13.2.4", "tap": "^16.0.1" }, @@ -32,14 +32,14 @@ "homepage": "https://npmjs.com/package/libnpmteam", "dependencies": { "aproba": "^2.0.0", - "npm-registry-fetch": "^13.0.0" + "npm-registry-fetch": "^14.0.2" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.0", + "version": "4.6.2", "content": "../../scripts/template-oss/index.js" }, "tap": { diff --git a/workspaces/libnpmversion/CHANGELOG.md b/workspaces/libnpmversion/CHANGELOG.md index 75668ee2bfc8f..cc16ed2f34af8 100644 --- a/workspaces/libnpmversion/CHANGELOG.md +++ b/workspaces/libnpmversion/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [4.0.0-pre.1](https://github.com/npm/cli/compare/libnpmversion-v4.0.0-pre.0...libnpmversion-v4.0.0-pre.1) (2022-10-19) + +### Dependencies + +* [`aa01072`](https://github.com/npm/cli/commit/aa010722996ef6de46e1bb937c6f8a94dc2844fa) [#5707](https://github.com/npm/cli/pull/5707) update the following dependencies + ## [4.0.0-pre.0](https://github.com/npm/cli/compare/libnpmversion-v3.0.7...libnpmversion-v4.0.0-pre.0) (2022-09-08) ### ⚠ BREAKING CHANGES diff --git a/workspaces/libnpmversion/package.json b/workspaces/libnpmversion/package.json index 5cdeec0bd7261..8fa92246542ee 100644 --- a/workspaces/libnpmversion/package.json +++ b/workspaces/libnpmversion/package.json @@ -1,6 +1,6 @@ { "name": "libnpmversion", - "version": "4.0.0-pre.0", + "version": "4.0.0-pre.1", "main": "lib/index.js", "files": [ "bin/", @@ -31,16 +31,16 @@ ] }, "devDependencies": { - "@npmcli/eslint-config": "^3.1.0", - "@npmcli/template-oss": "4.5.0", + "@npmcli/eslint-config": "^4.0.0", + "@npmcli/template-oss": "4.6.2", "require-inject": "^1.4.4", "tap": "^16.0.1" }, "dependencies": { - "@npmcli/git": "^3.0.0", - "@npmcli/run-script": "^4.1.3", - "json-parse-even-better-errors": "^2.3.1", - "proc-log": "^2.0.0", + "@npmcli/git": "^4.0.1", + "@npmcli/run-script": "^5.0.0", + "json-parse-even-better-errors": "^3.0.0", + "proc-log": "^3.0.0", "semver": "^7.3.7" }, "engines": { @@ -48,7 +48,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.0", + "version": "4.6.2", "content": "../../scripts/template-oss/index.js" } }